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

[Feature Request] - Support UDM Pro controler #50

Open
eilko opened this issue Feb 12, 2020 · 25 comments
Open

[Feature Request] - Support UDM Pro controler #50

eilko opened this issue Feb 12, 2020 · 25 comments

Comments

@eilko
Copy link

eilko commented Feb 12, 2020

The new Unifi UDM Pro has its own controler. I have created a new user on the UDM pro and gave it access to the network controler. But it seems that something has changed. The url of the clients list is a bit different from https://IP/network/site/default/clients/1/50 the normal controler.

The app in homey gives the following debug info:

12-2-2020 17:40:26 : [debug] Connection success!
12-2-2020 17:40:26 : [debug] Updating status to Disconnected
12-2-2020 17:40:26 : [debug] TypeError: Cannot read property 'forEach' of undefined
12-2-2020 17:40:25 : [debug] Error while fetching usergroup list
12-2-2020 17:40:25 : [debug] Updating status to Disconnected
12-2-2020 17:40:25 : [debug] TypeError: Cannot read property 'forEach' of undefined
12-2-2020 17:40:25 : [debug] Error while fetching ap list
12-2-2020 17:40:25 : [debug] Accesspoints received
12-2-2020 17:40:25 : [debug] Updating status to Disconnected
12-2-2020 17:40:25 : [debug] TypeError: Cannot read property 'forEach' of undefined
12-2-2020 17:40:25 : [debug] Error while fetching client list:
12-2-2020 17:40:25 : [debug] Fetching user group list
12-2-2020 17:40:24 : [debug] Updating status to Connected

Let me know what more info you need to debug this issue to support this type of Unifi controler.

@mnederlof
Copy link
Owner

You could try to figure out what url's are called by the browser. Try to use steps from this page:
https://community.ui.com/questions/How-can-I-know-all-uris-and-commands-of-the-UniFi-API/163765cb-a744-489a-993b-52df015a4a4f

@eilko
Copy link
Author

eilko commented Feb 18, 2020

Could you do something with the following api client? https://github.com/Art-of-WiFi/UniFi-API-client
It already support UnifiOS (UDM/UDM PRO).

If I understand the code correctly only the authorisation url has changed. See
https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/src/Client.php

@grotting
Copy link

Has there been any progress with this issue? I installed my udm pro yesterday and now my favorite homey app is broken.

@eilko
Copy link
Author

eilko commented Apr 27, 2020

Will this help?

Art-of-WiFi/UniFi-API-client@961d692

@steffjenl
Copy link

Hello,

I have created an app for the Unifi Protect App. The newest version has also support for UDM PRO.

You can see the source at https://github.com/steffjenl/com.ubnt.unifiprotect

  • The authorisation endpoint is changed to /api/auth/login
  • All other endpoints are proxied to /proxy/network/api/....
  • You must send the Cookie from /api/auth/login and x-csrf-token (only if you want save data).

There is also an docker container to use older packages only this works only for protect app:
https://hub.docker.com/r/silvenga/unifi-udm-api-proxy

@eijlers
Copy link

eijlers commented Apr 27, 2020

There is also a UniFi Protect app supporting the dream machine. Search for UniFi in the Homey App Store.

@steffjenl
Copy link

There is also a UniFi Protect app supporting the dream machine. Search for UniFi in the Homey App Store.

That’s me! Source code is the same in the store!

@Allram
Copy link

Allram commented Jul 20, 2020

Hope you can find the time to take a look at this, just tell me what information you need and i will try to bring it :)

@grotting
Copy link

Disappointing that you can't be bothered to fix this problem, despite that @steffjenl provided the info how to do it three months ago.

@bergh-io
Copy link

bergh-io commented Sep 3, 2020

I would also love if you could implement this. I have a UDM, not pro, but i guess it works the same.

@klim123123
Copy link

Please fix.

@Veldkornet
Copy link

FYI, the CloudKey Gen2’s are now also moving over to UniFiOS, and hence are now also hitting this problem.

@MrBlue90
Copy link

Hitting the same issue with my recently purchased UDMP.
Anything where we can assist to solve this issue?
Thanks for looking into this!

@joalmiza
Copy link

Hi! Yes, please let us know if we can do anything to help out to make some progress in the development of this feature.

@jozahner
Copy link

