Finally an INSTEON 3W working setup, -- DEPRECATED UNTIL 0.111 --

Hello everyone! there was a few months of headaches with the insteon switches and the 3w states situation.

If you don’t have insteon: you can link one switch or dimmer with anyone on the house, so you can made virtual 3w and works instantly.

The Problem:

  1. When you push the switch with the main charge of light HA receives the state change, the 3w linked changes states on real life but HA will not notice cos this changes are not reported to the hub by default.

  2. When you push a 3w HA see the 3w change of state but not the main charge new state.

  3. The insteon HUB (v2) it’s very laggy, slow as hell, so the requests have to be the minimum to not overload it.

  4. The regular automation included in HA require to made constant changes (requests) to the hub to change thing that already are on the desired state, the HUB overload.

  5. Te regular Automation included in HA makes hard to program a 4 way or 5 way system, for a 4 way needs 8 automations with several HUB unnecessary requests.

  6. The master on INSTEON, @teharris1 (Read this please) made an excellent upgrade recently so you can trigger scenes on the hub (the hub stores the linked switches as scenes), but in my case fails constantly and overload the hub with only 2 or 3 tries.

My Tries:

I believe a made everything was wrote. Here some of my experience.

  1. Regular Automation: FAIL, HUB Overload, massive work and overpopulation on Automation menu.
  2. Node RED: copying the regular automation science on NR was the same overload plus delays cos NR use webhooks to pull states. (wait, this will be our hero)
  3. Insteon to Mqtt: @TD22057 wrote and very useful and impressive library to convert the insteon msg to MQTT protocol, i tried, it’s not compatible with my hub, i bought a compatible interface, works but was to hard and i’m not so familiar with MQTT protocol, i’m strictly a newie on this and i want a solution that works with my hub, laggy hub with easy interface.
  4. Scene Triggering using the new capabilities of the native HA insteon library: works some times, overload the hub in my case.

Theres no more.

So i found an idea from @ronschaeffer just here

Was not insteon, but the situation sounds familiar to me. The key!

This method was tested on switches only, not dimmers, please share if you improved to used with dimmers

This is a step by step solution.

The Solution:

  • Have to reflect the real state of the switch (all of them)
  • Have to made only the necessary requests to the hub.
  • Have to be scalable to N ways.

Lets do this:


  1. All the linked switches have to be tested in the real life so the states match every time in the reality.
  2. Write on paper the links.
  3. In my case i have Switchs with the main charge (master) and switch(es) and/or dimmers as slaves.

On HA:

If you are using Dimmers as 3w of a switch i recommend made a template switch with the state of the dimmer, so the dimming bright level won’t affect the system.

In my code my dimmer is light.3w_entrada
My template switch is 3w_entrada_sw

- platform: template
        friendly_name: "3w Entrada Sw"
        value_template: "{{ is_state('light.3w_entrada', 'on') }}"
          service: light.turn_on
            entity_id: light.3w_entrada
          service: light.turn_off
            entity_id: light.3w_entrada
  1. On your configuration.yaml Create an input_boolean for each master you are dealing with. This will help to know on the future if the light it’s been toggle from the real life or HA.
    name: Luz Entrada Virtual
  1. In your user options create a long life TOKEN, name it as you wish. (copy and save on a secure place, basically its a master key to your HA instance)

  2. Install NODE-RED


Let say you have a simple configuration of light: ONE master and ONE slave, linked.

  1. Create one node of “events: state” for each linked device, plus one state node for the input_boolean.

  1. Create 2 Call Service node one connected to each output of the MASTER state node.
    The connected to Master ON will turn_on the input_boolean switch. The other one will turn_off.

  1. Connect the ON and OFF outputs of the MAIN and Slaves States Nodes to the input of a function node (one for each of the state nodes).

Set the Function node as:

if(flow.get('flag') === true)
    return null;
    let flag=flow.get('flag') || true;
    return msg;
  1. Create an HTTP REQUEST NODE for each MASTER AND SLAVE devices. Configure as follow:
