Node-red-contrib-homekit-bridged: [Setup Help]: Security System together with node-red-contrib-alarm

Created on 4 Dec 2020  路  13Comments  路  Source: NRCHKB/node-red-contrib-homekit-bridged

Setup Help
Physical hardware device: node-red @ rasp3 and alarm components from homematic
HomeKit Service being used: SecuritySystem

Current Flow

[{"id":"7779032.8e668fc","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"1f227af9.cf9645","type":"group","z":"7779032.8e668fc","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["4cce9609.961778","a6e0fdea.7190f","2b787d83.814e32"],"x":54,"y":199,"w":672,"h":82},{"id":"c7194ee3.90da8","type":"group","z":"7779032.8e668fc","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["b08534e2.268f28","34c8ac87.751214","579dbba8.492614"],"x":54,"y":99,"w":672,"h":82},{"id":"b08534e2.268f28","type":"homekit-service","z":"7779032.8e668fc","g":"c7194ee3.90da8","isParent":true,"bridge":"22d4e8fc.af3ef8","parentService":"","name":"Alarmanlage","serviceName":"SecuritySystem","topic":"","filter":false,"manufacturer":"NRCHKB","model":"1.2.0","serialNo":"Default Serial Number","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","waitForSetupMsg":false,"outputs":2,"x":390,"y":140,"wires":[["579dbba8.492614"],[]]},{"id":"34c8ac87.751214","type":"AnamicoAlarmStateChanged","z":"7779032.8e668fc","g":"c7194ee3.90da8","name":"State Changed","panel":"3a8de6f2.bd172a","format":"1","sendInitialState":1,"x":160,"y":140,"wires":[["b08534e2.268f28"]]},{"id":"579dbba8.492614","type":"AnamicoAlarmChangeState","z":"7779032.8e668fc","g":"c7194ee3.90da8","name":"Change State","panel":"3a8de6f2.bd172a","format":"1","x":620,"y":140,"wires":[]},{"id":"4cce9609.961778","type":"AnamicoAlarmStateChanged","z":"7779032.8e668fc","g":"1f227af9.cf9645","name":"State Changed","panel":"3a8de6f2.bd172a","format":"2","sendInitialState":1,"x":160,"y":240,"wires":[["2b787d83.814e32"]]},{"id":"a6e0fdea.7190f","type":"AnamicoAlarmChangeState","z":"7779032.8e668fc","g":"1f227af9.cf9645","name":"Change State","panel":"3a8de6f2.bd172a","format":"2","x":620,"y":240,"wires":[]},{"id":"2b787d83.814e32","type":"ui_dropdown","z":"7779032.8e668fc","g":"1f227af9.cf9645","name":"","label":"","tooltip":"","place":"Select option","group":"cd8db9ac.c86458","order":4,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"Home","value":0,"type":"num"},{"label":"Away","value":"1","type":"str"},{"label":"Night","value":"2","type":"str"},{"label":"Off","value":"3","type":"str"}],"payload":"","topic":"","x":390,"y":240,"wires":[["a6e0fdea.7190f"]]},{"id":"22d4e8fc.af3ef8","type":"homekit-bridge","bridgeName":"HomeKitNodRed","pinCode":"111-11-111","port":"","allowInsecureRequest":true,"manufacturer":"NRCHKB","model":"1.2.0","serialNo":"Default Serial Number","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true},{"id":"3a8de6f2.bd172a","type":"AnamicoAlarmPanel","name":"@Home"},{"id":"cd8db9ac.c86458","type":"ui_group","name":"Au脽en","tab":"855c3b15.563748","order":1,"disp":true,"width":"4","collapse":false},{"id":"855c3b15.563748","type":"ui_tab","name":"Steuerung","icon":"dialpad","order":4,"disabled":false,"hidden":false}]

Help Needed
Do you have any example how to setup security system? there is no doc. the flow works basicly, but together with node-red-contrib-alarm i'm facing some problems. i'm not sure if it errors occours by this package or node-red-contrib-alarm.

