Send an alert if I leave a switch on #14
Replies: 1 comment 2 replies
-
I was just coming here to figure out how to implement an alarm that'll trigger just once even if the condition is ongoing. My use case is that late in the season, the speed log wheel often gets stuck and I might not immediately notice it because I just have SOG on most of the displays. I created an alarm that checks if SOG > 1kn and STW == 0 and after 30 s delay raises an alarm. That works but when implemented with Does the conditional branch and delay you used here fare any better in that regard? How about adding an rbe node in front of the alarm? That should both trigger and clear the alarm just once, right? |
Beta Was this translation helpful? Give feedback.
-
This one lets me know that I forgot to turn off the anchor washdown pump, which I do regularly.
[{"id":"d999af28.39407","type":"signalk-subscribe","z":"db137791.d0f408","name":"Anchor Washdown","mode":"sendChanges","flatten":true,"context":"vessels.self","path":"electrical.switches.anchorWashdown.state","source":"","period":1000,"x":110,"y":580,"wires":[["47ad545e.f5c0fc"]]},{"id":"47ad545e.f5c0fc","type":"switch","z":"db137791.d0f408","name":"is on","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":580,"wires":[["4d5124c6.a173b4"],["b2134d88.f1aef"]]},{"id":"cfe85a98.3870a8","type":"change","z":"db137791.d0f408","name":"alarm","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"state\":\"alarm\",\"message\":\"The Anchor Washdown was left on\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":640,"wires":[["da8f972d.8f11c8"]]},{"id":"4d5124c6.a173b4","type":"change","z":"db137791.d0f408","name":"normal","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"state\":\"normal\",\"message\":\"The Anchor Washdown is off\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":580,"wires":[["da8f972d.8f11c8"]]},{"id":"da8f972d.8f11c8","type":"signalk-send-notification","z":"db137791.d0f408","name":"Washdown Alarm","path":"electrical.washdown.running","state":"warn","message":"","visual":true,"sound":true,"source":"","x":810,"y":600,"wires":[]},{"id":"b2134d88.f1aef","type":"delay","z":"db137791.d0f408","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":110,"y":640,"wires":[["fb9dce3d.376a28"]]},{"id":"355cb6ac.4234a2","type":"switch","z":"db137791.d0f408","name":"is on","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":640,"wires":[["4d5124c6.a173b4"],["cfe85a98.3870a8"]]},{"id":"fb9dce3d.376a28","type":"function","z":"db137791.d0f408","name":"get washdown state","func":"\nlet app = global.get('app')\n\nreturn {payload: app.getSelfPath('electrical.switches.anchorWashdown.state.value')}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":640,"wires":[["355cb6ac.4234a2"]]}]
Beta Was this translation helpful? Give feedback.
All reactions