Method: Post
URL: "https://your.ha.ip:8123/api/states/light.3w_entrada" or the entity you are setting up Without Quotes
Use Autotication: Bearer
  1. Connect the input to the output of the other switch. The Slaves always reports to the master and the other slaves, the master to all slaves.
    For Example:

  1. Connect the output of the httpPOST to a delay node (1 sec).

  2. Connect to a Function Node with the code:

return msg;

CAREFUL: if you have severals slaves connected to the master you have to connect the HTTP post in parallel.

Almost ready:

  1. Connect 2 Current State Nodes on the ON and OFF output of the input_boolean, for the ON output: check if the MASTER is off. For the OFF output, check if the MASTER is ON.

  2. On the true output of each one connect a Function Node with the code:

let flag=flow.get('flag') || true;
return msg;
  1. To each Function node connector a Call Service Node to turn ON or OFF the switches.

Here the dirty job. the Hub v2 its very slow sending the orders. So we’ll ask him to turn off or on all of the entities in relation with this light fixture.

And the most important: Output Location: msg.payload.

  1. For every entity on this list create a WAIT UNTIL node and made the set for each device. Timeout at 5 sec is good. The trick is this: state is: expression

The code of the expression is:

$substringAfter($lookup(payload, "service"), "_")

The connection is in series and in the same order you locate them in the Call Service Node.

  1. Create a Call Service Node and configure as:

    "message": "The insteon hub fails on the last order, reset the hub to best performance"

Connect the input of the TIMEOUT outputs of the WAIT UNTIL nodes.

  1. Finally create a FUNCTION node with the code:
return msg;

Connect the input to the both outputs of the last WAIT UNTIL and to notification service output.

UPDATE: connect the both outputs of every WAIT node to the next WAIT or (in case of the last WAIT) to the Function FALSE. Prevent fails on API send notification breaks the program.

The entire flow have to be like:


On your frontend yo have to use the input_boolean instead the regular entity. In this case the LOVELACE button card won’t change the color of the card when toggle, you need to setup custom_ui or custom:button_card

Again i’m a newie on this, if you improve the code please share

Now the Request: @teharris1 this method solved my problems with the 3w perfectly but, as you know the insteon has the skill of trigger the off scene when the switch was already off, with my method if the insteon entity has an undefined state (forced) i can emulate this. You can see it? if i can force a undefined state of the entity without changing my input_boolean, HA will detect the change of state to OFF when was already off and trigger the 3w’s.

Thanks for your time and please share your Improvements of this!

1 Like

So it looks like you’re trying to do a virtual three way switch with HA automations. Am I right?

The beauty with Insteon is that you can manually program a virtual three way, 4 way etc. with the switches themselves so only the state needs to be sent to your hub/ha.

This video illustrates it pretty well.

This way the communication happens directly between switches rather than having a bunch of automations to handle it.
…unless I completely misunderstood your goal or situation. If so then please disregard.

Hello, in the papers sounds very well, in the real life depends of what system are you using to monitor the lights and states.

When you link 2 or 3 or N insteon switches they talk together as one entity if are all responders and controllers (3way application), the problem is when you turn on one of those the light turn on and the others insteon devices linked turn on too, but HA only see that the one you pushed change the state, so never realized the others changes the states in the real life.

So, for example:

You have 2 linked switches on a room, one has the charge (main switch) and the other is a virtual 3w.

You turn on the main switch and HA received the ON light of the room, but remains in HA the 3w switch in the off state (in the real life passed to ON cos the link).

Then you turn OFF the light, this time from the 3w, HA doesn’t receive any state change so never realized the off light, in HA the room light remains ON when is OFF in the room.

This is the problem, i think based on the arch of the insteon coms so they are not engendered to report every state of the switches when a Scene (the link program) fired.

Do you have Insteon at home and HA?

ps: openHAB solved this issue very well using an internal linked command to tell openHab when 2 or more insteon switches are linked. @teharris1 can do this for sure.

Aaahh I understand the issue
Yes because of how Insteon works, it doesn’t send those messages probably to keep traffic down on the Insteon network.

Yes nearly all my light switches are Insteon switches, dimmers, micro modules or keypads with a handful of 3 ways. I’m using the isy994i and the isy integration for home assistant. Ive never noticed that issue with showing the state change on a 3 way switch but I haven’t specifically been looking either.

