Hello guys, I'm new to node-red and influxdb and mqtt so bear with me. So I'm trying to send a Json object to an influxdb database I created but when I try to send the object to influxdb I get the following error:
Error: A 400 Bad Request error occurred: {"error":"unable to parse 'sonoff ENERGY=[object Object],Time=\"2019-02-16T19:51:25\"': invalid boolean"}
The json string I get from the sensor is this:
"{"Time":"2019-02-16T19:51:25","ENERGY":{"TotalStartTime":"2019-02-11T17:34:56","Total":1.507,"Yesterday":0.348,"Today":1.159,"Period":6,"Power":66,"ApparentPower":67,"ReactivePower":0,"Factor":0.99,"Voltage":126,"Current":0.532}}"
Finally, the flow I am using is the following flow:
[{"id":"6ce293e0.d07ab4","type":"mqtt in","z":"31324429.f7d1ac","name":"","topic":"stat/sonoff/POWER","qos":"2","broker":"b219fa03.3781f8","x":279,"y":129,"wires":[["c6f3034f.ebd078"]]},{"id":"c6f3034f.ebd078","type":"debug","z":"31324429.f7d1ac","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":714,"y":102,"wires":[]},{"id":"b35ffdb9.9eb05","type":"mqtt in","z":"31324429.f7d1ac","name":"","topic":"tele/sonoff/SENSOR","qos":"2","broker":"b219fa03.3781f8","x":282,"y":215,"wires":[["ea18aa60.babca"]]},{"id":"ea18aa60.babca","type":"json","z":"31324429.f7d1ac","name":"","property":"payload","action":"","pretty":true,"x":531.5,"y":213,"wires":[["c6f3034f.ebd078","de651a0c.c782f"]]},{"id":"de651a0c.c782f","type":"influxdb out","z":"31324429.f7d1ac","influxdb":"de82086b.a7424","name":"measurements","measurement":"sonoff","precision":"","retentionPolicy":"","x":792.5,"y":218,"wires":[]},{"id":"b219fa03.3781f8","type":"mqtt-broker","z":"","name":"TESIS","broker":"192.168.2.3","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"de82086b.a7424","type":"influxdb","z":"","hostname":"192.168.2.3","port":"8086","protocol":"http","database":"Tesis","name":"TESIS","usetls":false,"tls":""}]
Everything together along with the error message looks something like this
I copied the flow from a video I saw on youtube and it works for his sensor, unfortunately it doesn't work for mine even tho we have the same sensor. I don't know if I'm doing something wrong and I can't seem to find the problem.