Solar Assistant + Raspberry Pi for monitoring

richbee
Posts: 595
Joined: Tue Apr 19, 2022 3:39 pm
Location: Northumberland

Solar Assistant + Raspberry Pi for monitoring

#1

Post by richbee »

Hi all,
I keep getting my Sunsynk monitoring app dropping out for 1/2 a day at a time, and seems to be a common occurrence.
I've seen that there is an alternative using the Solar Assistant software (from South Africa) mounted on a raspberry Pi with RS485(?) directly connected to the inverter and co0llecting data directly rather than going through a server somewhere in China.
Any had any experience with this system? Any good?
Solar PV since July '22:
5.6kWp east/west facing
3.6kW Sunsynk hybrid inverter
2x 5.12kWh Sunsynk batteries
1.6kWp Hoymiles East/West facing PV on the man cave
Ripple DW 2kW
Ripple WB 200W
Oldgreybeard
Posts: 1873
Joined: Thu Sep 09, 2021 3:42 pm
Location: North East Dorset

Re: Solar Assistant + Raspberry Pi for monitoring

#2

Post by Oldgreybeard »

Probably the best supported option is Home Assistant, as it's fairly easy to get this to interface with most inverters, either directly via the inverter RS485 interface, or via an RS485 to WiFi option if the inverter is some distance away.

I'm using a Sofar inverter, but the principle is much the same for other makes. Because the inverter is some way away I used an ESP8266 and RS485 converter to decode the Modbus data from the inverter and make that available via WiFi using MQTT. I then have Home Assistant running on a Raspberry Pi and that pulls data from the inverter as required and allows any sort of display you want. I have a couple of different dashboards, a simple one that I designed to give an "at a glance" display of system status and a more complex one that I use for digging into the detail.

I could have just plugged a USB to RS485 converter directly into the Raspberry Pi and got the data that way, but for me that would have meant a long and awkward cable run.

Home Assistant dashboards can be displayed on any device with a web browser, and you can choose to lock things down so that data is only sent around your private home LAN or you can open it up and allow wider web access. I haven't done the latter, only because I prefer the security of having things locked down, plus I don't have any need to see what the system is doing when we're not at home.

This is the simple Home Assistant dashboard I put together to monitor our system at a glance:

Home Assistant.jpg
Home Assistant.jpg (58.42 KiB) Viewed 4164 times
25 off 250W Perlight solar panels, installed 2014, with a 6kW PowerOne inverter, about 6,000kWh/year generated
6 off Pylontech US3000C batteries, with a Sofar ME3000SP inverter
richbee
Posts: 595
Joined: Tue Apr 19, 2022 3:39 pm
Location: Northumberland

Re: Solar Assistant + Raspberry Pi for monitoring

#3

Post by richbee »

Thanks Oldgreybeard - that sounds good - I was wondering how to run various cables up to the loft to connect to the inverter!
I'll go away and read up about Home Assistant etc - I have a very old Raspberry PI, but never did much with it - I guess a new version is in order for this, and then I can find out about ESP8266 & MQTT too.
Seems Rapsberry Pis are hard to get hold of currently, will give me time to find out :D
Solar PV since July '22:
5.6kWp east/west facing
3.6kW Sunsynk hybrid inverter
2x 5.12kWh Sunsynk batteries
1.6kWp Hoymiles East/West facing PV on the man cave
Ripple DW 2kW
Ripple WB 200W
Tinbum
Posts: 1110
Joined: Mon May 31, 2021 9:55 pm

Re: Solar Assistant + Raspberry Pi for monitoring

#4

Post by Tinbum »

richbee wrote: Wed Oct 26, 2022 5:25 pm Seems Rapsberry Pis are hard to get hold of currently, will give me time to find out :D
I've had 2 on order for nearly a year now but I was lucky to pick up some on that auction site as a buy it now, brand new. The seller had made a pricing mistake but even despite me contacting him to just check the listing and quantities before hand he didn't spot it until after he had sent them. :D I doubt he lost money on them, he just wouldn't have made any.

I may have a look at home assistant myself as it does make it look easier but I've done most of the work already with my own design. I'm trying to add my Texecom alarm and have partly managed it with mqqt but their is nice github addition for home assistant and I can't get the docker image to run without it.
85no 58mm solar thermal tubes, 28.5Kw PV, 3x Sunny Island 5048, 2795 Ah (135kWh) (c20) Rolls batteries 48v, 8kWh Growatt storage, 22 x US3000C Pylontech, Sofar ME3000's, Brosley wood burner and 250lt DHW
Oldgreybeard
Posts: 1873
Joined: Thu Sep 09, 2021 3:42 pm
Location: North East Dorset

Re: Solar Assistant + Raspberry Pi for monitoring

#5

Post by Oldgreybeard »

As an example as to how versatile Home Assistant is, especially with the ESP Home add-on, since writing the post above I've put together an ESP32 module together with a DHT20 sensor, loaded ESP Home on to the ESP32 module (via the USB cable), set up the WiFi and then added the DHT20 sensor over the air to the newly created sensor using Home Assistant itself. I now have a small module that's reporting the outside air temperature and humidity to Home Assistant every 60 seconds. Great thing is that I don't ever need to plug the ESP32 into a PC again, I can now modify anything, add additional sensors or relay controls, over-the-air from within Home Assistant itself.

