Using Fing as a new way to detect smartphone presence

Plugins that users have built. NOTE: plugins that were developed for Indigo versions older than 2022.1 will have to be updated to work with Indigo 2022.1 (Python 3 - see this blog post for details). If the plugin listed here is not in the Plugin Store (which will show updated plugins) then you will need to ask on the appropriate thread below if it has been updated and where you get get the update.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

next version:

I have my asus router integrated. FINGSCAN now uses
-fing
-ASUS router info
-find my iDevcies
to determine up/down, home away ..

Also in the next release: each ipDevice will be its own indigo device. That will make it easier to trigger, sort, rename ...

If you can supply me with your router status page info I can try to include the info in the plugin:
I would need
- http://x.x.x.x/ >>>page address<<,
- the page dump (in safari or chrome go to view source code) to check if I can incorporate the info.

attached the page from an ASUS 68 and my view source code with the relevant section.

Code: Select all

textarea cols="63" rows="30" style="width:99%;font-family:'Courier New', Courier, mono; font-size:13px; background:#475A5F;color:#FFFFFF" readonly="readonly" wrap=VIRTUAL>SSID: "2"
RSSI: 0 dBm	SNR: 0 dB	noise: -89 dBm	Channel: 6
BSSID: D8:50:E6:CF:B4:E0	Capability: ESS ShortSlot 
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
VHT Capable:
	Chanspec: 2.4GHz channel 6 20MHz (0x1006)
	Primary channel: 6
	HT Capabilities: 
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ]
	VHT Capabilities: 
	Supported VHT (tx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
		NSS: 3 MCS: 0-9
	Supported VHT (rx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
		NSS: 3 MCS: 0-9

Mode	: AP Only

Stations List                           
----------------------------------------
MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time
F8:27:93:59:9D:B2 Yes        Yes         -73dBm Yes Yes No        1M     24M 00:59:03
28:10:7B:0C:CB:52 Yes        Yes         -71dBm No  Yes Yes    72.2M   72.2M 20:24:24
28:10:7B:0C:CB:4B Yes        Yes         -72dBm No  Yes Yes    72.2M     52M 30:52:14
F0:F6:1C:D5:51:16 Yes        Yes         -53dBm Yes Yes Yes   144.4M  144.4M 37:03:59
F0:7D:68:08:5F:D0 Yes        Yes         -43dBm No  Yes Yes    72.2M    6.5M 37:04:03
2C:76:8A:BF:51:A1 Yes        Yes         -66dBm No  Yes Yes    72.2M   72.2M 37:04:04

SSID: "5"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 149/80
BSSID: D8:50:E6:CF:B4:E4	Capability: ESS 
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
VHT Capable:
	Chanspec: 5GHz channel 155 80MHz (0xe09b)
	Primary channel: 149
	HT Capabilities: 
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ]
	VHT Capabilities: 
	Supported VHT (tx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
		NSS: 3 MCS: 0-9
	Supported VHT (rx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
		NSS: 3 MCS: 0-9

Mode	: AP Only

Stations List                           
----------------------------------------
MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time
D8:A2:5E:63:7D:DF Yes        Yes         -73dBm Yes No  No       65M     39M 37:04:00

</textarea>
</div>
<div class="apply_gen">
<
Attachments
Screen Shot 2014-07-30 at 12.25.24 PM.png
Screen Shot 2014-07-30 at 12.25.24 PM.png (125.98 KiB) Viewed 5768 times
Shutter
Posts: 345
Joined: Fri Mar 07, 2014 7:11 am
Location: London, UK

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

Post by Shutter »

Hi Karl,

Been using your fingscan plugin for a while now and it's been working really well. thanks for that. I've now installed the updated version and the connection with Smartphone Radar is still working ok, I'm now trying to get it to work with FMID and I'm unsure what to select in the fingscan configuration window for the …device name in iDevice option.

Per iPhone I have 2 devices set in Indigo - 1. iDevice Registration and 2. Apple ID login information. Lastly I have a FMID Map Location device with my home location.

I've also set up a trigger with a finsgscan type to send a Pushover action.

Which one does one select in the aforementioned fingscan configuration window?

Thanks

Simon
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

select the "findmyiDevice" devices (one after the other), move up the lover part of the screen, the correct one should show
-Accuracy=
-AppleID=
...
-DistanceAway = .. <++++++ this must be here
- Longitude =
...


But it should offer you only the eligible ones in the menu anyway (the current one is shown twice, once as the current selected and once as part of the overall list)

Karl
Shutter
Posts: 345
Joined: Fri Mar 07, 2014 7:11 am
Location: London, UK

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

Post by Shutter »

Karl,

I thick I've selected the correct one. In the fingscan configuration window I see all the FMID devices - the home location device, the Apple ID login, and the iDevice Registration. But I see that the last one is the one the custom states you specified, i.e. DistanceAway.

I'll do some testing now to see how it all works. I suppose using fingscan and FMID means I can do without Smartphone Radar, correct?

Simon
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

smartphoneradar is exposing the info from either FING or your router info. (I believe that is true.)
As for FINGSCAN: it combines the info from FING AND "find my iDevice" .. and in the next version ALSO info from an ASUS router if you have one.


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

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

Post by Dewster35 »

Perhaps just a coincidence, but has anyone seen a hit to their smartphone battery life when running fing?
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

Fing is listening to network traffic continuously. Then once a minute it sends a ping to each device it knows. Don't think that should create a problem.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

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

Post by Dewster35 »

Ok. For the every minute ping, is this a value that can be changed by the user for test purposes?
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

I have found no OBVIOUS parameter in FING that could change that. Their manual for FING is VERY short and the config files are not clear to me.
The config file is "/usr/share/fing/template/conf/discovery.properties". If you want to dig deeper you could change may be "profile.default.data-link.round.interval=60000" to 30000
It should be in milliseconds: 60000 then would be 1 minute and 30000 is 30 seconds. just try it out. should be no harm.
For testing you have to
-stop FINGSCAN,
-kill FING in activity monitor,
-edit the file (with e.g. text wrangler not textedit!!) save it
-and restart FINGSCAN. Or use FING directly: open in terminal, type: "sudo fing" then enter your mac password and watch the repeat frequency. To stop type cntrl-c

They sell a complete package to monitor multiple networks. FING is just a small part of it (sentinel) they give away for free to entice you to buy the full package.
Also posted a question on their website, but no answer.. I am not a paying customer
If you can find out how let me know.

Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

https://www.dropbox.com/s/3ntw3hkh8o5zk ... -4-6-1.zip v 4-6-1

NEW:
1) each ipDevice is now a device in indigo in a folder ipDevices.
you can sort for name, ip number, MAC number (and state somewhat... Matt/Jay need to enable value sort in this column. Indigo currently sorts status "type" -- would be really nice if that static value sort could be added.. :D )
the columns are:
--- name of ipDevice
--- status and date of last change
--- ip number and Wifi info
--- MAC number of device
2) reads ASUS 6x router wifi information
3) shows if the ipDevice is connected through wifi and which channel (if you have an ASUS router)
improves the recognition of a device in power save mode (sleeping iPhone). FING will likely set a sleeping iPhone to "down" mode while the router is still recognizing the connection.
FING actually is not slower than the router in recognizing a NEW or UP device (within a second accuracy)
If the router info is present it will overwrite the FING information.
Iif you want to supply your router info, I can add a connection to use that information.
4) you can create an action or schedule .. and select FINGSCAN action and select an ipDevice to ping. Results will be shown in the log file.. this is just a trial to see if one could use this for other purposes....

