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.

SunSynk - Inverter Monitoring

Featured Replies

  • Replies 734
  • Views 205.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Thanks to @Bloubul7and all the other contributors. This is my HA dashboard. It has all I need to view at a glance. (PS: really impressed with the Sunsynk)  

  • Thanks for sharing. Did not know about the horseshoe or plotly cards. Added to Dashboard  

  • Think I figured it out. Copied the Raw Config file. EDIT: Open the file at the bottom with notepad or Text Editor. Copy and paste in Dashboard "Raw configuration editor" You need to install

Posted Images

On 2022/03/19 at 7:39 PM, Hannesvz said:

The thing that fixed the inverter not speaking back to me was the modbus sn was set to 0, when I set it to 01 it fixed the issue immediately. For curiosity I tried to put it back to 0 and was unable to do so. @kellerza you should add to your github that people should remember to set the modbus sn to 01 < .  Thanks for helping me everyone. :) 

Thanks - also been having issues trying to connect to my SunSynk.
I've just tested addresses 0-255, seems SunSynk only responds to the broadcast address 0.
Modbus RTU addresses are 1-255, with 0 being reserved for broadcast messages.

EDIT:
As mentioned by @_terminal below, the Modbus ID can be changed from the default broadcast 0 to another ID:
image.png.10b6c134b3faa207d886aa1cf9534d41.png

Edited by system32

16 hours ago, kellerza said:

@Hannesvz glad you got it fixed!
I would still change the wiring to be on a pair to minimise errors. No point in trying to fight the physics behind differential signals

Hey @kellerza

 

So you are saying is, it should be either the 

orange&white/orange pair 

or the Brown&White/Brown pair 

That you use? 

Makes sense, I just thought that using solid colours would be easier and less likely to get confused 🙂 

5 hours ago, Joerg said:

 

Yes, and 274-279 needs the first bit set to enable it in that timeslot.

tbh, I set 232 once and simply alter the program 268-279 (soc target % and charge from grid) for either load shedding or normal state

3 hours ago, Sc00bs said:

Hey @kellerza

 

So you are saying is, it should be either the 

orange&white/orange pair 

or the Brown&White/Brown pair 

That you use? 

Makes sense, I just thought that using solid colours would be easier and less likely to get confused 🙂 

they are pairs for a reason 😀. If you crimp them like you would ethernet cables it should in most cases be on a pair
https://github.com/kellerza/sunsynk#hardware

we are using extremely low data rates and short distances in most cases. In theory, on pairs, eth 1gbps can reach 100m and rs-485 1.2km as someone quoted.

but even for short distances, keep with the best practises!

2 hours ago, kellerza said:

Yes, and 274-279 needs the first bit set to enable it in that timeslot.

tbh, I set 232 once and simply alter the program 268-279 (soc target % and charge from grid) for either load shedding or normal state

That's odd. I can't poll 232 from my SunSynk 8kW. It shows an error. The rest works now. Some values show 0 like all the cumulative Values (week, month, year)...I guess these values are not working on my model..?

On 2022/03/20 at 6:40 AM, kellerza said:

they are pairs for a reason 😀. If you crimp them like you would ethernet cables it should in most cases be on a pair
https://github.com/kellerza/sunsynk#hardware

we are using extremely low data rates and short distances in most cases. In theory, on pairs, eth 1gbps can reach 100m and rs-485 1.2km as someone quoted.

but even for short distances, keep with the best practises!

I'd like to get a better understanding of how the write feature works in your library / addon.  I didn't see much info in the docs.  What are you writing and how does it work from HA?

6 hours ago, poldim said:

I'd like to get a better understanding of how the write feature works in your library / addon.  I didn't see much info in the docs.  What are you writing and how does it work from HA?

system_mode reads/writes the System Profile 😉 Which includes all these sensors.

In HA it is represented as a single dropdown/select control (see example screenshots)

The actual values in the presets are stored under /share/hass-addon-sunsynk on HA as yaml files. You can edit them and create new presets with different values. When you select UPDATE a file will be created with your current settings if that specific set of presets does not exist.

Then you simply rename the files, change basic parameters and UPDATE again.

In my example I change the time, capacity target % and charge from grid bit in slot 2. In slot 5 I simply allow charge from grid. To the left and the right you see other sensors I have included to visualize the system mode. (the system mode photo is simply one I had lying around and might not show 100% the values in HA)

image.png

