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 »

thanks
edit: see next post
please download this one, has some more debug info

could you run it with debug checked in plugins/fingscan/config

and send me the log file ..you might want to delete the lines with passwords
edit:- and # of ipDevices you have

Karl
Last edited by kw123 on Sun Jan 12, 2014 7:44 pm, edited 1 time in total.
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 »

edit: see next post
lroust : for testing please use this one, has some for debugging output

Karl
Last edited by kw123 on Sun Jan 12, 2014 7:44 pm, edited 1 time in total.
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/w58a3ijimcdaj ... Plugin.zip


with lots more more error control and debugging enabled
will check input data consistency and for other issues
will also convert from old data format to new one


Karl
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

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

Post by jalves »

I'm not able to get the plug-in version working.

Code: Select all

Jan 13, 2014, 12:32:50 PM
  Enabling plugin "fingscan 3.0.8"
  Starting plugin "fingscan 3.0.8" (pid 75919)
  Started plugin "fingscan 3.0.8"
  fingscan                        startup called
  fingscan                        inititializing fing
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan                        inititializing fing
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan                        inititializing fing
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan                        inititializing fing
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Disabling plugin "fingscan 3.0.8"
  Stopping plugin "fingscan 3.0.8" (pid 75919)
  fingscan                        stopConcurrentThread called
  fingscan                        stopConcurrentThread called
  fingscan                        shutdown called
  Stopped plugin "fingscan 3.0.8"
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
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 »

could you be so kind and check if "fing.bin" is running in "activity monitor" ( in spotlight start activity monitor )

AND have you entered your password in plugins/fingscan/configure?

edit: and please set debug to on in plugins/fingscan/configure
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

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

Post by jalves »

I checked the Activity Monitor on the machine Indigo is running on and fing.bin is running as root

My password is entered correctly in the plugin.

Here's the debug output for a few cycles

Code: Select all

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan                        inititializing fing
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Reloading plugin "fingscan 3.0.8"
  Stopping plugin "fingscan 3.0.8" (pid 76622)
  fingscan                        stopConcurrentThread called
  fingscan                        stopConcurrentThread called
  fingscan                        shutdown called
  Stopped plugin "fingscan 3.0.8"
  Starting plugin "fingscan 3.0.8" (pid 76693)
  Started plugin "fingscan 3.0.8"
  fingscan                        startup called
  fingscan Debug                   my pid: 76693
  fingscan Debug                  indigo variables initialized
  fingscan Debug                  indigo initialized
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  fingscan Debug                  get password done
  fingscan                        inititializing fing
  fingscan Debug                    fing pid= 3031 3032 3033
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 950, in runConcurrentThread
  File "plugin.py", line 345, in getfingLog
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 139, in getsize
<type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/Users/Jeff1/Documents/fing/fing.log'

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Disabling plugin "fingscan 3.0.8"
  Stopping plugin "fingscan 3.0.8" (pid 76693)
  fingscan                        stopConcurrentThread called
  fingscan                        stopConcurrentThread called
  fingscan                        shutdown called
  Stopped plugin "fingscan 3.0.8"
Thanks for your hard work on this!
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
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/tkxno8vuiuetb ... Plugin.zip

please try this one... does not fix the error, but tolerates it.

please do the following:
1. in activity monitor quit fing.bin
2. install new fingscan.plugin

and thanks for the feedback

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/q0o3ah7o5xl7o ... Plugin.zip

ok this one will try to handle different issues with fing:
- if no output generated: kill old fing instances and restart new one with proper parameters
- check if anything returns an error (have covered most places)
- try to recover and restart.

Karl
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

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

Post by jalves »

Sorry I didn't get around to testing the .09 version. Just downloaded the .10 version and will test in the next hour or so.
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

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

Post by jalves »

Just tried the .10 version and it seems to be working fine now. I did go into activity monitor and killed the running Fing.bin and Fingscan instances first. Then installed the new plugin, got verbose debug logging but nothing that looked like an actual error. I turned off the debug feature and the plug-in appears to be working fine. My device variables are updated with current data so I'd call this one good.

Just for the record, my server machine is a MacMini with 16G of memory running OSX 10.9.1, Indigo 6.0.7.

Thanks again!
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
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 »

thanks for the feedback

one question: are you also using smartphone radar? there might be a conflict in how fing is used.
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

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

Post by jalves »

kw123 wrote:thanks for the feedback

one question: are you also using smartphone radar? there might be a conflict in how fing is used.
As a matter of fact, I do also have smartphone radar. I run both but so far I'm not actually using the info for triggers, etc. I'm still getting to know all this stuff and like to monitor things for a while manually before implementing actions based on these triggers.

Not sure which I'll use, the Fing Plugin or Smartphone Radar when I do implement actions. I'm saving that decision for after I move into my new house and have things up and running there. I anticipate a bit of trial and error just getting things in the new house to function with my basic setup and would prefer not to introduce another variable while I do that. :D
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
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 »

here is the conflict:

fingscan uses 3 files from fing:
- the regular table view of all data ==> fing.data
- the event log, e.g a device connects ==> fing.log ++ very fast way to detect a new or up device ~ 2 seconds ++
- any other fing output i.e. error messages ==> fingeror.log
all these files are read and analyzed by fingscan to improve speed and error handling.

all of them are stored in /users/yourid/Documents/fing

smartphoneradar uses one file, I believe, in /users/yourid/

you could have 2 fing running in parallel, some overhead but it works.

now fingscan checks if fing is already running,
- if not it starts it.
- if it is running it will check if there is any new output generated by fing. if not (after 2 minutes) it "kills" all fing processes and starts fing new with setup for fingscan. That will kill also the fing instance for smartphoneradar.

That WILL disable fing for smartphoneradar.

you might say: why don't you guys get together and work it out ....


Karl
i hate the spellchecker fing always gets replaced by ring
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

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

Post by jalves »

Appreciate the additional info. I'll pay attention to which variables are updated and when between the two plug-ins.
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
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 »

fingscan and smartphone coexistence:

here an easy solution:

in smartphoneradar use the following directory for fing (see attached screenshot, used my userid)
/Users/karlwachs/Documents/fing/fing.data

then both can coexist and share data. (fingscan should be started first to make sure fing is running properly, smartphoneradar assumes you start fing outside smartphoneradar )

Karl
Attachments
smpr.tiff
smpr.tiff (120.65 KiB) Viewed 4761 times
Last edited by kw123 on Tue Jan 14, 2014 1:10 pm, edited 1 time in total.
Post Reply

Return to “User Plugins”