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

[draytonwiser] Expose Smart Plug Power Metering, Improve null handling #9706

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

jamesmelville
Copy link
Contributor

Expose Smart Plug Power Metering, Improve null handling

The Drayton Wiser API now exposes instantaneous power metering and cumulative energy usage for Wiser Smart Plug devices through the API. This PR adds channels to report this data. Capability mentioned by @andrew-schofield in this post - sorry I couldn't wait so thought I should share!

Additionally, when Wiser wireless devices are offline some properties in the API response are nulled and the binding would fail to fully update all the device's channels. Added checks to update all channels, tested with registered Smart Plug / TRV / RoomStat with power removed.

Signed-off-by: James Melville <jamesmelville@gmail.com>
Signed-off-by: James Melville <jamesmelville@gmail.com>
Copy link
Contributor

@andrew-schofield andrew-schofield left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

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

LGTM

@Hilbrand Hilbrand added the enhancement An enhancement or new feature for an existing add-on label Jan 6, 2021
Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

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

LGTM

@cpmeister cpmeister added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jan 6, 2021
@cpmeister cpmeister merged commit ae7eb26 into openhab:main Jan 6, 2021
@cpmeister cpmeister added this to the 3.1 milestone Jan 6, 2021
themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this pull request May 10, 2021
openhab#9706)

* [draytonwiser] Expose Smart Plug Power Metering
* [draytonwiser] Handle null values from offline devices

Signed-off-by: James Melville <jamesmelville@gmail.com>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
openhab#9706)

* [draytonwiser] Expose Smart Plug Power Metering
* [draytonwiser] Handle null values from offline devices

Signed-off-by: James Melville <jamesmelville@gmail.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
openhab#9706)

* [draytonwiser] Expose Smart Plug Power Metering
* [draytonwiser] Handle null values from offline devices

Signed-off-by: James Melville <jamesmelville@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants