Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A much better way of connecting Home Assistant to your DEYE/Sunsynk inverter

Featured Replies

  • Replies 171
  • Views 53.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • daisy chain RS485 think of the RS-485 Master as the esp32 device 1= master sunsynk  device 2 = slave sunsynk 

  • @Yuri thanks for sharing this. I've included some additional sensors and changed some of the friendly names for consistency with the latest Dashboard and other configs. @Sc00bs I've uploaded to Github

  • I have just completed it8KW Sunsynk Master-Slave .txt

Posted Images

  • Author
7 minutes ago, Tonytex230 said:

Hi Gambit

Yes ... I tried Modbus 1 & 2 also tried setting up the Inverter as Slave and Master with the same results.
 

I feel your pain @Tonytex230 , sometimes they just don't seem to work for no plausible reason. 

I resoldered connections till I was blue in the face and then other times they just worked. 

I think that there are just too many moving parts to make fault finding an easy process with the board setup. 

Hi,

Firstly thank you @Sc00bs @slipx (and anybody else that I have missed) for your contributions! Much appreciated!

Having an issue with the PV energy readings, wondering if anyone else has seen this happening?

Sunsynk 8kW (2x PV strings) with the ESP32 and the shield from Smart home integrations.

Today for example, the Sunsynk app reports 7.3kWh but I get 5.3kWh readings, as below.

However in the Energy Dashboard, I use the Total sensors for PV as source (Modbus address 96) and this reports correctly for today:

image.png.191afcedf24d01af9ace7387262f3628.png

 

ESPHome log:

[20:06:04][D][sensor:094]: 'Solar PV Day Energy': Sending state 5.30000 kWh with 1 decimals of accuracy

Sensor:

  - platform: modbus_controller            #108 PV Day Energy
    modbus_controller_id: inverter
    name: "${name} PV Day Energy"
    id: sunsynk_pv_day
    register_type: holding
    address: 108
    unit_of_measurement: "kWh"
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.1
    value_type: U_WORD 

The time is correct on the inverter.

Any thoughts please?

Thanks in advance.

Rob

22 hours ago, Sc00bs said:

Hi @RobO 

What does it say on your inverter screen? 

Hi @Sc00bs

Shows 7.3kWh for yesterday.

As a test, yesterday I created a Utility Meter helper (Daily cycle), referencing the Total PV energy readings (Modbus address 96) and this reports correctly for today.

@RobO When you click on that sensor in home assistant what does the state history graph look like. Does it reset to zero at some stage and start calculating again?

You can also create energy meters on the ESP32. They tend to be a more reliable than the those daily registers which tend to reset themselves every now and then

https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/blob/a3f9d4c4b93b31a24c84bc2c15fda4fc7ff496f5/ESPHome-1P-Sunsynk-Deye.yaml#L1019-L1033

On 2024/08/16 at 12:47 AM, slipx said:

@RobO When you click on that sensor in home assistant what does the state history graph look like. Does it reset to zero at some stage and start calculating again?

You can also create energy meters on the ESP32. They tend to be a more reliable than the those daily registers which tend to reset themselves every now and then

https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/blob/a3f9d4c4b93b31a24c84bc2c15fda4fc7ff496f5/ESPHome-1P-Sunsynk-Deye.yaml#L1019-L1033

@slipx it does! And shows correctly on the inverter console

 

image.png.0a7809c0f46360e6ca5962467df12015.png

Added your local sensor, thanks! 

All 3 compared. Wonder what is going on:

image.png.fea4c1e6dc38b87c292b70185d0d4781.png

The daily reset at midnight is expected. I meant for those instances where there is a mismatch can you see an abnormal reset in the sensor value where it starts counting again which would cause the under reporting.

18 hours ago, slipx said:

The daily reset at midnight is expected. I meant for those instances where there is a mismatch can you see an abnormal reset in the sensor value where it starts counting again which would cause the under reporting.

But it's resetting during the day as per the previous graph, just after 2PM. Today it reset twice during the day:

image.png.4003753826f4b1aa86e73283f51b1255.png

Might request a firmware upgrade on the unit and don't want to hijack this thread (sorry!) 🙂

Thanks for checking it though!

 

Hi, I've been going round in circles and i can't seem to get this working.

