Updated Version(s):
- UnifiAPI.groovy = 0.1.7
Change(s):
- Correction on line 262. I accidentally left the state.CSRF getting an it.value instead of the correct temporary CSRF that was being populated. This would possibly have impacted all non-UDMP use.
Updated Version(s):
Change(s):
I had a fun time debugging this with @snell and @Bago today.
If anyone is still having issues, try entering your site name as all lower case. The URLs of the requests built from them appear to be case sensitive.
UDM Base, I updated to 0.1.7. I'm using "other Unifi Controllers". New error see below
dev:16992020-12-13 22:32:30.282 errorUDM - Exception when performing Login: org.apache.http.conn.HttpHostConnectException: Connect to 10.168.30.1:8443 [/10.168.30.1] failed: Connection refused (Connection refused)
dev:16992020-12-13 22:32:29.355 errorUDM - Exception when performing Login: org.apache.http.conn.HttpHostConnectException: Connect to 10.168.30.1:8443 [/10.168.30.1] failed: Connection refused (Connection refused)
Try the UDM Pro setting, @landon_webster
Changed it UDM Pro setting. Original error is back
UDM - Exception when performing Login: groovyx.net.http.HttpResponseException: unknown
What is the browser URL when you're using the Unifi web portal? Do you have SSH enabled on the controller, and are you using the username and password from the SSH settings (which might differ from your normal Ubiquiti website login)?
https://10.168.30.1/ I entered only the IP (http was not entered) Yes SSH is enable, I can SSH into UDM using the following (ssh root@10.168.30.1) I'm using the SSH root/password in the device preference.
It looks like I misspoke -- try the Ubiquiti SSO credentials (username and password for logging in to the web interface, not SSH). I was confused because my username is the same, but the password differs and my SSH password was rejected.
I can confirm the behavior @landon_webster is seeing on a UDM (non-pro). I am experiencing the same. I haven't been able to login since I updated to version 0.1.2 4 days ago. Prior to that version, I could login and see health stats, but could not use the presence functions.
Updated Version(s):
Change(s):
Lot of verbage for this one. If you do not want the background, just read the Short story, update your driver, and Save Preferences again or run CurrentStats.
Updated Version(s):
Change(s):
Hey, this is great, I've got it installed and running against my USG/CloudKey Gen2+ and it's returning the number of devices etc.
I'm a little bit confused by the "child device" part though for the presence sensing - should I be creating these with the MAC address of the device, or the name I want to see displayed?
The child devices will be automatically created once their data comes back in a poll. So if you put the MAC(s) you want polled in the "MAC Address(s) to Presence Check" field and Save Preferences, it will try to check them from then on. Once it gets a response from the controller it will automatically add the child device and then keep the children up to date with their presence (so far as the controller says at least). It will even put in the name of the device (as shown by the API) as the label for the child. If you change it on your controller the label should change the next time it gets a response from the controller.
the ${ Site } was showing as null in the https string in logs
change to default in code manually and worked, changed to ${ state.Site } and still seems to work
still not getting child devices though
@jschlote: THANK YOU! You helped out a lot because it made me see I had forgotten to put the state in front of all the Site listings. It still worked on my test one because of the old Site variable floating around in the ether... This also made me discover that I had broken presence detection. I created a new device and found them to be working there. One thing to note, the Presence children will not get their labels unless there is a successful (present) response from the controller. Not-present responses do not include any device info.
Updated Version(s):
Change(s):
I'm seeing an issue with Authentication against my USG?
If I click "login" and then click one of the buttons, the commands work.
If I leave it to run, it doesn't seem to log in properly?
Unifi Network - Unauthorized for PresenceCheck please Login again
Any ideas how I can help you troubleshoot this?
Are you logging into the USG or the network controller? It should be the controller (the IP where you access the web interface).
one other issue I noticed line 294
if( MACPresence.indexOf( Json.data[ 0 ].mac ) >= 0 )
the Json.data[ 0 ].mac was lowercase, I entered the macs as upper case on the device preferences, so was never matching, that is why no child devices were created for me, once I entered my macs in lowercase worked
@proffalken:
There is the bit from tomw... but the fact the button works but NOT the regular polling seems like there has to be a bug on my end a bit. I need to take a look and get back to you to see if I can think of anything.
@jschlote:
Good to know. I think I will remake it to be case insensitive (force it lowercase in the request itself and when checking the response) in the next version.
@snell, thanks for creating this
everything seems to be working for me, tested with cell turning off and on, worked as expected, I am using a UCK-G2
I set up a local user as read only to use on the unifi