travisc wrote:@bluenoise
Nice script, that would be fairly easy to incorporate into the plugin, see my question below.BeNoOne wrote:Please note:
The information snmp returns is the same Smartphone Radar is getting out of the logging.
So it's not more or less reliable. It's only another (simpler) way to get the same information.
I was just going to ask that question, thanks BeNoOne.
I'm curious how long the iPhone's are listed in the snmp output in various situations.
i.e.:
- If the iPhone is asleep, connects to the network, checks it's email.
- If the iPhone is on charge and asleep.
- If the iPhone goes out of range of the base station.
It seems there's some persistence to the data as your script only runs every 5 minutes. I'm curious if that's often enough to not miss any activity.
The intent of my script running every five minutes is to determine whether or not the iPhone is connected to the WiFi network at the moment of polling. It doesn't try to determine that through any kind of connect/disconnect activity. It just says, "If the iPhone's MAC address is in the base station's list of currently-connected devices, set the variable to 'true.'"
For testing, I had the script run every 15 seconds. When I turned on Airplane Mode on my iPhone 4, the variable went to false almost immediately. Conversely, turning off Airplane Mode made it go true the next time it was polled. I chose to check every five minutes arbitrarily, with the thinking that it didn't matter since there was no need to worry about missing something happening. It might be a problem if, at the moments it's polled, the phone is not connected to the WiFi, but it appears that the iPhone 4 (and I assume the 4S) stays connected to the WiFi even while sleeping. Unfortunately, the iPhone 3 falls off the WiFi after a short while, so it's going to think my daughter is not home, even when she is.