[RELEASE] Improved Mobile Presence (Android only)

android
presence
dth_presence
project_presence
webcore

(Dbhardman) #181

I have the same issue as Agrajag. On the phone the App never shows a list of networks to connect to. When I go into the WiFi setup the phone is seeing nine networks but none of them (including the one I am connected to) show in the App. Android version 7.1.1, App version 1.5.3 App has location persmission, background data permission and battery is “Not Optimised”.


#182

If you can get the logs and pm them to me then I can see what I can work out. I’ll try to run it in the emulator later to see what I can figure out.


(Dbhardman) #183

John, Do you mean the phone app logs? If so I cannot find their location. Or the logs from the device handler itself? Below is a screenshot from the phone, it does not show a network to connect to. Below some cleaned up logs from the device handler.

18:22:38: debug Previous Location: null
18:22:38: debug Current Location: Away
18:22:38: debug Recieved “{“id”:“xxxxxxWm”,“present”:false,“location”:“Away”}” from server
18:22:38: debug leftCounter: 20
18:22:38: debug setPresence(false)
18:22:38: debug Checking presence
18:22:38: debug Checking presence


#184

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.


(Dbhardman) #185

John,

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


(Kyle Crebs) #186

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


#187

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.


(Brandon Schilling) #188

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


#189

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


(Brandon Schilling) #190

:man_facepalming:


(Mainak M) #191

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?


#192

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?


(Mainak M) #193

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


#194

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.


#195

this link is broken fyi


#196

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

Edit: Issue resolved


(Scott) #197

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

Step 6: Authorize Presence Sensor


#198

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


(Scott) #199

Oh nice. Thanks for putting this together!


(Tanya Sawrie) #200

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