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.

My Sunsynk 8Kw & data collection setup

Featured Replies

The direction of flow is determined by the positive or negative value in the sensor so we still need to reference that somewhere. You can always create a new sensor that only displays absolute values. BTW I like your idea of the smart battery. Going to include.

  • Replies 657
  • Views 182.3k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • If you want to try this card in home assistant follow these steps. 1. Create a new directory under www/community/ and name it sunsynk-card. If you don't have HACS installed you can create directo

  • Hi all. Here is my version to get Sunsynk 8.8 Modbus metrics in Home Assistant: Required Hardware: ESP32 Development Board @R149.95 https://www.diyelectronics.co.za/store/espressif-iot/1495-

  • Thought I would also contribute with something small. Not as impressive as what some of the others here but a contribution nonetheless. The GUI for Sunsynk System Mode, or lack thereof, has reall

Posted Images

3 hours ago, slipx said:

The direction of flow is determined by the positive or negative value in the sensor so we still need to reference that somewhere. You can always create a new sensor that only displays absolute values. BTW I like your idea of the smart battery. Going to include.

@slipx this is how I'm currently doing it:

- bind: >-
      return hass.states["sensor.sunsynk_battery_output_power"].state < "0" ?
      hass.states["sensor.sunsynk_battery_output_power"].state*-1 + ' W' :
      hass.states["sensor.sunsynk_battery_output_power"].state + ' W'

Not elegant at all, but it works.

On 2023/03/14 at 10:06 PM, JDSym said:

@slipx this is how I'm currently doing it:

- bind: >-
      return hass.states["sensor.sunsynk_battery_output_power"].state < "0" ?
      hass.states["sensor.sunsynk_battery_output_power"].state*-1 + ' W' :
      hass.states["sensor.sunsynk_battery_output_power"].state + ' W'

Not elegant at all, but it works.

I've added it. Also made some other fixes

  • 3 weeks later...
  • Author
On 2023/03/02 at 5:15 PM, CorneSchutte said:

"My" ESPHome code, which is a combination of others work before me.

But I believe the Deye registers are completely different?

I hope it helps!

FYI - Just plugged the ESP32 I was using on my 8kw Sunsynk into my new 16Kw DEYE and works without any modificiations. 

The only thing I anticipate having to change/add is the new registers for PV3 if I decide to use the 3rd MPPT controller. 

7 minutes ago, Sc00bs said:

FYI - Just plugged the ESP32 I was using on my 8kw Sunsynk into my new 16Kw DEYE and works without any modificiations. 

Does writing to registers also work?

  • Author
On 2023/02/07 at 12:10 PM, Sc00bs said:

@jacauc Have you noticed any issues with the ESP32 and reading you are getting from it after the latest updates? 

I started getting all sorts of weird reading SOC @ 3800 etc after I did some updates on the 5th. 

I think it may have something to do with the updates of Home Assistant core from 2023.1.7 to version 2023.3.2 as when I roll it back the issues go away. 

Was wondering if you have experienced the same issue? 

Turns out that these issues were as a result of me locating the ESP32 in the inverter in an attempt to neaten everything up 😝

  • Author
1 hour ago, Denarius said:

Does writing to registers also work?

Can't see why it wouldn't but I haven't tried as yet so will have to report back. 

The registers look the same except for the extra Power/Amperage&Voltage registers for the 3rd MPPT controller.

I think that it is the 3-Phase inverters, DEYE & Sunsynk, that seem to have a number of differences.

  • 2 weeks later...
On 2023/04/01 at 1:16 PM, Sc00bs said:

Can't see why it wouldn't but I haven't tried as yet so will have to report back. 

Hi @Sc00bs, I also think it should work, but just in case it doesn't,  I'm wondering if you have tried writing to it yet.

Hi All,

I just bought/Installed my 5kva Sunsynk inverter. And on my inverter I only have the following ports.
METER, BMS 485/CAN, DRMs, parallel_1,parallel_2AJFCJaXBQ-jM5mM5dURQHmVKOyVYczJWzZu4acK3Wtid86-E9zzhtN8yOsXVWtnOu7_uiVFKUN9UfcxvJXIejU02IUPEioe6L6u4Xoz8sjwjPBd6zhO6kz0o1r9P2K7OjYwKxPps1LO8WCpPfxnoFHewnreb8_ZJD3LGLTdERvc-IKbOZgDD9hiuNreFmjY3zf5IY0dylLnmobP4kmOoHbkYwISlH8j7FlA97rBptRBV0rtd9tfxlgRpwaSXiRbDBvvW8lZ1jMPLG3zrwobM17xg0UT_bb8Evx78ytz2kJknO1JsfJqGw6JWwXgVXQGyIKCziBPa1InDLNvKAdlM6jtvun1JXn6OYUvvgOcgof4LMSng0F0S9kakH4IC7h_39ru_avMtuVv-cS6BJLvnqweJM5NP8oKulDslS_A_5__BB7ntz2f86j6NqKKz287E2vOaAvYwn4Kz3Ciu8VGhVwiLa3dsWsKGHqhKkHad6Ymp46Ht0Gk_PGCGLaEfNOicfBj8LRhUgKZjZSKfuLLYrM5MyJx-IcpDOVKUG_Sbm2jWza8yP9jURwXvCe6pIpl88SFS0-0fVg_bpc8yXRDi-xTh8qSUp-evI1_zMJCTUhT5BUT8VrS7wG-KafDBfuPhma6NSOHWFvo6q0ieKI-PlY0qleTYKSvbHoeRkoqdaT02e8m6N4m2-FlbsY6gNiAuIjDi5bhyJovDYkxf1yTpPgxqIaNhRAUoiFAZ2dTXcgKegDZtUuMHiPbKmuwb8JcTRX3PNCebFsuBWdh0IJkUXTlzWnK7nBcPhUdU96wlBJKy68twEVSnTI8vImNeM7Rny1fCkqef-h772z1x1R0JN7g5UdJRgdaiBl9ME3kFuuEGBY7g6fdpz5HdExkimzUgaHhwAU8haXRN1B7jmKmFcQ=w1583-h749-s-no?authuser=0

