Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keypadlinc Dimmer Button 2 - 8 issue #159

Closed
chris153002 opened this issue Aug 7, 2019 · 3 comments
Closed

Keypadlinc Dimmer Button 2 - 8 issue #159

chris153002 opened this issue Aug 7, 2019 · 3 comments

Comments

@chris153002
Copy link

chris153002 commented Aug 7, 2019

I have a 2 keypadlincs ( 1 2334-222, 1 2334-232) and a Dimmer 2477D all linked together, keypadlinc 1 is linked to the dimmer using button 4, keypadlinc 2 is linked using button 2.

When i turn on and off the light from the first keypad it does switch the 2477d as expected but the posted mqtt message topics are a little weird insteon/3c.43.53/state/4 (correct) for the first keypadlinc and insteon/40.b2.4a/state (correct) for the dimmer, but keypadlinc 2 shows insteon/3d.8d.cf/state/4 (incorrect) when it should be insteon/3d.8d.cf/state/1

when switching from the second keypad i get insteon/3d.8d.cf/state/2 on keypad2 (correct), insteon/40.b2.4a/state on dimmer (correct), and insteon/3c.43.53/state/2 on keypad 1 (incorrect)

when switching from the dimmer i get insteon/40.b2.4a/state on dimmer (correct), i get insteon/3d.8d.cf/state/1 on keypad2 (incorrect), and insteon/3c.43.53/state/1 on keypad 1 (incorrect)

here is the debug log from when i pressed the 2477D
2477D is 40.b2.4a
Keypadlinc 1 is 3c.43.53
Keypadlinc 2 is 3d.8d.cf
`
2019-08-07 17:12:01 INFO Dimmer: Setting device 40.b2.4a (basementhallcans) on=255 normal

2019-08-07 17:12:01 INFO Dimmer: MQTT received level change 40.b2.4a (basementhallcans) level: 255

2019-08-07 17:12:01 DEBUG Mqtt: MQTT publish insteon/40.b2.4a/state { "state" : "ON", "brightness" : 255 } qos=1 ret=1

2019-08-07 17:12:01 DEBUG Base: Found 3 responders in group 1

2019-08-07 17:12:01 DEBUG Base: Group 1 -> ['2c.ea.a1', '3d.8d.cf', '3c.43.53']

2019-08-07 17:12:01 INFO Base: 40.b2.4a (basementhallcans) broadcast to 2c.ea.a1 for group 1

2019-08-07 17:12:01 INFO Base: 40.b2.4a (basementhallcans) broadcast to 3d.8d.cf for group 1

2019-08-07 17:12:01 INFO KeypadLinc: Setting device 3d.8d.cf (basementlanding) grp=1 on=255 normal

2019-08-07 17:12:01 INFO KeypadLinc: MQTT received button press 3d.8d.cf (basementlanding) = btn 1 at 255 normal

2019-08-07 17:12:01 DEBUG Mqtt: MQTT publish insteon/3d.8d.cf/state/1 { "state" : "ON", "brightness" : 255 } qos=1 ret=1

2019-08-07 17:12:01 INFO Base: 40.b2.4a (basementhallcans) broadcast to 3c.43.53 for group 1

2019-08-07 17:12:01 INFO KeypadLinc: Setting device 3c.43.53 (comprm) grp=1 on=255 normal

2019-08-07 17:12:01 INFO KeypadLinc: MQTT received button press 3c.43.53 (comprm) = btn 1 at 255 normal

2019-08-07 17:12:01 DEBUG Mqtt: MQTT publish insteon/3c.43.53/state/1 { "state" : "ON", "brightness" : 255 } qos=1 ret=1

2019-08-07 17:12:01 DEBUG Mqtt: MQTT writing

2019-08-07 17:12:01 INFO Protocol: Read 0x50: Std: 40.b2.4a Type.ALL_LINK_BROADCAST grp: 01 cmd: 06 00

2019-08-07 17:12:01 DEBUG Protocol: Setting next write time: 1565215921.851741

2019-08-07 17:12:01 DEBUG MsgHistory: Received 0 hops, total 6 for 11 entries

2019-08-07 17:12:01 INFO Broadcast: Handling all link broadcast for 40.b2.4a 'basementhallcans'

2019-08-07 17:12:01 INFO Dimmer: Dimmer 40.b2.4a broadcast ACK grp: 1

2019-08-07 17:15:03 INFO Protocol: Read 0x50: Std: 40.b2.4a Type.ALL_LINK_BROADCAST grp: 01 cmd: 13 00

2019-08-07 17:15:03 DEBUG Protocol: Setting next write time: 1565216103.504329

2019-08-07 17:15:03 DEBUG MsgHistory: Received 0 hops, total 5 for 11 entries

2019-08-07 17:15:03 INFO Broadcast: Handling all link broadcast for 40.b2.4a 'basementhallcans'

2019-08-07 17:15:03 INFO Dimmer: Dimmer 40.b2.4a broadcast grp: 1 on: False mode: normal

2019-08-07 17:15:03 INFO Dimmer: Setting device 40.b2.4a (basementhallcans) on=0 normal

2019-08-07 17:15:03 INFO Dimmer: MQTT received level change 40.b2.4a (basementhallcans) level: 0

2019-08-07 17:15:03 DEBUG Mqtt: MQTT publish insteon/40.b2.4a/state { "state" : "OFF", "brightness" : 0 } qos=1 ret=1

2019-08-07 17:15:03 DEBUG Base: Found 3 responders in group 1

2019-08-07 17:15:03 DEBUG Base: Group 1 -> ['2c.ea.a1', '3d.8d.cf', '3c.43.53']

2019-08-07 17:15:03 INFO Base: 40.b2.4a (basementhallcans) broadcast to 2c.ea.a1 for group 1

2019-08-07 17:15:03 INFO Base: 40.b2.4a (basementhallcans) broadcast to 3d.8d.cf for group 1

2019-08-07 17:15:03 INFO KeypadLinc: Setting device 3d.8d.cf (basementlanding) grp=1 on=0 normal

2019-08-07 17:15:03 INFO KeypadLinc: MQTT received button press 3d.8d.cf (basementlanding) = btn 1 at 0 normal

2019-08-07 17:15:03 DEBUG Mqtt: MQTT publish insteon/3d.8d.cf/state/1 { "state" : "OFF", "brightness" : 0 } qos=1 ret=1

2019-08-07 17:15:03 INFO Base: 40.b2.4a (basementhallcans) broadcast to 3c.43.53 for group 1

2019-08-07 17:15:03 INFO KeypadLinc: Setting device 3c.43.53 (comprm) grp=1 on=0 normal

2019-08-07 17:15:03 INFO KeypadLinc: MQTT received button press 3c.43.53 (comprm) = btn 1 at 0 normal

2019-08-07 17:15:03 DEBUG Mqtt: MQTT publish insteon/3c.43.53/state/1 { "state" : "OFF", "brightness" : 0 } qos=1 ret=1

2019-08-07 17:15:03 DEBUG Mqtt: MQTT writing

2019-08-07 17:15:03 INFO Protocol: Read 0x50: Std: 40.b2.4a Type.ALL_LINK_CLEANUP grp: 01 cmd: 13 01

2019-08-07 17:15:03 DEBUG Protocol: Setting next write time: 1565216103.688311

2019-08-07 17:15:03 DEBUG MsgHistory: Received 0 hops, total 4 for 11 entries

2019-08-07 17:15:04 INFO Protocol: Read 0x50: Std: 40.b2.4a Type.ALL_LINK_BROADCAST grp: 01 cmd: 06 00

2019-08-07 17:15:04 DEBUG Protocol: Setting next write time: 1565216104.491948

2019-08-07 17:15:04 DEBUG MsgHistory: Received 1 hops, total 4 for 11 entries

2019-08-07 17:15:04 INFO Broadcast: Handling all link broadcast for 40.b2.4a 'basementhallcans'

2019-08-07 17:15:04 INFO Dimmer: Dimmer 40.b2.4a broadcast ACK grp: 1`