Due to the lack of support I'm not gonna buy the UDM Pro, as I would loose my presence detection... so I'm still using the UniFi Controller within Docker on my NAS.
Hopefully @mnederlof finds the time to change the implementation based on the findings within this ticket. Cheers Josef

@willumpie82
Copy link

willumpie82 commented Jan 18, 2021

Please note that the 2.x update for the cloudkey ck2(plus) introduces unifi OS to this device as well and will break the support for this version of the app.

@josefzahner, I switched to a different precence detection app that uses the Ip address of a device, set it to fixed in the unifi controller and modify your flows to accomodate for the different app. and enjoy the same-ish functionality

@MrBlue90
Copy link

With all due respect for @mnederlof, but after not updating the app for nearly a year with major issues and not replying here on Github, I don't believe there will be a new update in the future.
Hoping that @mnederlof will be able to at least confirm that statement so we can move on with it.

In the meantime..
@steffjenl Considering you've created the other Unifi apps and clearly knows what's missing of needs to be modified in this app; is there any chance you could fork this repo and publish an update?
I believe many users, including myself, would really appreciate that.

Thanks!

@mnederlof
Copy link
Owner

You are correct, you should not expect any update any time soon.

Also, I cannot troubleshoot the udm pro as I do not have that installed. I have no problems with transferring or removing the app from homey, if someone wants to pick up development for this app.

@MrBlue90
Copy link

Thanks @mnederlof for letting us know! And really appreciate the work you did in the past, but in that case I believe it's important to find a successor for the app development.
Unfortunately I don't have the right skills to do so, so hope @steffjenl or someone else is willing to take it from here.

@steffjenl
Copy link

steffjenl commented Jan 18, 2021

@mnederlof can you contact me at stephan@monkeysoft.nl? so i can pick up the development off this project? Thank you for your time!

@mnederlof
Copy link
Owner

This app has been transferred to @steffjenl, so he will do any updates in the future.

@steffjenl
Copy link

Thank you @mnederlof, i will release soon an new version with support for UniFi OS.

@steffjenl
Copy link

https://homey.app/nl-nl/app/com.ubnt.unifi/Ubiquiti-UniFi-Network/test/

First test version with UniFiOS support

@Veldkornet
Copy link

Should we continue here then or make a new issue in the new repo?

I'm getting the below with the new test version.

