I have a large INSTEON installation controlled by an ISY controller. In the ISY setup, there are multiple 3- and 4-way switch setups combined into a scene (this is a default setup for INSTEON, where multiple light switches are configured to control the same load, they all also control each other, to keep the indicator lights on each switch in sync). The ISY component detects each device as a light, and each scene as a switch.
The problem I have is trying to leverage the scene setup to deal with dimming. In the ISY (and even without the ISY, just relying on the INSTEON mesh network), dimming one switch in a 3-or-more-way setup dims all the others, as well as the âsceneâ of which they are all a part.
In Home Assistant, since the scene is imported as a switch domain, there is no brightness attribute to the scene. I can hide the particular switch in Home Assistant that corresponds to the scene, and group the switches together as a group, and specify a brightness level that way, but this also requires quite a bit more INSTEON network traffic to accomplish the same thing (iteratively sending a dimming signal to each light in the group), rather than sending a single scene command.
Is there any way to force an ISY scene to be imported into HA as a light instead of as a switch? Is there a better method of handling INSTEON scenes I should know of?
You canât really DIM a scene on the ISY. I think you can issue the DIM/BRIGHTEN command which steps you 3% in each direction, but you canât issue a set scene to 50% type of command.
I did the following because I wanted it to work with Alexa and be able to tell her to set a %.
On the ISY:
Create a scene and put only the responders in that scene. Say your real scene had switch 1 (with load) and switch 2, switch 3, then create a scene and only put switch 2 and switch 3 in it Then create a program. In that program, the IF statement will look and see if the status of the device is OFF. If it is off, then turn off the âfixâ scene, otherwise, turn on the âfixâ scene.
It is a hassle, and Iâm not sure if it causes other issues, but it is the only way I can get full dimming ability on the ISY and use scenes.
There was a thread a while back where people asked and UDI said no because Insteon doesnât support setting a dim level on a scene. People asked UDI to âfakeâ it and just set % on the devices inside a scene, but there was a lot of, what if this, what if that, how should it work this way, or that way, etc etc so I gave up on them ever doing anything like that.
Edit: I forgot to say, once you have the real scene, the fix it scene, and the fix it program, what you want to expose to Alexa or HA is the device (the one that is used in the program and typically has the real load). Forget the scene even exists.
Thanks for your reply! I think I understand what youâre proposing, but wonât the âfix itâ scene cause the indicators on the non-load switches (responders 2 and 3) to be disconnected from the load switch when itâs dimmed? E.g., in the proposed logic, if HA tells switch one to dim to 50%, then the program goes to the ELSE statement and sets the âfix itâ scene to âONâ, which pushes the dimming level of the responder switches to whatever the scene brightness was (default 100%). Thatâs not a catastrophe, but it is unfortunately not making good use of the INSTEON indicators. Is that what you see happening when you use this approach? As a fix, are you aware of any programmatic way in ISY to extract a brightness level from one device as a variable, to then apply to others?
Alternatively, perhaps some automation in HA? Iâm not sure of the syntax for extracting the brightness and passing it to the other switches, but perhaps it would look like this:
The only disconnect I get is that the secondary switches do not correctly reflect the dim level on local leds. The main switch will have, say 50% of the lights lit up, but the secondary switches show all the lights lit.
I donât know about a pure HA solution. I have only been running HA for a couple days. I would worry about if you can update the switches as responders, aka, for them to receive the level and for them to not try to broadcast the change out on the insteon network.
I might poke at the ISY rest ap and see if there is a way to just change the led status on the switches. No matter what, any fix is going to be ugly.
Itâs not necessary to specify the switch domain element imported from ISY in either automation â once all the devices are off, the switch is updated to off (as you can confirm if you donât hide it with a customization), and once even one device is turned on, the switch element (corresponding to the ISY scene) is set to state âonâ.
Actually, it only takes one automation per group of switches - you can use the homeassistant.turn_on service to set brightness to 0, which updates the state to off:
Is the brightness reflected on the secondary switches? I use the paddle switches and there is a vertical row of LEDS that light up that reflect the current on level. That is the one thing that is out of sync on my ISY only approach.
Yup! It works like a charm. For dimmer switches, anyways. For switchlinc devices, I use two programs, since you canât pass brightness data to a switch.
Just to clarify, for dimmer switches, like the â2477dâ you use one program, and for the toggle only switches, the â2477sâ is what you use a 2 program solution for?
I would really, really like to duplicate this over on the ISY itself, but until they get their 5.0 release stable, I donât think you can, in a program, set the brightness or on level of one device to that of another. 5.0 is not stable at the moment and at the rate they are going, itâll be another year before it is stable.
I might have to implement this solution. And then, start looking at zwave alternatives so I can ditch the ISY.
works to detect when the first switch (the only one that you would leave un-hidden in HA) changes state, and adjusts the brightness of all the other switches (and therefore their indicator pips) in the same scene. I have multiple n-way INSTEON dimmer setups in my home, and this has worked great to keep all their indicators in sync. In HA, I simply hide all the non-load-bearing switches in the scene, together with the switch thatâs imported from ISY to represent the scene, and the only remaining switch that it visible works to control the whole scene.
For Switchlinc 2477S devices, where dimming is not possible, they show up in HA as switches instead of as lights. Therefore, the automation programs that I wrote for the multiple-dimmer-scene wonât work (since you canât pass brightness data to a switch in HA). For those, I use this pair of automations:
- alias: 'Indicator Fix Garage On'
trigger:
platform: state
entity_id: switch.garage_lights_1_by_side_yard
to: 'on'
action:
service: homeassistant.turn_on
entity_id:
- switch.garage_lights
- alias: 'Indicator Fix Garage Off'
trigger:
platform: state
entity_id: switch.garage_lights_1_by_side_yard
to: 'off'
action:
service: homeassistant.turn_off
entity_id:
- switch.garage_lights
And then I hide the non-load bearing switch (in this case, switch.garage_lights) and the scene-representing switch imported from ISY.
Iâm guessing it would work with the keypads as the non-load bearing devices such as the 2334-222 (8 button) and the 2334-232 (6 button). It looks like Iâll be busy this weekend writing a bunch of automations.
Now to figure out the best way to get my fans with the fanlinc (2475f) working correctly in HA with the 2334-232 as the controller.
I can confirm it does work with the keypads â the example I posted for my garage lights uses one 2477S (switch.garage_lights_1_by_side_yard) and one 2334-232, where the top and bottom buttons are, collectively, one switch (switch.garage_lights). I believe that there are some additional switches associated with the keypad (in HA, each of the four middle buttons of the 2334-232 is imported as a switch, and each scene that separately controls the illumination of each of those four keypad buttons is also imported, as a different switch), but I think the principle of the automation should be applicable across those devices.
Ah, well, Iâll have to play around because my 2334-222 buttons are also a controller for scenes with a 2477D (dimming). I need to verify I entered everything correctly, but my first shot worked at updating the secondary non-load 2477D but it didnât turn on the button for the 2334-222. It might be I didnât enter the entity correctly or something.
Ok, so it looks like only the main button on a KPL can be controlled with a direct command. I will have to put all the secondary buttons in their own scene and send an on/off to that scene to get the secondary KPL buttons to stay in syncâŚ
Edit: So what I did was go back to what I was doing earlier, but only for KPL secondary buttons. Those are all handled in ISY with a program and scenes. I used your program for my 2 different 3 ways to keep the dim levels in sync with the primary.
I think, with 5.0, if it is ever stabilized would allow us to put all this logic in the ISY. Iâll revisit when it is released.
With a little sober reflection, I realized that two-program automation solution for switches is unnecessary â instead of exposing the load-bearing switch and hiding both the non-load-bearing switches and the scene of which they are all controllers, I hide all the switches and expose the scene. Since thereâs no lights involved, there never can be a brightness level sent (my keypad is the switch-style, not the dimmer-style), so just using the ISY scene is the simplest and fastest solution for that n-way arrangement.
Did it start working for you with v38? I am having some issues after upgrading to v38. I see this in my log:
17-02-21 13:07:57 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: expected int for dictionary value @ data[âbrightnessâ]. Got ââ
I confirmed I still have an entity âlight.kitchen_lightsâ and it has a brightness attribute. Is the attributes not making it across in the to_state property of the trigger?
Sorry to Necro this old thread but was wondering if anyone got this all dialed in.
The issue Iâm having is that if I control the ISY scene in Home Assistant, everything works fine BUT I canât dim. If I control the load, that also had a KPL button in it and try to send turn the lights on to say 50%, when Home Assistant turns on the KPL button to match the states, it also turns the load on to 100%.
It seems that this code works well if you only have switches OR lights but not a mix. Has anyone gotten this figured out?
So â playing around with this some more, I decided I didnât like HA sending a second command every time I controlled that light (via HA, ISY, Alexa, orâdun, dun, dunâthe physical switches. I decided to move things back to the ISY (using 5.0.13 beta):
Using some inspiration from this post:
For this sample scene, I have a light controlled physically controlled by a 6-button keypadâs main output, a slave âpaddleâ dimmer as a 3-way switch, and a button on an 8-button keypad upstairs that also controls the scene and shows the status.
To keep things in sync across the ISY, HA, Alexa, and the physical switches:
State variable to hold the brightness value. In this example itâs s.First_Floor_Hall_Dim_Level.
A program that follows the switch with the load and keeps the variable up to date:
A program that watches the variable compared to the slave deviceâif it doesnât match, it waits 2 seconds in case the scene was controlled (if the scene was controlled, then it should sync up in a moment and cancel the program). If after 2 seconds, the scene hasnât updatedâupdate the slave devices.
Since Iâm using one of the non-âcontrollableâ buttons on a 3rd keypadlinc, I have a scene with just the button as a responder. When this is called by the program with a %, it will either go on or off.