Jump to content

My Attempt at Sunsynk Nodered MQTT Local Data Logging and Sending to Live Thingsboard Cloud Portal


Recommended Posts

Posted (edited)

Thank You @Bloubul7 for the great info on nodered.

I have the latest Sunsynk Data logger, but, the data is not very close to real-time :( so not really suitable to use for gauges (I love gauges).

NOTE: This is a work in progress :)

Here is my 1st attempt at getting Sunsynk data out to my thingsboard cloud server.
All data is also pushed to my local mqtt in case the cloud(internet) goes down or is not reachable (No data lost) :)

Here is the link to my Test Dashboard (work in progress)
Click To View Live Dashboard
Data points come in at 0.8 second intervals :)

That's about the fastest I could get data posted to the cloud.

Nodered flows is different to how @Bloubul7 did his, I have gone a much simpler route as I do not need HA
All the nodered experts are welcome to make suggestions to how I can improve mine :) (Optimise etc)
As for thise little rs485 to usb converter that are so glitchy, I have stopped using them (Unless someone knows of a converter that is super stable)
I have opted to rather use rs232 to usb converter, super stable and no more timeouts causing missing data points :)

My Attempt at Sunsynk Nodered MQTT Local Data Logging and Sending to Live Thingsboard Cloud Portal.jpg

 

 

nodered-flows-test1-sunsynk.jpg

flows.json

Edited by WannabeSolarSparky
Added nodred flows image
Posted (edited)
5 minutes ago, cyber7 said:

Hi @WannabeSolarSparky

This is a real nice Dashboard!  I like the "wooden" look, being a bit of a woodworker :)

Please tell me where do you get the "Essential" and "Non-Essential" readings?

Cheers

Aubrey (aka @cyber7)

lol the wood look was a small dig at riot 😉

As for essential and non-essential
They are derived from calculations as per info I found on @Bloubul7 's post about using nodered for Sunsynk.
non-essential is the little house pic using modbus address formula is (172-167)
essential is the UPS pic using modbuss address formula is 175-(166-167)
 

screen-codes-sunsynk-modbus.png

Edited by WannabeSolarSparky
Posted
4 hours ago, WannabeSolarSparky said:

Thank You @Bloubul7 for the great info on nodered.

I have the latest Sunsynk Data logger, but, the data is not very close to real-time :( so not really suitable to use for gauges (I love gauges).

NOTE: This is a work in progress :)

Here is my 1st attempt at getting Sunsynk data out to my thingsboard cloud server.
All data is also pushed to my local mqtt in case the cloud(internet) goes down or is not reachable (No data lost) :)

Here is the link to my Test Dashboard (work in progress)
Click To View Live Dashboard
Data points come in at 0.8 second intervals :)

That's about the fastest I could get data posted to the cloud.

Nodered flows is different to how @Bloubul7 did his, I have gone a much simpler route as I do not need HA
All the nodered experts are welcome to make suggestions to how I can improve mine :) (Optimise etc)
As for thise little rs485 to usb converter that are so glitchy, I have stopped using them (Unless someone knows of a converter that is super stable)
I have opted to rather use rs232 to usb converter, super stable and no more timeouts causing missing data points :)

My Attempt at Sunsynk Nodered MQTT Local Data Logging and Sending to Live Thingsboard Cloud Portal.jpg

 

 

nodered-flows-test1-sunsynk.jpg

flows.json 31.51 kB · 5 downloads

Very impressive , you' ve add some good value there , I've checked the live view as well , 👌.  Well done.  

Posted

Very impressive.  Can one in a setup like yours create a custom field to monitor inverter efficiency for example and plot on your chart over time?  Inverter efficiency = dc power (solar power +- battery power) / inverter load power * 100?   

Posted
26 minutes ago, Halcyon said:

Very impressive.  Can one in a setup like yours create a custom field to monitor inverter efficiency for example and plot on your chart over time?  Inverter efficiency = dc power (solar power +- battery power) / inverter load power * 100?   

I am pretty new to nodered, but this is just programming with data extracted, so yes, you would/should be able to do any calculations you like and plot it on a graph.
I have some free time today will see if I can add it :)

Posted

Awesome, thank you.

