Fing won't show some device(s). How can I recover

Posted on
Thu Aug 16, 2018 11:56 am
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Fing won't show some device(s). How can I recover

IP 192.168.0.10 is my Airport Express.
It used to show up properly, but since I "Reset All Devices" last week, it has disappeared.

I can see it the the fing.log:
Code: Select all
2018/08/16 00:19:19;up;192.168.0.10;;;F0:D1:A9:0C:72:44;

but it doesn't show up when I "save ipDevices to file" or in the indigo devices window.

One other device also disappeared (a MacBook Pro). 23 other devices are behaving just fine, including another Mac, 2 iPhones, 2 iPads, etc.
.
How can I figure out what black hole these disappeared into and recover them?

Posted on
Thu Aug 16, 2018 12:15 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: Fing won't show some device(s). How can I recover

My bad. Looks like I have a bug in an event script (from the indigo log):
Code: Select all
  Trigger                         new device discovered
   Embedded script executor host started
   Script Error                    embedded script: 'key name FingEventDevChangedIndigoId not found in database'
   Script Error                    Exception Traceback (most recent call shown last):

     embedded script, line 3, at top level
KeyError: 'key name FingEventDevChangedIndigoId not found in database'


What variable can I use to get the indigo device ID, so I can log(email) other details about it?

PS I'm running fingscan version 7.29.31, which I believe is the latest.

Posted on
Thu Aug 16, 2018 2:42 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: Fing won't show some device(s). How can I recover

posted a new version v7.29.32 on GitHub.com/kw123/fingscan (should show up in plugin store soon )

it will populate 2 variables:

ipDevsLastDevChangedIndigoName shows the indigo device NAME with last status change
FingEventDevChangedIndigoId shows the indigo device ID that triggered a finscan EVENT

hope that helps

Karl

Posted on
Fri Aug 17, 2018 9:48 am
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: Fing won't show some device(s). How can I recover

Using the indigo console, I don't see either of those variables:
>>> print indigo.variables['ipDevsLastDevChangedIndigoName']
Traceback (most recent call last):
File "<console>", line 1, in <module>
KeyError: 'key name ipDevsLastDevChangedIndigoName not found in database'
>>> print indigo.variables['FingEventDevChangedIndigoId']
Traceback (most recent call last):
File "<console>", line 1, in <module>
KeyError: 'key name FingEventDevChangedIndigoId not found in database'

I do see :
>>> print indigo.variables["ipDevsNewDeviceNo"]
description :
folderId : 1147016421
globalProps : MetaProps : (dict)
id : 1496645261
name : ipDevsNewDeviceNo
pluginProps : emptyDict : (dict)
readOnly : False
remoteDisplay : True
value :
>>> print indigo.variables["ipDevsNewIPNumber"]
description :
folderId : 1147016421
globalProps : MetaProps : (dict)
id : 591831393
name : ipDevsNewIPNumber
pluginProps : emptyDict : (dict)
readOnly : False
remoteDisplay : True
value :

which are empty at present because no event has triggered.
Is there another way to access the two variables you mentioned?

Posted on
Fri Aug 17, 2018 10:01 am
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: Fing won't show some device(s). How can I recover

Did you upgrade to the latest version


And check out the indigo variables view.
If the variables are there you can access them in a script


Good practice is
Code: Select all
try:
   Do your thing
except:
   Indigo.server.log(“error”)# you can be more specific




Sent from my iPhone using Tapatalk

Posted on
Fri Aug 17, 2018 1:38 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: Fing won't show some device(s). How can I recover

this will show the state (status) of the fingscan device that changed last
Code: Select all
devName = indigo.variables['ipDevsLastDevChangedIndigoName'].value
if len(devName) > 0:
    dev   = indigo.devices[devName]
    state = dev.states["status"]
    indigo.server.log(state)

and this one the same for the FINGEVENT (this one uses ID not name!!)
Code: Select all
devID = indigo.variables['FingEventDevChangedIndigoId'].value
if len(devID) > 0:
    dev   = indigo.devices[int(devID)]
    state = dev.states["status"]
    indigo.server.log(state)

Posted on
Fri Aug 17, 2018 5:11 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: Fing won't show some device(s). How can I recover

Yes, I have the latest version of fingscan:
versionCheck for com.karlwachs.fingscan installed: 7.29.31
.

Yes I'm familiar with the variable view window. It doesn't show either of the two variables you mention, only these similar names in the "folder IP Devices": ipDevsLastUpdate, ipDevsNewDeviceNo, ipDevsNewIPNumber, ipDevsNoOfDevices.

I browsed your code. I see where you create and delete the variable 'FingEventDevChangedIndigoId'
if init:
try: indigo.variable.delete("FingEventDevChangedIndigoId")
except: pass

try:
indigo.variable.create("FingEventDevChangedIndigoId",folder=self.FINGscanFolderID)
except: pass


I think "self." in the above is an error. FINGscanFolderID is used as a local variable in other places. I don't see it being created as an object member. That would explain why I don't see it -- it's being put into an undefined folder.

Also, I can't find any mention of 'ipDevsLastDevChangedIndigoName' in plugin.py. You must have meant one of those I listed above.

Posted on
Fri Aug 17, 2018 5:45 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Fing won't show some device(s). How can I recover

Then you likely you do not have the latest version. May be I have posted an old one.
I am out. Back in 2 hours.

Sent from my iPhone using Tapatalk

Posted on
Fri Aug 17, 2018 8:18 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: Fing won't show some device(s). How can I recover

indeed on the plugin store was v7.29.31 and on GitHub the latest7.29.32. sorry for that, somehow I forgot to push from GitHub to indigo store.

please download .32. the variables should all work

Karl

Posted on
Sat Aug 18, 2018 8:51 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: Fing won't show some device(s). How can I recover

jtburgess... does it work for you now?

Posted on
Mon Aug 20, 2018 3:27 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: Fing won't show some device(s). How can I recover

I'm now running the latest
Started plugin "fingscan 7.29.32"
:)

and I can see both variables we've been discussing.

Thanks!

Now I need to rework my Actions to use the new info.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests