Author Topic: Using IOTstack, Telegraph, Graphana and MQTT Classic data  (Read 708 times)

Graham

  • Sr. Member
  • ****
  • Posts: 307
    • ClassicDiy
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #15 on: January 12, 2022, 08:25:07 AM »
Here is a quick video tour of my solar system and the  messing around I have been doing on the solar system and monitoring.
https://www.ebay.com/itm/384229223436
...

Larry, I don't see the link to the video, the first link is to ebay (same as the last link)

Graham
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: 3109
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #16 on: January 12, 2022, 05:33:37 PM »
Here is a quick video tour of my solar system and the  messing around I have been doing on the solar system and monitoring.

...

Larry, I don't see the link to the video, the first link is to ebay (same as the last link)

Graham

Graham -
Yeah I goofed up the link
Here it is - also I corrected it in the other post.
https://youtu.be/qj97LjGcj1Y
I hooked up the PZEM-017 and got it working - well for awhile !
I was using the factory software and amp reading was off .
Then I thought yeah I had different shunt on there so I  half read the instructions on how to do it. 
The software had a Calibrate command - and oops that screwed it up !
Reading some other instructions said basically don't use the Calibrate - oops too late.
There was another spot in software to set the shunt.
Anyway might fixable  by modbus ? But I just ordered another one.
Do you want the one I messed up ? Maybe you have the modbus skills to recalibrate it right.
If you want it I will send it to you - message me .
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

Graham

  • Sr. Member
  • ****
  • Posts: 307
    • ClassicDiy
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #17 on: January 13, 2022, 09:13:09 AM »
Graham -
Yeah I goofed up the link
Here it is - also I corrected it in the other post.
https://youtu.be/qj97LjGcj1Y
I hooked up the PZEM-017 and got it working - well for awhile !
I was using the factory software and amp reading was off .
Then I thought yeah I had different shunt on there so I  half read the instructions on how to do it. 
The software had a Calibrate command - and oops that screwed it up !
Reading some other instructions said basically don't use the Calibrate - oops too late.
There was another spot in software to set the shunt.
Anyway might fixable  by modbus ? But I just ordered another one.
Do you want the one I messed up ? Maybe you have the modbus skills to recalibrate it right.
If you want it I will send it to you - message me .
Larry
sure, it would be fun to see if I can fix it, I'll send you a PM with my address etc.

If you're using telegraf as the mqtt subscriber for influxdb, you should be able to add the tasmota topic to the telegraf.conf file to get the telemetry data to grafana. I have a bunch of sonoff/tasmota switches, so I'll try it here to see if I can get that to work.

I started to update the wiki at https://github.com/ClassicDIY/ClassicMQTT/wiki/3.1-Raspberry-Pi-setup-using-IOTStack to include influx/telegraf/grafana, you're more of an expert on grafana, let me know if I should add more details on the last section


Graham.


...

I added "tele/tasmotaPower_6839BD/SENSOR" to the telegraf.conf topics area and got the extra field keys for the sonoff P2. You can use the TelePeriod command in the tasmota console to change the publish rate for the sensor (default is 300s)

« Last Edit: January 13, 2022, 12:08:07 PM by Graham »
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: 3109
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #18 on: January 13, 2022, 05:02:25 PM »
I added "tele/tasmotaPower_6839BD/SENSOR" to the telegraf.conf topics area and got the extra field keys for the sonoff P2. You can use the TelePeriod command in the tasmota console to change the publish rate for the sensor (default is 300s)

Graham - I got my Sonoff POW added to mqtt_consumer via telegraph and seems to be working.
I haven't set it up on Grafana yet.
Thanks for that -  I never would have imagined it would be that easy to do !
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

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3109
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #19 on: January 13, 2022, 09:27:22 PM »
I was able to get  the Sonoff data into Grafana .  I am getting better at figuring out how to set up things in Grafana .
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

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3109
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #20 on: January 14, 2022, 11:11:08 PM »
Here is the my latest Midnite Grafana dashboard flow with any additional improvements I have made since last time I posted it.
I just added shunt watts and also data from the Sonoff POW.
Larry
« Last Edit: January 14, 2022, 11:24:45 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 , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

Wizbandit

  • Newby
  • *
  • Posts: 30
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #21 on: January 16, 2022, 12:34:58 PM »
I didn't like the version of Grafana with auto-size fonts.  I use v7.4.3 which has text size settings.
This is my ugly 1 of 5 Classics...

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3109
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #22 on: January 16, 2022, 01:49:21 PM »
I didn't like the version of Grafana with auto-size fonts.  I use v7.4.3 which has text size settings.
This is my ugly 1 of 5 Classics...

I am using Grafana 8.3.0
I use whatever docker version IOTStack installs . IOTStack makes it easy to automatically  install all the needed programs like Portainer, Influxdb, Telegraph, Mosquitto, etc.
Pretty sure I can set whatever  text size and fonts I want but havent' messed with that yet.   
Right now I am learning how to have Grafana do the math to add up totals from both of my Classics and display it properly. 
I had mistakes on other dashboards I shared and am now correcting them ( learning Grafana mostly by trial and error ).

Also here is my latest improved grafana dashboard

« Last Edit: January 16, 2022, 02:10:12 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 , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

Graham

  • Sr. Member
  • ****
  • Posts: 307
    • ClassicDiy
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #23 on: January 17, 2022, 09:01:06 AM »
I am using Grafana 8.3.0
I use whatever docker version IOTStack installs . IOTStack makes it easy to automatically  install all the needed programs like Portainer, Influxdb, Telegraph, Mosquitto, etc.
...

You can use IOTStack to generate a docker-compose.yml file to start with, then edit the file to suite your needs.
Once you have the docker-compose.yml setup the way you want it, you can use the docker commands to create and start the containers
you can also setup bash aliases https://sensorsiot.github.io/IOTstack/Docker-commands/.

If you want to pull a specific version of an image, you can specify any version that is defined in dockerHub https://hub.docker.com/r/grafana/grafana/tags?page=1&ordering=last_updated

  grafana:
    container_name: grafana
    image: grafana/grafana:7.4.3
...


note: if you run the IOTStack/build stack after you edit your docker-compose.yml file it will overwrite your edits...

Graham.
« Last Edit: January 17, 2022, 09:22:32 AM by Graham »
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: 3109
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #24 on: January 25, 2022, 12:28:56 PM »
I was able to flash an ESP32 Devkit V1 board with Tasmota .
It wasn't documented very well  but is supported and also supports the Peacefair PZEM-016 AC monitor .
I used a RS485 to TTL adapter board to connect to ESP32, selected the pin options for PZEM in Tasmota configuration menu and it worked !
( should work with esp8266 too)
The CT from PZEM is snapped around  neutral wire from inverter to main breaker box. I have about 30 feel to cat 5 bringing signal from PZEM into house ( the PZEM board is out by breaker box)
Doesn't get much easier than that ( though it took me a few hours to find all the info I needed) .
Tasmota is great firmware to flash on ESP because drop down menu for every pin shows all available options for every type of sensor that may work .
I used this info for wiring https://community.home-assistant.io/t/how-to-connect-pzem-017-dc-with-nodemcu/160754/12
The PZEM is sending power back over cat 5 wire I am using and it powers the esp32.
I just need to configure the mqtt in Tasmota and should be able to bring it into Grafana by making the changes in telegraf.conf and setup database in influx as described in previous post.
Larry
« Last Edit: January 25, 2022, 12:32:54 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 , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie