Hello,
So I have this dashboard
code bellow
[{"id":"c2e8e157.a11cc","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"8fd285ae.e97da8","type":"mosca in","z":"c2e8e157.a11cc","mqtt_port":1883,"mqtt_ws_port":8080,"name":"","username":"","password":"","dburl":"","x":310,"y":100,"wires":[[]]},{"id":"af115c63.5b8398","type":"mqtt in","z":"c2e8e157.a11cc","name":"","topic":"esp32/accelerometerX","qos":"2","broker":"30e6b4e8.0662cc","x":320,"y":340,"wires":[["ce9f6912.d54f68","1b4f6c1f.e3000c"]]},{"id":"31811800.54bcc8","type":"mqtt in","z":"c2e8e157.a11cc","name":"","topic":"esp32/speed","qos":"2","broker":"30e6b4e8.0662cc","x":290,"y":140,"wires":[["bc3c5dcb.83c2c8"]]},{"id":"bc3c5dcb.83c2c8","type":"ui_gauge","z":"c2e8e157.a11cc","name":"","group":"9b963a24.e9d3d","order":4,"width":0,"height":0,"gtype":"wave","title":"Speed","label":"km/h","format":"{{value}}","min":0,"max":"250","colors":["#00b500","#e6e600","#ff0209"],"seg1":"","seg2":"","x":510,"y":140,"wires":[]},{"id":"5115a818.8843c8","type":"mqtt in","z":"c2e8e157.a11cc","name":"","topic":"esp32/movement","qos":"2","broker":"30e6b4e8.0662cc","x":300,"y":240,"wires":[["2ef834c6.7827bc","2313fd57.1fec8a","83059ea4.50a0f"]]},{"id":"2ef834c6.7827bc","type":"ui_text","z":"c2e8e157.a11cc","group":"9b963a24.e9d3d","order":3,"width":0,"height":0,"name":"","label":"Movement","format":"{{msg.payload}}","layout":"row-left","x":520,"y":280,"wires":[]},{"id":"ce9f6912.d54f68","type":"ui_text","z":"c2e8e157.a11cc","group":"9b963a24.e9d3d","order":3,"width":0,"height":0,"name":"","label":"X","format":"{{msg.payload}}","layout":"row-spread","x":510,"y":320,"wires":[]},{"id":"e2ec9c80.d45f6","type":"ui_text","z":"c2e8e157.a11cc","group":"9b963a24.e9d3d","order":3,"width":0,"height":0,"name":"","label":"Y","format":"{{msg.payload}}","layout":"row-spread","x":490,"y":440,"wires":[]},{"id":"8bea2566.934838","type":"mqtt in","z":"c2e8e157.a11cc","name":"","topic":"esp32/accelerometerY","qos":"2","broker":"30e6b4e8.0662cc","x":320,"y":400,"wires":[["e2ec9c80.d45f6","c0f7a105.86c038"]]},{"id":"2313fd57.1fec8a","type":"debug","z":"c2e8e157.a11cc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":530,"y":240,"wires":[]},{"id":"83059ea4.50a0f","type":"change","z":"c2e8e157.a11cc","name":"Set Topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"rflink","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":200,"wires":[["63ee3d4f.2206f4","5bc661ec.d1dca8"]]},{"id":"63ee3d4f.2206f4","type":"debug","z":"c2e8e157.a11cc","name":"","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","x":690,"y":220,"wires":[]},{"id":"5bc661ec.d1dca8","type":"influxdb out","z":"c2e8e157.a11cc","influxdb":"b2337330.1c6a9","name":"movements","measurement":"root","precision":"s","retentionPolicy":"","x":770,"y":160,"wires":[]},{"id":"cf704ba5.beaba8","type":"influxdb out","z":"c2e8e157.a11cc","influxdb":"b2337330.1c6a9","name":"movements","measurement":"accele","precision":"s","retentionPolicy":"","x":970,"y":340,"wires":[]},{"id":"1b4f6c1f.e3000c","type":"change","z":"c2e8e157.a11cc","name":"Topic X","rules":[{"t":"set","p":"topic","pt":"msg","to":"X","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":360,"wires":[["8e881fbd.e3b178"]]},{"id":"c0f7a105.86c038","type":"change","z":"c2e8e157.a11cc","name":"Topic Y","rules":[{"t":"set","p":"topic","pt":"msg","to":"Y","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":400,"wires":[["8e881fbd.e3b178"]]},{"id":"34f8f2c1.f95f1e","type":"function","z":"c2e8e157.a11cc","name":"Formatting","func":"var xval = msg.payload[\"X\"];//h thermokrasia poy erxetai apo to topic ekxwriseth se miametavlith\nvar yval = msg.payload[\"Y\"];\nvar data = {\n X: xval,\n Y: yval\n}\nmsg.payload = data\nreturn msg","outputs":1,"noerr":0,"x":770,"y":360,"wires":[["5c463f71.9719c"]]},{"id":"8e881fbd.e3b178","type":"join","z":"c2e8e157.a11cc","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":630,"y":380,"wires":[["34f8f2c1.f95f1e"]]},{"id":"c6e86da0.48c61","type":"debug","z":"c2e8e157.a11cc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":710,"y":300,"wires":[]},{"id":"5c463f71.9719c","type":"debug","z":"c2e8e157.a11cc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":970,"y":440,"wires":[]},{"id":"71972f91.01c318","type":"json","z":"c2e8e157.a11cc","name":"","property":"payload","action":"","pretty":false,"x":970,"y":220,"wires":[[]]},{"id":"30e6b4e8.0662cc","type":"mqtt-broker","z":"","name":"mqtt","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9b963a24.e9d3d","type":"ui_group","z":"","name":"Main","tab":"dec672d9.239ef","disp":true,"width":"6","collapse":false},{"id":"b2337330.1c6a9","type":"influxdb","z":"","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"IoT","name":"","usetls":false,"tls":""},{"id":"dec672d9.239ef","type":"ui_tab","z":"","name":"Dashboard","icon":"dashboard"}]
I send accelerometer values from a esp32 and I want to save them on a table and have this from
TIMESTAMP -- X -- Y
X and Y two different columns
So I receive them, set topics, join them with key/value object (their topics are X and Y).
then I use this function to combine them into one payload.
and then try to add them to my table but I get this error
Error: A 400 Bad Request error occurred: {"error":"unable to parse 'accele xval="182",yval=undefined': invalid boolean"}
I have seen previous asked questions but I cannot understand what I'm doing wrong.