Author Topic: Node-Red, ModBus, InfluxDB, Grafana on Raspberry Pi - Solar System Monitoring  (Read 288 times)

dgd

  • Hero Member
  • *****
  • Posts: 1722
    • Lorylink
I have had a while to read up on these software packages for the Pi3. The modbus library is good although I would prefer its use via a direct serial port connection to the Classic rather then some Ethernet to serial conversion. Doesn’t seem to onerous to implement once the various timings are sorted out.
The InfluxDB and Grafana look interesting but I’m left with the probably incorrect impression that they are an awful lot of overhead for dealing with just a relatively few data from the Classic. Maybe I’m just too old fashioned but using a data structure managed by some simple C code to extract and store Classic data over time OR for a real time metered display looks like an easy approach. Grafana is just a graphics package, looks like it can make some whizzy displays but I’d like to see some better or bettered dashboard metering (of have I missed this).
Anyway, I look forward to seeing how yous progress (CC and Steve) as I want to learn.
In meantime I will tidy up my Pi3 c code, document and post my simple Classic monitoring tool for Pi via serial port.
Dgd
Classic 250, 150,  20 140w, 6 250w PVs, 2Kw turbine, MN ac Clipper, Epanel/MNdc, Trace SW3024E (1997), Century 1050Ah 24V FLA (1999). Arduino power monitoring and web server.  Off grid since 4/2000
West Auckland, New Zealand

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 2151
Not sure what you mean dgd by a lot of overhead - the Pi Zero W only costs about $10 and uses about 1 watt or less. I don't know though if it has enough processing power to run the Grafana and all though . Even though I have a pi zero W I have been so far using Pi 3 B+ to experiment with the node red - though I also often just use my windows computer with node red too since it is usually always running in the daytime anyway.
I haven't tried hooking the pi up to serial on Classic - well I did try but I figured out that since I have the Classics in Follow Me I can't get serial data . Maybe I will try putting both the Classics as independent controllers and see if I can get the serial data going - like you say should work a lot better than modbus IP .

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

dgd

  • Hero Member
  • *****
  • Posts: 1722
    • Lorylink
CC, sorry I didn’t mean power usage or money investment in Pi3, instead I meant cpu cycles as I have found the Pi tends to run out of grunt which can often lead to lock ups or weird results. The overhead of a DB inc it’s language interpreter then a well featured graphics generator all running real time data extraction and display, I think will push the Pi3. Maybe Im wrong but we will see when I get time to install everything.
With my Pi3 I was thinking of using it dedicated to classic data extraction and offering that data as some web pages, but even with minimum web server code the Pi3 resource is getting stretched.
Dgd
Classic 250, 150,  20 140w, 6 250w PVs, 2Kw turbine, MN ac Clipper, Epanel/MNdc, Trace SW3024E (1997), Century 1050Ah 24V FLA (1999). Arduino power monitoring and web server.  Off grid since 4/2000
West Auckland, New Zealand

Steve_S

  • Newby
  • *
  • Posts: 19
At this point, I have Node-Red running, pulling Modbus via TCPIP with no issue, the Modbus lib I am using can also do serial but why If you can get it via IP.  With NodeRed, InfluxDB & Grafana running on my Pi3, it sees spikes of 12% when writing to Influx and 20% if I am working software on my browser.  I do not use the browser in the Pi for more than just settings, I use my lappie to connect to the Pi.  The Pi can handle this well enough as a "server" but don't think you'll be browsing or doing much more on it with all of this running.

The writes are but a blink literally and don't create IO bottlenecks BUT I am running off an SSD drive, which likely has a positive effect on that.

My Nodered flow is simple enough, it's only pulling the data I want, setting it up and dumping it to Influx.  The basic Dash (nodered) was just to see a quick & dirty "it is working" screen.   I was originally thinking of writing a program in C# which was cross platform BUT with RasPI and all these goodies that simplify it and being all FREE it's a no brainer to go this route.  There is a CATCH for me though.  My Samlex gear can also talk Modbus BUT I had to sign an NDA to get their data & specs, so I won;'t be able to share that part for now, till things are sorted.

SOMETHING FOR PI FOLKS !
As mentioned, I went with an SSD drive on my Pi and it is terrific to use it... I followed instructions from Andreas Speiss on YouTube and all went according to plan BUT I just came across this which solves a LOT of quirks & foibles.

Geekworm Raspberry Pi 3 B+/3B SATA HDD/SSD Storage Expansion Board, X820 V3.0 USB 3.0 Mobile Hard Disk Module for 2.5 Inch SATA HDD/SSD/Raspberry Pi 3 Model B+ (B Plus)/3 B/ROCK64/Tinker Board https://www.amazon.com/Geekworm-Raspberry-Storage-Expansion-Compatible/dp/B073CGQD9C/ref=sr_1_19?keywords=Orange+Pi&qid=1560892223&s=gateway&sr=8-19   and it is ONLY $28   Plus Geekworm has cases with fans and expansion modules to house your Pi & attached kit, all very reasonably priced and most affordable.

SIDE NOTE: There are Banana Pi's & Orange Pi's which have faster CPU's and up to 4GB Ram onboard which are 100% compatible with Raspberry, same form factor and compatible with the extra goodies.  Prices are very very close to RasPi's as well, so not a big leap if that's a point of contention.
Classic-200, Samlex EVO-4024 Inverter/Charger, 2080W of Canadian Solar CS-260P in 2 strings of 4,  8x Rolls Surette S-550 24V/856Ah battery bank.