No change in EVENTS.
In config just the added fields to configure the router info.

how to use / install:
1) download zip
2) before you upgrade, clean up your device variables especially the "nickname". If nickname exists (and is unique and not iPhone-xyz) FINGSCAN will use it to name the device. If not, the name will be "MAC-macnumber" (you can change the name later in the device edit menu, also the vendor and device info can be edited in the device editor)
3) do a save to disk from the FINGSCAN menu, just in case. ... If you don't like it:. reinstall old version, delete all devices and reimport old data from disk.
4) double click on the plugin in your download folder and watch whats happening:
the new FINGSCAN will read the ipDevice variables and will create devices for each variable in a folder ipDevices
After that the variables are just output and any change will be overwritten. Master sources are the ipDevice, FING and the router -- it would be very difficult to maintain if you could modify the same info in 2 places.

Karl

2 weeks of work..
hopefully not too many bugs.. tested add, delete, sort, save to disk, restore from disk , rename, duplicate ....

as you can see I keep every device ever connected..
as for details: see the 3 digits in the last octet of the IP number.. changed 192.168.1.7 to 192.168.1.007 just for the display to make the sorting better
Attachments
Screen Shot 2014-08-02 at 1.05.16 AM.png
Screen Shot 2014-08-02 at 1.05.16 AM.png (233 KiB) Viewed 5660 times
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

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

