Using Fing as a new way to detect smartphone presence

Posted on
Wed Sep 18, 2013 11:06 am
kw123 offline
User avatar
Posts: 6343
Joined: May 12, 2013
Location: Dallas, TX

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

version 1.01 posted

new:
1. supports "&" in password
2. set OSX attribute to be able to run for files downloaded from internet
3. hide icon in dock for fingscan .. it is running in the background, you can still see it in system monitor

Karl

for technically interested folks:

1. put ' around password in echo 'yourpassword' :
Code: Select all
set cmd to "echo '" & yourPassword & "' | sudo -S fing  -o table,csv,\"" & theDir & theFile & "\"  log,csv,\"" & theDir & theLog & "\"  >/dev/null  2>&1 &"
do shell script cmd


2. do shell script "xattr -d com.apple.quarantine /directory of /fingscan.app"

3. add NSUIElement set to true in info.plist in fingscan.app container:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>NSUIElement</key>        <++++
   <true/>                                     <++++
   <key>CFBundleAllowMixedLocalizations</key>
   <true/>

Posted on
Thu Sep 19, 2013 2:27 pm
midd offline
Posts: 355
Joined: Apr 18, 2010

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

so does fing override Travis's Smartphone Radar plugin and Find My iDevice?

Indigo 7, High Sierra , on a dedicated 2011 Mac Mini Server.

Posted on
Thu Sep 19, 2013 3:37 pm
Simon offline
Posts: 30
Joined: Aug 15, 2013
Location: Denmark

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

Thanks for the quick fix. I can now use strong password again :-)

Posted on
Sat Sep 21, 2013 10:18 am
kw123 offline
User avatar
Posts: 6343
Joined: May 12, 2013
Location: Dallas, TX

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

midd, this is a utility that can be used to get an overview of all ip devices connected / disconnected in your network.

I believe the other tools are to track 1,..,3 specific devices.

your choice

Karl

Posted on
Tue Oct 01, 2013 12:58 am
bip.philippe offline
Posts: 58
Joined: Feb 20, 2013
Location: France

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

Hi,

I have worked on patching smartphone radar with fing as a new way of getting smartphone presence. It is implemented as a third communication choice.
I did not work on the launching fing aspect and decided to rely on a fing launched by another way (which is the case on my mac mini, in fact).

This allowed me to solve the issue cause by the latest airport extreme and to keep the built-in smartradar mechanisms.

It is running for three weeks at home. Yon can download it from here : http://bipphilippe.files.wordpress.com/2013/10/smartphoneradar.zip.

Bernard

Posted on
Tue Oct 01, 2013 1:32 am
durosity offline
User avatar
Posts: 3722
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

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

Very nice!

Computer says no.

Posted on
Sun Oct 06, 2013 3:06 pm
kw123 offline
User avatar
Posts: 6343
Joined: May 12, 2013
Location: Dallas, TX

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

FINGSCAN V 1.2 is uploaded at http://www.perceptiveautomation.com/filelib/index.php?keywords=fing

new :
1. enables indigo trigger on new (unknown) devices attached to the network
2. added info on number of connect/disconnect per device
3. added many checks if things are going correctly, ie checking fing std out and error messages
4. structured program better
5. "readme" gives examples how to set up trigger, schedule, using the information:
- new unknown device attached to network, ....... using trigger
- specific device not connected for xx minutes, .... using trigger
- several devices not connected for xx minutes, ... using scheduled action



Karl

Posted on
Mon Oct 07, 2013 9:34 pm
richy240 offline
Posts: 110
Joined: Jul 08, 2012

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

I haven't tried this yet, but it looks pretty awesome. I do have a question though...

Is this method susceptible to the wifi "time-out" issue iDevices have? It's not really an issue so to speak, but the behavior where your wifi network connection is dropped when the network is not in use, and reconnects as necessary.

So, if Fing is scanning the network for connected devices, and one isn't there because it's dropped its network connection, does this somehow compensate for that? (I'm thinking no, but I thought I'd ask. This was one of my primary complaints with Smartphone Radar, since iOS displays some really interesting patterns when you shorten home/away window.)

Posted on
Mon Oct 07, 2013 11:37 pm
kw123 offline
User avatar
Posts: 6343
Joined: May 12, 2013
Location: Dallas, TX

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

Here is my understanding how fing &fingscan works:

