home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.97k stars 30.52k forks source link

Insteon Keypad Buttons Togglinng When Light Switch is Turned on #127514

Open srolomc opened 3 weeks ago

srolomc commented 3 weeks ago

The problem

Every so often when I turn on one of my Insteon light switches, it appears that the keypad buttons (one of which is a responder) turns off many of the keypad buttons and then quickly toggles them back on. This does not happen very often. The reason I notice this is that it triggers an automation I have that is monitoring the state of one of buttons. I have actually come up with a workaround for my use case for this automation so I do not think it will get triggered anymore, but I still think that this behavior is odd (various keypad button states toggling when I turn on a light switch).

The light switch is device 451d81, and the keypad is device 331531. The keypad is an 8 button dimmer.

What version of Home Assistant Core has the issue?

2024.9.3

What was the last working version of Home Assistant Core?

2022.2.2

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Insteon

Link to integration documentation on our website

https://www.home-assistant.io/integrations/insteon/

Diagnostics information

2024-10-03 20:09:35.939 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x50, address: 451d81, target: 000001, flags: 0xcf, cmd1: 0x11, cmd2: 0x00 2024-10-03 20:09:35.939 DEBUG (MainThread) [pyinsteon.topics] Topic: 451d81.1.on.all_link_broadcast data: {'cmd1': 17, 'cmd2': 0, 'target': 000001, 'user_data': None, 'hops_left': 3} 2024-10-03 20:09:35.939 DEBUG (MainThread) [pyinsteon.topics] Topic: handler.451d81.1.on.all_link_broadcast data: {'on_level': 255} 2024-10-03 20:09:35.940 DEBUG (MainThread) [pyinsteon.topics] Topic: event_451d81_1_on_event data: {'name': 'on_event', 'address': '451d81', 'group': 1, 'button': 'on_off_switch'} 2024-10-03 20:09:35.941 DEBUG (MainThread) [pyinsteon.topics] Topic: send.status_request.direct data: {'address': 4bb35f, 'status_type': 0} 2024-10-03 20:09:35.941 DEBUG (MainThread) [pyinsteon.messages] TX: msg_id: 0x62, address: 4bb35f, flags: 0x0f, cmd1: 0x19, cmd2: 0x00 2024-10-03 20:09:36.543 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x62, address: 4bb35f, flags: 0x0f, cmd1: 0x19, cmd2: 0x00, ack: 0x06 2024-10-03 20:09:36.543 DEBUG (MainThread) [pyinsteon.topics] Topic: ack.4bb35f.status_request.direct data: {'cmd1': 25, 'cmd2': 0, 'user_data': None} 2024-10-03 20:09:37.148 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x50, address: 4bb35f, target: 49e6a4, flags: 0x2f, cmd1: 0x07, cmd2: 0xff 2024-10-03 20:09:37.148 DEBUG (MainThread) [pyinsteon.topics] Topic: 4bb35f.standard_message_received.direct_ack data: {'cmd1': 7, 'cmd2': 255, 'target': 49e6a4, 'user_data': None, 'hops_left': 3} 2024-10-03 20:09:37.208 DEBUG (MainThread) [pyinsteon.topics] Topic: handler.4bb35f.0.status_request.direct data: {'db_version': 7, 'status': 255} 2024-10-03 20:09:37.208 DEBUG (MainThread) [pyinsteon.topics] Topic: state_4bb35f_on_off_switch_1 data: {'name': 'on_off_switch', 'address': '4bb35f', 'value': 255, 'group': 1} 2024-10-03 20:09:37.209 DEBUG (MainThread) [pyinsteon.topics] Topic: send.status_request.direct data: {'address': 331531, 'status_type': 2} 2024-10-03 20:09:37.210 DEBUG (MainThread) [pyinsteon.messages] TX: msg_id: 0x62, address: 331531, flags: 0x0f, cmd1: 0x19, cmd2: 0x02 2024-10-03 20:09:37.753 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x50, address: 451d81, target: 49e6a4, flags: 0x40, cmd1: 0x11, cmd2: 0x01 2024-10-03 20:09:37.754 DEBUG (MainThread) [pyinsteon.topics] Topic: 451d81.1.on.all_link_cleanup data: {'cmd1': 17, 'cmd2': 1, 'target': 49e6a4, 'user_data': None, 'hops_left': 0} 2024-10-03 20:09:37.754 DEBUG (MainThread) [pyinsteon.topics] Topic: handler.451d81.1.on.all_link_cleanup data: {} 2024-10-03 20:09:37.754 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x62, address: 331531, flags: 0x0f, cmd1: 0x19, cmd2: 0x02, ack: 0x06 2024-10-03 20:09:37.754 DEBUG (MainThread) [pyinsteon.topics] Topic: ack.331531.status_request.direct data: {'cmd1': 25, 'cmd2': 2, 'user_data': None} 2024-10-03 20:09:37.755 DEBUG (MainThread) [pyinsteon.topics] Topic: send.status_request.direct data: {'address': 331531, 'status_type': 1} 2024-10-03 20:09:37.782 DEBUG (MainThread) [pyinsteon.messages] TX: msg_id: 0x62, address: 331531, flags: 0x0f, cmd1: 0x19, cmd2: 0x01 2024-10-03 20:09:38.358 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x62, address: 331531, flags: 0x0f, cmd1: 0x19, cmd2: 0x01, ack: 0x06 2024-10-03 20:09:38.358 DEBUG (MainThread) [pyinsteon.topics] Topic: ack.331531.status_request.direct data: {'cmd1': 25, 'cmd2': 1, 'user_data': None} 2024-10-03 20:09:38.962 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x50, address: 331531, target: 49e6a4, flags: 0x2b, cmd1: 0x19, cmd2: 0x00 2024-10-03 20:09:38.963 DEBUG (MainThread) [pyinsteon.topics] Topic: 331531.status_request.direct_ack data: {'cmd1': 25, 'cmd2': 0, 'target': 49e6a4, 'user_data': None, 'hops_left': 2} 2024-10-03 20:09:38.963 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x50, address: 331531, target: 49e6a4, flags: 0x20, cmd1: 0x11, cmd2: 0x3a 2024-10-03 20:09:38.963 DEBUG (MainThread) [pyinsteon.topics] Topic: 331531.on.direct_ack data: {'cmd1': 17, 'cmd2': 58, 'target': 49e6a4, 'user_data': None, 'hops_left': 0} 2024-10-03 20:09:39.024 DEBUG (MainThread) [pyinsteon.topics] Topic: handler.331531.1.status_request.direct data: {'db_version': 25, 'status': 0} 2024-10-03 20:09:39.024 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_d_4 data: {'name': 'on_off_switch_d', 'address': '331531', 'value': 0, 'group': 4} 2024-10-03 20:09:39.024 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_e_5 data: {'name': 'on_off_switch_e', 'address': '331531', 'value': 0, 'group': 5} 2024-10-03 20:09:39.024 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_f_6 data: {'name': 'on_off_switch_f', 'address': '331531', 'value': 0, 'group': 6} 2024-10-03 20:09:39.024 DEBUG (MainThread) [pyinsteon.topics] Topic: handler.331531.1.status_request.direct data: {'db_version': 17, 'status': 58} 2024-10-03 20:09:39.024 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_b_2 data: {'name': 'on_off_switch_b', 'address': '331531', 'value': 1, 'group': 2} 2024-10-03 20:09:39.025 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_d_4 data: {'name': 'on_off_switch_d', 'address': '331531', 'value': 1, 'group': 4} 2024-10-03 20:09:39.025 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_e_5 data: {'name': 'on_off_switch_e', 'address': '331531', 'value': 1, 'group': 5} 2024-10-03 20:09:39.025 DEBUG (MainThread) [pyinsteon.topics] Topic: state_331531_on_off_switch_f_6 data: {'name': 'on_off_switch_f', 'address': '331531', 'value': 1, 'group': 6} 2024-10-03 20:09:39.025 INFO (MainThread) [homeassistant.components.automation.foyer_keypad_den_lights_off] Foyer Keypad Den Lights Off: Running automation actions 2024-10-03 20:09:39.025 INFO (MainThread) [homeassistant.components.automation.foyer_keypad_den_lights_off] Foyer Keypad Den Lights Off: Executing step call service 2024-10-03 20:09:39.026 INFO (MainThread) [homeassistant.components.automation.foyer_keypad_dining_room_lights_turn_off] Foyer Keypad Dining Room Lights Turn Off: Running automation actions 2024-10-03 20:09:39.026 INFO (MainThread) [homeassistant.components.automation.foyer_keypad_dining_room_lights_turn_off] Foyer Keypad Dining Room Lights Turn Off: Executing step call service 2024-10-03 20:09:39.026 INFO (MainThread) [homeassistant.components.automation.foyer_keypad_turn_first_floor_lights_off] Foyer Keypad Turn First Floor Lights Off: Running automation actions 2024-10-03 20:09:39.026 INFO (MainThread) [homeassistant.components.automation.foyer_keypad_turn_first_floor_lights_off] Foyer Keypad Turn First Floor Lights Off: Executing step call service 2024-10-03 20:09:39.029 DEBUG (MainThread) [pyinsteon.topics] Topic: send.off.direct data: {'address': 49f03d, 'group': 1} 2024-10-03 20:09:39.030 DEBUG (MainThread) [pyinsteon.topics] Topic: send.off.direct data: {'address': 4adb6a, 'group': 1} 2024-10-03 20:09:39.033 DEBUG (MainThread) [pyinsteon.topics] Topic: send.off.direct data: {'address': 4bb35f, 'group': 1} 2024-10-03 20:09:39.034 DEBUG (MainThread) [pyinsteon.topics] Topic: send.off.direct data: {'address': 451d81, 'group': 1} 2024-10-03 20:09:39.034 DEBUG (MainThread) [pyinsteon.messages] TX: msg_id: 0x62, address: 49f03d, flags: 0x0f, cmd1: 0x13, cmd2: 0x00 2024-10-03 20:09:39.383 INFO (MainThread) [homeassistant.components.automation.curio_light_association] Curio Light Association: Running automation actions 2024-10-03 20:09:39.383 INFO (MainThread) [homeassistant.components.automation.curio_light_association] Curio Light Association: Choose at step 1: choice 2: Running automation actions 2024-10-03 20:09:39.383 INFO (MainThread) [homeassistant.components.automation.curio_light_association] Curio Light Association: Choose at step 1: choice 2: Executing step call service 2024-10-03 20:09:39.565 DEBUG (MainThread) [pyinsteon.messages] TX: msg_id: 0x62, address: 4bb35f, flags: 0x0f, cmd1: 0x13, cmd2: 0x00 2024-10-03 20:09:39.567 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x62, address: 49f03d, flags: 0x0f, cmd1: 0x13, cmd2: 0x00, ack: 0x06 2024-10-03 20:09:39.567 DEBUG (MainThread) [pyinsteon.topics] Topic: ack.49f03d.1.off.direct data: {'cmd1': 19, 'cmd2': 0, 'user_data': None} 2024-10-03 20:09:39.567 DEBUG (MainThread) [pyinsteon.messages] RX: msg_id: 0x50, address: 49f03d, target: 49e6a4, flags: 0x21, cmd1: 0x13, cmd2: 0x00 2024-10-03 20:09:39.567 DEBUG (MainThread) [pyinsteon.topics] Topic: 49f03d.off.direct_ack data: {'cmd1': 19, 'cmd2': 0, 'target': 49e6a4, 'user_data': None

Example YAML snippet

No response

Anything in the logs that might be useful for us?

I believe that the top of the log shows light switch 451d81 being turned on. At 20:09:39.024 I think some of the buttons quickly toggle state from 0 to 1 (if I am interpreting the value parameter in the messages correctly).

Additional information

For reference, my automation for one of the keypad buttons will turn all light switches off when the button state changes to "off". To get around this, I have added the following condition to my automation to only trigger when the button is physically pressed (which is really my only use case for this automation):

  - condition: template
    value_template: "{{ trigger.to_state.context.id != none }}"
  - condition: template
    value_template: "{{ trigger.to_state.context.parent_id == none }}"
  - condition: template
    value_template: "{{ trigger.to_state.context.user_id == none }}"
home-assistant[bot] commented 3 weeks ago

Hey there @teharris1, mind taking a look at this issue as it has been labeled with an integration (insteon) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `insteon` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign insteon` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


insteon documentation insteon source (message by IssueLinks)

srolomc commented 23 hours ago

@teharris1 - I just wanted to check in on this - my workaround does not seem to always be working, any idea why the keypad button states might be toggling like this? Unfortunately it sometimes causes my automations to fire when they should not. I have one more idea that I am going to try for an additional guard (do not execute the automation if the state does not remain in the "transitioned to" state for 1 second, as a sort of "steady state" check).