Has anybody got the Waveshare RS485/CAN Hat (https://www.waveshare.com/rs485-can-hat.htm) working with Home Assistant OS? I have a working setup using a USB interface but I'm getting lots of Timeout errors, as discussed extensively on this thread.

I've got access to the host OS and have managed to get the hat configured as a CAN interface (as a test). I'm struggling to get RS485 working. Does anybody have any pointers?

ps: @kellerza I am very impressed with your Sunsynk add-on. That combined with the HA built in Energy Management and the power-distribution-card is very useful.

@JGB once you have the hat working as a CAN interface it might be as simple as connecting A&B instead of H&L. What I do miss from that HAT is the GND terminal and want to go as far as saying that it wont really solve your problems without it.

Although RS-485 don't need the ground, a voltage difference between the GND with the 2-wire RS-485 converters is not ideal. Most of the cheap 5V SMPS gives you some floating ground, so there will be difference between GND. Much better to use a RS-485 receiver with GND if you are experiencing issues! This is my current favorite transceiver - https://www.robotics.org.za/W17286 It includes GND & protection. They also sell a slightly cheaper version with GND, without the protection.

And the other important point is to keep the data lines on a twisted pair. You run this cable along/or cross AC and high current DC wires in the inverter. 

Thanks for the compliments. The addon really does what @Bloubul7 does with his Node-Red flows. It's only integrated much closer with HA and as a result simpler to deploy.

@JGB Check on your inverter under Advanced -> Multi-Inverter. If Modbus SN is set to 00 change that to 01. This solved my timeout issue. 

Edit: Likely not given you have an adapter that works.

Edited by _terminal

@_terminal Thanks. I tried to set the Modbus SN as suggested, but it didn't make a difference. 

@kellerza  I'm pretty sure the cabling is good. I crimped a RJ45 on both ends of the cable, tested it (with a network cable tester) and then cut the one end off to connect to the USB (https://www.robotics.org.za/RS485-3P). I used a twisted pair (1 + 2) for B and A and also used the ground (3). I'll give that Waveshare USB a try, although at this point, I think my problem may not be related to the choice of RS485 adaptor.

I'm getting the following in the logs:

Quote

2022-03-23 09:33:08,053 INFO    Connecting to serial:///dev/ttyUSB0
2022-03-23 09:33:08,138 INFO    ############################################################
2022-03-23 09:33:08,139 INFO                Inverter serial number '1234567890'
2022-03-23 09:33:08,141 INFO    ############################################################
2022-03-23 09:33:08,144 INFO    MQTT: Connecting to mqtt@mqtt_host:1883
2022-03-23 09:33:08,168 INFO    MQTT: Connection successful
2022-03-23 09:33:21,772 ERROR   Timeout reading: 
2022-03-23 09:33:34,789 ERROR   Timeout reading: 
2022-03-23 09:33:54,820 ERROR   Timeout reading: 
2022-03-23 09:34:12,848 ERROR   Timeout reading: 

Debug shows it polls a few times and then "freezes" for around 10 seconds followed by the "Timeout reading:" entry. I think there may be some other hardware problem, perhaps with the USB Interface on the Pi. I am getting data from the inverter. It's enough to have a useful dashboard, but it is slightly delayed with all the 10 second pauses related to the timeouts. More importantly, it is gnawing at me knowing these timeouts are occurring :)

image.png.03de1fdf75ddb023929da15dca2ef6e7.png

 

@JGB Other suggestions:

  • try mbusd as the serial interface and tcp from the addon
  • try the pymodbus driver
  • try just the minimum amount of sensors (On some inverter models if you read an unknown/undefined register there are strange results including timeouts)

 

On 2022/03/19 at 7:46 PM, Hannesvz said:

This dit work after all btw.

image.png.2fdf1969761b1af84301aac018b39200.png

 

Which RS485 port did you plug it into in the end? 

Interested to know which one works on the 5kw

 

I’m having the same issue and no luck in resolving it. My MQTT connects from node-red but the Inverter just keeps switching between connected, queueing, timeout, reconnecting, initialise, init, opened. Like i said i tried 2 different USB adapters and also 2 different RPI’s and the same thing happens. I have HA running with, node-red, influx MQTT etc all installed as HA add-ons. I've also tried a different RPI 3b with PI-OS and NR but exactly the same issue. I also tried a second usb adapter and a different network cable

question on the network cable - If i take a normal cat 5e cable and cut the one end off and connect it to the USB as per the diagrams mentioned in the forum will it work or do i have to re-crimp the RJ45 side?

thanks 

 

 

 

 

 

 

 

 

 

image

 

 

image.thumb.png.f49c402e97e7ad1d6f13af26291945ca.png

Edited by McAllstar

I assume that you connection is not working @McAllstar 

Have you check in Node Red if the requests are being sent out?

I would start with adding 2 x debug nodes onto the Modbus read screens in Node Red and tick the system status and node status boxes so that is displays what is going on with nodes.

The inverter node should also be polling data to the inverter and should flash between active & queing. The Modbus Que info should also be changing value as the data is queued. 

It should show you the requests being sent out to the inverter and then the response from the inverter.

image.png.9cc33c2dd2f421fb3cc4b8abf251fd48.png

If the requests are being sent out but your aren't getting any response. 

- Check if the USB-RS485 adapter lights are flashing

If they are flashing then there is something wrong with either the cable or the connection somewhere between the adapter and the inverter. Plugged into wrong port, Ethenet cable wired up incorrectly, wires not connected properly etc.

If the adapter is not flashing then I would suspect that there is a problem with either the setup of the USB port in Node Red or the USB-RS485 adapter. I have had experience with USB ports on raspberry pi's moving around with /dev/ttyUSB0 not always being the same port so would check that first. Check the USB settings in the Inverter node and try changing it from 0 - 1 and see if that helps or plug the adapter into a different USB port. 

If you are getting the data back from the inverter but can't see it in home assistant then I would check your database and MQTT settings. 

 

 

Edited by Sc00bs
More info

3 hours ago, McAllstar said:

question on the network cable - If i take a normal cat 5e cable and cut the one end off and connect it to the USB as per the diagrams mentioned in the forum will it work or do i have to re-crimp the RJ45 side?

There are two main ways that Ethernet cables are wired. T-568-A  & T-568-B 

B is the most common way and the way that was used for the diagrams that were provided. 

image.png.65f334a5e5d45428e82c787990b1d011.png

 

best is to wire it using one of the pairs 

Orange/White & Orange 

or 

Brown/White & Brown 

It will work using both pairs but only necessary to have one. 

 

 

 

 

 

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.