xtreme22886 / SmartThings_UniFi-Presence-Sensor

Integration for SmartThings to use UniFi wireless clients as presence sensors
GNU General Public License v3.0
8 stars 3 forks source link

We're having trouble connecting #2

Closed richbeales closed 3 years ago

richbeales commented 3 years ago

I've installed the docker image on a raspberry pi and installed + published the two groovy files. When trying to set it up in the app the first time it will show Processing.. forever and hang the app. The second time it comes up almost immediately with a message "We're having trouble connecting. Check your network connection and try again".

Any idea what might be wrong?

http://raspberrypi:9443/config retrurns "No config file!"

Thanks

xtreme22886 commented 3 years ago

Hi @richbeales, thanks for giving things a go. Let's see what we can do.

Frist thing, are you using the SmartThings Classic app? This solution only currently works with the Classic app.

If you are using the Classic app, have installed and published the two groovy files, did you enable OAuth on the SmartApp?

If you have enabled OAuth, first place to check is the SmartThings IDE live logs. Can you get the live log of the SmartApp after you've inputted all your UniFi information and click save? We are looking to see activity of the SmartApp sending information over to the Docker image. When inputting the UniFi information into the app, don't add http:// or https:// to the IP addresses.

Last note, this does not work with the UniFi Dream Machines.

Thanks

richbeales commented 3 years ago

No I'm using the latest Android app, that may be my issue. I only started (bought hub) yesterday. To be clear if it is set up on the 'old' app will it work on the new one or do i have to use the classic app for everything from now on?

xtreme22886 commented 3 years ago

That's probably the issue. Since you just bought the hub, I would not worry about the Classic app. That's because the Classic up is going away on October 14th. I'm actually looking at their new developer portal now trying to figure out how to remake this app compatible with their new layout. I'd just stay tuned for a new version of this app to be released.

richbeales commented 3 years ago

Ok thanks for the prompt response, I actually installed the classic app and tried to get a list of unifi clients but it just spins and doesn't return any clients back to me. I have two APs on my unifi system but no Gateway (I have an EdgerouterX instead). I'll wait for the new version. Thanks

EDIT: It seems unable to save the config without selecting a client first so i'm stuck.

xtreme22886 commented 3 years ago

You should be able to save regardless if a client is select or not. I'd check the live logging in the IDE to see what's going on. Should see something similar to this.

image

richbeales commented 3 years ago

Just got it to work, thanks for your help. Not sure what was happening before. Will eagerly await the new version so i can use the current App.