I've tried to use a splitter : https://www.takealot.com/rj45-cable-adapter-splitter-extender-for-cat6-cat5-cable/PLID91332572 and even without the splitter I'm unable to get any data back. I'm using https://github.com/kellerza/sunsynk to integrate to HA but getting the following info:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2023-04-12 19:49:09,129 INFO    Loading HASS OS configuration
2023-04-12 19:49:09,135 DEBUG   could not patch umodbus: numpy not found
2023-04-12 19:49:09,138 INFO    ############################################################
2023-04-12 19:49:09,138 INFO        Sensor deprecated: total_pv_power -> total_pv_energy
2023-04-12 19:49:09,138 INFO    ############################################################
2023-04-12 19:49:09,138 DEBUG   last unit:kWh, id:total_pv_power
2023-04-12 19:49:09,138 DEBUG   last unit:kWh, id:total_battery_charge
2023-04-12 19:49:09,138 DEBUG   last unit:kWh, id:total_battery_discharge
2023-04-12 19:49:09,138 DEBUG   last unit:kWh, id:total_grid_export
2023-04-12 19:49:09,139 DEBUG   last unit:kWh, id:total_grid_import
2023-04-12 19:49:09,139 DEBUG   last unit:%, id:battery_soc
2023-04-12 19:49:09,139 INFO    Filter *last used for battery_soc, total_battery_charge, total_battery_discharge, total_grid_export, total_grid_import, total_pv_power
2023-04-12 19:49:09,139 DEBUG   Using selector: EpollSelector
2023-04-12 19:49:09,144 INFO    Reading startup sensors rated_power, serial
2023-04-12 19:49:19,154 ERROR   Timeout reading: 
2023-04-12 19:49:19,154 INFO    ############################################################
2023-04-12 19:49:19,154 INFO    No response on the Modbus interface, try checking the wiring to the Inverter, the USB-to-RS485 converter, etc
2023-04-12 19:49:19,154 INFO    ############################################################
2023-04-12 19:49:19,155 CRITICAL This Add-On will terminate in 30 seconds, use the Supervisor Watchdog to restart automatically.
2023-04-12 19:49:49,186 DEBUG   Close <_UnixSelectorEventLoop running=False closed=False debug=True>
[cmd] ./run.py exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

I've tested my cable with an older sunsyk inverter and it's getting the relevant data. Have anybody got data back on the "new"(combined port) inverters?

Regards

 

 

 

- use the multi addon

- use mbusd to connect to the serial port

- modbus id = 1 (16 is not supported today)

- should still be pins 1-3. Plug out the bms/can cable and plug in the modbus cable

30 minutes ago, JDB007 said:

Hi, yes both set to 16. And did try 1 as well.
image.png.ba17595ee836d998fd4f6ca38027c54d.png

 

image.thumb.png.885a5bb75621a6f23d3b530b000d353d.png

 

Also used pins 6,7and 8. 

No luck!

On the inverter - set the Modbus ID:

https://powerforum.co.za/uploads/monthly_2023_01/image.png.eafb1c5b5c8635e5c9582f18d0b903f8.png

On MQTT, set the ID the same:

Question for the guys using the modbus home assistant integration. Did you put your geyser on non essential or essential load? I'm about to upgrade from a growatt to a deye 8kw. I'm running a smart switch on my geyser currently. Problem I have, when utility goes off, so does the smart switch - currently geyser is straight on mains till i move over to deye/sunsynk, but assuming on the non essential load on the deye the same would occur, when utility is off, and no excess pv or night time, no power will be fed to geyser and thus smart switch will be off.  This is not ideal as the smart switch is there for more finer tuning and control with automations. From my limited understanding I'm guessing If the geyser is on non essential and wants to warm and there is no pv available, it will pull from grid. I want to be able to limit and fine tune the grid draw and maximise PV warming. Assuming If it's on essential you just configure an automation to turn off smart switch when load shedding kicks in so it doesn't eat the batteries. Or am I getting this all wrong, what did you guys do, just leave the geyser on 247 on non essential? Only other thing I can think of is to find a smart switch that has a seperate power source for the microcontroller, so I can keep the switch working on non essential, or modify my current switch and solder on some DC wires and start a fire. That way the geyser doesn't go through the invertor but I still have control.

