Sensor data upon start

I suspect this is the wrong forum to ask this, and it's probably device-specific, but is there a way to "prod" sensors to send their complete data set when NR starts up? I'm using Hubitat via MQTT.

Thanks

Do you have control over the produce commands? If you set the MQTT publish commands to "retain" then when node-red starts and MQTT subscriptions occur, you'll get latest values.

Alternatively, you can store the values yourself in file backed store and load from this file on node-red start.

Finally, you could re-publish the mqtt values to new topics and add the retain option. Then use the new topics in your project.

Thank you. Using retain may be just the ticket.

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