The reason I ask was because I did some analysis on my inverter's internal efficiency.  I exported a random full days data from my 5kw Susnynk machine (I have a 5kw solar array, 10 kwh battery and use the Sunsynk logger).  The data was filtered for each datapoint where dc power was used and I calculated the efficiency ratio. The results were very interesting, especially when compared to the Deye/Sunsynk advertised efficiency curve.  I think the efficiency metric would be a great one to monitor as well on a dashboard? Thoughts?

 

image.thumb.png.1323ef8849f58878e66cf18ec17dd5b6.png

 

image.png.74d14a9d9b04c2b1c1176d53a98d4341.png


 

Posted
8 hours ago, Halcyon said:

Very impressive.  Can one in a setup like yours create a custom field to monitor inverter efficiency for example and plot on your chart over time?  Inverter efficiency = dc power (solar power +- battery power) / inverter load power * 100?   

I have added Battery To Inverter Efficiency (Time series at the bottom-scroll down), will give the solar one a go as soon as I have time and then a combined one for both battery and solar.

Posted

Awesome. I checked it out earlier on your dashboard and it was working a charm. The % efficiency value that displayed was it  a live value or an accumulated for the day? 

Posted
48 minutes ago, Halcyon said:

Awesome. I checked it out earlier on your dashboard and it was working a charm. The % efficiency value that displayed was it  a live value or an accumulated for the day? 

I took it off to re-code the calculations. When only battery and no solar the calculations work perfectly, problem as soon as solar kicks in it messes up the results.
Maybe my arithmetic needs some polishing 🤣
Slowly adding more data t my cloud portal :)

Link again in case anyone missed it above:
ThingsBoard Cloud Portal Using Sunsynk Data CLICK HERE <<<---

Posted (edited)

Yeah I can imagine it can get tricky with the combination to program...good luck with that one. 

For interest the manufacturer advertises a Euro efficiency of 96,5%

image.png.f844cb9b7d2db93036da88fd3fbc05d6.png

Most of the Sunsynk/Deye machines that I have tested using logger data achieve an overall average efficiency using this formula of the +- 94% .  These are machines in the field and not in a lab.  I suppose with a hotter climate efficiency is expected to be a little lower.

 

I am looking forward to a time when one can program some conditional logic to dynamically change inverter settings (time of use, battery charge priority etc) based on logger data, weather or even a load shedding schedules ;)

Edited by Halcyon
Posted
9 minutes ago, Halcyon said:

I am looking forward to a time when one can program some conditional logic to dynamically change inverter settings (time of use, battery charge priority etc) based on logger data, weather or even a load shedding schedules ;)

You can already do that, see @Bloubul7 he has quite complex nodered flows which can update his inverter on the fly based on conditions.
As I am new to nodered I am getting the hang of the basics, next step would be to start trying out all the automations like @Bloubul7 did :)

 

Quote

For interest the manufacturer advertises a Euro efficiency of 96,5%

Most of those are usually the MPPT efficiencies, not the overall efficiency, I may be wrong on that. ?!?
My Sunsynk battery to ac efficiency I measured last night came in at average 89% so unless other parts are 100% efficient I do not see how they get to those claims.
Stats and figures can always be chosen and shown to highlight only the best parts 🤣

 

Here is what my simplified flows look like at the moment.

 

flows-latest-sunsynk.jpg

Posted
10 minutes ago, WannabeSolarSparky said:

You can already do that, see @Bloubul7 he has quite complex nodered flows which can update his inverter on the fly based on conditions.
As I am new to nodered I am getting the hang of the basics, next step would be to start trying out all the automations like @Bloubul7 did :)

Awesome, Thank you I will check that out.  I assume one needs to use a Rasberry Pi/similar to process the collected data to achieve the custom logging and custom dashboard?...my hope was that one could achieve automation capability using Sunsynk's logger?  I suppose the only way would be for them to open up the API right?

17 minutes ago, WannabeSolarSparky said:

Most of those are usually the MPPT efficiencies, not the overall efficiency, I may be wrong on that. ?!?
My Sunsynk battery to ac efficiency I measured last night came in at average 89% so unless other parts are 100% efficient I do not see how they get to those claims.
Stats and figures can always be chosen and shown to highlight only the best parts 🤣

MPPT gets its own efficiency benchmark.  Here is the full advertised list.

Deye/Sunsynk

