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

Added support for the Philips Hue Smart Plug #1350

Merged
merged 5 commits into from
May 28, 2024

Conversation

kiera-robinson-st
Copy link
Contributor

Philips Hue Smart Plug is exposed as a 'light' service so existing light code was modified to include the case for Philips Hue Smart Plug new device adoption and use

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

github-actions bot commented Apr 30, 2024

Test Results

   57 files  ±0    364 suites  ±0   0s ⏱️ ±0s
1 757 tests ±0  1 757 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 051 runs  ±0  3 051 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 488b34b. ± Comparison against base commit 38c597c.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 30, 2024

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 56f4a0a

@dljsjr
Copy link
Contributor

dljsjr commented Apr 30, 2024

For some reason, OneApp isn't showing any devices that I onboard today. But the device does onboard to the driver just fine, and I've tested control via the CLI. Here's a screenshot:

image

@dljsjr
Copy link
Contributor

dljsjr commented Apr 30, 2024

Working from OneApp now:

IMG_6565

Copy link

github-actions bot commented May 1, 2024

Channel deleted.

@@ -0,0 +1,12 @@
name: SmartPlug
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required, but I think we typically try to make the name match the filename

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on #1359

Copy link
Contributor

@greens greens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard to tell what's unique to this PR.

Maybe change the target branch to feat/device/motion-and-contact-sensors? I know that complicates timing, though.

@dljsjr dljsjr changed the base branch from feat/new-device-types to feat/device/motion-and-contact-sensors May 2, 2024 03:29
@dljsjr dljsjr force-pushed the feat/device/motion-and-contact-sensors branch from 1b281d9 to 62f4ab1 Compare May 3, 2024 20:32
@dljsjr dljsjr force-pushed the feat/device/smartplug branch from 5480c3e to f969440 Compare May 3, 2024 20:38
@dljsjr dljsjr force-pushed the feat/device/motion-and-contact-sensors branch from 62f4ab1 to 053faea Compare May 3, 2024 21:22
@dljsjr dljsjr force-pushed the feat/device/smartplug branch 2 times, most recently from 3cc39f1 to df57efc Compare May 3, 2024 21:44
@dljsjr dljsjr force-pushed the feat/device/motion-and-contact-sensors branch from 053faea to 201601d Compare May 3, 2024 22:09
@dljsjr dljsjr force-pushed the feat/device/smartplug branch from df57efc to 007b231 Compare May 3, 2024 22:12
@dljsjr dljsjr force-pushed the feat/device/motion-and-contact-sensors branch from 201601d to 38c597c Compare May 3, 2024 22:44
@dljsjr dljsjr force-pushed the feat/device/smartplug branch 3 times, most recently from 87f4c8a to 488b34b Compare May 3, 2024 23:39
@dljsjr
Copy link
Contributor

dljsjr commented May 6, 2024

hard to tell what's unique to this PR.

Maybe change the target branch to feat/device/motion-and-contact-sensors? I know that complicates timing, though.

Did this last week and forgot to ping you.

kiera-robinson-st2 and others added 5 commits May 27, 2024 23:32
Philips Hue Smart Plug is exposed as a 'light' service so existing light code
was modified to include the case for Philips Hue Smart Plug new device adoption and use
This is the Hue Dimmer Remote and the Hue Tap Dial.

Note that we do *not* yet have support for the rotary portion of the tap dial.
Philips Hue Smart Button is exposed as a 'button' service in addition to
including the 'device_power' service. Development and inclusion of this
device driver was modelled after the 4-button-remote device driver
This refactor furthers the generalizations done previously for devices
that provide multiple services to allow for not only mapping of services
to capabilities or components, but also multiple device records.

This allows for us to support devices such as the Dymera up/down light.

Other changes:

- I found myself frequently introducing bugs related to using the Hue Bridge ID
(MAC Address) as a Device ID, and the Bridge Device ID as a Hue Bridge ID. We renamed
all instances of `bridge_id` referencing the MAC to `bridge_network_id` to try and
alleviate the confusion.

- Button support is further generalized to support two-button models, which covers the
In-Wall Switch Module in the 2-gang configuration.
- Fixes an issue where compound devices wouldn't be labeled properly
- Fixes an issue where the stray device task was scanning a bridge every time it onboarded, even if there were no strays
- Fixes an issue where refresh on devices could fail early in driver start by accidentally passing in an API Key string instead of an API Rest Client instance to a function
- Fixes an issue where multi-service devices (Buttons, Motion Sensors, Contact Sensors) could sometimes fail to emit attributes if their init handler ran before their parent bridge's network connection was open.

Move `battery` above refresh in profile for motion

Remove debug logic from tamper emit

Remove unused Rooms API calls

Replace strings with consts in API methods

Add missing early return in button attribute handler

Early return in device discovery for unsupported buttons

Move debug logs to correct function

Update category for single button profile

Fix duped line from bad rerere rebase

Finish SSE event stream generalizations

Tidy up docs/logs that still assume lights-only

Generalize stray device handling

Normalize module structures
@dljsjr dljsjr force-pushed the feat/device/smartplug branch from 5a47c05 to 56f4a0a Compare May 28, 2024 04:32
@dljsjr dljsjr merged commit 0e05ca8 into feat/device/motion-and-contact-sensors May 28, 2024
8 checks passed
@dljsjr dljsjr deleted the feat/device/smartplug branch May 28, 2024 04:32
Copy link

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.

7 participants