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

Occupancy sensor never clears if more than one in a room #114

Open
Idleyute opened this issue Jul 20, 2023 · 2 comments
Open

Occupancy sensor never clears if more than one in a room #114

Idleyute opened this issue Jul 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Idleyute
Copy link

Describe The Bug:
I had two sensors in my master bathroom in the lutron app and in HomeKit, one sensor just never cleared occupancy, even when it was cleared in the lutron app. It’s not a big deal..the easy workaround is to create a fake room in the lutron app to get around this limitation. Just thought you’d like to know. (Even with the fake room in the lutron app, the two sensors are still in the same room in HomeKit and work swimmingly)

To Reproduce:
You’d need two sensors and this bug definitely isn’t serious enough for the added expense. But yea two sensors in the same room in the lutron app, and one sensor won’t clear in HomeKit.

Expected behavior:
Both sensors should clear.

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:
@Idleyute Idleyute added the bug Something isn't working label Jul 20, 2023
@thenewwazoo
Copy link
Owner

Interesting! The plugin itself doesn't know anything about the rooms. I wonder if there's a serial number bug or something. Unfortunately, I do only have one occupancy sensor, but if I ever get another one I'll be sure to test it. I plan to leave this report open until/when that happens. Thank you for the report!

@bobvandevijver
Copy link

@thenewwazoo I believe this is caused due to the OccupancySensorRouter implementation (I am working on the Homey integration, and am using your implementation from time to time to know what LEAP is doing).

An occupancy group can have multiple sensors in it, but the status is from the sensors in the group combined. When additional sensors are registered with the same group, the OccupancySensorRouter will only have the callback registered for the latest sensor added as it uses the group href as identifier. If you change the router so that you can register multiple callbacks for the same occupancy group, I believe it should be solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants