Using Fing as a new way to detect smartphone presence

Posted on
Tue Jan 20, 2015 3:36 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

ok .. a little lecture on wifi / networking... as I understand it

WiFi use electric power, thats why devices go into a "low power mode" that does not answer traffic, but still keeps the connection to the router open: "associated" state.

FING and PING have no chance of detecting that state. Only when the phone wakes up and check with email etc it creates traffic that FING will pick up.

FINGSCAN has 4 ways of detecting presents:
1. FING ==> listens to all traffic on the network and detects new / old devices. and it then scans all known devices once a minute with PING
2. PING ==> is used in parallel to FING to detect a device going down to set device to "down" status
3. FMID ==> can be set to enable HOME / AWAY triggers ... As apple changed their security schema... does not seem to work well anymore
4. WIFI info from ASUS routers ==> detects if wifi device is "associated" if yes, it overwrites all other info and set device to "UP" status


I have observed that the iPhone 6 with IOS 8.x behaves differently when communication with the WIFI router. It disassociates some times from the router where the iphone5 was staying associated.

So if you don't have #3 and #4 you should set your "away" timeout to >15 minutes and the backHome timeout to > 5 minutes.

try and see if it helps.

Karl

the attached screen shot show the status from the wifi router the column PSM indicates the power save mode. At that point in time the iPhone 6 54:9F:13:3F:95:25 is still associated, but does not answer to pings anymore.
Attachments
Screen Shot 2015-01-20 at 3.38.19 PM.png
Screen Shot 2015-01-20 at 3.38.19 PM.png (26.04 KiB) Viewed 5986 times

Posted on
Tue Jan 20, 2015 7:51 pm
ryanbuckner offline
Posts: 1081
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Using Fing as a new way to detect smartphone presence

Do you have a iPhone 6 ?


I have an iPhone 5s. I'm going to try to keep the iPhone plugged in all night and see if I get different results.

Posted on
Wed Jan 21, 2015 9:13 pm
ryanbuckner offline
Posts: 1081
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Using Fing as a new way to detect smartphone presence

I'm also seeing that my iPhone appears to register up, then down every minute or so even when I'm actively using my WiFi connection.

Posted on
Wed Jan 21, 2015 9:35 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

Could you switch on debug for ding and ping?


Sent from my iPhone using Tapatalk

Posted on
Wed Jan 21, 2015 11:01 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

I believe I understand.

In my setup I have the info from the WIFI router. You likely do not have that. (that overwrits the PING info as the WIFI info is more accurate and faster.)

Here is whats happening: as the iPhone goes into power save mode it is not answering pings anymore. That's why it will go into down mode.

Solution: edit the iphone device and disable "use ping"

After that ONLY the info from FING will be used. That should make it less "nervous" and keep it in UP mode as the iPhone is still sending a package out once in a while and FINg is registering that.

Hope that helps.

Karl

Posted on
Thu Jan 22, 2015 8:57 am
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

Could you switch on debug for ding and ping?


Sent from my iPhone using Tapatalk

Posted on
Wed Jan 28, 2015 2:08 pm
Skiddy offline
User avatar
Posts: 149
Joined: May 06, 2008

Re: Using Fing as a new way to detect smartphone presence

I have installed Fing from overlooksoft.com but cannot get this to work with any success. Any ideas from anyone?


fingscan Error Error in plugin execution startup:

Traceback (most recent call last):
File "plugin.py", line 319, in startup
File "plugin.py", line 1530, in initFing
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/genericpath.py", line 49, in getsize
<type 'exceptions.OSError'>: (2, 'No such file or directory', '/Users/Jon/Documents/fing/fing.data')

Posted on
Wed Jan 28, 2015 2:22 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

the message states: the file fing.data does not exist . I will add an exception to cover, BUT that is just the symptom.

could you open a terminal window and type

sudo fing

then you should enter your password. If thats does NOT work you have not installed fing properly.

If it does, I need some more info:
- versions of OS,
-a directory listing of ~documents/fing

Karl

Posted on
Wed Jan 28, 2015 2:58 pm
Skiddy offline
User avatar
Posts: 149
Joined: May 06, 2008

Re: Using Fing as a new way to detect smartphone presence

Thanks Karl, I got around it by manually creating the folder and restarting things so it's looking good now.

Posted on
Wed Jan 28, 2015 3:05 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

It should create the directory on its own. And if there is no file it should also create it. ... :?:

Posted on
Thu Jan 29, 2015 2:01 pm
MarcoGT offline
Posts: 1105
Joined: Sep 11, 2014
Location: Germany

Re: Using Fing as a new way to detect smartphone presence