Took me around half an hour to get this up and running, most of that time was waiting for the code to compile and download to the ESP32. In terms of hardware it's just an ESP32 module, the DHT20 sensor, and four soldered wires to connect the two. At the moment it's not in a case, and is just dangling from a spare 5V USB power supply lead, but it's working and sending data to Home Assistant.

The great thing about Home Assistant is that 90% of everything you need to do involves no form of direct writing of code, loads of sensors and other device integrations are supported pretty much "out of the box". My next project is to add another ESP32, driving an epaper display (like those in ebook readers) that I've mounted in a cheap Ikea picture frame. The plan is to have this mounted on the wall in the hall, with a hidden 5V power supply, with the display showing key Home Assistant dashboard data (like the weather forecast, some basic info from the PV/battery system, and any other stuff I think that it might be handy to be able to see at a glance.
25 off 250W Perlight solar panels, installed 2014, with a 6kW PowerOne inverter, about 6,000kWh/year generated
6 off Pylontech US3000C batteries, with a Sofar ME3000SP inverter
dlw
Posts: 71
Joined: Mon Oct 24, 2022 8:33 pm

Re: Solar Assistant + Raspberry Pi for monitoring

#6

Post by dlw »

I second @oldgreybeard with HA, I'm getting my data from my voltronic Axpert with a orange pi sending info via mqtt to HA and i have control too by sending commands I can use off peak energy to charge my batteries where the built in is per hr but my supplier starts on the 1/2 hr now I can have what I need.

Lots of info out there and if not there will be someone willing to help and integrate

As for esp32 a D1 mini is well supported and can add with hats very easily
16 250w Trina panels
Voltronic Axpert Max 8Kw hybrid inverter
3 x Chinese 125Ah (19Kwh total) batteries
To be done, more panels and a wind turbine
Off Grid 20 out of 24hrs
Oldgreybeard
Posts: 1873
Joined: Thu Sep 09, 2021 3:42 pm
Location: North East Dorset

Re: Solar Assistant + Raspberry Pi for monitoring

#7

Post by Oldgreybeard »

As there are around half a dozen of us here using HA, or looking to use it, both for RE system monitoring and also control, as well as other energy efficiency related monitoring purposes, I wonder if it's worth trying to bring all the home automation related stuff into one common area here?

By very useful to have a repository for information and links to other data sources as to how to do things like get data from specific makes of inverter, given that they all tend to use slightly different protocols.

The key for me being able to pull data from my Sofar inverter was this Git repository: https://github.com/cmcgerty/Sofar2MQTT

I pretty much used this WiFi solution as-is, with just some minor tweaks, like adding a slightly larger display and a different ESP8266 module. This box sits in the outbuilding next to the inverter and allows data to be sent to HA via MQTT:

Image
25 off 250W Perlight solar panels, installed 2014, with a 6kW PowerOne inverter, about 6,000kWh/year generated
6 off Pylontech US3000C batteries, with a Sofar ME3000SP inverter
MrPablo
Posts: 273
Joined: Mon Oct 17, 2022 1:26 pm

Re: Solar Assistant + Raspberry Pi for monitoring

#8

Post by MrPablo »

Oldgreybeard wrote: Wed Oct 26, 2022 9:16 pm As there are around half a dozen of us here using HA, or looking to use it, both for RE system monitoring and also control, as well as other energy efficiency related monitoring purposes, I wonder if it's worth trying to bring all the home automation related stuff into one common area here?
This sounds like a great idea to me, I'm still finding more features I want to incorporate, so sharing knowledge would be a good approach.
Dedicated thread?
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
64kWh Kia E-Niro
Oldgreybeard
Posts: 1873
Joined: Thu Sep 09, 2021 3:42 pm
Location: North East Dorset

Re: Solar Assistant + Raspberry Pi for monitoring

#9

Post by Oldgreybeard »

MrPablo wrote: Wed Oct 26, 2022 9:27 pm
Oldgreybeard wrote: Wed Oct 26, 2022 9:16 pm As there are around half a dozen of us here using HA, or looking to use it, both for RE system monitoring and also control, as well as other energy efficiency related monitoring purposes, I wonder if it's worth trying to bring all the home automation related stuff into one common area here?
This sounds like a great idea to me, I'm still finding more features I want to incorporate, so sharing knowledge would be a good approach.
Dedicated thread?
Either a dedicated thread, or, perhaps, a sub-section within this part of the forum for all the home automation related threads. Anything, really, that would make finding solutions for common requirements a bit easier would be helpful, IMHO. It's very easy for useful stuff to get buried deeply in long threads that are often not directly related to the HA side of things.
25 off 250W Perlight solar panels, installed 2014, with a 6kW PowerOne inverter, about 6,000kWh/year generated
6 off Pylontech US3000C batteries, with a Sofar ME3000SP inverter
MrPablo
Posts: 273
Joined: Mon Oct 17, 2022 1:26 pm

Re: Solar Assistant + Raspberry Pi for monitoring

#10

Post by MrPablo »

Oldgreybeard wrote: Wed Oct 26, 2022 9:36 pm Either a dedicated thread, or, perhaps, a sub-section within this part of the forum for all the home automation related threads. Anything, really, that would make finding solutions for common requirements a bit easier would be helpful, IMHO. It's very easy for useful stuff to get buried deeply in long threads that are often not directly related to the HA side of things.
A dedicated subsection strikes me as the best idea. That way we can have multiple threads for different projects / discussions.
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
64kWh Kia E-Niro
Post Reply