Probably the isy994i pass the correct state to HA an keep everything linked.

I’m really interested on your review about the insteon system and your experience with it, i have mixed feelings, i recommend this to a friend who never deal in his life with something “smart” more than his iPhone and it getting me nuts, he calls me as everyday with issues with the states of lights (no more with this solution, but i’m worried everyday) or the open close module for the rollers, his house is big, 2 floors 2200 ft2 of construction.

The electrical box has 3 legs and has a total of 56 insteon devices.

If you can install everything again, would you repeat insteon?

For me and my friend the nightmare starts with the dimmers, all the lights flashed when insteon coms where passing by.

I tried more than 5 bulb brand, 2 of them recommended directly from Insteon Support. Change it to Lutron and works with the first bulbs perfectly. So i re-use the dimmers as 3w of a switches.

Then the nightmare was (i hope) the states.

I’m honestly not totally conform with my solution, the part when you ask the hub/plm to send avery msg to every switch in the scene may fail because the insteon coms, the perfect solution in this case should be fired an scene and voila. But the developer start this feature but for me it’s too laggy right now.

Man I can feel your pain. Fortunately (or unfortunately) I have no friends that are into automating their homes.
I really like my Insteon system because even when internet is down everything still works and my wife still wants to be able to use everything at the switches.

I think my success was because I started very slow with just two switches and over the course of a year I added a switch or two here and there. So any communication problem was really easy to diagnose because if the new switches couldn’t communicate, I just added a lamplinc in between the switch and the modem and viola! As my system grew, some of the lamplincs became unnecessary for communication so I was able to move them to better spots.

If I were to do it again in my current house is probably go Insteon again because the power lines happen to be setup pretty well for Insteon communication (two phase, relatively compact so no really long runs, ideal spot for plm communication is a well placed outlet behind couch).

I’m interested in the Lutron system because it seems to work really well from what I’ve read, but I really hate the look of their dimmer switches and pico remotes. I like how the Insteon switches still pretty much look like regular switches.

If/when we move I plan to bring all my Insteon gear with me so I hope it works just as well at a different house. I think certain houses with really well and others just have issues based on the wiring. The dual band switches help with this but I know many users struggle to reach solid communication. I think any system you go with will have some quirks though.

1 Like

I appreciate your comments, I use insteon at home since 2 years but I have not 3w with switches, I have 8 buttons and the way they sends the coms are different.

Can you help me answering if you can reproduce 2 issues I have?

  1. The one I described before, 3w sync issue.

  2. A complex one: cos the insteon switch’s, dimmers are not physically toggleable (it’s like momentary push button) you can trigger a scene twice whiteout changing the state of the switch.

Let say you have a standard 3w and you have a 3th switch as CONTROLLER only, so it does not change the state when the light it controls change state.

So, your controller is in the last state, off. You turn on the light from the 3w and then you pushed the CONTROLLER to off (was already off) but insteon trigger the scene and turn off the light it controls.

HA NEVER NOTICED you turn off the light cos the state (again) never changed. This issue is impossible to solved with my algorithm.

Your Isy in this case shows you the correct state of the lights?

I will definitely test this out for you but unfortunately it’ll have to wait until this weekend.

Can you explain why you have a scene controller that isn’t a responder as well? I’m having trouble thinking of a use case where this would be needed.

I’ll let you know what I come up with

Hello, thanks in advance.

This case can be useful when you have a switch in the exit of a space that has different fixture circuits with theirs 3w or main charges, etc. This exit switch can turn off or on all the room/space, no matter what circuit was on or off before, controls all.

For example a pad on you house’s main door can turn off or on all the lights on the common spaces in one shot.

Any question let me know.

I actually have this use case in my house already! I have an “all off” button at my garage door.
I have a program in the isy that if any light in the house is on, the “all off” keypad button will turn on. (you may be able to setup a scene this way although I’m not sure: all lights are controllers of scene and keypad button is only responder). With a glance, I can see if any light is on when I’m leaving the house.
Every light in house is a responder in a scene that turns them off.
HA sees the state changes for all lights and the keypad button. The difference is that my keypad button does actually change state.

