Insteon scene control - automations

Do you have the node red example for this?

I rebuilt all insteon scenes using HA groups. Although the performance is a built slower, Insteon scenes are a pain
I have many multi button insteon controllers I have had to essentially throw away because they “remember” what they controlled before and never take new programming.

If you still stick with Insteon to create and manage groups, be sure to use iOS and the Insteon app. The Android app does not fully update switches. I went through the process of removing/changing ramp rates recently and nothing I did would take. Eventually after reading all the Insteon forums did I find this out.

I had to redo everything with iOS and magically it worked.

Andrew-

edited again…

Assuming you are using n ISY-

Use a home assistant call service node

Domain: switch
Service: turn_off or turn_on
Entity Id: switch.scene_1 (pick your scene here)

Assuming you are integrating with the Insteon controller-

call service: service: insteon.scene_on and entering the group in the payload.

super easy this way

edit- I believe this changed since my first post a year ago but is working the way I described. Just confirmed in nodered. To the user above- factory resetting Insteon devices fixes all of those problems. I would not use groups at all. Insteon scenes are native and function without a controller and instantaneously.

I have 180 Insteon devices and have been using them for 15 years. Use the native functionality and if you have any number of devices do not use the Insteon app. Properly control them with an ISY + PLM integrated with HA.

To clarify, I am using the 2245 HUB, and have many device to device links, but I have a few Insteon scenes set up via the android app for testing with HASS. I am trying to find a way to get Home assistance to treat the Insteon scenes as an entity, so I can use one switch in lovelace to turn the insteon scenes on and off. I.E. so all keypad linc buttons and 3 ways switches reflect the proper state of the load being controlled.

My HA skills are less than my ISY and nodered skills so I am sure there is a more elegant way to do it in HA the what follows.

Just using HA you could create a binary sensor based on the scene. You could use a Template Switch - Home Assistant that reflects the status of the scene.

Then follow this to have a switch in lovelace that shows the status:

Would you be willing to buy a used ISY on ebay? The ISY natively out of the box presents scenes as switches in HA. Probably $100. If you have many insteon devices the ISY will blow you away compared to the insteon hub.

Are you able to run nodered? You could have a flow where the scene creates a switch entity. You could have that switch entity in lovelace. That switch would then toggle the automation (scene).

I’m lazy and would go the ISY route for all of its other benefits.

Certainly you can execute the scene, but it likely will not update in a two way fashion the status of your scene controllers. That should be expected though. Say I have a 6 button and use it to turn on three lights. If I go to those switches individually and turn them on, the scene button is out of sync and does not light. Pushing it will light the button an send the on, but they are already on. Introducing a third way to control them is not going to change that.

To the poster above me- I tested this and it does work. The behavior you describe means the devices are not cross-linked with each other. You can have any light in any scene control the keypad button or the entire scene.

This may not be worth it to you but this works for me. I use an ISY which can but purchased on ebay with a PLM serial modem (~$100). You may not be willing to do that but it works.

In HA my Insteon scenes are switch entities. I can control the scene off and on. If I control the scene in HA, the keypad button reflects the change. If I control it at the keypad, HA shows the correct status.

I doubt you can do this with the Insteon hub. If you use the ISY this will work. It directly integrates in HA.

That could be true. I use to have an ISY but it went bad and I did not want to shell out money for another. That said, I use HA most exclusively now. No desire to try and make them all play together and rarely touch 6 button controllers.

If you want some … I have a box full.

Sorry to revive this moderately zombie thread, but wanted to see how folks get the Scene ID number. I found an unanswered reddit question, but did find any answers. The insteon iOS app seems to allow you to find the Device ids by navigating to advanced settings of the device, but no such advanced setting seems to exist for Scenes.

Do you have access to an Android device? The old app shows the group number. If you don’t you could create a temporary login and use someone else’s device. I would do it if you want.

I could not find the group number in the “new” app.

