[ST Edge] LAN Device Monitor

I’m running some tests pinging my and my wife’s iphone to see if there is a reliable way to determine presence and absense. So far, my observation leads me to believe that numerous retries are required to know for sure if the phone has left, since pings can fail fairly often even when the phone is present, but it is asleep. To conserve battery, it is only responding periodically. The result of this is that any presence device using this method is going to be somewhat slow to declare a phone away in order to avoid false reports. However once the phone is definitely gone, when it returns it can be declared present fairly quickly since as soon as you get a good response from a ping you can assume it’s back.

I’m going to run these tests over another 24 hour period and then if it looks like it’s worth proceeding, I’ll look for one of you with an Andriod phone to repeat this analysis so we can understand the differences in response.


Just wanted to say top work @TAustin.

I have this monitoring my telly (2015 android sony bravia) - it seems to take a long time for it to show as Off using the edge driver, I’m 99% sure this is to do with telly staying awake for some time when put on standby, I’ve fiddled around with as many settings as I can on the TV.

Just checking if anyone else has any experience…wondering if there’s an android TV utility to kill the network connection as soon as it’s put on standby.

Thanks again, if I can get the OFF status working more snappily I can bin the groovy DTH I have installed for the TV which is the final thing in my set up using the legacy back end (Im only using it to monitor device status so this edge driver would be a perfect replacement)

Not to belittle the great work done, but only for the TV, I my old Samsung of 2014, I solved so

  1. Socket device with consumption detection Connected to TV
  2. SwitchBot (ir blaster) to command it (And this creates a virtual device that indicates on or off)
  3. a routine that if the socket detects consumption above 10w turns on the TV, under 10w turns off the TV

These two rules will not affect the TV, because it is already off or on, but it will align the display on or off in the SmartThings App.

1 Like

Just in case anyone else runs into this problem, I solved it using @TAustin’s excellent upnp explorer to discover the uuid of a service on the telly which DOES get killed on standby (in Sony bravia 2015’s case it was the media renderer service). Put uuid into a LAN monitor and away we go!

Thank you so much. It’s much quicker and more reliable than my legacy solution (community groovy DTH + webcore handling the polling/refreshing).

I no longer have anything that relies on groovy except a load of virtual switches which I will replace with @TAustin’s virtual device edge driver if and when the old back end is killed.

So yeah, thanks again @TAustin, you’ve pretty much single handedly assured my smart home future!


Thank you for the shout out! :+1:t3:

1 Like

No worries, I really appreciate your work.
Any tips to being able to monitor a Playstation 5? Not finding it based on IP address, and Upnp explorer doesn’t find it either. I saw others in this thread have had success with Xboxes.

Following up on the investigation I’ve been doing to see if I could provide a reliable Edge driver to detect cellphone presence on home LAN. Unfortunately I’ve hit dead ends. I’ve tried a couple different techniques and none are reliable for iPhones. It comes down to the way they go into a deep sleep when on battery and not used for a period of time. They disappear from network tables, and even upon returning home can continue to appear disconnected if the phone is asleep. Looks like Apple is doing everything they can to preserve battery life by keeping network connection to absolute minimum.

For those of you with Android who might want to pursue this further, I have a Python test program you’re welcome to try running for a few days to see if reliable tracking is at least feasible for Andriod phones. It can run on Linux (including Raspberry Pi) or Windows. I can post it to github and provide the link here if there is interest.


Another update regarding detection of phone connection to your home LAN:

I’ve been doing some work with @smartie to provide a package to enable you to have a SmartThings presence device based on phone detection results. Although it’s not perfect, some may find it a workable solution, as @smartie has. Please refer to my github repository for more information:


Thanks for all your work on this @TAustin. Yes, from my experience using it, it works very well. My perspective on automation is nothing is perfect, so I personally do not currently use this (or any other type of home automation tool,) for example, to control exterior doors, etc. But for my use, it works very well.

1 Like

@TAustin, does this play nice with my existing Blue Iris integrated bridge server install before I install and test?

Yes since you already have the bridge server, you’re halfway there. However, the phone tracker app is a Python script right now, meaning you’ll need Python 3.7 or later on your server. If that’s too much of a hassle, I can create an .exe that you can run on Windows.

Not a problem, I have Python installed and running already and have a vague understanding. Thanks! I’ll give it a shot for our iPhone and Android phones and let you know how it goes.

1 Like

Todd, pretty sure this is not possible but worth an ask, is there any way to access a phones WiFi connection state for use in an Edge driver, it could be used as a reliable prescence sensor

When connected to WiFi prescence home, when not prescence away

This is a routine that is available on Samsung phones in Bixby routines but would help users who do not have bixby routines

1 Like

Unless I’m misunderstanding what you are asking, that’s exactly what the posts above are talking about. I have what I would consider at this point, an experimental solution that a couple people are already trying. You’re welcome to join the club!

Had a quick read above Todd, it does look like you are already looking for a solution

It also points out if a driver had the ability to detect a WiFi connection it would only realy be useful to those who use Android only as Apples go into deep sleep

One of the guys testing has iPhones, as do I. You might want to try it out and see if it fits your needs. @smartie is using it now with his iPhones and he says it’s working fine for him. There are config parameters that you can adjust to see if you can find a sweet spot for your situation. Yes, the iPhones go into deep sleep and can trigger false-aways, but you can bump the retry parameter to get rid of almost all of them - it just lengthens the time it takes to report an ACTUAL away state to a couple minutes.

Yes, it has been working out pretty well for me. The issue I ran into is I didn’t want to have (2) terminal windows open 24/7 to keep the scripts running, so what I ended up doing is using the “screen” program on my raspberry pi to run the (2) scripts in the background, even re-loading them on re-boot. At this point, the issue I’m seeing is that I can’t tell when a script terminates within screen. I had this happen recently and the only reason I knew was because this implementation was no longer changing the presence status. I am now keeping the log on to see if the script (within screen) exits again so i can hopefully figure out why. My ultimate goal, which I haven’t figured out how to do yet, is if one or more of the scripts crashes, screen (other maybe some other program) can automatically restart the script.

So this basically replaces Host Pinger with the benefit of WOL which will eliminate the need for Host Pinger running on my Pi and old CoRE Pistons running in Groovy…

I’m in!

I guess there is no access to a phones WiFi state and what network it is connected to then ?

I was actually asking as a response to another user who posted issues with prescence with an iPhone

I personally don’t use Apple, my Samsung has the ability to use WiFi state and multiple network names to be used in a bixby routine to trigger ST scenes or devices, this gives solid prescence detection, I just wondered if same was possible for Apple devices but using an Edge driver

Not directly on the hub, no. That’s why that solution is implemented as a separate application that has to run on another computer. But it talks to an Edge driver which provides the SmartThings integration.

The reason you can’t perform this function on the hub is because you need to be able to access the ARP table, and Edge does not permit access to that.