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.
philc
Posts: 156
Joined: Tue May 17, 2011 8:36 pm

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

Post by philc »

Karl,
I think I just fixed it.
I stopped and restarted the plugin and got the following:
Starting plugin "fingscan 4.10.7" (pid 15639)
Started plugin "fingscan 4.10.7"
fingscan FINGSCAN--V 4.10.7 initializing will take ~ 2 minutes...
fingscan indigo variables initialized
fingscan Error Error in plugin execution startup:

Traceback (most recent call last):
File "plugin.py", line 198, in startup
File "plugin.py", line 1861, in getIndigoIpVariablesIntoData
<type 'exceptions.ValueError'>: invalid literal for int() with base 10: 'phone-xyz'

fingscan Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2653, 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)
So I then went to my variable list and deleted the variable for 'phone-xyz' because it had text in the column where all the others had channels.

Stopped and restarted the plugin, and then got:
Starting plugin "fingscan 4.10.7" (pid 15667)
Started plugin "fingscan 4.10.7"
fingscan FINGSCAN--V 4.10.7 initializing will take ~ 2 minutes...
fingscan indigo variables initialized
fingscan loaded indigo data
fingscan FING initializing
fingscan FING initialized .. created new data waiting ~ 1 minute for stable operation
fingscan settings: iDevicesEnabled False
fingscan settings: inbetweenPingType 0
fingscan settings: wifiRouter 0
fingscan settings: wait seconds between cycles 5
fingscan settings: password entered True
fingscan

fingscan printEvents: no EVENT defined


Sep 14, 2014, 9:50:59 AM
fingscan FINGSCAN initialized
Now I can save the configuration info.

So it appears that a bad variable cause the plugin to throw an error and not work properly. Will let this run for a while before I bother you again.
Best,
Phil
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 send me the log file anyway Would like to understand why it failed to start.
You should see some devices created in a folder called ipdevices.


Sent from my iPhone using Tapatalk
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 »

sorry, just saw your posting with the error... was not visible on my iPhone. ignore my previous posting
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/mteejj86yaff6 ... 8.zip?dl=0 v 4-10-8

fixed:
reading a bad ipDevicexx variable, catching error for non integer values in column # of changes.

Philc , thanks for pointing out the error.

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/fkpp2vkjz0vla ... 9.zip?dl=0 v-4-10-9

fixed:
found 2 more text to integer conversions that COULD go wrong if there is bad data in the variables..
they are covered now.


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 »

Hi Karl,

I think there's another issue has crept in, either in 4.10.9 or prior.

Code: Select all

  fingscan Error                  Error in plugin execution shutdown:

Traceback (most recent call last):
  File "plugin.py", line 356, in shutdown
  File "plugin.py", line 1545, in killFing
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'yourPassword'

Code: Select all

  fingscan Error                  Error in plugin execution runConcurrentThread:

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

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
When I pop into settings even if I make now changes saving out fails - a red warning appears saying that I need to make a change to the section in red, or words to that effect, except no section is in red.

I've rolled back to version 4.7.1 and all is ok now.

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 »

as soon as you get this kind of error everything after that is not predictable, i.e. also the user interface (UI) messages will indicate bad data, although its a program issue.

for those who would like to understand:
if everything is ok the UI program does a
"return true, valuesDict"
if it goes wrong (i.e. an program error) the UI just stops and does not return True, xxx hence indigo thinks there is an error with the data which is indicated by
"return False, ... "


will fix asap.
Last edited by kw123 on Sun Sep 14, 2014 4:10 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 »

could you get me the log file when fingscan starts i.e. if password is set, or are there any other messages before?
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/927ys1kx4dgzj ... 0.zip?dl=0 v4-10-10

added a quicker debugging option: in the Menu you can toggle debug OFF/FullON (it has 4 different levels)
added self.password ="" in the beginning of the code to ensure the password is set, but that should not be needed anyway..

Simon: could you install v ..10 and toggle debug ON in the plugin/fingscan menu
It will create a LOT of output, but should catch the "real" error.
The message "'Plugin' object has no attribute 'yourPassword'" is not the root cause, just a downstream error.


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 »

Hi Karl,

Installed 4.10.10 and toggled debug on and this is all the output I get, which keeps repeating every 10 seconds.

Code: Select all

fingscan                        command: debug set to ON
  fingscan Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2672, 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)
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 »

and there is NO message before that??
like starting finscan ....


added some more debug statements and some more basic init statements for variables. (they all should be initialized as part of the normal startup..)
https://www.dropbox.com/s/5lo11p1xu5lh1 ... 1.zip?dl=0 v 4-10-11

Shutter: could you be so kind and try this one?

thanks

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 »

Hi Karl,

Here you go. (That's me xxxxxxxxxxxxxxxxxx the output).

Code: Select all

Stopped plugin "fingscan 4.10.11"
  Enabling plugin "fingscan 4.10.11"
  Starting plugin "fingscan 4.10.11" (pid 74006)
  Started plugin "fingscan 4.10.11"
  fingscan                        FINGSCAN--V 4.10.11   initializing     will take ~ 2 minutes...
  fingscan                        killing ping jobs: all
  fingscan                        indigo variables initialized
  fingscan Error                  Error in plugin execution startup:

Traceback (most recent call last):
  File "plugin.py", line 173, in startup
<type 'exceptions.ValueError'>: empty string for float()

  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan                        dev start called for xxxxxxxxxxxxxxxxxx
  fingscan Error                  Error in plugin execution runConcurrentThread:

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

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

15 Sep 2014 8:12:13 pm
  fingscan Error                  Error in plugin execution runConcurrentThread:

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

  fingscan Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Hope it helps.
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/ld6xyw0moy0la ... 3.zip?dl=0 v-4-10-13

13 is the lucky number.. :?

added more checks on non initialized Configuration variables.

Shutter: could you be so kind and try again..

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 »

Hi Karl,

How much of this do you need, it goes on forever.

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 »

I can't reproduce the error. Trying to understand what is not working. Anyway: whatever you like to do is fine.


Sent from my iPhone using Tapatalk
Post Reply

Return to “User Plugins”