i can control the security system with my ios home app very well. if i create a dropdown in my node-red dash. if i set for example "night" at this dropdown the securitysystem node does not sent or sent a wrong message to the change state node.
the status on the security remains in the old "mode".

in ios the button appears as working, but never stops

maybe its just an setup error.

kind regards

help wanted

Most helpful comment

I just stumbled on this while searching for something else. I'm the author of node-red-contrib-alarm.

You just neglected to set the topic on the dashboard widget. It's not an issue with either nodes, node-red-contrib-homekit (and node-red-contrib-alarm) needs the topic : payload.SecuritySystemTargetState so it knows what to apply the value to.

Let me know if you think it doesn't need it, or there is a better way, and I'll look to updating the package.

Please close at bountysource.

All 13 comments

Hi, let鈥檚 start with some details
Please tell versions of: Node, Node-Red, NRCHKB.

Also if you are unsure about other node which is not developed by us I would start with debug node and try to figure it out.

Calling @crxporter for help :)

sorry, for that
Node: 10.23.0
Nodered: 1.2.6
NRCHKB: 1.2.0

Hello! Yes I have a security system built with zwave sensors over mqtt, all logic is in nodered, and I use homepod for the "alarm sounds"

...wanna see it??

Alright, this should import a full "tab" in nodered. But some background first. You should see 5 nodered groups when you import this, they are:
1- Triggers. This has the sensor inputs, I have inputs from z-wave motion detectors, security camera motion detection (not currently used), and my door sensors, if they are true they go into a function node to check whether the system is armed
2- Arm Auto. This takes my "presence" messages from other flows, it triggers whenever we are all home or all away. The system arms automatically when we leave home and disarms automatically when we come back. There are a couple of rules in Home app for disarming, I can show those later in screenshots.
3- Alarm. This is where the state handling is dealt with, where the flow.set context items are set, and where we check if we need to "sound the alarm"
4- Sound and visitors. We have a programmable button for alarm noise, used in Home app to play Jaws attack during the first bit of alarm then more intense alarm noises.
5- Additional sensors. Just an area to move my zwave sensors into homekit.

Without further delay, have some flows:

