Support for Sunways

  1. Sunways solar energy
  2. https://www.sunways-tech.com/

Where is their API?

They have a raw TCP socket API, I’ve asked their tech dept for more info as I can’t make much of the data.

I logged onto sunway-portal, and can see this:

So it might be possible to scrape the cloud, but it would be more efficient to directly tap into the API if at all possible. The Sunways inverter does have its own wifi hotspot, as well as connecting into the cloud (for use in the app and on the web).

Has anyone had any luck on extracting data from Sunways Inverter? Planning to set it up with HASS/Grafana to have an alert when PV is below a certain value.

I personally use an ESP Home integration for Sunways to read directly from the RS485 port.
In that case you have all available information in real time in Home Assistant.
I use it to adjust my EV charger, boiler etc.
You can find the project on Github:
ESP Home Sunways inverter

i stumbled upon that page before but i didn’t really understand it. It seems i need to buy the 2 hardware indicated in that page, and then solder it to the inverter?

I think plugging them in to the inverter.

I meant soldering the two boards lol

Yes, that is what is needed. Or perhaps a breadboard for testing.

Which Sunways devices are you interested in?
I would be interested in an intergartion of the NT family. I have an NT3700 myself.

What I’ve been able to find out so far is that you can find out about the URL
http://192.168.13.28/data/ajax.txt?CAN=1&HASH=00200405&TYPE=1
you can get a lot of data that the system used to provide via their portal by e-mail (no longer works since 2018).

The answer looks like this, for example:
1670 W;1631 W;1.6 kVA 0.0 kvar;479.4;232.2;3.5;7.0;1670.0;1631.0;—;—;1.00 ;4.32;882.4;889.8;882.4;132;1;0;NT3700
Service error+(906)
Service error+(907)
Service error+(909)
Service error+(911)
x
00200405;01;00000001

(I get the service error because the SD card is full after 14 years of operation)

479.4 should be the voltage on the DC side, 232.2 is the AC voltage.
I can’t quite interpret the values behind it yet. I’ll have to have a look in the system to see if it shows me the right values on the display.

The hash value in the URL is probably used to bypass caches. The value should be incremented with each call.

Unfortunately, I’m a novice when it comes to Homeassistant, but it would be great if someone could take care of it.

Translated with DeepL.com (free version)

This is what I can see when logged in to the system: