-
Notifications
You must be signed in to change notification settings - Fork 131
Insteon Linking and Scenes
Before we provide instructions on how to create links/scenes, it is beneficial if you first understand both what a link/scene is and how it works.
Scenes are a central feature of home automation. They allow multiple actions to happen when triggered by a single event. For example, a scene can be configured to turn off or dim all of the lights in a specific room or an entire floor.
Scene control is a central feature of MH. Programming scenes manually as described above in Programming Insteon Devices Without MisterHouse is a tedious task. Keeping track of what devices are programmed as a part of these scenes can be maddening.
A link defines a 1:1 relationship between a controller and a responder. This link can include specific parameters that apply to this pairing such as on-level and ramp-rate if supported by the responder.
The following depicts a very simple link where device A is the controller and Device C is the responder. In this instance, when Device A is turned on, it sends a command to Device C causing Device C to turn on. In this case, Device B is simply acting as a repeater, re-broadcasting the message but not acting on it.
Every Insteon device has a record of all of the Controller/Responder relationships that affect that device. Controllers know which Responders they are linked to, and Responders know which Controllers they are linked to.
A scene is nothing more than collection of links from a Controller to multiple Responders. For example in the following diagram, Device 1 controls devices 2, 3, & 4:
We would call this the "Device 1 Scene." A Responder can be the member of numerous scenes, so Responder 4 may also be turned on by the Device 5 Scene.
- The Terms Links and Scenes are Interchangeable
The Insteon Details pdf, particularly pages 48-50, goes into great detail about how an Insteon Scene works. In short, when the scene is triggered, the Controller first sends a broadcast message which all devices on the network hear. Only those Responders that have been preprogrammed with this responder link respond to the command. By using broadcast commands, Insteon scenes can change multiple responders in less than half a second. However, the responding devices do not send an acknowledgement message back to the controller after receiving the broadcast command.
In order to confirm receipt of its command, after sending the broadcast message, the Controller sends a direct 1 to 1 cleanup command to each of the Responders, and waits for an acknowledgement from each Responder. The cleanup messages ensure that if the broadcast message was lost that the individual Responders still receive the command. The time it takes to complete all of these direct cleanup messages depends on the number of Responders and the reliability of your Insteon network.
The result of all of this, is that in most cases you will see all of the Responders in a scene turn on at once. However, periodically if a Responder fails to hear the initial broadcast message, there may be a noticeable delay before the Responder receives the direct 1 to 1 cleanup command.
The devices and the PLM store all of the information necessary to send and respond to these commands in a Link Table Database. This database keeps track of what a responder is supposed to do in response to a scene command and what devices a controller needs to notify when it initiates a scene control. As discussed on the Link Management page, MH can scan a device's link table, add links to the link table, and delete links from a link table.
Now that we have a general understanding of what a Scene is, how do we create them from MisterHouse?
We discussed the process of manually creating links at the end of the Insteon Installing Devices page. While it is important to understand how to manually create links between devices, for the reasons stated below, it is not recommended that you create links manually.
One of the most powerful features of MisterHouse is its ability to create and manage links/scenes for Insteon devices. For example, I have a single button near my garage door that I can press to turn off the 30+ Insteon lights in my house. To manually create this Scene, I would have to walk around my house programming 30+ devices. Instead, as will be shown below, I can simply make 30 entries in my MHT file and MisterHouse will take care of this process for me.
Additionally, if MisterHouse knows of the existence of a Scene, it will update its internal state of all responders appropriately if the controller changes. Otherwise, MisterHouse will not know that a responder has been turned on by a controller, and the state of the responder as reported by MisterHouse will be wrong. Finally, MisterHouse will see manually created links as "orphans" and will attempt to delete them if they are not defined in MisterHouse.
- Remember before we can work with a device at all, we need to first perform the link to interface step as described on the Insteon Link to Interface page.
Generally, a device only has as many Scenes as it has buttons. A SwitchLinc has one scene, that can be turned on/off from the paddle. A RemoteLinc or KeyPadLinc has 1,4,6, or 8 scenes depending on how many buttons it is configured with. Each button controls its own scene.
The PLM is unique. It has no physical Scene buttons, but it has 253 software defined Scene buttons. Each one of these 253 Software buttons can be linked to a Scene. These scenes are activated using the MisterHouse interface.
To use one of these software buttons as a scene controller, you must first define the button in MisterHouse. The syntax for defining a virtual PLM button is shown below. The CtlNum is the Insteon PLM controller number in a hexadecimal number. This number must be unique for each scene name and in the range 02-FE. The other virtual buttons are reserved for special PLM functions.
#PLM Scene Controller CtlNum, Scene Name, Group INSTEON_ICONTROLLER, 10, accent_scene, All_Lights
The syntax for Insteon scenes requires a unique SCENE_MEMBER entry for every responder/controller link pair. This defines a "unidirectional" link between a controller and responder. The Options can be used to specify a dim level and ramp rate for the responder if the responder is a dimmable device. The controller may be either a Device, or a virtual PLM button that you defined above.
# Responder, Controller, Options SCENE_MEMBER, living_accent_light, accent_scene, 100%, 0.5s
The normal convention is that these definitions are grouped together by controller, although this is not required. The only requirement is that this definition must appear in the mht file **after** the controller and responder are defined.
You then declare the relationship between "hall_kpl_a" (controller) and "living_accent_light" (responder) as:
SCENE_MEMBER, living_accent_light, hall_kpl_a, 100%, 0.1sThe SCENE_MEMBER tag causes the relationship between hall_kpl_a and living_accent_light to be known so that when MH sees hall_kpl_a show on or off, then it knows the state of living_accent_light.
The previous example was an exceptionally simple scene with only two devices. Scenes may be much more complicated and may exist between multiple devices. These scenes can be controlled directly by MisterHouse as shown in the following example:
#Define the Virtual PLM Button First INSTEON_ICONTROLLER, 8A, day_scene, Downstairs #Define the responders to the day_scene virtual button SCENE_MEMBER, living_accent_light, day_scene, 100%, 0.5s SCENE_MEMBER, family_room_pedestal, day_scene, 80%, 9s SCENE_MEMBER, living_room_lights, day_scene, 100%, 19s SCENE_MEMBER, kitchen_swag_light, day_scene, 60%, 19s
Note that this example illustrates the option of having varying on-levels as well as ramp rates. This means that the time for "family_room_pedestal" to become fully lit is roughly half the time for "living_room_lights" to be fully lit.
The following method discussed will always work in MisterHouse. However, there is now a simpler method for creating complex Scene including Multi-Way Circuits, See the SCENE_BUILD discussion in the next section.
MisterHouse supports the ability to cross-link SwitchLincs and KeypadLincs to create mulit-way circuits (3-way, 4-way, etc). In a traditional Multi-way circuit a light can be controlled by toggling two, three or more separate switches. Multi-way circuits in Insteon are simply scenes than enable a SwitchLinc/KeypadLinc to turn on and off all other SwitchLinc/KeypadLinc devices in the scene. By creating forward and backward links between all of the devices, the behavior of a traditional Multi-way circuit is emulated.
The following is an example of a three-way circuit using two SwitchLincs. The SCENE_MEMBER entries are defined to create the cross links. Like any SCENE_MEMBER definition, the definition for all devices referenced by the SCENE_MEMBERs must precede the SCENE_MEMBERs definition in the .mht file.
#The devices must be defined first INSTEON_SWITCHLINC, 01.52.35, Den_Lt_01, All_Lights|First_Floor INSTEON_SWITCHLINC, 01.82.E8, Den_Lt_02, All_Lights|First_Floor #Now we define the relevant links to create the scene # Responder, Controller, Options SCENE_MEMBER, Den_Lt_02, Den_Lt_01, 100%, 0.1s SCENE_MEMBER, Den_Lt_01, Den_Lt_02, 100%, 0.1s
The following an example of a four-way circuit using three SwitchLincs.
#Again the devices must be defined first INSTEON_SWITCHLINC, 01.52.35, Den_Lt_01, All_Lights|First_Floor INSTEON_SWITCHLINC, 01.82.E8, Den_Lt_02, All_Lights|First_Floor INSTEON_SWITCHLINC, 01.12.F5, Den_Lt_03, All_Lights|First_Floor #Then we define the relevant links/scenes # Responder, Controller, Options #Den_Lt_01 responder SCENE_MEMBER, Den_Lt_01, Den_Lt_02, 100%, 0.1s SCENE_MEMBER, Den_Lt_01, Den_Lt_03, 100%, 0.1s #Den_Lt_02 responder SCENE_MEMBER, Den_Lt_02, Den_Lt_01, 100%, 0.1s SCENE_MEMBER, Den_Lt_02, Den_Lt_03, 100%, 0.1s #Den_Lt_03 responder SCENE_MEMBER, Den_Lt_03, Den_Lt_01, 100%, 0.1s SCENE_MEMBER, Den_Lt_03, Den_Lt_02, 100%, 0.1s
Note that you will need to define a full mesh of forward and backward links with [n*(n-1)] SCENE_MEMBER definitions so that all of the objects remain in sync. This can obviously become a very long list very quickly. This is why the Scene_Build Definition was created, see the next section.
The SCENE_BUILD definition was added to make multi-way scene creation easier. When using SCENE_BUILD only 1 line is needed for each device. The definition looks as follows:
#First we can optionally define a Virtual PLM Button INSTEON_ICONTROLLER, A0, scene1, All_Lights|Kitchen #Then we define each device # name, device, cont, resp, on_lev, ramp_rate SCENE_BUILD, scene1, dev1, 1, 1, 80%, 0s SCENE_BUILD, scene1, dev2, 1, 1, 100%, 0s SCENE_BUILD, scene1, dev3, 1, 1, 100%, 2s SCENE_BUILD, scene1, dev4, 1, 1, 100%, 0s SCENE_BUILD, scene1, dev5, 1, 1, 30%, 0s
The defintion has the following parameters:
- name - If name matches the name of a Virtual PLM Button, then the virtual PLM button is added as a controller to the Scene. Otherwise the name is just used to keep the Scenes organized.
- device - the name of a device that is a member of this scene
- cont - Should this device be a controller in the scene. (1 = Yes/ 0 = No)
- resp - Should this device be a responder in the scene. (1 = Yes/ 0 = No)
- on_lev - optional, set the on-level of a dimmable responder device
- ramp_rate - optional, set the ramp rate of a dimmable responder device
For advanced users that use Light/Occupancy/Motion/Presence objects, it is possible to define Light_Items as scene members. This is particularly useful when wanting to combine scenes with normal occupancy automation. During the scene, a light item is automatically put into manual mode for the duration of the scene--preventing automation logic from interrupting the scene. In addition, the dim level known by the light item is programmatically altered to be the on-level defined for the scene.
Once a Scene has been defined in MisterHouse, you need to tell MisterHouse to write these links to the devices themselves. You can do so by following these steps:
- Restart MisterHouse or run the "Reload Code" Voice Command - This will cause MisterHouse to read the MHT file.
- Run the PLM voice command "Scan Changed Device Link Tables" - This will cause MisterHouse to check the serial number for the link table on each device. If the serial number has changed since the last time MisterHouse scanned the device, MisterHouse will scan the device again. See Link Table Management for a detailed description. This will hopefully only take a few moments to complete.
- Run the PLM voice command "AUDIT - Sync All Links" - This will cause MisterHouse to print out all of the links that it is going to add to your devices. Review this list, if everything looks in order proceed to the next step, if anything looks wrong, you need to check your setup.
- Run the PLM voice command "Sync All Links" - This will cause MisterHouse to write the links it identified in the previous step.
include component="pageList" hideInternal="true" tag="insteon" limit="10"