Dashboard Gauges that return to 0 if no input

Hi,
I I have some gauges that are driven by the input from mqtt sensors that arives every couple of minutes if all is working, now the gauges don't act like normal gauges and if the mqtt topics stop coming in then the gauges are still displaying the last input which leads to problems, what would be the best way to overcome this, is it to send a 0 value to the gauge ?

Thanks
Stuart

You can use a trigger node to send 0 if no input for x minutes. Set to send nothing, extend delay if message received, then send 0.

Hi,

Is the correct setup ?


Thanks
Stuart

Not quite as you want the og message to go to gauge even if trigger is waiting. Also you are sending "0" a string, which will work for some gauges but best to send 0 a number
This is correct

[{"id":"46e9ca6abf0bc688","type":"inject","z":"b779de97.b1b46","name":"mqtt in","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":7220,"wires":[["7916fa6baec05626","397818ab07c739a7"]]},{"id":"7916fa6baec05626","type":"debug","z":"b779de97.b1b46","name":"gauge","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":390,"y":7220,"wires":[]},{"id":"397818ab07c739a7","type":"trigger","z":"b779de97.b1b46","name":"","op1":"","op2":"0","op1type":"nul","op2type":"num","duration":"3","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":270,"y":7160,"wires":[["7916fa6baec05626"]]}]
1 Like

Hi E1cid,

Thanks for the Json file, I will try it on my gauges

Stuart

Hi,

The way you have wired it is key too as I would of put the node in between the MQTT node and the Gauge, didn't think of putting it in parallel

Thanks
Stuart

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