-
Notifications
You must be signed in to change notification settings - Fork 18
Lights example 1: the first step, switch your light
Andre Hartman edited this page Oct 27, 2019
·
1 revision
You set everything up, you open the Node-RED editor, you look at a blank page and you have no idea what to do next. As first step the most simple automation: switch a light on and off.
Homekit, Homebridge and Node-RED are event-driven tools. They define a situation, a model of reality. Nothing happens until an event occurs. When an event occurs the node-red flows determine a reaction and node-red can send instructions to Homebridge accessories accordingly.
In this example we will - not yet - monitor real-life events but we will create a test event inside Node-RED. Again and this is important, nothing happens until an event occurs!
We need only two components, it does not get any simpler that that.
- Component to create a test event: an 'inject' node.
- Component to control the light: a 'hb control' node representing a light accessory in your Homebridge setup.