nickovs / unificontrol

A high-level Python interface to the Unifi controller software
Apache License 2.0
96 stars 41 forks source link

UnifiTransportError after FW upgrade #30

Open menvol3 opened 3 years ago

menvol3 commented 3 years ago

Hi @nickovs,

Thank You for this tool, it worked perfectly for me, but today i updated FW on my Cloud Key Gen2 and now I’m receiving and error unificontrol.exceptions.UnifiTransportError: 404: Here is my Client initialisation def get_client(): cert = ssl.get_server_certificate((host, 8443)) return UnifiClient(host=host, username=username, password=password, site="default", cert=cert)

Can you please help me to solve this issue ?

menvol3 commented 3 years ago

Python version - 3.7.3 unificontrol - 0.2.9 Cloud Key version - 2.1.11 Network version - 6.4.54 SSLcert - unifi.local Expires: Thursday, 18 January 2024, 15:01:26 Eastern European Standard Time

menvol3 commented 3 years ago

So problem is that this lib should be updated. Because in recent Unifi updates api call url was changed https://github.com/finish06/pyunifi/blob/master/pyunifi/controller.py#L95

nickovs commented 3 years ago

@menvol3 Is correct in that the library needs an update. Sadly it's not as simple as just changing the base URL; there are a number of the API endpoints that have moved around and some that have changed the HTTP methods. Unfortunately I've been very busy with my day job and have not yet had time to build a complete new release.

BigIronLinux commented 2 years ago

I'm getting this error as well with UniFi OS 2.2.12 on the Cloud Key Gen2 Plus. I just found this project while trying to find a way to export a detailed device list (great work!). Do you have any suggestions to work around this?