1. fing is listening on a low level to network traffic coming by the ethernet card. If a device that is currently marked as down an entry is made into the finglog file (mac# ip# up). Same if there is a new device not known to fing. "fingscan" checks if there is any change to finglogfile every 5 seconds. It then reads the last line of finglog and updates ipDevicenn accordingly and increments variable ipDevcsNoOfDevices if there is a new device.

2. In addition every minute fing is sending out pings to all fing-known devices (in my network fing takes about 5 seconds to get answers / no answer from all 28 devices). If a device is answering that device is marked as "up". If the device is not answering, "down" is marked in file fingdata.
Fingscan checks the time stamp of fingdata, if changed reads it and updates the variables ipDevicenn list & ipDevcsNoOfDevices (mostly "down" as the "up's" are discovered quicker through listening to traffic coming by).

Observing Iphone and Kindle, it looks to me that when connected to a power supply wifi goes up every ~12 minutes for ~ 30 seconds and then down again. When not connected to a power supply the intervals seem to be longer (have not measured exactly how long).

To shed light on it fingscan adds # of up/down changes to the ipDevicenn variable.

So to make this useful one should wait ~ 15 minutes (after signal is down with eg delayed trigger, see read me file) to determine if an iphone is not present in the house anymore.

Better result would be achieved with listening to 2 devices as they are on a different schedule to reduce the wait period - see readme file.

I guess 10-15 minutes is the minimum time period to make a decision if a device is away. if the devices would do it much more often likely the battery of the device would be drained to quickly. New devices with low power bluetooth might change that in the future.

For me the really interesting feature is that by checking variable ipDevsNoOfDevices for "any change" one can set a trigger to warn if there is a new device attached to the network even if it is only for a few seconds.

hope that helps

Karl

Posted on
Tue Oct 08, 2013 8:53 pm
richy240 offline
Posts: 110
Joined: Jul 08, 2012

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

It does help, greatly. Thank you very much! :D

Posted on
Sun Oct 13, 2013 9:48 am
wileyone offline
Posts: 14
Joined: Sep 04, 2013

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

First off - Thanks very much for doing this work. This is exactly what I was looking for to detect smartphone devices on my home network since I have an uncooperative router and couldn't use Travis' excellent Smartphone Radar.

A comment or two...
1. When I began setting triggers, I found that I did not have to include the semicolon associated with the variable values of 'up' or 'down'. I simply entered them as up or [u]down[u] with no quotes or anything (underlines added at left for emphasis). Maybe I misinterpreted your instructions in the Readme - but thought I would just give you an FYI...

2. Do you have any plans to add variables that would be along the lines of Travis' work that include things such as "All Phones Away"? I've worked around it by using multiple conditions in the triggers and creating my own variable, but if there was a grouping such as this it would be very handy. I would see it being used for it for things such as - "when we all are gone, adjust the thermostat setting", etc.

3. I'd love to hear from everyone in this forum regarding the creative things they are doing with this and/or Smartphone Radar. I'm simply using it at this point for thermostat and lighting control, but there is probably more creative stuff going on.

Thanks again.

Posted on
Sun Oct 13, 2013 10:56 am
kw123 offline
User avatar
Posts: 6343
Joined: May 12, 2013
Location: Dallas, TX

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

Yes, you are correct the ";" is not needed. --but-- The trigger condition "contains" looks at the whole string of the variable. As it contains some free text (vendor, name of device...) you might have the string "up" in e.g. vendor "upscale" device name "updated-phone". That would create always true for up-- Just to be 101% sure.

As for other conditions: there you get into all kinds of variations and it will be difficult to support.
1. which one is the device you would like to track
2. do you want to track multiple devices
3. are there any links between these devices (and or ..)
4. what are time-outs you would like to use. Some devices behave differently in terms of connect / disconnect cycles
5. cycle times differ if running on battery or connected to power
6. you might want to change the trigger depending on day / night (if you are at home and sleeping at night) and the devices is "down" too long you might not want to change the away status.
..

Again: FINGSCAN is meant to deliver "raw" information to Indigo you can use to set up your triggers as you see fit.


Karl

Posted on
Sun Oct 13, 2013 11:18 am
wileyone offline
Posts: 14
Joined: Sep 04, 2013

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

I had thought that might be the reason for calling out the semicolon. Thanks for the clarification.

Re: other elements - I understand completely. Not a problem. I can certainly work with the raw info.

Thanks again. This is good stuff. :mrgreen:

Posted on
Sun Oct 13, 2013 11:50 am
kw123 offline
User avatar
Posts: 6343
Joined: May 12, 2013
Location: Dallas, TX

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

:oops: actually the condition ";up" would also be triggered by ";upscale" ... ;) to be 200% sure use ";up;"

Posted on
Sun Oct 13, 2013 12:19 pm
wileyone offline
Posts: 14
Joined: Sep 04, 2013

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

Indeed... :lol:

Page 4 of 32 1, 2, 3, 4, 5, 6, 7 ... 32

Who is online

Users browsing this forum: No registered users and 1 guest