Using IOTstack, Telegraph, Graphana and MQTT Classic data

Started by ClassicCrazy, December 05, 2021, 03:03:52 PM

Previous topic - Next topic

ClassicCrazy

I made three videos I put on youtube explaining how I wired up PZEM-016 and 017  energy monitors to Esp8266 or Esp32 . First video is on wiring, second video on setting up the mqtt on Tasmota flashed Esp , and third video is about getting the data on Grafana.
Here are the links
https://youtu.be/TbLLrlZ3deI

https://youtu.be/xKxGaerzNKM

https://youtu.be/BaCugQvhQ00

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Wizbandit

Quote from: Graham on January 31, 2022, 12:44:28 PM
Quote from: Wizbandit on January 31, 2022, 08:53:51 AM
I actually built a prototype "Power Monitor" daughter board for the MNS COMBOX.  It has 10 CT's and 4 AC voltage inputs. ...

Nice Dashboard,
are you using MQTT or are you sending data directly to influxdb with the influxdb-python library ?
Graham.

Yes. I designed a circuit that uses two 8 channel ADC chips, a 3V stable reference, Chip Select decoder, and SPI interface on the Pi.  I have a dozen projects going right now but when I can I plan on understanding what MQTT is. (think I looked it up once but can't remember) I only work part-time for Midnite so most of my work on the MNSCOMBOX and extras are done evenings and weekends.

Graham

Quote from: Wizbandit on February 03, 2022, 08:11:20 AM
...
Yes. I designed a circuit that uses two 8 channel ADC chips, a 3V stable reference, Chip Select decoder, and SPI interface on the Pi.  I have a dozen projects going right now but when I can I plan on understanding what MQTT is. (think I looked it up once but can't remember) I only work part-time for Midnite so most of my work on the MNSCOMBOX and extras are done evenings and weekends.

MQTT is just a simple publisher/subscriber pattern that decouples the sender (publisher) with the receiver (subscriber). It would not make sense to use MQTT as the internal protocol if you are running influxdb/grafana on the MNSCombox. But you might want to consider including the option to publish to MQTT as the ClassicMQTT does for us DIYers so we can aggregate the data from the MNSCombox with other IOT devices like Larry's current sensor into subscribers like Node-Red, HomeAssistant or a custom Grafana dashboards.

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

Graham
There were some changes to IOTstack or Docker which messed up running menu in IOTstack.
After a lot of time with help from paraphraser at IOTstack found that the problem was that networks has been changed.
In the end ( after I rebuilt my IOTstack from scratch) to fix the Classics mismatch all I had to do was change compose-overide.yml networks from iotstack_nw to networks default.
I sent a lot of messages on Slack but you can skip them - this was the conclusion .
classic_mqtt:
    container_name: classic_mqtt
    image: classicdiy/classicmqtt
    restart: unless-stopped
    environment:
      - LOGLEVEL=DEBUG
      - CLASSIC=192.168.3.22
      - CLASSIC_PORT=502
      - CLASSIC_NAME=CLASSIC
      - MQTT_HOST=mosquitto
      - MQTT_PORT=1883
      - MQTT_ROOT=ClassicMQTT
      - MQTT_USER=ClassicPublisher
      - MQTT_PASS=ClassicPub123

     
    networks:
      - default
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Graham

Quote from: ClassicCrazy on February 04, 2022, 11:11:26 AM
Graham
There were some changes to IOTstack or Docker which messed up running menu in IOTstack.
After a lot of time with help from paraphraser at IOTstack found that the problem was that networks has been changed.
In the end ( after I rebuilt my IOTstack from scratch) to fix the Classics mismatch all I had to do was change compose-overide.yml networks from iotstack_nw to networks default.
I sent a lot of messages on Slack but you can skip them - this was the conclusion .
classic_mqtt:
    container_name: classic_mqtt
    image: classicdiy/classicmqtt
    restart: unless-stopped
    environment:
      - LOGLEVEL=DEBUG
      - CLASSIC=192.168.3.22
      - CLASSIC_PORT=502
      - CLASSIC_NAME=CLASSIC
      - MQTT_HOST=mosquitto
      - MQTT_PORT=1883
      - MQTT_ROOT=ClassicMQTT
      - MQTT_USER=ClassicPublisher
      - MQTT_PASS=ClassicPub123

     
    networks:
      - default

Thanks for finding that error Larry, I updated the compose-override.yml file on the github page https://github.com/ClassicDIY/ClassicMQTT.
Also updated the wiki using the "old" IOTStack menu since it didn't give me that docker version warning. (https://github.com/ClassicDIY/ClassicMQTT/wiki/3.1-Raspberry-Pi-setup-using-IOTStack)
I tested it on a fresh Raspberry Pi 3 32Bit OS

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

#35
Quote from: Graham on February 05, 2022, 11:04:07 AM
Quote from: ClassicCrazy on February 04, 2022, 11:11:26 AM


Thanks for finding that error Larry, I updated the compose-override.yml file on the github page https://github.com/ClassicDIY/ClassicMQTT.
Also updated the wiki using the "old" IOTStack menu since it didn't give me that docker version warning. (https://github.com/ClassicDIY/ClassicMQTT/wiki/3.1-Raspberry-Pi-setup-using-IOTStack)
I tested it on a fresh Raspberry Pi 3 32Bit OS

Graham

There is a section  on IOTstack that shows how to change between menus pretty easily.
I didn't see the usual docker out of date warning when I switched back to new menu.
https://sensorsiot.github.io/IOTstack/Getting-Started/
Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable