Author Topic: Installing Node Red on Raspberry PI Bullseye also Telegraf and Grafana  (Read 1838 times)

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3344
Re: Installing Node Red on Raspberry PI Bullseye also Telegraf and Grafana
« Reply #15 on: December 11, 2021, 12:15:57 PM »
State of Charge working .
I also added totals between the two Classics.
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 , Jakiper 48v LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batteries

Graham

  • Sr. Member
  • ****
  • Posts: 311
    • ClassicDiy
Re: Installing Node Red on Raspberry PI Bullseye
« Reply #16 on: December 12, 2021, 06:38:30 AM »

I may have found easier way to do the State of Charge code to text.
There is a Value Mapping section .
https://grafana.com/docs/grafana/latest/panels/value-mappings/
Guess I will find out next time the sun comes out if it works or not.
Screen shot shows what I did .
attached is my latest version of Grafana Dashboard  supporting two Classics and I jazzed it up with colors.
Larry

That's much easier than the SQL approach... thanks for finding that.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3344
Re: Installing Node Red on Raspberry PI Bullseye also Telegraf and Grafana
« Reply #17 on: December 18, 2021, 05:25:36 PM »
I made some progress with Node Red - figured out how to get it to read the MQTT data .
Easy I suppose once you know what you are doing !
Thanks to Grahams past instructions on how to use MQTT.fx program - that is helping me get some understanding of MQTT stuff.
Next I will work on trying to make Node Red use some of the data to control something.
I attached the flow I have so far which will show how to setup the mqtt input .
Larry

« Last Edit: December 18, 2021, 05:37:37 PM by ClassicCrazy »
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 , Jakiper 48v LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batteries

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3344
Re: Installing Node Red on Raspberry PI Bullseye also Telegraf and Grafana
« Reply #18 on: December 23, 2021, 02:40:36 PM »
I worked on getting Node Red to take Aux data, then change the true / false to a number value.
Then it is supposed to go to Influxdb but I haven't got the influx databases configured right yet.
Here is what I have used for references to get this far
Very good video where he takes time to explain each step in detail
https://youtu.be/ffg3_1AgtyA
Also Paraphraser helps some though for me hard to follow along sometimes until I read it over and over
https://gist.github.com/Paraphraser/c9db25d131dd4c09848ffb353b69038f
This is the function code I used to change true false to number value - I found this while searching for way to do it so thanks whoever wrote it cause I forgot already

node.warn(msg.payload)
msg.original = msg.payload;
if (msg.payload === "true" || msg.payload === true) {
 msg.payload = 111;
} else {
 msg.payload = 999;
}
return msg;

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 , Jakiper 48v LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batteries