Skip to content

Commit f6312e4

Browse files
committed
docs: add ac in voltage alarm
1 parent a0ce6eb commit f6312e4

File tree

2 files changed

+1
-0
lines changed

2 files changed

+1
-0
lines changed

examples/ac-in-voltage-alarm.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"id":"9d05e907.a5601","type":"tab","label":"Notifications","disabled":false,"info":""},{"id":"503db258.f8687c","type":"signalk-on-delta","z":"9d05e907.a5601","name":"","x":120,"y":120,"wires":[["db06e6a5.373ac"]]},{"id":"5c3cf53f.1e26ec","type":"switch","z":"9d05e907.a5601","name":"is AC in voltage","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"electrical.inverters.261.acin.voltage","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":240,"wires":[["b446df4c.06ef4"]]},{"id":"fe80fbfd.66aad","type":"delay","z":"9d05e907.a5601","name":"","pauseType":"timed","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":550,"y":120,"wires":[["5c3cf53f.1e26ec"]]},{"id":"b446df4c.06ef4","type":"switch","z":"9d05e907.a5601","name":"switch Voltage","property":"payload.value","propertyType":"msg","rules":[{"t":"lt","v":"100","vt":"str"},{"t":"gte","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":520,"y":300,"wires":[["251357d4.37f9f"],["e515e21.ad267a"]]},{"id":"251357d4.37f9f","type":"function","z":"9d05e907.a5601","name":"alarm if < 50ft from slip","func":"\n\nlet geodist = global.get('geodist')\nlet app = global.get('app')\n\nlet slipLocation = { \n lat : 39.063125,\n lon: -76.4872533333333\n}\n\nlet pos = app.getSelfPath('navigation.position.value')\n\nif ( pos ) {\n let distanceFromSlip = geodist(slipLocation, \n {lat: pos.latitude, lon: pos.longitude}, { units: 'feet'})\n //node.log(`dist: ${distanceFromSlip}`);\n let alarm\n if ( distanceFromSlip < 50 ) {\n alarm = {state: 'alarm', message: 'AC in Voltage is less than 100V'}\n } else {\n alarm = {state: 'normal', message: 'AC in Voltage is normal'}\n }\n \n return { payload: alarm }\n}\n\n","outputs":1,"noerr":0,"x":550,"y":360,"wires":[["e515e21.ad267a"]]},{"id":"db06e6a5.373ac","type":"signalk-flatten-delta","z":"9d05e907.a5601","name":"","x":340,"y":120,"wires":[["fe80fbfd.66aad"]]},{"id":"e515e21.ad267a","type":"signalk-send-notification","z":"9d05e907.a5601","name":"AC in Alarm","path":"electrical.inverters.261.acin.voltage","state":"normal","message":"AC Voltage is normal","visual":true,"sound":true,"x":750,"y":320,"wires":[]}]

screens/ac-in-voltage-alarm.jpeg

216 KB
Loading

0 commit comments

Comments
 (0)