Use a trigger node . set to pass the original message, but send a 0 after 5 mins. But extend the time on every message so it never send the 0 unless it doesn't get a message.
Hi,I have an mqtt message coming in with temperature data which is linked to a gauge on the dashboard, when I turn off my raspberry pi and turn it on again a day later the gauges still have the temperature on them from the day before and it is miss leading, what I would like to do is say if the mqtt data does not come in at the specified sample time ie every 5 mins then set the gauge to zero, is this something that could easily be done, I have been ploughing through the node-red library looking for something that could compare the time that the message comes in to present time but I can't find anything.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/a0d80089-6c66-4c72-9ef3-7fa3096abdb1%40googlegroups.com.
You don't need to reset the trigger, in fact you don't want to. You want to extend the time