Save data from the object to influxdb

Hello

[{"id":"5297e597a1c4de59","type":"inject","z":"d753f1f6adf829e0","name":"push","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":170,"y":340,"wires":[["7c686f9367a2f9bb"]]},{"id":"7c686f9367a2f9bb","type":"http request","z":"d753f1f6adf829e0","name":"station=WYN","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://app-prod-ws.meteoswiss-app.ch/v1/stationOverview?station=WYN","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":340,"wires":[["e51415720f17df0c","ff095262c104ede5","49b086343c02afa3"]]},{"id":"e51415720f17df0c","type":"change","z":"d753f1f6adf829e0","name":"","rules":[{"t":"move","p":"payload.WYN.temperature","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":340,"wires":[["abe3edcf637cb81c"]]},{"id":"ff095262c104ede5","type":"debug","z":"d753f1f6adf829e0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":280,"wires":[]},{"id":"49b086343c02afa3","type":"influxdb out","z":"d753f1f6adf829e0","influxdb":"d49ae852893ea877","name":"test WYN","measurement":"WYN","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":600,"y":220,"wires":[]},{"id":"abe3edcf637cb81c","type":"influxdb out","z":"d753f1f6adf829e0","influxdb":"d49ae852893ea877","name":"test WYN temp","measurement":"WYN_temp","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":1020,"y":340,"wires":[]},{"id":"d49ae852893ea877","type":"influxdb","hostname":"10.147.42.155","port":"8086","protocol":"http","database":"test","name":"test","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","rejectUnauthorized":true}]

When cleaning up to move it to Node Red 2 i also wish to improve it too.

I have this request i use.

it works if i have the node 'Change' and it store the temp like this.
the idea is to save all data without to have a node change for all wanted datas.

i got a error like

Error: A 400 Bad Request error occurred: {"error":"unable to parse 'WYN WYN=[object Object]': invalid boolean"}

is there a trick to do so? it just should start saving from the second object.

have a nice day
vinc

Hi, in general people aren't going to want to load an unknown flow to answer a question since it takes time to do and undo and you are never quite sure what nodes/tabs are included.

The error is pretty clear, you are passing an object to something that wants a boolean true/false.

ok some people ask for the flow to understand

this is the output
msg.payload : Object
object
WYN: object
stationId: "WYN"
time: 1627460743117
temperature: 16.4
windSpeed: 5.4
windDirection: 230

i don't know how to by pass the first object and then only keep the second one with data!

found it

from the change node
payload.WYN.temperatur just cut it down to
payload.WYN
and works fine and smart
and more easy as expected!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.