InfluxDB unable to parse invalid boolean

Hello,

When I inject the following json into influxdb out node I encounter the following error :

Error: A 400 Bad Request error occurred: {"error":"unable to parse 'msg.payload fields=[object Object],measurement=\"thermostat\",tags=[object Object]': invalid boolean"}

Here is my function :

msg.payload =
{
    measurement: "thermostat",
    fields: {
        battery: msg.payload.battery,
        local_temperature: msg.payload.local_temperature,
        setpoint_temperature: msg.payload.occupied_heating_setpoint
    },
    tags: {
        object: "danfoss_ally_entree"
    }
}
return msg;

Regards


That is not a valid message for feeding to the influx out node. Read the help text for it more carefully. I haven't got any time at the moment to go into details.

If you haven't managed to work it out, this is probably how you need to structure the data, from the help text:

If msg.payload is an array containing two objects, the first object will be written as the set of named fields, the second is the set of named tags.

And if you don't want to configure the measurement in the node then:

If the measurement field is not set in the node configuration, the user can send in data with a specified measurement name in msg.measurement to overwrite the measurement field in the configuration of the node.

Note, that is msg.measurement, not msg.payload.measurement.

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