[OBSOLETE] Improved Mobile Presence (Android only)

So the bit about using location within WebCore is not required?

Currently, I set up my phone and within ST Devices I can make it show present/not present by toggling WiFi. All good.

Wiithin WebCore the phone does not even show up on the Devices list.

BTW applied the patch, but when I push the button it does nothing.

The test button only shows a notification when the debug notifications are turned on. That’s another thing on the to-do list.

I recently rewrote almost the entire app so there are still a couple of things that are on the list to change.

The WebCore part is completely optional. I just put it in there since alot of people seem to use it.

Do I still need to setup location within ST?

I was using WebCore to do things based on presence. So I would need a way to pass the variable to.somthing to perform an action.

If not WebCore, what?

Do I still need to setup location within ST?

If you are referring to the smartthings mobile presence, no you do not.

You can use webcore if you want. I was only saying that it’s not a requirement for the app to work. The devices should show up in WebCore, just make sure you give it access to them. Do you see presence showing up correctly in smartthings? It sounds like the issue from this point is just getting them to show up in WebCore right?

Exactly. The phone shows up fine in Devices and even updates almost immediately when I take it on or off the network. But if I go into webcore, and try to create a piston it’s not on the list. I jam ust not sure if it’s something within webcore I need to turn on or off or what.

By the way, I not only appreciate your help now but also appreciate the fact you created this to begin with.

I’m going to try removing the phone from ST location to see if it does anything

I almost guarantee it’s a setting with WebCore. There is no WebCore specific code in the SmartApp or Device Handler. I would just triple check in the WebCore SmartApp that it has permission to access all devices. It generally doesn’t add new devices automatically when they get created as far as I know.

And no problem
 Happy to help.

1 Like

Permissions was it. Never thought to go looking for it because I never had to grant it for anything else before. Found the solution here:

Now to finetune it and put it to work.

Thanks again for the help.

1 Like

Well, it is working great with the Wi-Fi (connect/disconnect).

I can’t get it to work with the actual location of the phone using the presence variable.

Make sure you have the “home location” checkbox set in the Presence Sensor Android app. That checkbox determines what the presence attribute will be when you are at that location. It should only be checked on locations where you want to be marked present.

Here’s the setup:

In PS app, I setup location TheCastle with no idnicator and WiFi with wifi. Both have Home box checked (although I have tried checking Home box on only one with the same result)

I have an App that examines $CurrentLocation – if it is “TheCastle” or “WiFi” it changes piston status to “I’m Here” otherwise it displays “Gone”.

Have also tried if presence=present or $CurrentLocation is “WiFi”

I run it with WiFi on it displays “I’m Here” so far so good.

Turn off WiFi and it says “Gone” even though presence is still present.

I did notice in PS when wifi is on the pin is blue, when it is off it is gray. TheCastle is always gray.

Logs say, with wifi off:

Using presence: Comparison (enum) not present is (string) present = false (2ms)
Using $CurrentLocation: Comparison (string) WiFi is (string) TheCastle = false (1ms)

Does the location show up correctly in SmartThings (outside of WebCore)? You can also check the logs in SmartThings to see what data is being sent from the Presence Sensor app.

If it helps, my configuration looks like this:

  • Home
    • Home location: checked
    • Triggers
      • Wifi is “HomeWifi”
  • Work
    • Home location: not checked
    • Triggers
      • Wifi is “OfficeWifi1”
      • Wifi is “OfficeWifi2”

With this configuration it works like this:

  • Wifi network: “HomeWifi”
    • CurrentLocation: Home
    • presence: present (because home location is checked)
  • Wifi network: “OfficeWifi1”
    • CurrentLocation: Work
    • presence: not present (because home location is not checked)
  • Wifi network: “OfficeWifi2”
    • CurrentLocation: Work
    • presence: not present (because home location is not checked)
  • Wifi network: off / disconnected
    • CurrentLocation: Away
    • presence: not present (because because no location matched)

ST reacts to WiFi connections, just like WebCore.

Perhaps, I should verify this: Does IMP react to physical moves of the presence sensor. In other words, if I take my phone outside the normal boundary of my homestead will it show Away? Or does it only record/react to WiFi and BT connection/disconnection?

Only Wifi / Bluetooth is used for this.

Also, the “home location” checkbox has no effect on how locations are checked. It’s only function is to set the presence attribute. The SmartThings logs will tell you exactly what information is coming from the app.

That solves the issue, thanks.


During the instalation this options are not available for me. Will this app work without proper update?

You can skip that. Looks like I need to update the instructions.

The GitHub integration hasn’t worked with SmartThings in a while :cry:

Having problems getting this working. I followed the step-by-step instructions but


1- after I installed the latest patch (am on Android 10) the test does not send any notification.
2- although I can identify myself to Presence Sensor in Smartthings, the Presence Sensor app will not go beyond the welcome screen (which tells me how to add myself).

What did I miss?

1- after I installed the latest patch (am on Android 10) the test does not send any notification.

This will not work unless you have the debug notifications on in the Presence Sensor app

2- although I can identify myself to Presence Sensor in Smartthings, the Presence Sensor app will not go beyond the welcome screen (which tells me how to add myself).

Were you able to scan the QR code already? It only goes to the welcome screen if it hasn’t been setup yet.

1- I can’t enable “debug notifications” in the Presence Sensor app because I can’t get past the welcome screen.

2- I can’t scan a QR code on my own device for my own device. In Presence Sensor within Smarthings, if I select “Pair this device” it displays the QR code on the device I want to add. Catch-22.