Smartphone Radar - Smartphone presence detection (Locked)

Smartphone presence detection.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Smartphone Radar - Smartphone presence detection (Update

Post by Dewster35 »

Glad you got it to work!

I know there is a script you can run to restart a plugin... you could setup a trigger that you have shown in Indigo to run it. I would assume if you can restart it, you can stop it as well. Hopefully someone can chime in. The plug in I found the script on was for find my idevices plugin. Hope that helps!
User avatar
c64
Posts: 53
Joined: Sun Oct 28, 2012 2:09 am
Location: Germany

Re: Smartphone Radar - Smartphone presence detection (Update

Post by c64 »

Hi,

This plugin seems amazing, but I am struggling with Travisc's first instruction on page 1 (when running Airport router), where it says to:

"First tell syslog to accept logs from other devices:
http://superuser.com/questions/131578/h ... rd-from-re"

I'm using Indigo on Lion and my syslogd file doesnt seem to relate to these instructions. Does anyone have a tip for me regarding a setup on Lion?

Many thanks,
Mike
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Smartphone Radar - Smartphone presence detection (Update

Post by Dewster35 »

Download airport utility version 5.6 first... you can't do it with the stock utility application that is most current.
snowjay
Posts: 274
Joined: Wed Aug 09, 2006 10:07 am

Re: Smartphone Radar - Smartphone presence detection (Update

Post by snowjay »

Smartphone Radar occasionally stops working and then I start getting these errors in my log:

Code: Select all

Smartphone Radar Error          Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 86, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Smartphone Radar.indigoPlugin/Contents/Server Plugin/iPresence.py", line 517, in startComm
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Smartphone Radar.indigoPlugin/Contents/Server Plugin/iPresence.py", line 405, in killProcesses
<type 'exceptions.OSError'>: (3, 'No such process')

  Smartphone Radar Error          plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Restarting the plugin gets rid of the errors and gets things working again. It had happened once or twice in the past but lately it's been happening almost every day.
Jason
User avatar
c64
Posts: 53
Joined: Sun Oct 28, 2012 2:09 am
Location: Germany

Re: Smartphone Radar - Smartphone presence detection (Update

Post by c64 »

Thanks Dewster35 for the clue.

I realise now that you don't need to follow the instructions on pg1 regarding using port514 if you are using Airport Extreme.

The only tricks are that the password set in the Radar Plugin is the SMNP password on the Airport Extreme (which is by default "public"), and to download the latest beta:
http://frightideas.com/hobbies/smartpho ... r_Beta.zip
User avatar
travisc
Posts: 346
Joined: Tue Sep 07, 2010 7:24 am
Location: Toronto, Canada
Contact:

Re: Smartphone Radar - Smartphone presence detection (Update

Post by travisc »

A new version of Smartphone Radar that is compatible with Indigo 6 has now been posted on the first page of this thread. There is no longer a Beta version, the new version supports both Apple and Generic routers. The setup instructions have also been updated to include Apple routers.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Smartphone Radar - Smartphone presence detection (Update

Post by Dewster35 »

Travis,
Thanks for the update. Just waiting on a couple more plugins to update before I jump into the 6.0 beta. Just curious if you were planning on any future enhancement features for this plugin or are you just maintaining existing features from here on out?
User avatar
travisc
Posts: 346
Joined: Tue Sep 07, 2010 7:24 am
Location: Toronto, Canada
Contact:

Re: Smartphone Radar - Smartphone presence detection (Update

Post by travisc »

Dewster35 wrote:Travis,
Thanks for the update. Just waiting on a couple more plugins to update before I jump into the 6.0 beta. Just curious if you were planning on any future enhancement features for this plugin or are you just maintaining existing features from here on out?
I don't have any in mind at the moment, other than trying to preserve the home/away states on restart. Mostly because the plugin's been serving my needs well and I can't think of anything to add. If you have some ideas I'd be happy to hear what they are and consider adding them if they are beneficial to other users. :)
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Smartphone Radar - Smartphone presence detection (Update

Post by Dewster35 »

I would like to see the preserved states on restart as well.

Perhaps the only other thing that would be handy, but isn't essential, is being able to designate a SR device as a "guest". With a global variable, "guestispresent" that I could drive my home vs. company house modes. I know that would save a lot of logic that I've yet to create... but that may be a lot of work for a fringe case. Not sure others use this plugin like I do ;)
User avatar
travisc
Posts: 346
Joined: Tue Sep 07, 2010 7:24 am
Location: Toronto, Canada
Contact:

Re: Smartphone Radar - Smartphone presence detection (Update

Post by travisc »

Dewster35 wrote:I would like to see the preserved states on restart as well.

Perhaps the only other thing that would be handy, but isn't essential, is being able to designate a SR device as a "guest". With a global variable, "guestispresent" that I could drive my home vs. company house modes. I know that would save a lot of logic that I've yet to create... but that may be a lot of work for a fringe case. Not sure others use this plugin like I do ;)
A guest mode makes sense, and wouldn't be that hard to implement. I'll get to it after I get done updating the DSC alarm plugin. :)

Thanks
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Smartphone Radar - Smartphone presence detection (Update

Post by Dewster35 »

Sweet! My laziness and procrastination pay off once again! You rock.
flic
Posts: 128
Joined: Thu Nov 30, 2006 1:35 pm
Location: Lidingö, Sweden

Re: Smartphone Radar - Smartphone presence detection (Update

Post by flic »

Morning.

I have a strange problem with the latest version and 6b1. It doesn't seem to matter what address I write, the phone gets tagged as "home". All of my configured phones are registering as "home".

I'm SNMP-querying my two Apple Extremes. This is the debug output:
Nov 17, 2012 10:59:13 AM
Smartphone Radar SNMP Output for tv.local:
wirelessnumber.0 = integer: 7
wirelessphysaddress."00:23:df:f8:89:83" = string: "00:23:df:f8:89:83"
wirelessphysaddress."18:e7:f4:92:33:56" = string: "18:e7:f4:92:33:56"
wirelessphysaddress."74:e1:b6:cb:19:46" = string: "74:e1:b6:cb:19:46"
wirelessphysaddress."74:e1:b6:d3:33:61" = string: "74:e1:b6:d3:33:61"
wirelessphysaddress."94:0c:6d:b0:25:98" = string: "94:0c:6d:b0:25:98"
wirelessphysaddress."a4:67:06:8b:8f:af" = string: "a4:67:06:8b:8f:af"
wirelessphysaddress."d0:23:db:a9:8e:02" = string: "d0:23:db:a9:8e:02"
wirelesstype."00:23:df:f8:89:83" = integer: sta(1)
wirelesstype."18:e7:f4:92:33:56" = integer: sta(1)
wirelesstype."74:e1:b6:cb:19:46" = integer: sta(1)
wirelesstype."74:e1:b6:d3:33:61" = integer: sta(1)
wirelesstype."94:0c:6d:b0:25:98" = integer: sta(1)
wirelesstype."a4:67:06:8b:8f:af" = integer: sta(1)
wirelesstype."d0:23:db:a9:8e:02" = integer: sta(1)
wirelessdatarates."00:23:df:f8:89:83" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 mcs: 0-15
wirelessdatarates."18:e7:f4:92:33:56" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 mcs: 0-15
wirelessdatarates."74:e1:b6:cb:19:46" = string: 6(b) 9 12(b) 18 24(b) 36 48 54 mcs: 0-15
wirelessdatarates."74:e1:b6:d3:33:61" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 mcs: 0-15
wirelessdatarates."94:0c:6d:b0:25:98" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 mcs: 0-15
wirelessdatarates."a4:67:06:8b:8f:af" = string: 6(b) 9 12(b) 18 24(b) 36 48 54 mcs: 0-15
wirelessdatarates."d0:23:db:a9:8e:02" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 mcs: 0-15
wirelesstimeassociated."00:23:df:f8:89:83" = integer: 340429
wirelesstimeassociated."18:e7:f4:92:33:56" = integer: 23
wirelesstimeassociated."74:e1:b6:cb:19:46" = integer: 340737
wirelesstimeassociated."74:e1:b6:d3:33:61" = integer: 336108
wirelesstimeassociated."94:0c:6d:b0:25:98" = integer: 397792
wirelesstimeassociated."a4:67:06:8b:8f:af" = integer: 326452
wirelesstimeassociated."d0:23:db:a9:8e:02" = integer: 327968
wirelesslastrefreshtime."00:23:df:f8:89:83" = integer: 0
wirelesslastrefreshtime."18:e7:f4:92:33:56" = integer: 0
wirelesslastrefreshtime."74:e1:b6:cb:19:46" = integer: 0
wirelesslastrefreshtime."74:e1:b6:d3:33:61" = integer: 0
wirelesslastrefreshtime."94:0c:6d:b0:25:98" = integer: 0
wirelesslastrefreshtime."a4:67:06:8b:8f:af" = integer: 0
wirelesslastrefreshtime."d0:23:db:a9:8e:02" = integer: 0
wirelessstrength."00:23:df:f8:89:83" = integer: -66
wirelessstrength."18:e7:f4:92:33:56" = integer: -55
wirelessstrength."74:e1:b6:cb:19:46" = integer: -49
wirelessstrength."74:e1:b6:d3:33:61" = integer: -56
wirelessstrength."94:0c:6d:b0:25:98" = integer: -66
wirelessstrength."a4:67:06:8b:8f:af" = integer: -63
wirelessstrength."d0:23:db:a9:8e:02" = integer: -61
wirelessnoise."00:23:df:f8:89:83" = integer: -86
wirelessnoise."18:e7:f4:92:33:56" = integer: -96
wirelessnoise."74:e1:b6:cb:19:46" = integer: -96
wirelessnoise."74:e1:b6:d3:33:61" = integer: -96
wirelessnoise."94:0c:6d:b0:25:98" = integer: -84
wirelessnoise."a4:67:06:8b:8f:af" = integer: -96
wirelessnoise."d0:23:db:a9:8e:02" = integer: -96
wirelessrate."00:23:df:f8:89:83" = integer: 78
wirelessrate."18:e7:f4:92:33:56" = integer: 54
wirelessrate."74:e1:b6:cb:19:46" = integer: 65
wirelessrate."74:e1:b6:d3:33:61" = integer: 65
wirelessrate."94:0c:6d:b0:25:98" = integer: 52
wirelessrate."a4:67:06:8b:8f:af" = integer: 65
wirelessrate."d0:23:db:a9:8e:02" = integer: 65
wirelessnumrx."00:23:df:f8:89:83" = integer: 79698
wirelessnumrx."18:e7:f4:92:33:56" = integer: 0
wirelessnumrx."74:e1:b6:cb:19:46" = integer: -1
wirelessnumrx."74:e1:b6:d3:33:61" = integer: -1
wirelessnumrx."94:0c:6d:b0:25:98" = integer: 1234
wirelessnumrx."a4:67:06:8b:8f:af" = integer: -1
wirelessnumrx."d0:23:db:a9:8e:02" = integer: -1
wirelessnumtx."00:23:df:f8:89:83" = integer: 2405
wirelessnumtx."18:e7:f4:92:33:56" = integer: 0
wirelessnumtx."74:e1:b6:cb:19:46" = integer: -1
wirelessnumtx."74:e1:b6:d3:33:61" = integer: -1
wirelessnumtx."94:0c:6d:b0:25:98" = integer: 31
wirelessnumtx."a4:67:06:8b:8f:af" = integer: -1
wirelessnumtx."d0:23:db:a9:8e:02" = integer: -1
wirelessnumrxerrors."00:23:df:f8:89:83" = integer: 0
wirelessnumrxerrors."18:e7:f4:92:33:56" = integer: 0
wirelessnumrxerrors."74:e1:b6:cb:19:46" = integer: -1
wirelessnumrxerrors."74:e1:b6:d3:33:61" = integer: -1
wirelessnumrxerrors."94:0c:6d:b0:25:98" = integer: 0
wirelessnumrxerrors."a4:67:06:8b:8f:af" = integer: -1
wirelessnumrxerrors."d0:23:db:a9:8e:02" = integer: -1
wirelessnumtxerrors."00:23:df:f8:89:83" = integer: 0
wirelessnumtxerrors."18:e7:f4:92:33:56" = integer: 0
wirelessnumtxerrors."74:e1:b6:cb:19:46" = integer: -1
wirelessnumtxerrors."74:e1:b6:d3:33:61" = integer: -1
wirelessnumtxerrors."94:0c:6d:b0:25:98" = integer: 0
wirelessnumtxerrors."a4:67:06:8b:8f:af" = integer: -1
wirelessnumtxerrors."d0:23:db:a9:8e:02" = integer: -1

Smartphone Radar SNMP Output for hobbyrum.local:
wirelessnumber.0 = integer: 3
wirelessphysaddress."00:1c:b3:74:d2:ff" = string: "00:1c:b3:74:d2:ff"
wirelessphysaddress."c8:d5:fe:e5:6a:fc" = string: "c8:d5:fe:e5:6a:fc"
wirelessphysaddress."d0:23:db:aa:44:19" = string: "d0:23:db:aa:44:19"
wirelesstype."00:1c:b3:74:d2:ff" = integer: sta(1)
wirelesstype."c8:d5:fe:e5:6a:fc" = integer: sta(1)
wirelesstype."d0:23:db:aa:44:19" = integer: sta(1)
wirelessdatarates."00:1c:b3:74:d2:ff" = string: 6(b) 9 12(b) 18 24(b) 36 48 54 mcs: 0-23
wirelessdatarates."c8:d5:fe:e5:6a:fc" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54
wirelessdatarates."d0:23:db:aa:44:19" = string: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 mcs: 0-23
wirelesstimeassociated."00:1c:b3:74:d2:ff" = integer: 10720677
wirelesstimeassociated."c8:d5:fe:e5:6a:fc" = integer: 10380358
wirelesstimeassociated."d0:23:db:aa:44:19" = integer: 10777210
wirelesslastrefreshtime."00:1c:b3:74:d2:ff" = integer: 0
wirelesslastrefreshtime."c8:d5:fe:e5:6a:fc" = integer: 0
wirelesslastrefreshtime."d0:23:db:aa:44:19" = integer: 0
wirelessstrength."00:1c:b3:74:d2:ff" = integer: -62
wirelessstrength."c8:d5:fe:e5:6a:fc" = integer: -60
wirelessstrength."d0:23:db:aa:44:19" = integer: -57
wirelessnoise."00:1c:b3:74:d2:ff" = integer: -90
wirelessnoise."c8:d5:fe:e5:6a:fc" = integer: -89
wirelessnoise."d0:23:db:aa:44:19" = integer: -89
wirelessrate."00:1c:b3:74:d2:ff" = integer: 270
wirelessrate."c8:d5:fe:e5:6a:fc" = integer: 54
wirelessrate."d0:23:db:aa:44:19" = integer: 65
wirelessnumrx."00:1c:b3:74:d2:ff" = integer: 2865155
wirelessnumrx."c8:d5:fe:e5:6a:fc" = integer: -1
wirelessnumrx."d0:23:db:aa:44:19" = integer: -1
wirelessnumtx."00:1c:b3:74:d2:ff" = integer: 2110194
wirelessnumtx."c8:d5:fe:e5:6a:fc" = integer: -1
wirelessnumtx."d0:23:db:aa:44:19" = integer: -1
wirelessnumrxerrors."00:1c:b3:74:d2:ff" = integer: 0
wirelessnumrxerrors."c8:d5:fe:e5:6a:fc" = integer: -1
wirelessnumrxerrors."d0:23:db:aa:44:19" = integer: -1
wirelessnumtxerrors."00:1c:b3:74:d2:ff" = integer: 87
wirelessnumtxerrors."c8:d5:fe:e5:6a:fc" = integer: -1
wirelessnumtxerrors."d0:23:db:aa:44:19" = integer: -1
For example: one of the phones is configured with MAC 84:85:06:3c:73:98 and is registering as "home". Minutes till away is currently configured to "1".
User avatar
travisc
Posts: 346
Joined: Tue Sep 07, 2010 7:24 am
Location: Toronto, Canada
Contact:

Re: Smartphone Radar - Smartphone presence detection (Update

Post by travisc »

I'll check this in a few hours.
User avatar
travisc
Posts: 346
Joined: Tue Sep 07, 2010 7:24 am
Location: Toronto, Canada
Contact:

Re: Smartphone Radar - Smartphone presence detection (Update

Post by travisc »

I just PM'd you a link to a test build. Please check that and get back to me when you can.

I only changed two very small things in the plugin since the last beta build everyone's been using. I'm not sure why it's suddenly not working. :?
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: Smartphone Radar - Smartphone presence detection (Update

Post by hamw »

AlaskaDave wrote:

Feature Request or Already Possible?

Often times, say on weekends, I'm at home with my iPhone in my pocket as I work around the yard. For those times when I know I'm not leaving and I'll be going in and out of my WiFi range, is there a way to turn off Smartphone Radar from Indigo Touch? I've run through the plug-in options and do not see a way to turn of plug-ins? Is this possible?
If this hasn't been answered already, I was using this script to automatically reload the Autelis Jandy script as it was having cpu issues:

Code: Select all

plugin = indigo.server.getPlugin("com.ssi.indigoplugin.AutelisJandy")
if plugin.isEnabled():
   plugin.restart()
I thought one might simply change the last line from "plugin.restart()" to something else.... I tried plugin.stop and plugin.disable but neither work. Looking at the documentation:
There are also a couple of methods defined by this object.

isEnabled()
This method will return True if the plugin is enabled (running), False otherwise
executeAction(actionId, deviceId, props)
This is the method that actually executes the action. actionId is the unique action id. deviceId is the id of the device that the action on which the action will perform (if it requires a device). props is a dictionary of properties that the action needs to process correctly. See the plugin's documentation for a description of what you need to pass in to execute actions.
restart(waitUntilDone=True)
This method will restart the plugin if it's already running. Pass the optional parameter waitUntilDone=False if you don't want to block while the plugin restarts (waitUntilDone defaults to True if it's no parameters are passed). If you're a plugin developer and you want to restart the plugin from within itself you should pass that parameter.
I don't see that a disable or stop feature is currently part of the method set?
Locked

Return to “Smartphone Radar”