Really appreciate the effort to provide the community with a reliable presence sensor. Thank you for your hard work. Like a few other users I can’t get this to work unless I manually refresh my status in the Presence Sensor app. Both ST and the Presence Sensor do not update themselves. I have a feeling its my phone but idk. I am running Android 8.0, GPS ON, No data or battery restrictions that I can see. I very badly want this to work. If anyone can point me in the right direction please. TIA.
If you toggle the WiFi while the app is open, does it work?
Turning WIFI on/off with the app open does not change the status. Only manually pressing the refresh button changes it atm.
Interesting. Sounds like a permissions issue then. You have all of the permissions enabled I assume? It should at least update with the app open. Everything works as expected when hitting the refresh button?
Did you link your SmartThings account? Sometimes it can appear to not be working due to the delay (if you are not sure then you can PM me your device ID and I can check).
Side note: I’m currently looking into using the geofences in Android to improve the accuracy. This would mainly improve response time when leaving as the geofence feature can take a few minute to work. The geofences are what are used in the built in mobile presence so thats why I was a little hesitant to use them as it obviously didn’t go over well there. But anyways… if anyone has any feedback on using geofences as a second method of checking presence, let me know.
I’m having problem with OAuth. Just after filling out device ID and client secret, Smartthings throw a Internal Server Error 500 at me.
I found out in another thread that I need to change connection points
Could you create an option to select which Smartthings’s server we need to connect in your page?
Thanks for your hard work putting all these together.
Region does not matter when getting an OAuth token.
Regardless of the server the SmartApp is actually published to,
https://graph.api.smartthings.comshould be used to obtain the authorization code, access token, and endpoints.
What error are you getting? Make sure your Client ID / Client Secret are correct.
Even though I am running 8.0…I hit a wall trouble shooting so I installed the 8.1 patch anyway and…
Connect to WIFI
Get push notification from presence sensor app “update successful”
Within approx 30 seconds ST shows I’m home.
When left open in background the icon in presence sensor app stays grey and does not change.
If I then close and open the presence sensor app or manually refresh it will show blue.
If I connect to WIFI without the presence sensor app open ST does changes to home and when I open the presence sensor app it shows blue.
Disconnect from wifi with app open or closed.
Nothing happens. No push notification of update.
Manual refresh. Receive push notification of update.
Approx 30 seconds later ST shows I’m away.
Progress Yes, I double checked all my permissions they were all set as far as I can see. Also yes I had set up OAuth and connected to smart things. I will PM you my ID. Installing the patch seems to have it half working. Not sure why it doesn’t update when I disconnect. I see a few other people have this problem too. Thank you!
Got it authorized now. I was using device ID instead of client ID. You may need to change your tutorial a little bit.
### Step 6: Authorize Presence Sensor *This is a relatively new feature that I have been testing so please let me know if you have any issues* 1. Go to [https://st.callahtech.com/link ](https://st.callahtech.com/link) 2. Enter your **Device ID and Client Secret** from Step 5 and click “Next” 3. Sign in if prompted and check all devices created in Step 4 and click “Allow”
Will test responsiveness tomorrow.
Opps… my bad. I’ll update the instructions.
I decided to wipe my install and try from scratch. Followed the direction, made sure app permissions are set etc. Running patch on 8.0 (doesn’t seem to work without it). The app is properly setting presence for home and away in ST but ONLY if the app is open in the background. The grey/blue colors do not change without refresh or closing and reopening the app. If the app is closed it does not change anything and I have been receiving the following error. Figured id post bc it might help troubleshoot. Thanks again.
Update error #2
java.net.UnknownHostException: Unable to resolve
host “st.callahtech.com”: No address associated
New update should be in beta in the next few hours. Been testing on my phone (Android 8.1) with patch for a few days and seems to work better.
This is the 2nd time i’ve completley removed and restore the apps and devices associated with your presence solution. as it stands it appears to work, but the home away acknowledgement takes 3-5 minutes. What am I missing?
Any errors? Linked correctly and everything? If you turn on the status notifications do you see them immediately?
when i turn on status notifications i get them immediatley. it also updates my presence correctly if I’m in that 3-5 min waiting period
fyi - I normally have my VPN enabled when I’m on WiFi, but I don’t think that should matter
If the issue is just with the SmartThings notifications, I have been noticing the same thing. Possibly due to Android battery optimization etc. As long as the status notifications come up immediately, it shouldn’t be an issue with anything other than notifications.
I don’t really have anything I can do about the SmartThings notifications as that is entirely handled by SmartThings. I just tell SmartThings to send a notification and their api handles it. The status notifications are from the Presence Sensor app and are sent only after an update is completed (if everything is linked correctly).
i’ll play around with it for a few days and let you know if i find something
I’ve installed this on my Pixel 2XL with Android 9 and basically nothing happens unless I tap the refresh button. I accepted all the permissions when installing and have oauth enabled so would expect an instant update. So how do we troubleshoot the issue?
You have the patch installed right?
Er, no. I thought that was only for 8.1 I’ll try it now. Perhaps your instructions should say it’s for 8.1 and above of that’s the case.
What does the patch actually do?