[OBSOLETE] Improved Mobile Presence (Android only)

I just had this issue as well.

I can’t get it to work. I was getting an Error #3, so I went into the SmartApp and pressed Save. Then it said “An unexpected error occurred”.

The presence sensor seemed to work correctly, however it only updates when I’m in the presence sensor app (i.e. it’s actively on the mobile screen). IT has worked sometimes in the background, but it’s 20 minutes late.

For the most part though, it doesn’t seem to work in the background. I just launched the app again now, and it reported me as present and just unlocked the door (I have been present for over 6 hours now). I looked at the history, and it seems it didn’t pick up in any departures/arrivals in the past several days. Any ideas on why the inconsistency?

Did you install the patch as well? If so, make sure all permissions are enabled. Current versions of Android do not allow apps to listen to WiFi network changes. The delay would make sense since it syncs around every 30 minutes. If its not able to see network changes, it will not update until the background sync runs.

Sorry for the late reply, I think I missed the email notification.

The smartapp settings are really just there to create new devices. Part of the pairing process also authorizes the Presence Sensor app (which would be why you get the update error #3).

If you try it a few times and cant get it to work then please send me the logs from the smartthings online site.

Sorry, I’m using android 8.0 so I believe that means I do not need the patch, correct me if I’m wrong.

I looked at the android permission, and there are only two that can be toggled: Camera and Location. Both are enabled.

Checking ‘all permissions’ (after pressing the three dots at the top right of the screen in the previous photo, everything seems to be correct:

John, any plans to port this over to Hubitat?

You can try it with the patch and see if it works. But yes, you should not need the patch.

Also check to make sure battery optimization is disabled.

I haven’t looked at hubitat but it looks cool.

How would you compare it to SmartThings? If I had one of the hubs I would be happy to look at it. I don’t imagine that it would be super difficult. The majority of the functionality of this is in the Presence Sensor app. The actual device handler / SmartApp is fairly basic.

Since the custom apps are going away, along with device handlers, it probably might be time you might want to get a Hubitat.

If you need a little help to get one, PM me.

Hey John @johndc7

Trying to update a new phone I just got but I keep getting the following message when I try to add the new device . Was working like a charm on my old phone

Can I you please help

web

net::ERR_UNKNOWN_URL_SCHEME

This is an issue with the new SmartThings app. You should be able to copy that link into chrome as well (or I can send you a link to put into chrome that will work if that doesn’t). The QR code is also an option.

I would highly recommend editing your post to remove that link.

I was planning on making this compatible with the new app by using the new SmartThings api but it does not really seem to be very stable. The documentation even says v1.0 preview.

1 Like

Hi, @johndc7
After updating to you new 2.0.0 Android app. My status is updating only when doing manual refresh in the App and not automatically. I’m having Android 10. Can you please check…

Check the patch app. Uninstall the old patch and install the latest version. Make sure to open both apps afterwards.

I can confirm. This is working with the latest patch. Thanks

Hi,

Followed your instructions (as much as possible because things have changed since you wrote it).

SmartApp installed with Oauth enabled.
Device handler installed.
Android App (Presence Sensor) installed.
Patch (from the latest post) installed.

Yet when trying to add new device in smartthings I can see the ID but when I click next nothing happens.
Presence sensor will be shown under Smart Apps but with no option to Enable/disable it.
After a while the presence sensor app started giving me Update Error 3.

Anything I miss?

Thanks in advance,
Gal

1 Like

Ok so a couple things:

  1. What does the update error #3 say? It should have a more detailed message. The only thing the error numbers mean is: 1: Error in the Android app, 2: Error connecting to the server, 3: Server reported an error. Depending on what update error 3 it is, it could either not work at all or it could work but have a delay.
  2. Are you using the new SmartThings app or are you using the SmartThings classic app (if it’s still alive)? In the new SmartThings app, the “pair this device” option does not work due to a change in how they implemented webview. You will need to use the “pair another device” option and scan the QR code from within the app.

Hi,
The error is:
Update error#3
Unable to find device id in request

And yes, I’m using the new smartthings app (classic doesn’t work anymore) but I’m unable to pair with another device as well.

Sorry for the late response. For some reason, the email notifications were getting marked as junk.

Anyways, That error just means that the app isn’t sending a device ID to the server. That would normally be because the app hasn’t been setup completely.

I just tested the setup process on my phone and I get a QR code when selecting either option. Is this not the case for you?

Hi John,

Working on installing this and can not get it to find the remote presence. My uses are simple, all I want to do it is to trigger events when I leave the house and trigger others when I come home.

Before I wipe it all out and start again, is the version on GitHub the latest and greatest?

Yep. The version on GitHub is the latest.

You should only be creating devices within the Presence Sensor SmartApp. The built in mobile device types will not work.

Let me know how it goes :slight_smile: