Funny, got an email that you can now subscribe to Insteon Cloud. So I wanted to ask a question … simply … I do not want Insteon Cloud subscription BUT I want to change some basic things like IP address and userID/password.
So I thought … well if you are selling now Cloud subscriptions you must have re-instated the support forum.
A question for those that may have done anything with my Insteon Explorer code … I think next I want to add an automation that will call group.set with the entities that are in an insteon group. This would give HA control to the group … naming them like “insteon_group_21”. Then they could be used to see the state of the whole group (on/off) for like custom buttons.
Sound like something you would all like? I already can get all the entities in a group, would be easy to rebuild that into groups.
OK, I added it as it was very easy. Now you can create/update a Home Assistant Group that mirrors the Insteon Scene. This allows you to use a state of the Insteon Group (really Home Assistant Group) . For example, I can update a custom button card with the state if every member is “on”.
The new owners of Insteon appear to be making progress, the Apps are back, Alexa is back and Google should start working again soon. I expect they will also get either the original or another Forum running soon too. All of this is good and will hopefully lead to new product available and on going support.
To be honest, I could care less about Insteon “services”. For what would I want them?
I have to have their Cloud to change my ID or Password
I have to have their Cloud to change my Hubs local IP address (mind boggling)
I have to have their Cloud to understand that “Scene 32” is called “Kitchen” in their app (big woop, easily analyzed and extracted one time)
Everything else can be wiped out from the Hub … groups, schedules … and recreated in an open product. Use Nabu Casa and you can control scenes and such with Alexa.
They should concentrate on building devices, open up those few things to be controlled and forget it.
I for one will never purchase their Cloud service. There is no real need.
When used with some other things I have posted above, this is an automation that will build a Home Assistant group which contains every device in your Insteon scenes.
alias: Build Insteon Scenes
description: ''
trigger:
- platform: time_pattern
minutes: '1'
condition: []
action:
- repeat:
while:
- condition: template
value_template: >-
{{ repeat.index <=
(state_attr('input_select.insteon_modem_groups','options') | count)
}}
sequence:
- service: group.set
data_template:
object_id: >-
{{ 'insteon_group_' +
(state_attr('input_select.insteon_modem_groups','options')[repeat.index
- 1]) }}
name: >-
{{ 'Insteon Scene ' +
(state_attr('input_select.insteon_modem_groups','options')[repeat.index
- 1]) }}
icon: mdi:lightbulb-group
entities: >-
{% set glist = state_attr('sensor.insteon_groups','groups') %} {%
set devices = namespace(switch=[]) %} {% for value in glist %}
{% if ((value.group | int) ==
(state_attr('input_select.insteon_modem_groups','options')[repeat.index
- 1]) | int) %} {% set devices.switch = devices.switch +
[(value.device_address[0:2] + '.' + value.device_address[2:-2] +
'.' + value.device_address[-2:] + '_' + value.button | string) |
upper] %} {% endif %} {% endfor %} {% set gp =
namespace(groups=[]) %} {% for ent in
integration_entities('insteon') %} {% if
state_attr(ent,'insteon_address') + '_' +
state_attr(ent,'insteon_group') | string in devices.switch %} {%
set gp.groups = gp.groups + [ent] %} {% endif %} {% endfor %}
{{ gp.groups | unique | sort }}
all: true
mode: single
I would suppose attaching this automation to something other than a change in the group might be better if you are constantly adding new devices, but I believe that the insteon_group sensor is enough because it is set to refresh at 30 second intervals.
I should note I have made other changes to the code posted in previous messages to make things work a bit better (like insteon_groups state is set with a timestamp so that when it is rebuilt the state changes).
Another user reported an issue in the code above. It is really in the way the formatting is done. I copied that code from automations.yaml but reformatted and pasted into this web GUI. Just use the GUI-based YAML editor and create a new automation and play with it until you get it formatted correctly. This below is exactly what is in my automations.yaml with me reformatting it:
- id: '1651436131649'
alias: Set Insteon Select Options
description: ''
trigger:
- platform: state
entity_id:
- sensor.insteon_groups
condition: []
action:
- service: input_select.set_options
data_template:
entity_id: input_select.insteon_devices
options: '{% set dv = namespace(devices=[]) %} {% for ent in integration_entities(''insteon'')
%} {% set entry = state_attr(ent,''friendly_name'') + " (" + ent + ")" %}
{% set dv.devices = dv.devices + [entry] %} {% endfor %} {{ dv.devices
| sort }}
'
mode: single
I will post the missing things in a bit. I actually use oxygen editor through my network with mounted .homeassistant folder. I find a dedicated editor that supports many YAML features and can also sense JSON and XML with conversions between all of them much better than any browser GUI tool.
So it just is the deveive selected in the first popdown. I just use it to set on/off and possible brightness level for linking the device if you choose to do so via the buttons. I have been using the Insteon Control Panel to add/edit things now.nThe Target Insteon Scene is merely a helper, you can set how you like as I see you have a scene number 254. I set mine to allow scenes from 10 - 100:
I would note that I added more code that helps me considerably to see how things are working. On Home Assistant start and on updates, I dynamically build Home Assistant Groups that map to Insteon Scenes. You can see this in the screen below. I can then use the toggle to turn on the Home Assistant Group (of course, you get the 1 by 1 popcorn effect of each light coming on). Or I can use the Test Insteon Scene" button and you see all the lights come on at once.
I just like the ability to look at how things are working. I have noted a few lights that are problematic, where the lights does go on but HA still shows it off and visa/versa. I slowly narrowed these down by then looking what was in the Insteon Control Panel. I still have a few that do not function correctly but it is intermittent so not sure what is happening, possibly a timing issue in getting the status message back.
Looking here, you can see I turned on the “Backyard” Insteon Scene. What I really like is seeing the Home Assistant Group for “Backyard” is also on, but so is “Pergola” and “Deck Lights” because these two groups are subsets of the whole “Backyard”. The Home Assistant Groups are created such that all must be on in order for the state to be “on”.
Awesome. As I said, I used this at the beginning to add/change things in scenes but I tend now to just test things and use the Insteon Control Panel to do edit scenes. I am still trying to get things in shape and consolidated so that all these different parts load up correctly. I had many of them in automations that had a homeassistant.start trigger which is too soon and would throw errors in the log.
In the Insteon Control Panel, I would go to all the devices and the Hub and mark anything in that group unused. In this code which I use to populate that dropdown, it filters out any group marked as “unused”
@kbrown01 hi from the reddit thread you linked to this!
i’m a little lost. would you be willing to set up a github repo that just shows your modified files. or consolidate your improvements here in a single how-to post? i realize it’s a lot to ask.
as mentioned above – it would be great to just see some sample config files with this all together if you’re willing to share. configuration.yaml, sensor.yaml, the entire lovelace page, etc. – everything that one needs to construct the amazing @kbrown01 recipe. it’s clear this improves the experience drastically and should be considered building in to the official release.