[OBSOLETE] Improved Mobile Presence (Android only)

Make sure your GPS is turned on. I’ll look into it a bit more and put a workaround or patch on the next update.

John,

Thanks for help. have it working on phone now. gps the issue

Hi John, this seems to be working for me. Just left the house and it looks like the app was working however I had to manually refresh the server from the app to have the presence change in ST. I assume, I shouldn’t have to do this in the future…

One issue, The app doesn’t allow me to add multiple locations. Or at least the button to add doesn’t show on the app.

Android 8.1

If you have Android 8.1, you need the patch apk. Make sure you have both installed. About the add button… Looks like mines missing too but I never noticed. Should be an update in a few hours.

Edit: Update has been released.

When I click on Enable OAuth the Client ID and Secret are not generated. The fields just say “Auto-Generated”.

Save, go out and come back in. Then it will display them.

1 Like

:man_facepalming:

1 Like

Set this presence up on my Android, as the default ST presence failed to update over time. Location is correctly being identified as Home or Away, but the presence is always stuck on present? Looking at the debug logs in IDE, shows that presence is false indicating that the android app is correctly sending the updates, but it is not reflecting in the app. Any suggestions?

Having some server issues earlier. If you are still having issues, are you seeing the update from the SmartApp, the device handler or both? Are you seeing any errors in the logs?

Don’t see any errors in the logs.

3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Previous Location: Away
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Current Location: Home
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Recieved “{“id”:“xxx”,“present”:true,“location”:“Home”}” from server
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Presence set
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Previous location: Away
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Current location: null
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Setting location to: Home
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug leftCounter: 531
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug setPresence(true)
3458827a-0c53-436f-846b-d38f188edc17 5:49:26 AM: debug Checking presence
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug Previous Location: Home
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug Current Location: Away
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug Recieved “{“id”:“xxx”,“present”:false,“location”:“Away”}” from server
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug leftCounter: 530
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug setPresence(false)
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug Checking presence
3458827a-0c53-436f-846b-d38f188edc17 5:48:26 AM: debug Checking presence

These are my states in ST for the presence:
Current States
presence: present
deviceId: xxx
currentLocation: Away
previousLocation: Home

So it updates in the logs in the device handler but doesn’t actually show the changes in the app? If so, remove the device handler and SmartApp and try completely reinstalling (Do not need to reinstall the presence sensor app). Sounds like an issue with the SmartThings app.

this link is broken fyi

Having some internet issues. Should be back up in a few hours.

Edit: Issue resolved

1 Like

Sorry if I missed it but what exactly is this part?

Step 6: Authorize Presence Sensor

It allows Presence Sensor to push data to SmartThings instead of SmartThings checking for updates every minute. So basically it makes it update faster.

Oh nice. Thanks for putting this together!

1 Like

When I do step 6 I get this error
Unable to link to SmartThings - Device ID(s) invalid

Check your device ID. Make sure they are exactly the same in SmartThings as in the presence sensor app. Hit the refresh button in the presence sensor app and try again.

Got it - thanks!

I’m having to hit the refresh to make anything happen. Has there been a fix for that yet?