I've searched a lot and have not hit on what I need yet. I have a Raspberry Pi reading a sensor and sending temperature and humidity readings using MQTT to another RPI which is the Mosqitto Broker and node-red server.
The data is coming in the format of a JSON object. I've created a MQTT input on nodered that get the data and sends it on to the debug msg object. So every 10 seconds I get a message in the debug window like this:
1/6/2021, 2:12:12 PMnode: ab69ee34.8aa8d
testTopic : msg.payload : Object
I've tried to create a influxdb out object to add the 2 items to the database but at this point I really don't know what I'm doing. When I connect the MQTT input to the influxdb out, I get stuff in the database but it's wrong. There is only one measurement, Temperature and when I select * from Temperature I get a lot of data like:
1609960616822963797 40.8 58.4
1609960626985944420 40.8 58.4
1609960637143475475 40.8 58.4
Where the 40.8 is the humidity and the 58.4 is the temerature.
I feel like I'm just stumbling around. So any advice on how I should be doing this would be appreciated