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

30 minutes ago, Sc00bs said:

Firstly, make sure that you disable the Flows that Bloubul did to write setting back to your inverter otherwise you may end up with your inverter settings being changed.

You only want to have the ModbusRead &  Inverter monitoring flows enabled.

Then I would disable all of the queries being sent except perhaps the SOC query and see if you are getting the data back using the debug option on the SOC.

If you are getting the data there then I would check in the InfluxDB to see if the data is being sent there.

I created another flow with all of the downloadable variables that I could find, it includes some that were not in Bloubuls flow and have attached it.

flows (2).json 47.83 kB · 1 download

Cool, i've done all that. Still getting all the errors like before, but MQTT is populating as well as influxdb. Will try serial expert

  • Replies 734
  • Views 208.4k
  • 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

I tried serial expert - made no discernable difference.

Looking at my ModBusRead flow I can see the inverter going from:

  • Initialize
  • Init
  • Connected
  • Queuing
  • Active
  • Timeout

Non-stop in a loop with about 2-5 seconds between each state.

All values populate into grafana and MQTT very well - albeit with about 1 minute delay. So inbetween all the errors, something is working but for some reason it seems to timeout soon thereafter.

Debug Errors range in the below:

Error: Client Not Ready To Read At State init
Error: Client Not Ready To Read At State reconnecting
Error: Timed out
Modbus Failure On State sending Get More About It By Logging

 

Not sure if this is supposed to be normal? @Sc00bs is your debug log empty?

I don't get errors from the Modbus connection in my debug.

I get an error from one of the headers, not sure which one it is and haven't spent the time to work which one is causing the issue as yet

What platform are you running on?  

I run mine on a Intel Nuc i5, so have plenty of processor cycles available.

I set my sample rate lower so as to keep the size of the Db a bit more manageable. 

 

 

I'm running on a raspberry pi 3b. The influx dB is on my Synology NAS and the mqtt broker is on my Home Assistant Pi4. 

Also brings me to another point. Is it possible to get all entities from mqtt automatically added to my home assistant? Should I change the topics to have a "homeassistant/sensor/" prefix? Or is there another simpler way? 

  • Author
11 minutes ago, jacauc said:

I'm running on a raspberry pi 3b. The influx dB is on my Synology NAS and the mqtt broker is on my Home Assistant Pi4. 

Also brings me to another point. Is it possible to get all entities from mqtt automatically added to my home assistant? Should I change the topics to have a "homeassistant/sensor/" prefix? Or is there another simpler way? 

Just check and make sure which ttyUSB has been assigned to your cable

Just now, Bloubul7 said:

Just check and make sure which ttyUSB has been assigned to your cable

It's ttyusb0. No other USB devices are connected to the Pi. When clicking the search button on node red, I'm given only two options: ttyusb0 and ttyama0

Could it be the power supply? Saw an undervolt warning. Will change power supply and see if it is any better. 

 

 

I am also running an a Pi 3 at 1.5sec polling rate.

Also have the under voltage warning on the Pi most of the time so dont think it is that either.

Are you sure your polarity on the 485 connections are correct? I would try swopping the 485 wires over.

Just now, LawnChairLarry said:

I am also running an a Pi 3 at 1.5sec polling rate.

Also have the under voltage warning on the Pi most of the time so dont think it is that either.

Are you sure your polarity on the 485 connections are correct? I would try swopping the 485 wires over.

Well, I did it exactly as I was explained. Wires 2 and 7 in A and 1 and 8 in B. Have a few of those usb converters, so tried another also to see if that eliminates the issue. Exact same results. 

I'm also guessing that if the polarity was wrong it wouldn't work at all. Mine works, just times out every few seconds 

What RS485 converter do you use? Might cause a problem. I run mine on a raspberry pi zero w without any problems.

I go from (inverter)RJ45 -> rs485 to usb converter -> usb extention cable -> usb to micro usb cable -> rpi zero. And also use a cheap usb power adopter without any problems

 

I have a few of these as per attached picture. 

I'm doing inverter rs485 port to Cat 6 to usb converter A/B and connected directly in the Pi 3B. 

I'm also thinking that the influx and mqtt connections are irrelevant since the timeout is between pi and inverter. 

 

Screenshot_20210519-095143.jpg

4 minutes ago, jacauc said:

I have a few of these as per attached picture. 

I'm doing inverter rs485 port to Cat 6 to usb converter A/B and connected directly in the Pi 3B. 

I'm also thinking that the influx and mqtt connections are irrelevant since the timeout is between pi and inverter. 

 

Screenshot_20210519-095143.jpg

I have heard numerous problems with those cheap ones. Best would be to try one of these.

https://www.robotics.org.za/RS485-3P?search=485

I'll try a third USB device to see if that works any better. Will hold off for now with the other devices. 

 

FWIW, I updated all packages on the Pi and also reinstalled nodejs using the script on the node red site. Everything now on latest versions. Same result. 

 

Screenshot_20210519-113100.jpg

Screenshot_20210519-113355.jpg

More debug 

Linux raspberrypi 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed May 19 11:46:19 2021 from 192.168.1.70
pi@raspberrypi:~ $ sudo node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.121:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as root systemd service.
19 May 11:49:48 - [warn] [modbus-flex-getter:Inverter] Modbus Failure On State sending Get More About It By Logging
19 May 11:49:48 - [error] [modbus-flex-getter:Inverter] Error: Timed out
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init
^C
pi@raspberrypi:~ $

 

6 hours ago, jacauc said:

Well, I did it exactly as I was explained. Wires 2 and 7 in A and 1 and 8 in B. Have a few of those usb converters, so tried another also to see if that eliminates the issue. Exact same results. 

I'm also guessing that if the polarity was wrong it wouldn't work at all. Mine works, just times out every few seconds 

My inverter got installed on Friday, and I'm currently waiting for my USB - RS485 converters to be delivered. I've set up Node Red, and reading up as much as I can before I'm able to continue.

I'm wondering if the wiring indicated is perhaps incorrect? The Sunsynk manual indicates the below wiring on the RJ45 port:
 

No RS485 Pin
1 RS485B
2 RS485A
3 GND
4  
5  
6 GND
7 RS485B
8 RS485A

 

By mixing 2+7 and 1+8, aren't you adding both A+B to each of A and B of the USB converter?

6 hours ago, jacauc said:

@Sc00bs, I know you said you are using the same cheap adapter. Was there any specific driver that had to be installed in Linux for it to work as expected? 

 

6 hours ago, Luminous said:

I have heard numerous problems with those cheap ones. Best would be to try one of these.

https://www.robotics.org.za/RS485-3P?search=485

I can confirm this, I originally had the USB RS485 adapter with the bare circuit board as mentioned in Luminous' post above and I had no issues. I then upgraded to the R30.00 adapter from microrobotics that jacauc was using and I had issues with it so I'm back to the original adapter.

For the moment I just set up the timeout value to 100ms (fail fast) and disabled the error logging. All of the values make it to mqtt and influx about 9/10 cycles, so even though imperfect, it's not hampering my ability to use the data. 

 

Ignorance is bliss for the moment 

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.