I have an ESP32 with an RS485 Shield (ordered from Electrodragon.com) which i have installed the YAML on as per your instructions in the Youtube Video (https://www.youtube.com/watch?v=EN5GjEbM4fo)

I bought a cat5 splitter cable from SolarAssistant website as i also have 2 batteries in my system. I have a 3.6kwh inverter.

All i'm getting from the logs are no response or duplicate modbus command errors....

Can anyone help or shed any light on this?

Thanks! 

[14:19:52][C][modbus_controller:341]: ModbusController:
[14:19:52][C][modbus_controller:342]:   Address: 0x01
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=84 count=3
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=90 count=2
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=96 count=2
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=108 count=5
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=150 count=1
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=154 count=1
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=182 count=3
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=186 count=2
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=190 count=5
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=210 count=2
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=217 count=6
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=230 count=3
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=293 count=1
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=314 count=2
[14:19:52][W][modbus_controller:179]: Duplicate modbus command found: type=0x3 address=326 count=1
[14:19:52][W][component:237]: Component modbus_controller took a long time for an operation (141 ms).
[14:19:52][W][component:238]: Components should block for at most 30 ms.
[14:19:53][D][modbus_controller:040]: Modbus command to device=1 register=0xBA countdown=0 no response received - removed from send queue
[14:19:54][D][sensor:094]: 'ESPHome Web 8a7164 Essential Power': Sending state nan W with 0 decimals of accuracy
[14:19:54][D][sensor:094]: 'ESPHome Web 8a7164 Nonessential Power 1': Sending state nan W with 0 decimals of accuracy
[14:19:54][D][modbus_controller:040]: Modbus command to device=1 register=0x125 countdown=0 no response received - removed from send queue
[14:19:55][D][sensor:094]: 'ESPHome Web 8a7164 Essential Power 1': Sending state nan W with 0 decimals of accuracy
[14:19:55][D][sensor:094]: 'ESPHome Web 8a7164 Solar Power': Sending state nan W with 0 decimals of accuracy
[14:19:56][D][modbus_controller:040]: Modbus command to device=1 register=0x13A countdown=0 no response received - removed from send queue
[14:19:56][D][sensor:094]: 'ESPHome Web 8a7164 Nonessential Power': Sending state nan W with 0 decimals of accuracy
[14:19:57][D][modbus_controller:040]: Modbus command to device=1 register=0x146 countdown=0 no response received - removed from send queue
[14:19:58][D][modbus_controller:040]: Modbus command to device=1 register=0x54 countdown=0 no response received - removed from send queue

 

IMG_6378 Large.jpeg

IMG_6379 Large.jpeg

Screenshot 2024-08-22 at 14.11.36.jpg

  • Author

Hi @aderrington

Happy to help if I can.

Where are you located? 

You have the correct pins in the config selected so it isn't that.

Maybe post your YAML file so we can check that.

You are using Orange/White & Orange on pins 1 & 2 I assume, a photo of the connector please.

Also photo of your inverter internals where you have the cables plugged in. 

Would try connecting directly to the RS485 port without the splitter cable and see if you have better luck. 

Why do you have two battery connected to your inverter? Batteries are usually daisy chained together with only one, the master, connected to the inverter?  

@Sc00bs

🤦‍♂️

So turns out i'm an idiot and didn't properly look at the PCB internally, From everything i'd read online, i believed all Sunsynk 3.6 inverters had a combined CAN / RS485 connecter.... Mine has it's own.

I had thought i'd tested that weeks ago, however it was only a few days ago i found where the ModBus address is located, and had to change mine from 00, Which, with the YAML i'd used would have never worked (It was looking for 01)

Also, the battery is daisy chained, i only specified that for clarity of the whole system.

It is all now working great! Just wish i'd looked more throughly earlier.

Thanks for your reply! As without it i probably wouldn't have bothered opening it back up again.

So with my initial rush to get everything setup, my HAOS is running, I have my dongle and adapter board, the dashboard loaded, ESPhome running and that is as far as I got. Between studying and life, I didn't get to flash my dongle. I am a bit unsure what gets flashed to the dongle. If HA is on a different physical network than the one the dongle is connected to, is there a way for this to work? Or should I just place a Hotspot close by.

It also looks like my Huawei AP's create a different network apart with a different IP range from the Main router. It's a weird setup and would like to put new AP's but these are new so I don't want to waste them.

  • Author
19 hours ago, shaun99 said:

So with my initial rush to get everything setup, my HAOS is running, I have my dongle and adapter board, the dashboard loaded, ESPhome running and that is as far as I got. Between studying and life, I didn't get to flash my dongle. I am a bit unsure what gets flashed to the dongle. If HA is on a different physical network than the one the dongle is connected to, is there a way for this to work? Or should I just place a Hotspot close by.

It also looks like my Huawei AP's create a different network apart with a different IP range from the Main router. It's a weird setup and would like to put new AP's but these are new so I don't want to waste them.

Hi @shaun99 

Just needs to be able to connect to the wifi and be on the same network as your HAOS server.

  • Author
20 hours ago, aderrington said:

@Sc00bs

🤦‍♂️

So turns out i'm an idiot and didn't properly look at the PCB internally, From everything i'd read online, i believed all Sunsynk 3.6 inverters had a combined CAN / RS485 connecter.... Mine has it's own.

I had thought i'd tested that weeks ago, however it was only a few days ago i found where the ModBus address is located, and had to change mine from 00, Which, with the YAML i'd used would have never worked (It was looking for 01)

Also, the battery is daisy chained, i only specified that for clarity of the whole system.

It is all now working great! Just wish i'd looked more throughly earlier.

Thanks for your reply! As without it i probably wouldn't have bothered opening it back up again.

Glad you worked it out 🙂 

1 hour ago, Sc00bs said:

Hi @shaun99 

Just needs to be able to connect to the wifi and be on the same network as your HAOS server.

I understand it should be on the same network so I'll install an AP in the garage or behind the wall the inverter is on. It just means running more cable to the switch. I don't like using them in repeater mode. So that said, I have a bunch of plans to integrate some other things with HA.

So my next question would be if the data displayed on HA can be used by another Esp32 to give a mini dash with limited info.

Cheers

  • Author
1 hour ago, shaun99 said:

I understand it should be on the same network so I'll install an AP in the garage or behind the wall the inverter is on. It just means running more cable to the switch. I don't like using them in repeater mode. So that said, I have a bunch of plans to integrate some other things with HA.

So my next question would be if the data displayed on HA can be used by another Esp32 to give a mini dash with limited info.

Cheers

Easiest is to buy a mesh system, makes life much easier. 

Which port can I connect to if my DEYE 6K inverter only has one combined 485/CAN communication port and it is occupied by the battery?  The other one on the top left is labeled for use with a energy meter only.

What update_interval can be used? I see 15 seconds as default in yaml. Will 5 seconds or less work?
I am currently using the original wifi dongle connection with kellerza/sunsynk integration with a 5 second update_interval  and it generally works fine, but sometimes there are read errors.

 

Снимок экрана 2024-08-27 175929.png

Edited by m3n

  • Author

Easiest is to split the RS485/Modbus port using a double ethernet wall mount box with a cable from the inverter to the box splitting out the cables as shown below to each of the plugs and you can then plug your battery into one plug and the ESp32 into the other.

image.png.3fb1f26a9a3651fd1938059d41531de5.png

 

 

image.png.b2349ea73c2900a4cda57d0a89221b42.png

  • 3 weeks later...
10 hours ago, apdcentral said:

Hi, I love it, I have 2x Luxtek 5kw inverters in parallel, connected to 4 batteries with 24 Solar Panels. Took me a while to get all the sensors connected over time and into HAimage.thumb.png.6f9cdf6d8cdc87d40eae862372c86409.png

image.png

Daytime view, solar forecast pretty dam close tuned in image.thumb.png.4f64c11e03fb53dd3ef44722bb4a7da6.png

image.thumb.png.9c7ce0149f2958af8d301b4f627857bc.png

Afternoon all. So I'm still procrastinating and haven't flashed my dongle yet. But that is not the point here. I had a look at the schematic or at least the bit of info there is on the RS232 circuit board fitted to the 5kW inverter that the Solarman/Sunsynk wifi logger dongle plugs into and found that there is 12v power fed to the board. It may be possible to tap off of this to drive the electrodragon board. This is only when you need the 12v to drive the adapter board.

When and if I get it done I will take a picture and post it here unless it's been done already.

Thanks

  • Author
11 minutes ago, shaun99 said:

Afternoon all. So I'm still procrastinating and haven't flashed my dongle yet. But that is not the point here. I had a look at the schematic or at least the bit of info there is on the RS232 circuit board fitted to the 5kW inverter that the Solarman/Sunsynk wifi logger dongle plugs into and found that there is 12v power fed to the board. It may be possible to tap off of this to drive the electrodragon board. This is only when you need the 12v to drive the adapter board.

When and if I get it done I will take a picture and post it here unless it's been done already.

Thanks

 

The RSD usually (11,12) depending on the model inverter, provides 12Vdc output when the inverter is on

Just make sure you get the polarity correct otherwise you will blow your shield up as they do not have polarity protection. 

image.png.51663f30611fd2188a3c3ecfb4c322bd.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.