[{"id":"87e774f7.91d8f8","type":"tab","label":"Security","disabled":false,"info":""},{"id":"11f0e904.549e37","type":"group","z":"87e774f7.91d8f8","name":"Arm auto","style":{"label":true},"nodes":["e2fd85e9.38bb4","e1e11909.18e3d8","9deff4a1.6df128","135b1e8a.7a14e1","4902c009.ac012","eddf0335.df73e","b330d823.b9eed","c7f10093.d4e3c","13717d20.fe1b3b","dbd0c4bf.b18d28","488635a7.63d604","294d8b56.ec24f4"],"x":154,"y":519,"w":882,"h":242},{"id":"166250fe.be1357","type":"group","z":"87e774f7.91d8f8","name":"Triggers","style":{"label":true},"nodes":["c0bfc4d0.f5a2a8","9c881e5a.7fb18","ef849efa.988588","d55efbc1.28507","75ac6fcd.2d15a","24889f71.04343","c1aa7528.eed688","75bafd68.9f5a44","407dfc4a.f688a4","36f928bd.7e43a8","51fe778.a9d7e08","bddd7a40.77e118","1c7039a2.faf47e","80a294f9.1f96d8","54edee92.9c4708","701de66d.45631","4799416b.69b97","5e6cb16f.1f8498","873e0b18.6f5cb8"],"x":154,"y":39,"w":882,"h":442},{"id":"49a505b1.72460c","type":"group","z":"87e774f7.91d8f8","name":"Alarm","style":{"label":true},"nodes":["1d31f18d.920b6e","b8ab619.cf9d52","7a8cba26.372e0c","a091c7b1.1d0ff","f860bd7b.bce7e","dd75420c.a1609","c61ac9a.66fbbb8","d9ddc2ee.ec6008","aff8c0f7.852d1","30488ce4.353064","a4f9a3a.7b4f06","5f6f28d1.616178","78306bd3.6e1e3c"],"x":154,"y":799,"w":1242,"h":222},{"id":"a5e5e994.4089d","type":"group","z":"87e774f7.91d8f8","name":"Additional sensors","style":{"label":true},"nodes":["cb23a4bf.deb8f8","6008f1ae.098f98","b350019d.eee9c8","bae4a071.06ff98","a0c5ca19.bbe1c8","1cc25c73.f68334","47bf2d27.d35b6c","ca6dc6cb.5fe1a8","88c5bb10.366d3","f7268956.17d0b8","f6a4bbd2.890a68","33400977.29ada6"],"x":1074,"y":39,"w":732,"h":322},{"id":"d5db8b00.f740c8","type":"group","z":"87e774f7.91d8f8","name":"Sound and visitors","style":{"label":true},"nodes":["a9becec5.a23c2","8f051ede.7a49c8","5b4ce46a.aaa6a4","dab2a442.1191c","3472b6ff.d353aa","7ec28de5.4b540c"],"x":154,"y":1059,"w":752,"h":122},{"id":"c0bfc4d0.f5a2a8","type":"mqtt in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"OHD 1","topic":"zwave/Door/Heidi/48/1/0","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":230,"y":260,"wires":[["ef849efa.988588"]]},{"id":"9c881e5a.7fb18","type":"switch","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"True","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"255","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":80,"wires":[["1c7039a2.faf47e"]]},{"id":"ef849efa.988588","type":"switch","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"True","property":"payload.value","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":430,"y":320,"wires":[["4799416b.69b97"]]},{"id":"d55efbc1.28507","type":"link in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Security Cam Motion","links":["4c710694.2062f"],"x":280,"y":140,"wires":[["75ac6fcd.2d15a"]],"l":true},{"id":"75ac6fcd.2d15a","type":"switch","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"True","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":140,"wires":[[]]},{"id":"24889f71.04343","type":"mqtt in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Back Door","topic":"zwave/Door/Back/48/1/0","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":240,"y":380,"wires":[["ef849efa.988588"]]},{"id":"c1aa7528.eed688","type":"mqtt in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"OHD 2","topic":"zwave/Door/Garrett/48/1/0","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":230,"y":320,"wires":[["ef849efa.988588"]]},{"id":"75bafd68.9f5a44","type":"mqtt in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Front Door","topic":"zwave/Door/Front/48/1/0","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":240,"y":440,"wires":[["ef849efa.988588"]]},{"id":"407dfc4a.f688a4","type":"mqtt in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Garage Door","topic":"zwave/Door/Garage/48/1/0","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":250,"y":200,"wires":[["36f928bd.7e43a8"]]},{"id":"36f928bd.7e43a8","type":"switch","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"True","property":"payload.value","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":200,"wires":[["1c7039a2.faf47e"]]},{"id":"e2fd85e9.38bb4","type":"function","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"Presence","func":"// global.set('presence',msg.payload)\n\nconst heidiHome ={\n    payload: msg.payload.heidiHome\n}\n\nconst garrettHome = {\n    payload: msg.payload.garrettHome\n}\n\nconst anyoneHome = {\n    payload: msg.payload.anyoneHome\n}\n\nflow.set('AnyoneHome',anyoneHome.payload);\n\nreturn [heidiHome,garrettHome,anyoneHome];\n","outputs":3,"noerr":0,"initialize":"","finalize":"","x":440,"y":580,"wires":[[],[],["9deff4a1.6df128"]],"outputLabels":["Heidi","Garrett","Anyone"]},{"id":"a9becec5.a23c2","type":"inject","z":"87e774f7.91d8f8","g":"d5db8b00.f740c8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"On\":true}","payloadType":"json","x":520,"y":1100,"wires":[["3472b6ff.d353aa"]]},{"id":"8f051ede.7a49c8","type":"inject","z":"87e774f7.91d8f8","g":"d5db8b00.f740c8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"On\":false}","payloadType":"json","x":510,"y":1140,"wires":[["3472b6ff.d353aa"]]},{"id":"5b4ce46a.aaa6a4","type":"change","z":"87e774f7.91d8f8","g":"d5db8b00.f740c8","name":"Visitor","rules":[{"t":"set","p":"Visitor","pt":"flow","to":"payload.On","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":1120,"wires":[[]]},{"id":"e1e11909.18e3d8","type":"mqtt in","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"Presence","topic":"global/presence/share","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":260,"y":580,"wires":[["e2fd85e9.38bb4"]]},{"id":"9deff4a1.6df128","type":"function","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"Arm when leaving","func":"const Visitor = flow.get('Visitor')||false;\nconst CurrentState = flow.get('CurrentState');\n\nif (Visitor === false && CurrentState === 3){\n    return msg;\n}\n\n\nreturn;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":650,"y":580,"wires":[["135b1e8a.7a14e1","4902c009.ac012"]]},{"id":"135b1e8a.7a14e1","type":"trigger","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"29 min","op1":"","op2":"{\"SecuritySystemTargetState\":1}","op1type":"nul","op2type":"json","duration":"29","extend":false,"units":"min","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":870,"y":560,"wires":[["eddf0335.df73e"]]},{"id":"4902c009.ac012","type":"trigger","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"30 min","op1":"","op2":"{\"SecuritySystemCurrentState\":1}","op1type":"nul","op2type":"json","duration":"30","extend":false,"units":"min","reset":"true","bytopic":"all","outputs":1,"x":870,"y":620,"wires":[["eddf0335.df73e"]]},{"id":"1d31f18d.920b6e","type":"homekit-service","z":"87e774f7.91d8f8","g":"49a505b1.72460c","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"Security","serviceName":"SecuritySystem","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":340,"y":880,"wires":[["b8ab619.cf9d52","7a8cba26.372e0c"],[]]},{"id":"7a8cba26.372e0c","type":"function","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Disarm on HK command","func":"const CommandIn = msg.payload;\n\nif (CommandIn.SecuritySystemCurrentState !== undefined) {\n    flow.set('CurrentState', CommandIn.SecuritySystemCurrentState);\n}\n\nif (CommandIn.SecuritySystemTargetState !== undefined) {\n    flow.set('TargetState', CommandIn.SecuritySystemTargetState);\n}\n\nnewMsg = {};\n\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n    if (CommandIn.SecuritySystemTargetState === 3) {\n        newMsg.payload = {\n            SecuritySystemCurrentState: 3\n        };\n        return [newMsg, newMsg, null];\n    }\n    if (CommandIn.SecuritySystemTargetState === 2) {\n        newMsg.payload = {\n            SecuritySystemCurrentState: 2\n        };\n        return [null, newMsg, null];\n    }\n    if (CommandIn.SecuritySystemTargetState === 1) {\n        newMsg.payload = {\n            SecuritySystemCurrentState: 1\n        };\n        return [null, newMsg, null];\n    }\n    if (CommandIn.SecuritySystemTargetState === 0) {\n        newMsg.payload = {\n            SecuritySystemCurrentState: 0\n        };\n        return [null, newMsg, null];\n    }\n}\n\nif (CommandIn.SecuritySystemCurrentState !== undefined) {\n    if (CommandIn.SecuritySystemCurrentState === 4) {\n        newMsg.payload = {\n            \"ProgrammableSwitchEvent\": 1\n        };\n        return [null, null, newMsg];\n    }\n}\n\nreturn;","outputs":3,"noerr":0,"initialize":"","finalize":"","x":590,"y":900,"wires":[["dd75420c.a1609"],["c61ac9a.66fbbb8"],["d9ddc2ee.ec6008"]],"outputLabels":["Disarm","Arm","ALARM"]},{"id":"dd75420c.a1609","type":"link out","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Security Command","links":["a091c7b1.1d0ff"],"x":835,"y":840,"wires":[]},{"id":"a091c7b1.1d0ff","type":"link in","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Security Command","links":["dd75420c.a1609","eddf0335.df73e","294d8b56.ec24f4","80a294f9.1f96d8","701de66d.45631","873e0b18.6f5cb8"],"x":195,"y":880,"wires":[["1d31f18d.920b6e"]]},{"id":"c61ac9a.66fbbb8","type":"trigger","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"15","extend":false,"units":"s","reset":"","bytopic":"all","outputs":1,"x":850,"y":880,"wires":[["dd75420c.a1609"]]},{"id":"eddf0335.df73e","type":"link out","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"Security Command","links":["a091c7b1.1d0ff"],"x":995,"y":580,"wires":[]},{"id":"b330d823.b9eed","type":"inject","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 22 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"Night","payloadType":"str","x":270,"y":660,"wires":[["13717d20.fe1b3b"]]},{"id":"c7f10093.d4e3c","type":"inject","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"Morning","payloadType":"str","x":260,"y":700,"wires":[["13717d20.fe1b3b"]]},{"id":"13717d20.fe1b3b","type":"function","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"Arm night","func":"const Visitor = flow.get('Visitor')||false;\nconst AnyoneHome = flow.get('AnyoneHome');\nconst CurrentState = flow.get('CurrentState');\n\nif (msg.payload === \"Night\" && CurrentState === 3){\n    if (AnyoneHome === true && Visitor === false){\n        return [msg,null];\n    }\n} else if (msg.payload === \"Morning\"){\n    if (AnyoneHome === true){\n        return [null,msg];\n    }\n}\n\nreturn;\n","outputs":2,"noerr":0,"initialize":"","finalize":"","x":440,"y":680,"wires":[["dbd0c4bf.b18d28"],["488635a7.63d604"]]},{"id":"dbd0c4bf.b18d28","type":"trigger","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"NIGHT","op1":"{\"SecuritySystemTargetState\":2}","op2":"{\"SecuritySystemCurrentState\":2}","op1type":"json","op2type":"json","duration":"15","extend":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":610,"y":660,"wires":[["294d8b56.ec24f4"]]},{"id":"488635a7.63d604","type":"trigger","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"DISARM","op1":"{\"SecuritySystemTargetState\":3}","op2":"{\"SecuritySystemCurrentState\":3}","op1type":"json","op2type":"json","duration":"5","extend":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":720,"wires":[["294d8b56.ec24f4"]]},{"id":"294d8b56.ec24f4","type":"link out","z":"87e774f7.91d8f8","g":"11f0e904.549e37","name":"Security Command","links":["a091c7b1.1d0ff"],"x":755,"y":680,"wires":[]},{"id":"51fe778.a9d7e08","type":"comment","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Night only","info":"","x":820,"y":280,"wires":[]},{"id":"bddd7a40.77e118","type":"comment","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Home or Away","info":"","x":800,"y":160,"wires":[]},{"id":"1c7039a2.faf47e","type":"function","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Home or Away ALARM","func":"const TargetState = flow.get('TargetState');\n\nlet newMsg = {};\n\nif (TargetState === 0){\n    newMsg.payload = {\n        \"SecuritySystemCurrentState\":4\n    };\n    // \"ALARM\";\n    return [newMsg,null];\n}\nif (TargetState === 1){\n    newMsg.payload = {\n        \"SecuritySystemCurrentState\":4\n    };\n    // \"ALARM\";\n    return [null,newMsg];\n}\n\nreturn;","outputs":2,"noerr":0,"initialize":"","finalize":"","x":830,"y":200,"wires":[["80a294f9.1f96d8"],["873e0b18.6f5cb8"]],"outputLabels":["Alarm Home","Alarm Away"]},{"id":"80a294f9.1f96d8","type":"link out","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Alarm while kids home alone","links":["a091c7b1.1d0ff"],"x":995,"y":180,"wires":[]},{"id":"54edee92.9c4708","type":"function","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Night ALARM","func":"const TargetState = flow.get('TargetState');\n\nif (TargetState === 2){\n    let newMsg= {\n        payload: {\n            \"SecuritySystemCurrentState\":4\n        }\n    }\n    // \"ALARM\";\n    return newMsg;\n}\n\nreturn;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":320,"wires":[["701de66d.45631"]],"outputLabels":["Alarm Night"]},{"id":"701de66d.45631","type":"link out","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Alarm while night","links":["a091c7b1.1d0ff"],"x":975,"y":320,"wires":[]},{"id":"d9ddc2ee.ec6008","type":"switch","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Target State","property":"TargetState","propertyType":"flow","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":850,"y":940,"wires":[[],["aff8c0f7.852d1","30488ce4.353064"],["aff8c0f7.852d1","30488ce4.353064"]],"outputLabels":["Home","Away","Night"]},{"id":"a4f9a3a.7b4f06","type":"switch","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"! disarmed","property":"TargetState","propertyType":"flow","rules":[{"t":"neq","v":"3","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1230,"y":980,"wires":[["78306bd3.6e1e3c"]]},{"id":"aff8c0f7.852d1","type":"trigger","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"","op1":"","op2":"{\"ProgrammableSwitchEvent\": 2}","op1type":"nul","op2type":"json","duration":"55","extend":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1050,"y":980,"wires":[["a4f9a3a.7b4f06"]]},{"id":"b8ab619.cf9d52","type":"function","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Pause Music","func":"let ThisInput = msg.payload;\n\nlet newMsg = {};\n\nif (ThisInput.SecuritySystemTargetState !== undefined){\n    if (ThisInput.SecuritySystemTargetState === 3){\n        newMsg.payload = {\n            \"ProgrammableSwitchEvent\": 0\n        }\n        return newMsg;\n    }\n}\n\nreturn;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":550,"y":840,"wires":[["f860bd7b.bce7e"]]},{"id":"f860bd7b.bce7e","type":"link out","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Alarm Sounds","links":["dab2a442.1191c"],"x":675,"y":840,"wires":[]},{"id":"dab2a442.1191c","type":"link in","z":"87e774f7.91d8f8","g":"d5db8b00.f740c8","name":"Alarm Sounds","links":["5f6f28d1.616178","78306bd3.6e1e3c","f860bd7b.bce7e"],"x":195,"y":1100,"wires":[["7ec28de5.4b540c"]]},{"id":"78306bd3.6e1e3c","type":"link out","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Loud Sounds","links":["dab2a442.1191c"],"x":1355,"y":980,"wires":[]},{"id":"5f6f28d1.616178","type":"link out","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"Jaws Sounds","links":["dab2a442.1191c"],"x":1175,"y":920,"wires":[]},{"id":"30488ce4.353064","type":"switch","z":"87e774f7.91d8f8","g":"49a505b1.72460c","name":"! disarmed","property":"TargetState","propertyType":"flow","rules":[{"t":"neq","v":"3","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1050,"y":920,"wires":[["5f6f28d1.616178"]]},{"id":"3472b6ff.d353aa","type":"homekit-service","z":"87e774f7.91d8f8","g":"d5db8b00.f740c8","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"Visitor","serviceName":"Switch","topic":"","filter":false,"manufacturer":"Garrett","model":"Dummy","serialNo":"93","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":690,"y":1120,"wires":[["5b4ce46a.aaa6a4"],[]]},{"id":"7ec28de5.4b540c","type":"homekit-service","z":"87e774f7.91d8f8","g":"d5db8b00.f740c8","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"Alarm Noise","serviceName":"StatelessProgrammableSwitch","topic":"","filter":false,"manufacturer":"Garrett","model":"Noise","serialNo":"94","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":330,"y":1100,"wires":[[],[]]},{"id":"4799416b.69b97","type":"delay","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"","pauseType":"delay","timeout":"9","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":320,"wires":[["54edee92.9c4708","1c7039a2.faf47e"]]},{"id":"5e6cb16f.1f8498","type":"mqtt in","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Z-wave Motion","topic":"zwave/Motion/+/event","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":260,"y":80,"wires":[["9c881e5a.7fb18"]]},{"id":"cb23a4bf.deb8f8","type":"function","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","name":"Sensors","func":"let sensor = msg.topic;\n\nlet Topic = msg.topic.replace('zwave/', '');\nlet newMsg = {};\n\nif (sensor.endsWith('48/1/0')) {\n    // DOOR\n    newMsg.topic = Topic.replace('48/1/0', 'Door');\n    newMsg.payload = {\n        ContactSensorState: msg.payload.value\n    }\n    return newMsg;\n} else if (sensor.endsWith('128/1/0')) {\n    // BATT\n    newMsg.topic = Topic.replace('128/1/0', 'Batt');\n    newMsg.payload = {\n        BatteryLevel: msg.payload.value,\n        StatusLowBattery: (msg.payload.value < 15)\n    }\n    return newMsg;\n}\n\nreturn;\n\n// zwave/Door/Back/48/1/0","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1300,"y":200,"wires":[["6008f1ae.098f98","b350019d.eee9c8","bae4a071.06ff98","a0c5ca19.bbe1c8","1cc25c73.f68334","47bf2d27.d35b6c","ca6dc6cb.5fe1a8","88c5bb10.366d3","f7268956.17d0b8","f6a4bbd2.890a68"]]},{"id":"6008f1ae.098f98","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"OHD 1","serviceName":"ContactSensor","topic":"Door/Heidi/Door","filter":true,"manufacturer":"Ecolink","model":"Tilt","serialNo":"330-3-4","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1450,"y":100,"wires":[[],[]]},{"id":"b350019d.eee9c8","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":false,"bridge":"f6e3ae59.c33c3","parentService":"6008f1ae.098f98","name":"OHD 1 Batt","serviceName":"BatteryService","topic":"Door/Heidi/Batt","filter":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1470,"y":140,"wires":[[],[]]},{"id":"bae4a071.06ff98","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"OHD 2","serviceName":"ContactSensor","topic":"Door/Garrett/Door","filter":true,"manufacturer":"Ecolink","model":"Tilt","serialNo":"330-3-4","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1650,"y":80,"wires":[[],[]]},{"id":"a0c5ca19.bbe1c8","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":false,"bridge":"","parentService":"bae4a071.06ff98","name":"OHD 2 Batt","serviceName":"BatteryService","topic":"Door/Garrett/Batt","filter":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1670,"y":120,"wires":[[],[]]},{"id":"1cc25c73.f68334","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"Family Room Door","serviceName":"ContactSensor","topic":"Door/Garage/Door","filter":true,"manufacturer":"Ecolink","model":"Door","serialNo":"330-2-4","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1690,"y":180,"wires":[[],[]]},{"id":"47bf2d27.d35b6c","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":false,"bridge":"","parentService":"1cc25c73.f68334","name":"Family Room Batt","serviceName":"BatteryService","topic":"Door/Garage/Batt","filter":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1690,"y":220,"wires":[[],[]]},{"id":"ca6dc6cb.5fe1a8","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"Back Door","serviceName":"ContactSensor","topic":"Door/Back/Door","filter":true,"manufacturer":"Ecolink","model":"Door","serialNo":"330-2-4","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1490,"y":260,"wires":[[],[]]},{"id":"88c5bb10.366d3","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":false,"bridge":"","parentService":"ca6dc6cb.5fe1a8","name":"Back Batt","serviceName":"BatteryService","topic":"Door/Back/Batt","filter":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","softwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","waitForSetupMsg":false,"outputs":2,"x":1480,"y":300,"wires":[[],[]]},{"id":"f7268956.17d0b8","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":true,"bridge":"f6e3ae59.c33c3","parentService":"","name":"Entry Door","serviceName":"ContactSensor","topic":"Door/Front/Door","filter":true,"manufacturer":"Ecolink","model":"Door","serialNo":"330-2-4","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1670,"y":280,"wires":[[],[]]},{"id":"f6a4bbd2.890a68","type":"homekit-service","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","isParent":false,"bridge":"","parentService":"f7268956.17d0b8","name":"Entry Batt","serviceName":"BatteryService","topic":"Door/Front/Batt","filter":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","outputs":2,"x":1660,"y":320,"wires":[[],[]]},{"id":"33400977.29ada6","type":"mqtt in","z":"87e774f7.91d8f8","g":"a5e5e994.4089d","name":"Doors","topic":"zwave/Door/#","qos":"1","datatype":"json","broker":"5d1bb4a1.a59df4","x":1150,"y":200,"wires":[["cb23a4bf.deb8f8"]]},{"id":"873e0b18.6f5cb8","type":"link out","z":"87e774f7.91d8f8","g":"166250fe.be1357","name":"Alarm while away","links":["a091c7b1.1d0ff"],"x":995,"y":220,"wires":[]},{"id":"5d1bb4a1.a59df4","type":"mqtt-broker","name":"zQTT","broker":"10.1.1.2","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"f6e3ae59.c33c3","type":"homekit-bridge","bridgeName":"Security","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]

Note: I have not looked at your flow. I haven't used node-red-contrib-alarm ... I went the full blown DIY route. I'm happy if it's helpful, and I haven't wasted too much time if it's not helpful.

PS: I just had a look at node-red-contrib-alarm and noticed that while it's built to work alongside our node, it hasn't been updated for 2 years.

Good luck! Flag me anytime!

cool, thx a lot !

the flow looks well structured and great. i will adopt it to my sensors and actors.
in the meantime set my issue on hold.

We'll keep the issue open for you to continue discussing progress.

If you find any ideas to refine my flow- I'd be happy to make improvements! It is far from perfect I'm sure...

It's been 3 weeks I'll consider this closed.

Feel free to open it again any time if you have more questions!

I just stumbled on this while searching for something else. I'm the author of node-red-contrib-alarm.

You just neglected to set the topic on the dashboard widget. It's not an issue with either nodes, node-red-contrib-homekit (and node-red-contrib-alarm) needs the topic : payload.SecuritySystemTargetState so it knows what to apply the value to.

Let me know if you think it doesn't need it, or there is a better way, and I'll look to updating the package.

Please close at bountysource.

Thank you for your comment @macinspak 馃嚨馃嚤

@macinspak - I didn't know that node was actively supported! (To be completely honest I didn't check)

I'm off to see if it can handle my stuff better than what I threw together!

Alright - scratch all my stuff. This is better.

Give me a couple hours to implement it and I'll get it in the Wiki to replace my mess.

Now live

It is MUCH better than what I used before. Thank you @macinspak - awesome node you've made!

Hey no problems. I have found these 2 nodes work perfectly together and I use this to arm my Arlo cameras when the alarm is armed as well. I really love using Node Red for this sort of stuff.

I actually built a new house now (I built Node-red-contrib-light and node-red-contrib-alarm as a test to see how far I could take it). I am now using 130 Harvey Norman (retailer) branded downlights and light switches flashed with tasmota and individually hooked into homekit to expose as individual bulbs (YES, 130!), alongside my lifx strips, phillips hue outdoor lights and motion sensors and door sensors with other z-wave components. It's all tied together with node-red-contrib-light to maintain state and synced with node-red-contrib-homekit-bridged to put the whole shebang in Apple's home app.

Was this page helpful?
0 / 5 - 0 ratings