I read sensor data from a Hardware every second and plot it on the Dashboard.
I am trying to set up an alarm notification when I do not receive inputs from my sensors for a period of time say 10 seconds.
[{"id":"6eeb18ba.266468","type":"trigger","z":"7a7953cd.e2257c","name":"","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"10","extend":true,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":480,"y":620,"wires":[["1a65b436.94b58c"]]},{"id":"9c5f9eae.edc54","type":"inject","z":"7a7953cd.e2257c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":290,"y":640,"wires":[["6eeb18ba.266468"]]},{"id":"1a65b436.94b58c","type":"change","z":"7a7953cd.e2257c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"check 1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":620,"wires":[["5961099e.552a88"]]},{"id":"5961099e.552a88","type":"debug","z":"7a7953cd.e2257c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":620,"wires":[]}]
-
I have used the trigger node to set up a 10 seconds delay and get the notification if in case there is no input for 10 secs. I am not sure when I should use the ' second message to separate output' or Reset of trigger option. Can anyone kindly explain this?
-
I also need a functionality where I do not receive the alarms every 10 seconds from the same sensor. If I have received an alarm notification once, then I need it to send after 30 secs. So I have added a second trigger node as shown here.
[{"id":"6eeb18ba.266468","type":"trigger","z":"7a7953cd.e2257c","name":"","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"10","extend":true,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":490,"y":660,"wires":[["1a65b436.94b58c"]]},{"id":"9c5f9eae.edc54","type":"inject","z":"7a7953cd.e2257c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":680,"wires":[["6eeb18ba.266468"]]},{"id":"1a65b436.94b58c","type":"change","z":"7a7953cd.e2257c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"check 1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":660,"wires":[["9f9368f7.38f018"]]},{"id":"5961099e.552a88","type":"debug","z":"7a7953cd.e2257c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":660,"wires":[]},{"id":"9f9368f7.38f018","type":"trigger","z":"7a7953cd.e2257c","name":"","op1":"","op2":"","op1type":"pay","op2type":"pay","duration":"30","extend":true,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":890,"y":660,"wires":[["5961099e.552a88"]]}]
Is there any other way I can improve the flow here?
I would be happy to receive your suggestions and corrections if you find any mistake in my nodes.
Thank you for helping out.