i have a more 2477D dimmers setup the same way in different parts of the house and they are act in this manner.
Thank you in advance for any assistance you are able to offer.

@chris153002
Copy link
Author

It would seem that the group number is never cross referenced from the link db?
https://github.com/TD22057/insteon-mqtt/blob/42f3933566fb2bcdbe80de7e6f5ff8ff35ecdea0/insteon_mqtt/device/KeypadLinc.py#L930
i believe the problem is somewhere near the above line.

i believe we need to check data byte 3 from the link entry corresponding to the address of the sending dimmer. i however am not quite sure how to do so, i am still becoming familiar with the code.

@chris153002
Copy link
Author

chris153002 commented Aug 8, 2019

Hmm im not sure if it was just this easy or if i am overlooking something but i changed
line 934 from
if self.is_dimmer and is_on and msg.group == 1:
to
if self.is_dimmer and is_on and entry.data[2] == 1:
and line 937 from
self._set_level(msg.group, level, mode)
to
self._set_level(entry.data[2], level, mode)
and that seems to fix the issue i was talking about.

Edit: this issue also seems to be in the fanlinc code as well

TD22057 added a commit that referenced this issue Dec 28, 2019
… database link instead of the message group to figure out which local button is being changed.
@TD22057
Copy link
Owner

TD22057 commented Dec 28, 2019

Thanks for the fixes. I was able to confirm this locally with my keypadlincs. I updated that class as well as FanLinc and Outlet which I believe had similar issues (though I don't own either of those).

@TD22057 TD22057 closed this as completed Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants