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

Update Hue Driver to accommodate 0.49.x changes for LAN Child Device Health #927

Merged
merged 4 commits into from
Aug 22, 2023

Conversation

dljsjr
Copy link
Contributor

@dljsjr dljsjr commented Aug 22, 2023

Changes in hubcore 0.49 require LAN-parented Child Devices to manage their online/offline state explicitly instead of automagically following the parent's health, which is needed to allow for child devices to mark themselves offline independently.

There were places in the Hue driver that made assumptions around child devices always following their parents, so we need to make a few tweaks to address that.

Primarily:

  1. Bulbs call online() on themselves at the end of their init block;
  2. The Hue Bridge will walk all of its children and manually update their state to offline when the bridge goes offline, and will poll the actual Zigbee connectivity status reported by the bridge when the bridge comes online.

The goal here is to try and minimize state divergence between local device watch and cloud health state; the cloud still has some rudimentary assumptions that child devices will follow parent devices, so we need to make the child devices behave the same way they would have in the past.

This supercedes #926 and #922

@dljsjr dljsjr force-pushed the fix/hue-explicitly-mark-lights-online branch from c30c4e1 to a21ec34 Compare August 22, 2023 20:22
@github-actions
Copy link

github-actions bot commented Aug 22, 2023

Channel deleted.

@github-actions
Copy link

github-actions bot commented Aug 22, 2023

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against dd63ac1

@github-actions
Copy link

github-actions bot commented Aug 22, 2023

Test Results

     52 files  ±0     336 suites  ±0   0s ⏱️ ±0s
1 577 tests ±0  1 577 ✔️ ±0  0 💤 ±0  0 ±0 
2 732 runs  ±0  2 732 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit dd63ac1. ± Comparison against base commit d0eadcd.

♻️ This comment has been updated with latest results.

@dljsjr dljsjr force-pushed the fix/hue-explicitly-mark-lights-online branch from a21ec34 to 13d89b0 Compare August 22, 2023 20:37
@dljsjr dljsjr force-pushed the fix/hue-explicitly-mark-lights-online branch from 13d89b0 to 78709e3 Compare August 22, 2023 20:50
@dljsjr dljsjr force-pushed the fix/hue-explicitly-mark-lights-online branch from 78709e3 to d5717b3 Compare August 22, 2023 21:07
dljsjr added 2 commits August 22, 2023 17:05
A bridge with a lot of devices will take a while to respond with a 200 on the
Zigbee Connectivity endpoint, so we do a retry loop on a task.
@dljsjr dljsjr merged commit 54c8f15 into main Aug 22, 2023
@dljsjr dljsjr deleted the fix/hue-explicitly-mark-lights-online branch August 22, 2023 22:40
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.

4 participants