Post by autolog »

I am having a few problems setting this up - probably the way I went about it :wink:

I downloaded and installed fingscan 4-5-2. The config dialogue came up and I cancelled it without entering any info. I then installed fingscan 4-6-1 and now the Plugin is in a failing loop.
At this time I hadn't downloaded and installed Fing (which I have now).
The error message I am getting is:
Starting plugin "fingscan 4.6.1" (pid 5667)
Started plugin "fingscan 4.6.1"
fingscan FINGSCAN--V 4.6.1 initializing will take more than one minute...
fingscan loaded indigo data
fingscan Error ----------------------------------------------------------------------------------
fingscan Error password error please restart
fingscan Error ----------------------------------------------------------------------------------
Z-Wave Error no ack/nak/busy reply (033) for goToSleep (re-sending)
fingscan Error --> while loop break <-- error in logic or variables mixed up ... stopping ... quitNOW was:yes
Reloading plugin "fingscan 4.6.1"
Stopping plugin "fingscan 4.6.1" (pid 5667)
fingscan stopConcurrentThread called 2
fingscan stopConcurrentThread called 3
fingscan shutdown called
Stopped plugin "fingscan 4.6.1"
Starting plugin "fingscan 4.6.1" (pid 5716)
Started plugin "fingscan 4.6.1"
fingscan FINGSCAN--V 4.6.1 initializing will take more than one minute...
fingscan loaded indigo data
fingscan Error ----------------------------------------------------------------------------------
fingscan Error password error please restart
fingscan Error ----------------------------------------------------------------------------------
fingscan Error --> while loop break <-- error in logic or variables mixed up ... stopping ... quitNOW was:yes
Reloading plugin "fingscan 4.6.1"
I have deleted the Plugin and restarted the Indigo server and re-installed the Plugin and am still getting the error.
I never get the chance to enter the password as I can't get into the plugin configuration dialogue :(
Vaillant
Posts: 105
Joined: Sun Nov 06, 2011 7:56 am
Location: Belgium

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

Post by Vaillant »

Hi,

Getting errors after installing v4.6.1. and doing some cleanup.

Greetings,
Adrian

Code: Select all

  fingscan Error                  Error in plugin execution startup:

Traceback (most recent call last):
  File "plugin.py", line 169, in startup
  File "plugin.py", line 2386, in checkDEVICES
<type 'exceptions.ValueError'>: invalid literal for int() with base 10: '11-changed'

  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2128, in runConcurrentThread
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'updatePrefs'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Error                  Error in plugin execution runConcurrentThread:
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

https://www.dropbox.com/s/mpusyg9ovo98x ... n4-6-3.zip v 4-6-3

Adrian: this should fix your problem
autolog: this will not go into endless loop. It should give you time to enter your password. BUT I could not really test your specific situation.

Karl
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

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

Post by autolog »

kw123 wrote:...
autolog: this will not go into endless loop. It should give you time to enter your password. BUT I could not really test your specific situation.
Thanks for the quick fix - I am now able to enter the password and am up and running :)
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

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

Post by kw123 »

Any other issues?
Post Reply

Return to “User Plugins”