I wanted to read data from my Deye Inverter (Model SUN-5K-SG03LP1-EU) but my model do not have the RS486 plug fitted as shown in the Deye manual that mention it is "available on SOME models".
So RS232 is the only option. I downloaded 3 programs for ESP32 that claim to read RS232 data, but none worked on my inverter. The Modbus address they use are not valid/available on my inverter RS232 port.
I could not find any documentation on the Internet on Deye RS232 Modbus protocol. (If you have it please send to "EunomiaSolar" at gmail.)
So with a ESP32 Dev board I wrote some investigative programs and found addresses for 12 important data registers.
To be honest I am not an expert for this product but found some possibly helpful information. If it's not useable please put it into the next electronic garbage bin ...
On this page (in German language, you may have to use an online translator) users discuss how the Deye Wifi Logger (which they say is a Solarman Logger) works; Here is the essential point:
In current versions of the cFos Wallbox, there is a meter definition specifically for DEYE LP3 inverters. (Previously, users had to download the meter definition from the cFos website and upload it to the cFos Wallbox; this is no longer necessary today.)
In fact, the Deye Wi-Fi Logger (technically the Solarman Logger) listens on port 8899, allowing the cFos Wallbox to read out the relevant values. To enable this, when configuring the devices within the cFos interface, you must specify the local address of the Wi-Fi Logger in the following format: "192.168.x.y:8899i". Note well: that small, inconspicuous "i" is crucial, as it signals to the cFos Wallbox that the proprietary Solarman protocol is to be used.
You find a specification of the Solarman protocol here:
My Deye do not have the RS485 Modbus plug populated - so RS232 is the only way. Normally the WiFi dongle is in fact on RS232 as Ec2021 mentioned above, but I do not use the Deye Internet Web interface - so I unplug the WiFi dongle in any case.
The Modbus Documentation online seem to be for RS485, but I found none for RS232 and in my experimentation the addresses differ totally on RS232. Do anybody have it, or know where to find it? (See code on GitHub - link above, for the register addresses I found).
Secondly my ESP32 sketch have an HTML web interface that display all the data I found in real time(The most important fields) - so the WiFi dongle is unnecessary. However with more documentation I can add more data items.
The daily .CSV file is relay informative especially when you plot the data on a graph.
The beauty of the RS232 plus is that there is a 12V power supply that can drive the ESP32.
My ESP32 read the RS232 Modbus 100% fine after a big investigation and some trail & error searching for register addresses, but I would like documentation on Deye RS232 Modbus (RS485 is available) so I can access more registers.
Register addresses that I found on RS232 differ from the RS485 documentation online. (Why Deye ? )
On my Deye RS232 I use pin 2 and pin 3 as normal for data
gcjr I can assure you on my Deye the register addresses on RS232 differ totally from the manual on RS485 Modbus, however the Modbus protocol is the same.
If you do not have to apply to a standard you can specify your own use. Not always a good decision but some companies try to push sales of their own addon equipment by implementing non-standard interfaces...
In a lot of cases that's motivating makers to find their own solutions...
The addresses I found on my RS232 connections are below address 200 and they give valid data. (Online documentation addresses is above +- 500 for RS485)
See the list of addresses in the README.md file in :
It is a 9-pin connector but the signal attachment with pins vary with protocol. I did not know it as I have been always using it for async serial operation where Pins-2, 3 are used for data lines.
The protocol is standard Modbus, but the addressing differ as I explained above (and in the README.md files).
I used the standard Arduino library "ModbusMaster.cpp" but added a Poll function to improve speed of main loop(). Check it out in my source code.
Your other questions is answered in the four README.md files on GitHub (link above)
This is very helpful
They list 11 of the 13 registers I found with the same addresses in : Sensors | Deye/Sunsynk
I can work with this table and will share when I got it in .cpp format.
Thanks a lot
I found the following Deye registers from the link above - these are all below address 200. Still the registers above address 500 is not available on RS232 Modus - probably it is available on RS485
Load power 178
Inverter power 175
Inverter voltage 154
Inverter current 164
Inverter frequency 193
Battery charge limit current 314
Battery discharge limit current 315
Grid connected 194
Battery charging voltage 312
Battery shutdown capacity (R/W) 217
Battery restart capacity (R/W) 218
Battery low capacity (R/W) 219