Smartphone Radar - Smartphone presence detection (Updated)
| Author |
Message |
|
snowjay
Joined: Aug 09, 2006 Posts: 254
|
 Re: Smartphone Radar - Smartphone presence detection (Update
travisc,
So far so good, still working as expected. This morning I got an text about 7mins after I left the house and when I came home after work I got a text as I was walking up to the front door that I was home (less than 2 mins after parking).
I had it off the cradle for several hours yesterday and no false positives. I'm going to leave it off the cradle again when I go to bed tonight for a longer test.
_________________ Jason
|
| Mon Dec 19, 2011 8:33 pm |
|
 |
|
travisc
Joined: Sep 07, 2010 Posts: 228 Location: Toronto, Canada
|
 Re: Smartphone Radar - Smartphone presence detection (Update
I'm starting to roll the SNMP functionality into the plugin. I'm playing with it using an Airpot Express and noticed the snmpwalk output must be a little different from other units. Specifically, the MAC addresses are shown without colons on this unit. Just to be sure I'm covering all the different variations of output, would anyone be willing to post or PM me the output of an snmpwalk for their base station? Enter the command below in the terminal, replacing ADR with the IP address or bonjour name of the airport, and PWD with the airport's password. PWD is also known as the SNMP community string, which is sometimes found in the advanced tab of the airport utility. For me it's not shown there, but it's just the airport's password. Thanks! Terminal Command: snmpwalk -m AIRPORT-BASESTATION-3-MIB -Os -v 2c -c PWD ADR 1.3.6.1.4.1.63.501 The output should look something like this: sysConfName.0 = STRING: Test Express sysConfContact.0 = STRING: sysConfLocation.0 = STRING: sysConfUptime.0 = INTEGER: 1005 sysConfFirmwareVersion.0 = STRING: 6.3 wirelessNumber.0 = INTEGER: 1 wirelessPhysAddress.200.188.200.234.187.153 = Hex-STRING: C8 BC C8 EA BB 99 wirelessType.200.188.200.234.187.153 = INTEGER: sta(1) wirelessDataRates.200.188.200.234.187.153 = STRING: [ 1 2 5.5 11 18 24 36 48 54 ] wirelessTimeAssociated.200.188.200.234.187.153 = INTEGER: 1008 wirelessLastRefreshTime.200.188.200.234.187.153 = INTEGER: 0 wirelessStrength.200.188.200.234.187.153 = INTEGER: -54 wirelessNoise.200.188.200.234.187.153 = INTEGER: -69 wirelessRate.200.188.200.234.187.153 = INTEGER: 54 wirelessNumRX.200.188.200.234.187.153 = INTEGER: 31921493 wirelessNumTX.200.188.200.234.187.153 = INTEGER: 37665593 wirelessNumRXErrors.200.188.200.234.187.153 = INTEGER: 4 wirelessNumTXErrors.200.188.200.234.187.153 = INTEGER: 324 dhcpNumber.0 = INTEGER: 1 dhcpPhysAddress.200.188.200.234.187.153 = Hex-STRING: C8 BC C8 EA BB 99 dhcpIpAddress.200.188.200.234.187.153 = IpAddress: 10.0.1.2 dhcpClientID.200.188.200.234.187.153 = "" dhcpLeaseTime.200.188.200.234.187.153 = INTEGER: 14399 physicalInterfaceCount.0 = INTEGER: 2 physicalInterfaceIndex.1 = INTEGER: 1 physicalInterfaceIndex.2 = INTEGER: 2 physicalInterfaceName.1 = STRING: "wl" physicalInterfaceName.2 = STRING: "et" physicalInterfaceUnit.1 = INTEGER: 0 physicalInterfaceUnit.2 = INTEGER: 0 physicalInterfaceSpeed.1 = INTEGER: 54000000 physicalInterfaceSpeed.2 = INTEGER: 0 physicalInterfaceState.1 = INTEGER: linkUp(1) physicalInterfaceState.2 = INTEGER: linkDown(0) physicalInterfaceDuplex.1 = INTEGER: half(0) physicalInterfaceDuplex.2 = INTEGER: half(0) physicalInterfaceNumTX.1 = INTEGER: 1634 physicalInterfaceNumTX.2 = INTEGER: 70 physicalInterfaceNumRX.1 = INTEGER: 3374 physicalInterfaceNumRX.2 = INTEGER: 0 physicalInterfaceNumTXError.1 = INTEGER: 0 physicalInterfaceNumTXError.2 = INTEGER: 0 physicalInterfaceNumRXError.1 = INTEGER: 0 physicalInterfaceNumRXError.2 = INTEGER: 0
|
| Thu Dec 22, 2011 3:47 pm |
|
 |
|
bluenoise
Joined: Aug 23, 2008 Posts: 108
|
 Re: Smartphone Radar - Smartphone presence detection (Update
My Airport Extreme Basestation returns the MAC addresses with colons, all upper-case, and enclosed in quotes. I'm issuing this command to get my list:
snmpwalk -m AIRPORT-BASESTATION-3-MIB -Os -v 2c -c PWD ADR 1.3.6.1.4.1.63.501.3.2
The MAC addresses look like this: "AA:AA:AA:AA:AA:AA" (With the quotes)
I'm not at home right now to give you an actual dump of what it says.
|
| Thu Dec 22, 2011 3:56 pm |
|
 |
|
snowjay
Joined: Aug 09, 2006 Posts: 254
|
 Re: Smartphone Radar - Smartphone presence detection (Update
This is from a 1st Gen Time Capsules Airport: - Code: Select all
sysConfName.0 = STRING: Outatime sysConfContact.0 = STRING: sysConfLocation.0 = STRING: sysConfUptime.0 = INTEGER: 787885 sysConfFirmwareVersion.0 = STRING: 7.6 wirelessNumber.0 = INTEGER: 3 wirelessPhysAddress."00:1E:52:83:85:03" = STRING: "00:1E:52:83:85:03" wirelessPhysAddress."C4:2C:03:CD:A2:02" = STRING: "C4:2C:03:CD:A2:02" wirelessPhysAddress."D0:23:DB:58:83:31" = STRING: "D0:23:DB:58:83:31" wirelessType."00:1E:52:83:85:03" = INTEGER: sta(1) wirelessType."C4:2C:03:CD:A2:02" = INTEGER: sta(1) wirelessType."D0:23:DB:58:83:31" = INTEGER: sta(1) wirelessDataRates."00:1E:52:83:85:03" = STRING: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 MCS: 0-15 wirelessDataRates."C4:2C:03:CD:A2:02" = STRING: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 MCS: 0-15 wirelessDataRates."D0:23:DB:58:83:31" = STRING: 1(b) 2(b) 5(b) 6 9 11(b) 12 18 24 36 48 54 MCS: 0-15 wirelessTimeAssociated."00:1E:52:83:85:03" = INTEGER: 782045 wirelessTimeAssociated."C4:2C:03:CD:A2:02" = INTEGER: 27503 wirelessTimeAssociated."D0:23:DB:58:83:31" = INTEGER: 781138 wirelessLastRefreshTime."00:1E:52:83:85:03" = INTEGER: 0 wirelessLastRefreshTime."C4:2C:03:CD:A2:02" = INTEGER: 0 wirelessLastRefreshTime."D0:23:DB:58:83:31" = INTEGER: 0 wirelessStrength."00:1E:52:83:85:03" = INTEGER: -41 wirelessStrength."C4:2C:03:CD:A2:02" = INTEGER: -44 wirelessStrength."D0:23:DB:58:83:31" = INTEGER: -36 wirelessNoise."00:1E:52:83:85:03" = INTEGER: -97 wirelessNoise."C4:2C:03:CD:A2:02" = INTEGER: -80 wirelessNoise."D0:23:DB:58:83:31" = INTEGER: -80 wirelessRate."00:1E:52:83:85:03" = INTEGER: 130 wirelessRate."C4:2C:03:CD:A2:02" = INTEGER: 58 wirelessRate."D0:23:DB:58:83:31" = INTEGER: 58 wirelessNumRX."00:1E:52:83:85:03" = INTEGER: 138132061 wirelessNumRX."C4:2C:03:CD:A2:02" = INTEGER: -1 wirelessNumRX."D0:23:DB:58:83:31" = INTEGER: -1 wirelessNumTX."00:1E:52:83:85:03" = INTEGER: 193367680 wirelessNumTX."C4:2C:03:CD:A2:02" = INTEGER: -1 wirelessNumTX."D0:23:DB:58:83:31" = INTEGER: -1 wirelessNumRXErrors."00:1E:52:83:85:03" = INTEGER: 0 wirelessNumRXErrors."C4:2C:03:CD:A2:02" = INTEGER: -1 wirelessNumRXErrors."D0:23:DB:58:83:31" = INTEGER: -1 wirelessNumTXErrors."00:1E:52:83:85:03" = INTEGER: 230 wirelessNumTXErrors."C4:2C:03:CD:A2:02" = INTEGER: -1 wirelessNumTXErrors."D0:23:DB:58:83:31" = INTEGER: -1 dhcpNumber.0 = INTEGER: 0
_________________ Jason
|
| Thu Dec 22, 2011 4:13 pm |
|
 |
|
BeNoOne
Joined: Oct 11, 2006 Posts: 23 Location: Netherlands
|
 Re: Smartphone Radar - Smartphone presence detection (Update
@travisc If you look at my original script you will see two values for the same iPhone/iPad. I have an Extreme and an old 1st gen. Express. My Express outputs the MAC address in decimal value instead of hexadecimal. I'm not sure why, because a MacBook address will generate a hex value.
|
| Thu Dec 22, 2011 6:09 pm |
|
 |
|
travisc
Joined: Sep 07, 2010 Posts: 228 Location: Toronto, Canada
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Thanks to everyone who posted or PM'd me. It looks like the MAC addresses are shown in three different ways so far. With or without colons, or in decimal (thanks BeNoOne!) with periods between each value. I'll have to check for all three for each phone.
I'll get something together in the next day or so and post it here for testing.
Travis
|
| Thu Dec 22, 2011 10:29 pm |
|
 |
|
bluenoise
Joined: Aug 23, 2008 Posts: 108
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Hi, Travis! Happy New Year!
Do you have any updates on your efforts?
|
| Mon Jan 09, 2012 6:28 pm |
|
 |
|
travisc
Joined: Sep 07, 2010 Posts: 228 Location: Toronto, Canada
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Thanks! Happy New Year to you too!
I've got a new version ready for testing with Airports but I can't release it until Indigo 5.0.3 is released. It relies on the subprocess poll method which doesn't work correctly in the current version.
I'll share it as soon as the update drops.
Travis
|
| Mon Jan 09, 2012 6:40 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 214 Location: Juneau, Alaksa
|
 Re: Smartphone Radar - Smartphone presence detection (Update
I skimmed through the thread and didn't see it, can this be used on other networked devices like the iPod Touch? Sorry if this has been covered... didn't notice the question if it has been asked.
|
| Fri Jan 13, 2012 1:36 pm |
|
 |
|
bluenoise
Joined: Aug 23, 2008 Posts: 108
|
 Re: Smartphone Radar - Smartphone presence detection (Update
AlaskaDave wrote:I skimmed through the thread and didn't see it, can this be used on other networked devices like the iPod Touch? Sorry if this has been covered... didn't notice the question if it has been asked.
It should work, since this is based on the device connecting via WiFi to the base station.
|
| Fri Jan 13, 2012 1:50 pm |
|
 |
|
travisc
Joined: Sep 07, 2010 Posts: 228 Location: Toronto, Canada
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Sure. Any device that accesses the network can be tracked using this plugin.
|
| Fri Jan 13, 2012 1:50 pm |
|
 |
|
Randaulf
Joined: Jan 31, 2012 Posts: 10
|
 Re: Smartphone Radar - Smartphone presence detection (Update
HI Travis,
I have an Apple Extreme Router and I'm excited about the possibilities of this plugin. With 5.0.3 just dropping, can we expect to see your update soon? Thanks for all of your efforts on this, hopefully there's a way to make Apple play nice with more fun technology!
|
| Tue Jan 31, 2012 8:49 pm |
|
 |
|
travisc
Joined: Sep 07, 2010 Posts: 228 Location: Toronto, Canada
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Hi Randaulf, Try this. It's pretty self explanatory as far as the setup goes. Let me know how you make out. http://frightideas.com/hobbies/smartphoneradar/Smartphone_Radar_Beta.zip
|
| Tue Jan 31, 2012 9:10 pm |
|
 |
|
bluenoise
Joined: Aug 23, 2008 Posts: 108
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Hi, Travis- Thanks for posting the new version. I have been experimenting with it and I think I've found a problem. If I set the Minutes Till Away to 1 (just for the sake of testing), the state of our three iPhones toggles back and forth. I set it to 15 minutes to stop this behavior as it seems to not do the toggling. My guess is it's falsely reporting them missing from the Airport Extreme's list of connected devices and then immediately finding them again. Prior to this update, I was using my script that I've posted earlier. It got called every minute and never reported a false home or away, so I know the SNMP method should work. I really like the features of this plugin. It's far more elegant than the way I was doing things, especially since it doesn't spam the log with "Detect iPhones" every minute like mine did. 
|
| Wed Feb 01, 2012 1:18 am |
|
 |
|
travisc
Joined: Sep 07, 2010 Posts: 228 Location: Toronto, Canada
|
 Re: Smartphone Radar - Smartphone presence detection (Update
Hey bluenoise, A Minutes Till Away setting of 1 would probably cause problems if I think about it. The SNMP output of the base station is requested once a minute, and that minute is not necessarily aligned with the 'Minutes Till Away' minute. So the lowest setting you'd ever want to use is 2. I'll probably have to force that minimum in the next update. However, I'd discourage against using a value that low. That would mean if the phone is missing from the SNMP output for even one read then the plugin will report it as away. What if someone restarts their phone, their phone goes out of range for just a minute or two, or the base station is restarted. That would remove the phone from the base station's SNMP output, and depending on when the plugin polls it, it may be reported as away, firing any events you have told it to fire if a phone is away. The reason for the Minutes Till Away setting is to add a bit of a buffer to try and prevent false alarms like that from happening. Glad you like the plugin. 
|
| Wed Feb 01, 2012 7:54 am |
|
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|