Closed Choo-lux closed 3 years ago
Hmm, difficult to read this output but it is strange I don't see ant output from the set_device_settings_base() function/method.
You did make sure to use the latest version of the client (1.1.63)? The code was recently updated following this report: https://github.com/Art-of-WiFi/UniFi-API-client/issues/69
I'm afraid I can't replicate your environment; none of our direct clients where we manage the infrastructure are using Cloud Keys for Network Management, only for Protect.
thanks. sorry for formatting
At this point it looks like Unifi OS is the issue at least with the disable port example
you can see above that it attempts login a second time whereas the list example does not
finally found the php error:
PHP Notice: JSON decode error: Syntax error, malformed JSON in /var/www/html/UniFi-API-client/src/Client.php on line 3606
The PHP error is triggered because the response is non-json content. When I have access to a UniFi OS unit I’ll investigate this further.
ok cool, thanks for the api, I should have another ck soon for testing
Not yet tested this on a UniFi OS machine but after reformatting the original post I notice you’re logging in again after fetching the device details. That isn’t necessary if you still have an instance of the Client unless you previously logged off.
Can you try and see what happens without the second login?
hi there, just got a UDM Pro on latest controller and it does a similar thing. (400 error not 404)
I'm using the exact example code you provide. Am not trying to login twice.
Can I get you access to this controller?
not sure what happened here but its all good now...cheers
Hmmm, interesting... thanks for the update!
Hi all, just upgraded to latest controller where the 8443 port is no longer used (on the ck2).
While I can use the api with the list example, the default disable switch port example no longer works.
this shows main response is 404 Not Found (it does work on Ubuntu..)