You may be able to set this up in HA with automations similar to my isy programs:

Automation 1:
Trigger: any light in house is in state “on”
Action: turn on keypad button

Automation 2:
Trigger: keypad button state from “on” to “off”
Action: turn off all lights

I’m not sure if HA can control the state of the keypad buttons but maybe you can with the Insteon hub.

The issue with Insteon is the coms protocols make the system very slow to broadcast many msg like to turn off 10 switch’s for example. It’s not reliable.

In houseLinc i can write an scene that stores on the insteon device memory without any server in the middle the switch’s can trigger the scene.

In your case:

You leave the home, so you turn the pad off and all goes off. Then you arrived and turn one light at home on,

you garage pad remains off like the last state??

If so, when you push again the Off button (was already off) your house’s lights turn off?

HA noticed that?

Yes for scenes, the isy does the same thing but for programs (similar to HA automations) the isy is the intermediary. However I can use a program to trigger a scene stored in the device’s memory so it still only sends one signal through the coms to turn off (or on) multiple devices.

When I arrive home and turn any light on, the garage keypad button actually turns on because of the mentioned isy program

As I stated this may work with a scene (described above) stored in device memory as well, however I have not tried it.

So my use case is slightly different because my button actually does change state from on to off rather than in your case: off to off.

I will give your use case a try and see if HA notices the change.

Hi! Let me know if you tried the configuration!


So I tried your configuration.

Keypadlinc button A is the controller for a scene.
Laundry light is responder for the scene.
The scene is all devices to turn off when activated.

So if KPL button A is “off” and Laundry light is on as described by you here:

When I push the KPL Button A, the button turns on (and nothing else happens) and then if I press again to turn it off, the scene turns off (in this case the Laundry light and the KPL button).

So perhaps my setup isn’t quite the same as yours because and can’t get your “off to off” momentary button. My buttons still toggle off to on to off.

BUT… the answer to your main question is that yes HA sees almost immediately that the laundry light and the KPL button turned off.

I know it doesn’t answer your question directly, but can you setup a scene or program similar to mine to toggle the KPL button on if any of the lights that you want to control turn on? This will basically bypass your “off to off” state issue.

Thanks so much for the try, in your case the controller have to be the OFF and ON main buttons to replicate the situation i talked about.

If you have a chance and wanna help the computer science community jejeje

The button works just fine cos can be toggleable the on off main button of the KPL not.

Thanks for your help!

I just realized something. Are you using a 6 button KPL?
That one has the big on and off button on the top and bottom the run the main power for that switch location. I only have the 8 button KPL. All buttons on that one are a toggle button (press for on then press same button for off). I can see now how with the 6 button there would be no state change. Unfortunately I’m not able to test your situation with my 8 button.

If you press the off button and it’s already off, is there an event in HA? I use the event listener for my button presses as HA triggers rather than state changes. Tends to be speedier. Could you listen for the event of the button press even though no state will change?

Also I just had a thought while reading back in your post. You may have tried this or it may not be applicable.
You said your 3w is working but only the state of the switch you actually changed is being noticed by HA.
Could you just make a group with the switches that are in your 3 way? If one is on then the group is on…

Oh nevermind. Because then all have to be off for the group to be off…

The event listener may work though because if the event DOF (off button pressed) is heard then you only need one automation to turn off the other switches in your 3w and 4w. Same for DON (on button is pressed)

Hello, unfortunately the events listener can’t notice any, apparently there’s no listener to a pushed button (at least for insteon) only state change in this case.

So I understand your config and how different is with mine.

Maybe the Isy noticed the change, I like insteon, after all.

Thanks so much.

Shoot. Well I’m out of ideas.
If I had a 6 button KPL, I’d try the event listener route to see if the isy picks up the event even when it’s already off.
Maybe some other rare Insteon user could try??

We seem to be a rare breed that still/continue to use Insteon. Maybe this new update that’s coming will help your speed issues… There’s a new CEO that seems to want to bring Insteon back into relevance with the general smart lighting public.