mblackstock / node-red-contrib-influxdb

Node-RED nodes to save and query data from an influxdb time series database
Other
64 stars 44 forks source link

tag with false boolean not working #107

Closed soleous closed 2 years ago

soleous commented 2 years ago

Hi,

I am setting a boolean on a tag, but it's not getting into influxdb2.0 and only see true values. I am doing it to the batch node, example of my function/payload:

msg.payload = [
    {
        measurement: "default",
        fields: {
            data: 1
        },
        tags:{
            sensor: "new",
            lowBattery: false
        },
        timestamp: new Date()
    }
]

return msg;

Thanks,

AxelRHD commented 8 months ago

I have the same problem. Seems to be not solved.

This is the tag-object:

{
  "device": "LEQ0785938",
  "device_name": "Heizungsthermostat (Bad)",
  "room": "badezimmer",
  "from_cron": false
}

The from_cron value is missing when false.

mblackstock commented 8 months ago

Tags are stored as strings in influxdb so there's no point in using boolean values. Try "true" and "false"

AxelRHD commented 8 months ago

Tags are stored as strings in influxdb so there's no point in using boolean values. Try "true" and "false"

Okay, thank you for the fast response. I really missed that.