Stateful Lights - NorthernMan54/node-red-contrib-homebridge-automation GitHub Wiki

For me this is one of my highest WAF scoring home automation feature. The ability to turn on and off a group of lights, and have the lights resume their previous state prior to being turned on as a group. I use this in a couple of different places in my house. First I use it as part of my "When someone arrives home" automation. So that when someone arrives home, various lights around the door and front hall turn on, then resume their previous state after about 15 minutes. Secondly I have one of these setup for each of Alexa devices, to control all the devices in the room that the Alexa is installed in. This allows you to call out to Alexa turn on all the lights, then have return to their previous state when you ask her to turn them off.

For this flow, I also use 'HomeKit-bridged' to create the group turn on/off switch.

[{"id":"f6e5e7c5.e7bd3","type":"homekit-service","z":"7d0d74c4.5f31ac","isParent":true,"bridge":"15040030.2e772","parentService":"","name":"Ensuite","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Insteon - Switches","serialNo":"Default Serial Number","characteristicProperties":"{ \"On\": true, \n\"Brightness\": true}","x":120,"y":160,"wires":["c0a43df8.7cf61"](/NorthernMan54/node-red-contrib-homebridge-automation/wiki/"c0a43df8.7cf61")},{"id":"dc93645d.b32b","type":"hb-control","z":"7d0d74c4.5f31ac","name":"Ensuite Mirror","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Mirror00000043","conf":"ba39fa22.f9ec68","x":660,"y":80,"wires":[]},{"id":"3fb5cf68.b1f3a8","type":"hb-control","z":"7d0d74c4.5f31ac","name":"Ensuite Shower","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Shower00000043","conf":"ba39fa22.f9ec68","x":660,"y":140,"wires":[]},{"id":"3baf95e1.086112","type":"hb-control","z":"7d0d74c4.5f31ac","name":"Ensuite Sink","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Sink00000043","conf":"ba39fa22.f9ec68","x":650,"y":200,"wires":[]},{"id":"4ed29a2c.515144","type":"hb-control","z":"7d0d74c4.5f31ac","name":"Ensuite Tub","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Tub00000043","conf":"ba39fa22.f9ec68","x":650,"y":260,"wires":[]},{"id":"c0a43df8.7cf61","type":"join","z":"7d0d74c4.5f31ac","name":"Join","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":".03","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":290,"y":160,"wires":["145ab2ea.38046d","a81aa2a1.f75d4","70bcdea5.237d4","38bbc140.72d37e"](/NorthernMan54/node-red-contrib-homebridge-automation/wiki/"145ab2ea.38046d","a81aa2a1.f75d4","70bcdea5.237d4","38bbc140.72d37e")},{"id":"38bbc140.72d37e","type":"hb-resume","z":"7d0d74c4.5f31ac","name":"Ensuite Mirror","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Mirror00000043","conf":"ba39fa22.f9ec68","x":460,"y":80,"wires":["dc93645d.b32b"](/NorthernMan54/node-red-contrib-homebridge-automation/wiki/"dc93645d.b32b")},{"id":"70bcdea5.237d4","type":"hb-resume","z":"7d0d74c4.5f31ac","name":"Ensuite Shower","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Shower00000043","conf":"ba39fa22.f9ec68","x":460,"y":140,"wires":["3fb5cf68.b1f3a8"](/NorthernMan54/node-red-contrib-homebridge-automation/wiki/"3fb5cf68.b1f3a8")},{"id":"a81aa2a1.f75d4","type":"hb-resume","z":"7d0d74c4.5f31ac","name":"Ensuite Sink","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Sink00000043","conf":"ba39fa22.f9ec68","x":470,"y":200,"wires":["3baf95e1.086112"](/NorthernMan54/node-red-contrib-homebridge-automation/wiki/"3baf95e1.086112")},{"id":"145ab2ea.38046d","type":"hb-resume","z":"7d0d74c4.5f31ac","name":"Ensuite Tub","Homebridge":"Leonard-Dev","Manufacturer":"Insteon","Service":"Lightbulb","device":"Leonard-DevAC:22:3D:E3:CE:30InsteonEnsuite Tub00000043","conf":"ba39fa22.f9ec68","x":470,"y":260,"wires":["4ed29a2c.515144"](/NorthernMan54/node-red-contrib-homebridge-automation/wiki/"4ed29a2c.515144")},{"id":"15040030.2e772","type":"homekit-bridge","z":"","bridgeName":"Leonard-NodeRed","pinCode":"031-45-154","port":"51831","allowInsecureRequest":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true},{"id":"ba39fa22.f9ec68","type":"hb-conf","z":"","username":"031-45-154"}]