Deye SUN-3.6K-SG05LP1-EU-AM2-P Help Home Assistant

Hello everyone,

I have a Deye SUN-3.6K-SG05LP1-EU-AM2-P inverter and I’m trying to integrate it locally with Home Assistant.

I would like to use Modbus RTU over the RS485/METER port instead of relying on Deye Cloud.

So far I have:

  • Tested a USB-to-RS485 adapter.
  • Tried all available communication ports on the inverter.
  • Tested different A/B wiring combinations.
  • Tried Modbus RTU communication, but I only get timeouts (no response from the inverter).

Deye support has already sent me the official Modbus register map for this inverter, so I believe local Modbus should be supported.

My questions are:

  1. Has anyone successfully connected a SUN-3.6K-SG05LP1-EU-AM2-P locally via the RS485/METER port?
  2. What communication settings are you using?
  • Baud rate
  • Parity
  • Slave ID
  1. Which RJ45 pins are connected to RS485 A and B?
  2. Are there any settings in the inverter that must be enabled first?
  3. Does this model require a Modbus TCP gateway instead of a direct USB-RS485 adapter?

Any advice or configuration examples would be greatly appreciated.

Thank you!

I have a Solis Hybrid inverter, so I don’t know the particular details of your Deye other than reading the manual online.

Inverters connect to the battery BMS over the CAN port (which sometimes can include RS485 as well, used to talk with the battery).
There will also be an RS485 meter port. This goes to the power meter used to measure the grid import/export.

You will not get anything out of the meter port, so you need to look for a Modbus / Comms port. The Modbus protocol works as ‘master’ and ‘slave(s)’ with only one master that does all the talking, and one to many slaves that respond to the master read/write requests. For the meter port, the inverter is the master and the meter the slave. The inverter reads the meter, and will not respond itself to any read requests over that port.

For reading the inverter details, you need the computer to be the master and the inverter the slave. There appears to be a ‘Modbus’ port on your inverter.

Serial RS485 settings are most likely to default to 9600 baud, no parity, one stop bit. Slave ID should be set to ‘1’ (which is the most commonly used setting) and your inverter must be a Modbus Slave.

The manual suggests the RJ45 port pins are 1-B 2-A and also 7-A 8-B, which I have never seen before but does mean that you don’t have to worry about which way around the plug is! You are unlikely to need ground, and you may need terminating resistor(s) but only if you are getting occasional errors on the connection.

As always with Modbus, the A-B can be wrongly labelled [particularly on cheap USB adapters] so always try swapping them over. Always use a twisted pair from a cat cable.

USB adapters can work, but it is noted that these use various chip sets, some of which don’t work well/at all. If you have a long enough cable, try using the USB adapter in a Windows PC which is likely to have the necessary drivers, and you can easily find Modbus software that can be used to test the connection.

Whilst USB-RS485 adapters can work OK, the use of a Modbus TCP gateway can make it all easier. As long as you use an RS485-Ethernet adapter that is Modbus aware and can perform Modbus RTU to Modbus TCP translations, and you can get access to your LAN for the adapter location, Modbus TCP is easy to work with. Adapters usually have easy webpage configuration and helpful tools such as self-test and loopback-test.

I hope that has been of help to you. Modbus can be challenging as everything (settings, cable, adapter, software) has to be correct or nothing works.

Thank you for your detailed explanation.

My inverter model (SUN-3.6K-SG05LP1-EU-AM2-P) does not appear to have a dedicated “MODBUS” RJ45 port — only BMS (CAN/RS485) and METER.

Deye support has already provided me with the official Modbus register map for this model, which suggests that Modbus access should be available somehow.

Has anyone with this exact model successfully read inverter registers locally?

If yes:

  • Which physical port did you use?
  • Was it direct RS485 or through the WiFi/LAN logger?
  • Did you have to enable any installer/service setting?

This thread resonates. I’m planning on doing exactly this with the same Deye model I had installed a few weeks ago with my PV. Deye cloud has served me well but I plan to move local now, however I’ve yet to install HA and have only just signed up a moment ago to this forum.

I’ve spent last 3 days musing how to achieve your goal @cdee and am currently awaiting an SSD to mod a Macmini to run HA with the Deye via it’s Modbus port to a ESP32/RS485 TTL gizmo that seems like the optimal solution. The best video I’ve found is from a polish YouTuber. So I’m making a (shopping) list and checking it twice, and plan to have it all rocking by early September. :crossed_fingers:

You may want to check this out:

I have connected my ESP2 over MAX485 with the Meter-Port of my DEYE SUN-5K-SG05LP1-EU successfully and get 299 registers answered with “a lot” content. Only some areas are ‘0’. Few.

I did this because I have two Inverters parallel so I cannot want not to interfere this important comm-channel and the CAN-Port is occupied with JK BMS. So I tested and had success.

Regards Jörg

Hi,
do you use the Lilygo T-CAN485 or a different module?

i managed it successfully after some hardware and software fiddling.

you might share your final software and informations about hardware changes?

esp32U+RS485 jumper wire connected and ethernet wire connected to deye modbus port directly powered via USB to a 2014 macmini. then flashed via esphome website. its working well now and after a week ive removed the deye datalogger because the two systems fight for inverter control. Am rebuilding the dashboards in HA. its crucial to maintain some physical separation between components instead of stuffing ESP32 inside of metal Deye inverter or next to macmini metal chassis.

Paul: thanks for your infos.
You removed the datalogger because they fight for inverter control…
If I only want to use the RS485-Interface for reading registers not writing and let the datalogger as interface to the cloud. Is there any chance for coexistence, or does this make problems too?
Just printing a case for the T-CAN485 to hold it outside the Inverter-case

i tried that for about a week - as it took a long time to cross check each AI reflash of the ESP32 even with documentation to ensure I had the valid registers mapped - and yes it can coexist as long as you accept that the deye datalogger will act as the master and overwrite any Home Assistant set values which will act as the slave. (I used a chinese sweet & sour pork takeway plastic tray for my ESP32 and gubbins). It’s taken a few weeks to recreate the Deye Cloud and more custom dashboards but I’m very satisfied with the result now. I will probably decrease latency (currently 5secs) by offloading the Bluetooth tasks of the ESP32 to another one as the next phase. In a perfect world I would have hard wired the modbus output to the home router but it’s not possible in my case.

The only possible limitation so far relative to the Deye Cloud setup is firmware updates and easier AI automation - but I can overcome both of those and I’m not (yet) prepared or want to allow AI automation of the PV/battery operation.

Truth be told, there is way more advantage using HA, local control and ultra personalisation, than reliance on manufacturers app and services.

I have the inverter SUN-8K-SG05LP1-EU-AM2-P and I am unable to get responses through MODBUS port 8 with ATOM S3 Lite + TailRS485. Any solution?