Hi all,
I have a electrical power sensor, that send me many value via MQTT. I want to store 3 different power values (3 phases of my home installation).
The sensors sends this data via 3 single messages (topics are ..../emeter/0/power , .../emeter/1/power and .../emeter/2/power)
This 3 Messages comes simultaneously and I want to push these to Influxdb in one table (so the the fields there should be like:
timestamp
power0
power1
power2
I managed to send each single value in a seperate table, but how to combine?
This was exactly what I was looking for. I have a Raspberry Pi that I am using to monitor DS18B20 sensors for my greenhouse, hydronics system (solar hot water) and root cellar. Code is currently written in Python and storing data in a MySQL DB. The scripts also take actions like turning on/off circulator pumps and fans. I am migrating to NodeRed/InfluxDB/Grafana on my RPi and I couldn't figure out how to get all sensor readings input to a single point in the InfluxDB. The node that reads the DS18B20 sensors only puts the temperature in msg.payload. I have to post-process the data (using a Function node) and concatenate the msg.topic to msg.payload so the tag and value are both part of the message.payload string. While I'm at it, I convert the temp from C to F. I then use the join node to create a "merged object". This puts the msg.payloads into a single object which is then successfully input to the InfluxDB using the "influxdb out" node.
Ultimately, I'm going to implement an ESP32 micro-controller (MC) to read sensor data and send it to the InfluxDB via MQTT. The MCs should be more robust than the RPi for gathering data and controlling pumps and fans. The RPi will then function solely as a MQTT/NodeRed/InfluxDB/Grafana station. If it goes down, the MCs should still function to control the pumps and fans.
I would upload my flow .json file for those who are interested, but at the moment I'm not allowed to because I'm a new user on the forum.