I have some stupid questions: let's suppose that my iPhone is device1, then my iPhone will be always device1 or can also be assigned to another device? Then of course I can check if device is connected or not. What happens if device goes in standby? Of course if I put it offline/airline mode then it is marked as down...right?

Posted on
Thu Jan 29, 2015 2:08 pm
MarcoGT offline
Posts: 1105
Joined: Sep 11, 2014
Location: Germany

Re: Using Fing as a new way to detect smartphone presence

Would it be possible to switch off a Fibaro motion sensor if I am at home? But I think that "sensor on" means that sensor saw something and not that it is simply active. I think I have to use something "if device is at home do not send e-mail, otherwise send it".

Am I right?

Posted on
Thu Jan 29, 2015 2:59 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

Would it be possible to switch off a Fibaro motion sensor if I am at home? But I think that "sensor on" means that sensor saw something and not that it is simply active. I think I have to use something "if device is at home do not send e-mail, otherwise send it".
==>YES

I have some stupid questions: let's suppose that my iPhone is device1, then my iPhone will be always device1 or can also be assigned to another device? Then of course I can check if device is connected or not. What happens if device goes in standby? Of course if I put it offline/airline mode then it is marked as down...right?

no stupid questions, just stupid answers.==> a MAC number of a physical device is the key to link indigo ip-device to physical device. so one MAC# = one physical device, =one indigo-ip-device

==> second part is much more complicated:
- FINGSCAN uses several ways to detect a device

1. FING ==> listens to al traffic on the network and if the iPhone sends anything it will be registered as "up", then once a minute it does a ping to all devices and double checks. after some time it is set to "down" or later to expired if no traffic and no answer to ping
==> down to up detection within 2 seconds, up to down ~ 1 minute
2. PING ==> while up FINGSCAN sends pings to devices to detect if a device disappears. This only works for hardwired networks , should not be used for WIFI devices
==> up to down detection ~ 3 seconds
3. find my device ==> checks distance to home. but apple has kind of shut down that service
== reaction time ~ 5 minutes
4. Wifi info from ASUS routers ==> get info from Asus router if e.g. iPhone is "associated" to wifi = "up", even if it is not active (does not answer to pings ..) it is still associated.
==> reaction time for up and down detection ~ 3 seconds

so for the start I would set:
1. timeout for home again ~ 5 minutes
2. time out for away ~ 15 minutes
don't use # 2,3,4
once that works, try to add the other options (#2,3,4) and see how that works.


hope that helps

Karl

Posted on
Thu Jan 29, 2015 3:48 pm
MarcoGT offline
Posts: 1105
Joined: Sep 11, 2014
Location: Germany

Re: Using Fing as a new way to detect smartphone presence

kw123 wrote:
==>YES


Yes...what? I got lost, sorry :(

no stupid questions, just stupid answers.==> a MAC number of a physical device is the key to link indigo ip-device to physical device. so one MAC# = one physical device, =one indigo-ip-device

==> second part is much more complicated:
- FINGSCAN uses several ways to detect a device

1. FING ==> listens to al traffic on the network and if the iPhone sends anything it will be registered as "up", then once a minute it does a ping to all devices and double checks. after some time it is set to "down" or later to expired if no traffic and no answer to ping
==> down to up detection within 2 seconds, up to down ~ 1 minute
2. PING ==> while up FINGSCAN sends pings to devices to detect if a device disappears. This only works for hardwired networks , should not be used for WIFI devices
==> up to down detection ~ 3 seconds
3. find my device ==> checks distance to home. but apple has kind of shut down that service
== reaction time ~ 5 minutes
4. Wifi info from ASUS routers ==> get info from Asus router if e.g. iPhone is "associated" to wifi = "up", even if it is not active (does not answer to pings ..) it is still associated.
==> reaction time for up and down detection ~ 3 seconds

so for the start I would set:
1. timeout for home again ~ 5 minutes
2. time out for away ~ 15 minutes
don't use # 2,3,4
once that works, try to add the other options (#2,3,4) and see how that works.


hope that helps

Karl


Timeout 15min...that means that if during the night I will put iPhone in airplane mode, variable will be set as 'away'...right?

Posted on
Thu Jan 29, 2015 4:24 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: Using Fing as a new way to detect smartphone presence

I think I have to use something "if device is at home do not send e-mail, otherwise send it". ==> yes

Timeout 15min...that means that if during the night I will put iPhone in airplane mode, variable will be set as 'away'...right? ==> yes

you should us the device state not the variables

Karl

ps wich version are you using?

Page 25 of 32 1 ... 22, 23, 24, 25, 26, 27, 28 ... 32

Who is online

Users browsing this forum: No registered users and 5 guests