home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.11k stars 29.16k forks source link

Unifi Integration not working with Dream Machine Pro #31603

Closed dwillm1 closed 4 years ago

dwillm1 commented 4 years ago

The problem

When trying to set up a new unifi dream machine pro as the controller for the Unifi Integration, I am getting the error "No service available".

This may be due to how unifi OS is on the device, with [controller_ip]:8443 not directing to the controller software anymore, or as mentioned to me in discord, potentially due to the controller now appearing to use [controller_ip]/network/site/ instead of [controller_ip]/manage/site/

Environment

Problem-relevant configuration.yaml

image

Traceback/Error logs

Additional information

probot-home-assistant[bot] commented 4 years ago

Hey there @kane610, mind taking a look at this issue as its been labeled with a integration (unifi) you are listed as a codeowner for? Thanks!

Kane610 commented 4 years ago

Thanks for reporting. Someone will need to play around with the api to identify the differences. I don't plan to buy one for a few months since it still seem to be a beta product

dwillm1 commented 4 years ago

@Kane610 let me know if there is anything I can do to help

johntdyer commented 4 years ago

I'm also available to help, just not sure where to begin

Kane610 commented 4 years ago

Well the new way to login is necessary to understand, and then it is just to identify what paths are being used

SeraphimSerapis commented 4 years ago

I just got mine. Happy to help, too. Is there a preferred format for you to provide this information?

Some basic mapping:

I'll go through the API with https://github.com/Art-of-WiFi/UniFi-API-browser this weekend to provide more endpoints if needed.

johntdyer commented 4 years ago

FWIW this project was developed to address the new auth scheme for Unifi Protect. Perhaps it can help in this effort?

Kane610 commented 4 years ago

For anyone want to try stuff out I just added a main function to the aiounifi package, you can now just fork the git repo and call it using python3 -m aiounifi 127.0.0.1 username password

SeraphimSerapis commented 4 years ago

Done. Please see the issue report I created.

balloob commented 4 years ago

Crowdsource to buy a Dream Machine Pro for @Kane610 and I bet it will be fixed in the next release 😝

Kane610 commented 4 years ago

I like how you are thinking @balloob :D

SeraphimSerapis commented 4 years ago

@balloob Thinking out loud: how about a fund managed by Nabu Casa (or some other instance), that helps maintainers finance new hardware? I'd be happy to pay additional funds via my monthly subscription if that effectively helps improving integration quality and reducing the financial burden on people who actively enable integrations.

balloob commented 4 years ago

We do occasionally buy things for developers for integration development to make sure it works correctly. It's developer time that is more scarce.

balloob commented 4 years ago

Btw one could also open an ssh port to let Robban take a peek. This is probably just a changed path.

SeraphimSerapis commented 4 years ago

Valid point. @Kane610 let me know if I can help.

Kane610 commented 4 years ago

Work is ongoing here https://github.com/Kane610/aiounifi/issues/13

Kane610 commented 4 years ago

I've got support added to the library and its a small change to add support to hass. But I have a couple of other issues to investigate before releasing it

russseaman commented 4 years ago

I saw somewhere else that issue might be with SSO account....you have to log in with UI.com account to set up UDMpro...I created a local account and tried with that, still no luck...just thought I would add this comment in there

ensjens commented 4 years ago

@russseaman I got it working today with a local account. I needed to change the port from the default 8443 to 443

SeraphimSerapis commented 4 years ago

I also get the no local user found, even when changing the port to 443. I created a local user with limited admin rights to make sure it's not permission-related.

Screenshot 2020-05-12 at 11 09 15

russseaman commented 4 years ago

So I got it working with local account with Super Admin role and port 443

SeraphimSerapis commented 4 years ago

@russseaman which version does your UDMP run? I am on the 1.70 RC

Kane610 commented 4 years ago

For v1.7 you need 0.110

SeraphimSerapis commented 4 years ago

@Kane610 that helps a lot. Thx!

JamieP83 commented 3 years ago

So I got it working with local account with Super Admin role and port 443

same! thanks