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

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3188
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #30 on: February 01, 2022, 08:28:54 PM »
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 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

Wizbandit

  • Newby
  • *
  • Posts: 38
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #31 on: February 03, 2022, 08:11:20 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

  • Sr. Member
  • ****
  • Posts: 311
    • ClassicDiy
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #32 on: February 03, 2022, 01:19:22 PM »
...
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

  • Hero Member
  • *****
  • Posts: 3188
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #33 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
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: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #34 on: February 05, 2022, 11:04:07 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

  • Hero Member
  • *****
  • Posts: 3188
Re: Using IOTstack, Telegraph, Graphana and MQTT Classic data
« Reply #35 on: February 05, 2022, 11:58:29 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
« Last Edit: February 06, 2022, 06:46: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 , Jakiper 48v LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batteries