Philips Hue Motion-Sensor to AppleHomeKit with ON/OFF Dash Button-Switch

I have built a flow with which it is possible to connect the Philips Hue motion detector to Apple HomeKit. This provides the possibility to receive a notification as soon as the motion detector is triggered. The addon is that you can Switch the Notification ON and OFF with a Amazon Dash Button.

You need to install the following Nodes:

node-red-contrib-homekit node-red-contrib-huemagic node-red-contrib-amazondash

So you can use it with a AppleTV 4 to notificate you in WAN. If you have questions contact me: http://www.imakeyouintelligent.com/

[{"id":"8b877482.d87e48","type":"hue-motion","z":"493a3d1f.c5ee64","name":"Treppenhaus 1.OG Motion Sensor","bridge":"f35d62f4.17ab98","sensorid":"17","x":158,"y":101,"wires":[["a48e2a8b.517c08"]]},{"id":"7155ce85.027fb8","type":"change","z":"493a3d1f.c5ee64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"MotionDetected","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.MotionDetected","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":699,"y":79,"wires":[["a3b2e4fe.ffeab"]]},{"id":"23ae6593.ee425a","type":"homekit-service","z":"493a3d1f.c5ee64","accessory":"e159edbb.299df8","name":"MotionSensor Treppenhaus 1.OG","serviceName":"MotionSensor","x":1113,"y":89,"wires":[[]]},{"id":"e540be6.dad47c","type":"switch","z":"493a3d1f.c5ee64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","outputs":2,"x":546,"y":101,"wires":[["7155ce85.027fb8"],["558005cb.0bb5fc"]]},{"id":"a48e2a8b.517c08","type":"change","z":"493a3d1f.c5ee64","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.motion","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":398,"y":101,"wires":[["e540be6.dad47c"]]},{"id":"558005cb.0bb5fc","type":"change","z":"493a3d1f.c5ee64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"MotionDetected","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.MotionDetected","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":698,"y":115,"wires":[["a3b2e4fe.ffeab"]]},{"id":"7ae2075.5185778","type":"ButtonPressed","z":"493a3d1f.c5ee64","name":"DB_NoName","mac":"18:74:2E:29:A9:EE","x":140,"y":155,"wires":[["700232a0.8181b4"]]},{"id":"a3b2e4fe.ffeab","type":"traffic","z":"493a3d1f.c5ee64","name":"","property_allow":"payload","filter_allow":"GO","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"STOP","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":false,"differ":false,"x":881,"y":89,"wires":[["23ae6593.ee425a"]]},{"id":"700232a0.8181b4","type":"function","z":"493a3d1f.c5ee64","name":"Toogle","func":"let state = context.get('state');\nlet out = \"\";\nif(state == null){\n    context.set('state',false);\n}\n\nif(state == true){\n    state   = false;\n    output = \"STOP\";\n}else{\n    state   = true;\n    output = \"GO\"\n}\n\ncontext.set('state',state);\nreturn { \"payload\":output };","outputs":"1","noerr":0,"x":548,"y":155,"wires":[["a3b2e4fe.ffeab"]]},{"id":"f35d62f4.17ab98","type":"hue-bridge","z":"","name":"Philips hue 2.OG","bridge":"192.168.178.82","key":"1c9-iDOTUO1F6sdEy3rYArh6oYkrbH9zHy3eXwpO","interval":"3000"},{"id":"e159edbb.299df8","type":"homekit-accessory","z":"","accessoryName":"Hue MotionSensor Treppenhaus - 1.OG","pinCode":"111-11-111","port":"","manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","accessoryType":"10"}]
heydemar

Flow Info

created 3 weeks, 4 days ago
updated 3 weeks, 2 days ago

Node Types

Core
  • change (x3)
  • function (x1)
  • switch (x1)
Other

Tags

  • Amazon
  • Dashbutton
  • Dash
  • Button
  • Apple
  • HomeKit
  • TrafficLight
  • Alarmanlage
  • AppleTV
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option