Hi @corerootedxb - I'm new to node red, but I've been logging to influx using the SmartThings logger (initially) and then the port for Hubitat, for 3 years now.
To my surprise, I got this working right away on a new influx db!
But when I try and use it with my existing influx database (with the 3 years of data), I'm running into some data type inconsistencies.
Ex. Temp was stored as a float, but your flow wants it to be a string
Error: A 400 Bad Request error occurred: {"error":"partial write: field type conflict: input field \"value\" on measurement \"temperature\" is type string, already exists as type float dropped=1"}
and
Error: A 400 Bad Request error occurred: {"error":"partial write: field type conflict: input field \"valueBinary\" on measurement \"thermostatOperatingState\" is type float, already exists as type integer dropped=1"}
Like I said, new to node red, but it looks like the Set Influx Data
node is where any conversion happens.
If i'm reading right, Line 171 already has a catch all to push attributes like temperature in as a Number
// Catch any other general numerical event (carbonDioxide, power, energy, humidity, level, temperature, ultravioletIndex, voltage, etc).
else {
v.value = Number(msg.value);
v.isBinary = false;
}
With this in place, any idea why I'm getting the error above saying temperature is a string?
edit: scratch the above request - learning that there are a lot of nuances to the device data. Will try and overcome in code. Thanks again for the primer.