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

Add support for Unifi Smart Power devices #122

Closed
starsoccer opened this issue May 11, 2022 · 30 comments
Closed

Add support for Unifi Smart Power devices #122

starsoccer opened this issue May 11, 2022 · 30 comments

Comments

@starsoccer
Copy link

Creating ticket as requested here, home-assistant/core#71531

Let me know what info you need. Happy to provide whatever is needed. Will just mention there are(as far as Im aware 2 different devices),
Single Outlet: https://store.ui.com/collections/unifi-accessories/products/unifi-smart-power
Strip: https://store.ui.com/collections/unifi-accessories/products/smartpower-strip

I have both of them(2 outlets, and 1 strip) so can provide whatever information is needed on either in case they different slightly

@Kane610
Copy link
Owner

Kane610 commented May 12, 2022

Thank you, this is not nearly enough information to support them though. Could you perhaps share a diagnostics file from the UniFi integration as a start?

@starsoccer
Copy link
Author

Sure, diagnostics file attached

config_entry-unifi-1eabc036c156a091a334f15b0fad5845.json.txt

@robloh
Copy link

robloh commented Jun 29, 2022

I have a SmartPower PDU Pro if that's helpful for testing etc.

@Kane610
Copy link
Owner

Kane610 commented Jun 29, 2022

Right now I'm reworking the implementation do I try to avoid expanding it at the moment. It shouldn't take too long though I don't know if I'll have a pause during my summer vacation

@starsoccer
Copy link
Author

Any update to this?

@Kane610
Copy link
Owner

Kane610 commented Sep 2, 2022

Before expanding this Im doing some generic rewrites that will benefit future development. So no explicit ETA, maybe with 2022.10 but can't promise that

@stephack
Copy link

Thanks for your continued work on this @Kane610 .
I also have the SmartPower PDU if you ever needed to test or obtain any information from this unit.

@stephack
Copy link

After playing around with the Unifi API a little and doing some digging I came across this example of controlling the power outlets on a SmartPower PDU.

https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/examples/modify_smartpower_pdu_outlet.php

Hopefully this helps as you continue to update the Unifi integrations.

@rhdny
Copy link

rhdny commented Dec 18, 2022

Good find. Thanks! Hope we can get it built into the UniFi integration at some point :) I'm looking to control the smart power strip.

@Kane610
Copy link
Owner

Kane610 commented Dec 19, 2022

The Rewrite is going well, but I still won't promise an ETA though. This is on my todo list :)

@starsoccer
Copy link
Author

Just wanted to note as of an update(not sure as to when) it does seem possible to control these devices(atleast the smart outlet and strip). They appear in home assistant now with toggles for the power.

@stephack
Copy link

Just wanted to note as of an update(not sure as to when) it does seem possible to control these devices(atleast the smart outlet and strip). They appear in home assistant now with toggles for the power.

I just updated to 2022.12.8 but don't have any entities that allow me to control the outlets on the smartPDU yet. Good to see there is progress though.

@Kane610
Copy link
Owner

Kane610 commented Mar 22, 2023

@starsoccer
Copy link
Author

Another feature request https://community.home-assistant.io/t/support-for-usp-pdu-pro-in-the-ubiquity-integration/550746

Can confirm for PDU I can not seem to control things. Single plug and strip still work fine for me

@starsoccer
Copy link
Author

Just bumping this. Would be great if PDU got added along with power consumption metrics

@legomind
Copy link

legomind commented Jul 6, 2023

I can perform any testing needed on the USP-PDU-Pro. Would love to see power consumption and relay switches in ha.

@Cisien
Copy link
Contributor

Cisien commented Aug 9, 2023

@starsoccer

Just bumping this. Would be great if PDU got added along with power consumption metrics

I've submitted a PR for this feature: home-assistant/core#98081

image

@legomind feel free to give this branch a go on your system and let me know if anything comes up.

@starsoccer
Copy link
Author

Awesome glad to see this being done. Looks great. Cant wait for it to be merged.

Happy to help test anything if needed. I have most of the smart power devices

@Kane610
Copy link
Owner

Kane610 commented Aug 10, 2023

Awesome glad to see this being done. Looks great. Cant wait for it to be merged.

Happy to help test anything if needed. I have most of the smart power devices

Its merged so available on dev shortly :)

So @Cisien has provided power measurement sensors for all pdu. I think he also wants to enable relay control for the other devices as well which are not already supported.

@Cisien
Copy link
Contributor

Cisien commented Aug 10, 2023

so, i think the change i'm proposing in #427 would magically start supporting PDU outlet switches, as well as letting us update the change I made in that PR to use the more self-documenting properties instead of a "caps" bitfield.

Also, I just added a new PR for reading the AC outlet budget/consumption metrics

@Cisien
Copy link
Contributor

Cisien commented Aug 10, 2023

That's exactly what it will do!
image

@starsoccer
Copy link
Author

😄 this is great I cant wait for it to hit main/release and use it

@Kane610
Copy link
Owner

Kane610 commented Aug 12, 2023

We have merged @Cisien next PR with total power consu.ption of a pdu

@Kane610
Copy link
Owner

Kane610 commented Aug 13, 2023

Just merged extended support for controlling outlet relays for PDUs. I think we can close this issue now.

@stephack
Copy link

stephack commented Aug 13, 2023

Thanks for getting this added @Kane610 and @Cisien
We appreciate your commitment to this integration.

@Kane610
Copy link
Owner

Kane610 commented Aug 13, 2023

Thanks! But the kudos should go to @Cisien who put in the effort :)

@stephack
Copy link

Thanks! But the kudos should go to @Cisien who put in the effort :)

Updated my kudos accordingly 😉

@Cisien
Copy link
Contributor

Cisien commented Aug 13, 2023

Thanks! Let me know if you run into any issues!

I'm guessing this is in the pipeline for the August (September?) release?

@Kane610
Copy link
Owner

Kane610 commented Aug 13, 2023

I'm guessing this is in the pipeline for the August (September?) release?

Yes the beta will be on the 30th of August

@Kane610
Copy link
Owner

Kane610 commented Sep 2, 2023

Beta is out and we can consider this issue completed. Thanks for your excellent contribution @Cisien

@Kane610 Kane610 closed this as completed Sep 2, 2023
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

No branches or pull requests

7 participants