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

Use Remote Group When Adding Resp Link on Modem #453

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

krkeegan
Copy link
Collaborator

@krkeegan krkeegan commented Nov 8, 2021

Proposed change

This is a significant bug fix. Not sure how long this has been an issue. I only noticed it when I had to replace a PLM.

The Issue

When pairing a multigroup device such as a keypadlinc, remote, motion, ... The responder links for the secondary groups (not 0/1) were not being added to the modem.

This was happening because _db_update on the modem was treating the local_group as the scene group number for responder links. Since all responder links on the modem have a local_group of 0x01 this essentially meant that only one responder link would be added to the modem per device since all responder links looked the same.

The Solution

The solution is to use the remote_group as the scene group number on responder links. This code is written properly for all other devices except the modem, so I just copied the same code.

Additional information

I am not sure how long this has been happening. The code I modified is 4 years old. But I believe things were working at some point. Strange

Checklist

  • The code change is tested and works locally.
  • Local tests pass.
  • Tests have been added to verify that the new code works. Including tests to catch any change in this in the future.
  • Code documentation was added where necessary

The group on responder links is the "remote_group".  This was correct
in the devices/Base.py but was somehow not updated in Modem.py.

Also fix bug with link data on Modem _db_update.  It is a bit
confusing, but when calling _db_add_### at the end of the function
the call is to the remote device, so the local_data is actually
remote_data.

Copy Base Device DB_Update Tests into Test Modem.
Add tests for multigroup responder links on Modem.
@krkeegan krkeegan merged commit 7339651 into TD22057:dev Nov 8, 2021
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

Successfully merging this pull request may close these issues.

1 participant