25/01/2021, 17:29:51 : [debug] Updating status to Disconnected
25/01/2021, 17:29:51 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:51 : [debug] Error while fetching client list:
25/01/2021, 17:29:51 : [debug] Updating status to Connected
25/01/2021, 17:29:51 : [debug] Connection success!
25/01/2021, 17:29:51 : [debug] Updating status to Disconnected
25/01/2021, 17:29:51 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:51 : [debug] Error while fetching client list:
25/01/2021, 17:29:51 : [debug] Updating status to Disconnected
25/01/2021, 17:29:51 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:51 : [debug] Error while fetching usergroup list
25/01/2021, 17:29:51 : [debug] Updating status to Disconnected
25/01/2021, 17:29:50 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:50 : [debug] Error while fetching ap list
25/01/2021, 17:29:50 : [debug] Accesspoints received
25/01/2021, 17:29:50 : [debug] Fetching user group list
25/01/2021, 17:29:50 : [debug] Updating status to Connected
25/01/2021, 17:29:50 : [debug] Connection success!
25/01/2021, 17:29:50 : [debug] Updating status to Disconnected
25/01/2021, 17:29:50 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:50 : [debug] Error while fetching client list:
25/01/2021, 17:29:50 : [debug] Updating status to Disconnected
25/01/2021, 17:29:50 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:50 : [debug] Error while fetching usergroup list
25/01/2021, 17:29:50 : [debug] Updating status to Disconnected
25/01/2021, 17:29:50 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:49 : [debug] Error while fetching client list:
25/01/2021, 17:29:49 : [debug] Updating status to Disconnected
25/01/2021, 17:29:49 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:49 : [debug] Error while fetching ap list
25/01/2021, 17:29:49 : [debug] Accesspoints received
25/01/2021, 17:29:49 : [debug] Updating status to Disconnected
25/01/2021, 17:29:49 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:49 : [debug] Error while fetching client list:
25/01/2021, 17:29:49 : [debug] Updating status to Connected
25/01/2021, 17:29:49 : [debug] Connection success!
25/01/2021, 17:29:49 : [debug] Fetching user group list
25/01/2021, 17:29:49 : [debug] Updating status to Connected
25/01/2021, 17:29:49 : [debug] Connection success!
25/01/2021, 17:29:48 : [debug] Updating status to Connected
25/01/2021, 17:29:48 : [debug] Connection success!
25/01/2021, 17:29:48 : [debug] Updating unifi connection params.
25/01/2021, 17:29:48 : [debug] Updating status to Connecting
25/01/2021, 17:29:48 : [debug] Connecting to unifi controller 192.168.144.10
25/01/2021, 17:29:48 : [debug] Updating status to Disconnected
25/01/2021, 17:29:48 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:48 : [debug] Error while fetching usergroup list
25/01/2021, 17:29:48 : [debug] Updating status to Disconnected
25/01/2021, 17:29:48 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:48 : [debug] Error while fetching client list:
25/01/2021, 17:29:48 : [debug] Updating unifi connection params.
25/01/2021, 17:29:47 : [debug] Updating status to Connecting
25/01/2021, 17:29:47 : [debug] Connecting to unifi controller 192.168.144.10
25/01/2021, 17:29:47 : [debug] Updating status to Disconnected
25/01/2021, 17:29:47 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:47 : [debug] Error while fetching ap list
25/01/2021, 17:29:47 : [debug] Accesspoints received
25/01/2021, 17:29:47 : [debug] Fetching user group list
25/01/2021, 17:29:47 : [debug] Updating status to Connected
25/01/2021, 17:29:47 : [debug] Connection success!
25/01/2021, 17:29:47 : [debug] Updating status to Disconnected
25/01/2021, 17:29:47 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:47 : [debug] Error while fetching client list:
25/01/2021, 17:29:46 : [debug] Updating status to Connected
25/01/2021, 17:29:46 : [debug] Connection success!
25/01/2021, 17:29:46 : [debug] Updating status to Disconnected
25/01/2021, 17:29:46 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:46 : [debug] Error while fetching usergroup list
25/01/2021, 17:29:46 : [debug] Updating status to Disconnected
25/01/2021, 17:29:46 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:46 : [debug] Error while fetching client list:
25/01/2021, 17:29:46 : [debug] Updating status to Disconnected
25/01/2021, 17:29:46 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:46 : [debug] Error while fetching ap list
25/01/2021, 17:29:46 : [debug] Accesspoints received
25/01/2021, 17:29:46 : [debug] Fetching user group list
25/01/2021, 17:29:45 : [debug] Updating status to Connected
25/01/2021, 17:29:45 : [debug] Connection success!
25/01/2021, 17:29:45 : [debug] Updating status to Disconnected
25/01/2021, 17:29:45 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:45 : [debug] Error while fetching client list:
25/01/2021, 17:29:45 : [debug] Updating status to Connected
25/01/2021, 17:29:45 : [debug] Connection success!
25/01/2021, 17:29:45 : [debug] Updating status to Disconnected
25/01/2021, 17:29:45 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:45 : [debug] Error while fetching usergroup list
25/01/2021, 17:29:45 : [debug] Updating status to Disconnected
25/01/2021, 17:29:45 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:44 : [debug] Error while fetching client list:
25/01/2021, 17:29:44 : [debug] Updating status to Disconnected
25/01/2021, 17:29:44 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:44 : [debug] Error while fetching ap list
25/01/2021, 17:29:44 : [debug] Accesspoints received
25/01/2021, 17:29:44 : [debug] Fetching user group list
25/01/2021, 17:29:44 : [debug] Updating status to Connected
25/01/2021, 17:29:44 : [debug] Connection success!
25/01/2021, 17:29:43 : [debug] Updating status to Disconnected
25/01/2021, 17:29:43 : [debug] TypeError: Cannot read property 'forEach' of undefined
25/01/2021, 17:29:43 : [debug] Error while fetching client list:
25/01/2021, 17:29:43 : [debug] Updating status to Connected
Messages will come in automatically...

@steffjenl
Copy link

steffjenl commented Jan 25, 2021

@Veldkornet please make an new issue on my project (fork). Please change the setting that you use UnifiOS and enter port 443.

image

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