Hi all,
After lurking a while in the forum, i've been trying to tackle an issue, but i'm just a hobbyist.
Hopefully someone can help me figure this out.
I have the following question:
I'm receiving all data from a sensor in my MQTT.
When i try to parse it to InfluxDB, somehow my splitting isn't going as i would like to . How can i split or parse it, to get in the Influx properly?
MQTT output:
{"topic":"sensors/networkStatus/mysensor","payload":"{\"event\":{\"eventId\":\"bqheousrto76o8dikp3g\",\"targetName\":\"projects/location/devices/mysensor\",\"eventType\":\"networkStatus\",\"data\":{\"networkStatus\":{\"signalStrength\":78,\"updateTime\":\"2020-04-24T13:41:15.670000Z\",\"connector\":[{\"id\":\"bjr27rkc0000n66nmetg\",\"signalStrength\":78}],\"transmissionMode\":\"LOW_POWER_STANDARD_MODE\"}},\"timestamp\":\"2020-04-24T13:41:15.670000Z\"},\"labels\":{}}","qos":0,"retain":false,"_topic":"sensors/networkStatus/mysensor","_msgid":"607a8f7d.3d0eb"}
After my attempt to split the msg, to make it ready for InfluxDB
{"topic":"mysensor","payload":[{"measurement":"mysensor","fields":{"event":{"eventId":"bqheousrto76o8dikp3g","targetName":"projects/location/devices/mysensor","eventType":"networkStatus","data":{"networkStatus":{"signalStrength":78,"updateTime":"2020-04-24T13:41:15.670000Z","connector":[{"id":"bjr27rkc0000n66nmetg","signalStrength":78}],"transmissionMode":"LOW_POWER_STANDARD_MODE"}},"timestamp":"2020-04-24T13:41:15.670000Z"},"labels":{}},"timestamp":"2020-04-24T13:41:16.062Z"}],"qos":0,"retain":false,"_topic":"sensors/networkStatus/mysensor","_msgid":"607a8f7d.3d0eb"}
The InfluixDB notices :
"No measurement specified"
Thanks in advance for any help provided.