Yes! That totally worked. I installed the Android app on an old tablet (I think it was an old version as I got a warning to update it) and it showed the scene id under “edit this” on the scenes tab. Thanks so much

Well I guess I celebrated too early. I was able to get the scene IDs. But calling it from the developer tools Service call or adding to an automation doesn’t trigger the scene. The latest UI has this nice interface where you just put the slider on the group number, so I don’t imagine it’s a syntax error. Here’s the Automation yaml entry

  • id: ‘1606013374243’
    alias: Turn On Lights at Dusk
    description: ‘’
    trigger:
    • platform: sun
      event: sunset
      offset: -01:00:00
      condition: []
      action:
    • service: insteon.scene_on
      data:
      group: 20
      mode: single

Any ideas how to debug this? The scene triggers both via the app and via Alexa.

The indenting looks wrong. Action is certainly not inside trigger

Yeah, sorry, I think the formatting got squashed based on how I posted it. Let me try again.

Does this still look wrong. That would be ideal if it was!


- id: '1606013374243'
  alias: Turn On Lights at Dusk
  description: ''
  trigger:
  - platform: sun
    event: sunset
    offset: -01:00:00
  condition: []
  action:
  - service: insteon.scene_on
    data:
      group: 20
  mode: single

did you ever get an answer for this?

I was too was trying to run scenes from Alexa and I have it working using switch.

My steps:
First I go to configuration and select devices. then I tab to entities to get the address of a switch in the scene I want.

Then I select Developer tools >> services >> insteon.print_im_all_link_database to list all my devices.

Find the switch by it’s address from what you found in the first step. Once found note the group number. It’s the scene and has been in all my cases.

In your configuration.yaml make the switch

switch:
  - platform: template
    switches:
      ktichen_lights:
        friendly_name: "Kitchen" #this is the name of the switch for your alexa command
        turn_on:
          service: script.device_kitchen_on
        turn_off:
          service: script.device_kitchen_off
  - platform: template  #next switch
    switches:
      game_room_lights:
        friendly_name: "Game room" #this is the name of the switch for your alexa command
        turn_on:
          service: script.device_game_room_on
        turn_off:
          service: script.device_game_room_off

Now in the scripts.yaml

device_kitchen_on:
  alias: Kitchen lights on
  sequence:
    - service: insteon.scene_on
      data:
        group: {the group number you found}
  mode: single
device_kitchen_off:
  alias: Kitchen lights off
  sequence:
    - service: insteon.scene_off
      data:
        group: {the group number you found}
  mode: single

device_game_room_on:
  alias: Game room lights on
  sequence:
    - service: insteon.scene_on
      data:
        group: {the group number you found}
  mode: single
device_game_room_off:
  alias: Game room lights off
  sequence:
    - service: insteon.scene_off
      data:
        group: {the group number you found}
  mode: single

If you have the the insteon switch named the same change it from kitchen to kitchen switch or something else.

Once you have restated HA and made sure all is running and you have ran Home Assistant Core Integration: Check configuration in the developer tools, ask Alexa to discover new devices. Once found you should be good to go.

One note here. I have found that the GUI will not update sometimes at all if you use a scene in the hub/plm and this method. If you can live with slower activation of the scene then I would recreate them in HA and not call scene_on. It is bypassing turning on individual lights and therefore if you have parts on the gui showing these lights, the state can get out of sync.

Opcode, thanks for this example it is working for me. However, how do you add the template switches to a dashboard?

rlfromm, Once I wrote the code for switch in the configuration.yaml and restart HA they should list under switch in overview. I’m running a Windows HA version found here GitHub - AlexxIT/HassWP: Portable version of Home Assistant for Windows (no need to install)

Being new to HA and being inste-pwned I did not want to spend a lot of time setting up a virtual machine when I plan to get a pi when available and that’s being if all works out with HA. Which so far so good.

So you are not seeing the Switch in Overview. Have you restarted? Have you ran the Home Assistant Core Integration: Check configuration to make sure it’s all running correctly?