image.thumb.png.1d14423a9d07d8331e6545338f1115f8.png

LOL

 

Posted (edited)
31 minutes ago, Halcyon said:

Awesome, Thank you I will check that out.  I assume one needs to use a Rasberry Pi/similar to process the collected data to achieve the custom logging and custom dashboard?...my hope was that one could achieve automation capability using Sunsynk's logger?  I suppose the only way would be for them to open up the API right?

MPPT gets its own efficiency benchmark.  Here is the full advertised list.

Deye/Sunsynk

image.thumb.png.1d14423a9d07d8331e6545338f1115f8.png

LOL

 

Yip I saw those claims too and then you mentioned doing it yourself, that intrigued me to find out too.
You would need to have an absolutely (Lab Setup) perfectly balanced with panels, batteries, iradience, temperatures, sky conditions etc etc etc to get those figures.
Real world you would be lucky to get within a few % points of those figures.

Edited by WannabeSolarSparky
Posted
17 minutes ago, Halcyon said:

Awesome, Thank you I will check that out.  I assume one needs to use a Raspberry Pi/similar to process the collected data to achieve the custom logging and custom dashboard?...my hope was that one could achieve automation capability using Sunsynk's logger?  I suppose the only way would be for them to open up the API right?

Any pc can do this if you have the right software loaded.
I am using a pi4 for collecting the data into nodered and then send out to my own cloud thingsboard server for the graphs etc and locally to my pc into an influx-db via mqtt  and then to my local grafana graphing. So essentially have a cloud platform and local one in case the cloud goes down or is unreachable.

As for the Sunsynk app, until they open up their api you are pretty much stuck with what they allow you to do and or see.

I personally only use the Sunsynk dongle for firmware updates. I prefer to make my own gauges and time-series graphs and get/use only the data that interests me and visualise it the way I prefer :)

Posted

I have now tested running the thingsboard system locally without the need for the cloud :)
You would still need internet access if you want to monitor loadshedding status, if not then you can be 100% cloudfree on your local network to monitor your sunsynk inverter :)

If any one wants some guidance on how to do this let me know and I will write up some step by steps :)

sunsynk-local-monitoring-no-cloud-needed.thumb.jpg.0c8c132e8a6b8103049c83255db4a4f7.jpg

Posted

Would it be possible to concurrently use the Sunsynk logger and also push the same data from the inverter to a cloud or locally using the rs485 output. I know you mentioned this type of cable was glitchy, but if that issue was overcome could it work?

Posted
54 minutes ago, Halcyon said:

Would it be possible to concurrently use the Sunsynk logger and also push the same data from the inverter to a cloud or locally using the rs485 output. I know you mentioned this type of cable was glitchy, but if that issue was overcome could it work?

I am using my own offline data portal and the sunsynk dongle at the same time.
The sunsynk dongle is in the serial port as usual and my dashboard is running from the rs485 port on the sunsynk, both running at the same time no issues at all.

I tried the usual rs485 adapters to usb but not had much luck with them, so now using rs475 to rs232 serial adapter and then from there to my Raspberry pi usb port with a rs232 to usb cable.

Posted
33 minutes ago, werner.potgieter said:

My Solarman dongle is connected to the inverter RS232 port and reporting to the Solarman-cloud(delayed reporting). The inverter RS485 port is connected to my local Home-Assistant instance, reporting is closer to real time.

If you are using nodered to home-assistant you should be able to get 0.1 seconds per reading quite easily if they are both on the same device and using mqtt.
That's the closest to real-time I have been able to get on my setup without running into timeout or delay issues.

Posted (edited)
1 hour ago, werner.potgieter said:

Looking good, well done! I would like some guidance, please.

I am going to share an installable image of my full setup using nodered and thingsboard, all you would need is a raspberry PI4 with latest firmware installed that allow for external HDD and the latest official raspberry imager and of course a reliable connection to your sunsynk inverter rs485 port.
And at least a basic understanding of how to run a rpi in headless mode :)

The thingsboard dashboard you can modify and change to your liking :)
I am going to test doing the inverter settings next, directly on the thingsboard dashboard.

Again thanks to @Bloubul7 if it was not for him I would never have know how easy it is to get data out of the sunsynk inverters :)

Edited by WannabeSolarSparky

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...