Unfortunately no luck.
Just to be clear "MQTT msg" node includes that function node what you provided earlier.
And both MQTT nodes (in and out) are reading the same database room/basement.
Unfortunately no luck.
Just to be clear "MQTT msg" node includes that function node what you provided earlier.
And both MQTT nodes (in and out) are reading the same database room/basement.
Are you certain? It looks right? Odd
Did you include the return msg
part?
As a test, please change the new function node to contain ALL of the below...
node.warn({ topic: msg.topic, payload: msg.payload})
const data = msg.payload;
msg.payload = data.value
msg.measurement = data.loc
node.warn({ fullMsg: msg})
return msg;
edit - DOH! - I think it should be .value
not .temperature
I have updated the above code.
ALSO
Edit "debug 207" to output the "Complete Message"
I would have thought that it would be better to have the location as a tag rather than sending all the locations to different measurements.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.