Edited by roadkill
More info

  • Author

Hi @roadkill

My advice would be to put the geyser onto the essential side of the inverter if you are going to be using Home assistant and a smart switch to control it. It is relatively easy to set up an automation to switch the geyser off when required, using the grid frequency (load shedding), battery SOC and power production data.

If you don't want to use Home Assistant then I would connect it to the non-essential side of things as it will definitely stop the geyser from flattening your battery but you will loose out on some time that your geyser could be being power by your solar power. 

  • Author

I have 3 geysers that I heat from solar, I use the app to schedule my switching on/off of the geysers. 

I cycle through the geysers so as not to switch them all on at the same time as it would overload the inverter, the first one switches on at 9:30 and I give them 2 hrs each to heat up. 

I switch the geysers off in Home Assistant if we have load shedding (grid hz less than 40) and the inverter is not making enough power (less then 4kw). I don't use HA to switch the geysers on/off on the normal schedule, only to switch off during load shedding.   

@roadkill My geyser is on the Essential Load.

I have 2 geysers, which I heat sequentially.
I also have some logic that turns off the geysers
I have a timer to only run the geysers sequentially 10:30am to 17:00pm and 4:00am to 6:00am

During timed schedule (10:30am to 17:00pm and 4:00am to 6:00am):

  • If load shedding and battery is discharging -> turn off geyser

During 10:30am to 17:00pm, there is enough PV to run house, charge battery and heat geyser.

Edited by system32

@system32 @Sc00bs  Thanks for confirming, I thought as much. It would be nice to have the added safety of having the geyser on non essential, but i suppose it is not necessary and also the reason i am going for an 8kw instead of the 5kw so i can add more panels at a later stage. 

@roadkill it also depends on the size of your inverter. If you have a 5kW and a 4kW geyser element, rather put it on non-essentials.

Note that the Sunsynk/Deye can supply up to 2x its rater output for 10 seconds, so it should also be possible to switch off a geyser when the kettle/hair dryer is turned on.

Mine is on non-essentials and I manage the Inverter's load limit to ensure I don't discharge my batteries to the geyser during the evenings (while Eskom messes around with my geyser's smart switch), see here: https://kellerza.github.io/sunsynk/examples/a-mode#load-limit

 

 

  • 3 weeks later...

On the topic of geysers.
As i don't have solar yet, do anyone know of a "time-shift" automation i can look at?
I have my geysers on a fixed time schedule at the moment, but i would like to dynamic shift the time either forwards or back depending on the load shedding schedule.
Either in Node-RED or Home Assistant.

Hi guys,

Thanks for the awesome thread!

I'm in the process of purchasing all the components to integrate my soon to be installed Sunsynk 8kw Inverter into HA via an ESP32.

3 Quick q's in this regard:

  1. I'm planning on using @sjlouw's guide, found on page 3 - thanks for this!
    1. By going this route, I'm assuming that I won't need to setup any MQTT brokers or make use of @Klatremis's Sunsynk HA Addon. Is this correct that the ESP32 will send the sensor data via Wi-Fi to my HA instance?
  2. Slightly related to the above but trying to keep this simple, again, by using @sjlouw's guide, I don't need to purchase Solarassistant. Is this correct?
  3. Lastly, How are you guys powering your ESP32's?
    1. Is there a module that I can purchase to tap off USB power from the inverter itself?

Thanks once again :)

9 hours ago, Muttley said:
  1. I'm planning on using @sjlouw's guide, found on page 3 - thanks for this!
    1. By going this route, I'm assuming that I won't need to setup any MQTT brokers or make use of @Klatremis's Sunsynk HA Addon. Is this correct that the ESP32 will send the sensor data via Wi-Fi to my HA instance?
  2. Slightly related to the above but trying to keep this simple, again, by using @sjlouw's guide, I don't need to purchase Solarassistant. Is this correct?
  3. Lastly, How are you guys powering your ESP32's?
    1. Is there a module that I can purchase to tap off USB power from the inverter itself?

Thanks once again :)

1. Correct - there is no other component required as you are reading the modbus registers directly into HA.

2. Correct.

3. The inverters have a 12V output labelled "RDS" (rapid shutdown) which isn't in use in South Africa.  It is powered as long as the inverter is on.  I was contemplating running that through a 5V buck converter for the module.  (At least my Deye has that - not sure about the Sunsynk - might be model specific.)

However, I had more to run off 5V including a couple of fans, so would have exceeded the output limit of this port.  I rather opted for an external USB supply plugged into a socket next to my inverter's DB board.  Less neat, but requires no hacking.

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.