Latest Version 1.02.03 - Bug Fix

Posted on
Sun Nov 15, 2015 5:22 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Latest Version 1.02.03 - Bug Fix

Hi all

This is a bug fix release to resolve the following error identified by one of our users.

    iFindStuff Error Error in plugin execution runConcurrentThread:

    Traceback (most recent call last):
    File "plugin.py", line 3606, in runConcurrentThread
    <type 'exceptions.UnboundLocalError'>: local variable 'iUpdateCycle' referenced before assignment

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

This error was caused by users who hadn't specified a Mac Directory to save maps in the iFindStuff configuration dialog. Perfectly normal if you're not using the maps feature of course! However, if you want to use tracking you must specify a directory in the configuration for iFindStuff to save the resulting tracking data. Actually I should have seen this issue and got the plugin to exit gracefully with a proper message - but I hadn't considered the scenario :oops: It's now added to my test log. The feature to switch tracking on and off also works correctly when you check the relevant field in the iFindStuff configuration dialog so that's a plus :D

You can download the latest version (1.02.03) from this link:

https://www.dropbox.com/s/vtnxa5ssxvroga2/iFindStuff.zip?dl=1

Back to working on a new cool feature - something that could be useful honestly!

Mike

Posted on
Sun Nov 15, 2015 5:53 am
TOPS offline
User avatar
Posts: 169
Joined: Jun 17, 2015
Location: London, England

Re: Latest Version 1.02.03 - Bug Fix

:? Hi Mike,

Thanks for the new Bug Fix, something completely unrelated, was just looking through the Device States & Variables on my iP6, can you tell me what the below means and what it can be used for?

Keep up the good work

Regards,

Dave
Attachments
2015-11-15 11.40.37.png
2015-11-15 11.40.37.png (66.62 KiB) Viewed 6212 times

Posted on
Sun Nov 15, 2015 6:11 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.02.03 - Bug Fix

TOPS wrote:
:? Hi Mike,

Thanks for the new Bug Fix, something completely unrelated, was just looking through the Device States & Variables on my iP6, can you tell me what the below means and what it can be used for?

Keep up the good work

Regards,

Dave


Sure

The update frequency of a given device can either be calculated (default) or driven by a value contained in the [NAME OF DEVICE]FREQ variable. This was a request from a user a few weeks ago and is used mainly for links with FINGScan. When you define an action group and use an iFindStuff command you have a number of options:

Screen Shot 2015-11-15 at 12.03.27.png
iFindStuff Commands
Screen Shot 2015-11-15 at 12.03.27.png (40.09 KiB) Viewed 6203 times


The last three commands allow you to change the way that the update frequency is worked out - Calculated (as default) or Variable. If you set a device to be managed by a variable it uses the refresh value in the associated variable for that device otherwise it calculates the next update based on the factors that are set in the Device Configuration.

This feature could be used if you wanted to check a device every min at a specific time of day or if you wanted another event in some other part of Indigo to trigger a more regular update for a period.....

Regards

Mike

Posted on
Sun Nov 15, 2015 6:15 am
TOPS offline
User avatar
Posts: 169
Joined: Jun 17, 2015
Location: London, England

Re: Latest Version 1.02.03 - Bug Fix

:D Hi Mike,

Thanks for the quick and concise explanation, Thats sorted that out for me,

Cheers,

Dave

Posted on
Sun Nov 15, 2015 5:16 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Latest Version 1.02.03 - Bug Fix

mike,
none of my devices updates the distance to home anymore. There are stuck at the same distance. Looking at the log file:
Code: Select all
  iFindStuff                      Updating: iphone 6+ Karl this time
  iFindStuff                      Refreshing Apple Device...iphone 6+ Karl on account kw account
  iFindStuff                      Setting up the API...
  iFindStuff                      Standard API fields set up correctly...
  iFindStuff                      Updating status map for device
  iFindStuff                      Contents are:[xxx+xxx/xxx', u'iPhone 6 Plus', u'200', 0.68000000000000005, u'iPhone', u'iphone6plus-xx-xxx', True, True, u'NotCharging', False, 1447628474963L, u'GPS', 50.0, -96.794151440352934, 32.853719196312923, False, False]
  iFindStuff                      Converting and storing custom states for devices...
  iFindStuff                      Refreshing Device:iphone 6+ Karl
  iFindStuff                      Conversion field details for device:iphone 6+ Karl
  iFindStuff                      Battery:0.68
  iFindStuff                      TimeStamp:1447628474963
  iFindStuff                      TimeStamp on device:iphone 6+ Karl 1447628474
  iFindStuff                      Converting data before return...
  iFindStuff                      Custom API fields set up correctly...
 


it always show the same DISTANCE numbers in the states 3302.38 (meters) away from home although I am at home.
The coordinates in the states are correct(and they do change). It looks as if the distance calculation is not performed

I also get these:
Code: Select all
 iFindStuff                      Failed to access pluginPrefs for key fields - advise Developer
  iFindStuff                      Setting up the Custom API...
  iFindStuff                      Failed to access pluginPrefs for key fields - advise Developer
  iFindStuff                      Setting up the Custom API...
  iFindStuff                      Failed to access pluginPrefs for key fields - advise Developer
...
 


the exception is:
in Line '3336' has error='global name 'db' is not defined'


Karl
running v 1.02.03

Posted on
Sun Nov 15, 2015 5:53 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Latest Version 1.02.03 - Bug Fix

When I switch off maps no more errors.

It looks as if the db function is not initialized --
it states no>>>in Line '3279' has error='[Errno 2] No such file or directory: u'/users/karlwachs/maps/db.track''<<<
Code: Select all
            if iTrackHistory:
                trackTimeNextReset = time.time()+int(iTimeTrack)
                try:
                    # Open the current tracking database
                    db = TinyDB(iMapStore+'/db.track')
                    indigo.server.log(" itrackH defined")

                except  Exception, e:
                    indigo.server.log( u"in Line '%s' has error='%s'" % (sys.exc_traceback.tb_lineno, e) )
                    errorHandler('runConcurrent - TinyDB access failed')


after that it thinks it is initialized, but using
for recordsProcessed in db.all():
fails.


The directory is present.

Do I miss something I needed to setup?

Karl

Posted on
Mon Nov 16, 2015 4:06 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.02.03 - Bug Fix

kw123 wrote:
When I switch off maps no more errors.

It looks as if the db function is not initialized --
it states no>>>in Line '3279' has error='[Errno 2] No such file or directory: u'/users/karlwachs/maps/db.track''<<<
Code: Select all
            if iTrackHistory:
                trackTimeNextReset = time.time()+int(iTimeTrack)
                try:
                    # Open the current tracking database
                    db = TinyDB(iMapStore+'/db.track')
                    indigo.server.log(" itrackH defined")

                except  Exception, e:
                    indigo.server.log( u"in Line '%s' has error='%s'" % (sys.exc_traceback.tb_lineno, e) )
                    errorHandler('runConcurrent - TinyDB access failed')


after that it thinks it is initialized, but using
for recordsProcessed in db.all():
fails.


The directory is present.

Do I miss something I needed to setup?

Karl


Karl

Looks as if it's getting a reoccurring error during the initialisation phase on reload. To be honest I need some more information on the second issue as that's the root cause. Have you had a chance to look at the error log for iFindStuff that's part of this release. You'll find it in the Logs folder at /Library/Application Support/Perceptive Automation/Indigo 6/Logs. Can you send me a copy of the file?

Actually thinking about it this could be the root of the problem. Is your system a standard installation? Do you have the directory '/Library/Application Support/Perceptive Automation/Indigo 6/Logs/iFindStuffErrors.log'. The path is hard coded and would throw an error if this path didn't exist. You can change your path on line 161 of the plugin and that would resolve your issue. As I've had no other user reports I'm guessing that a difference in Indigo Environment is probably the cause.

I think that you're right that all of the other issues are simply symptoms of a single issue in the initialisation process as the except would mean that it fails to initialise db and that would cause the other problems you're seeing.

Send me the file or let me know how you get on :D

Thanks

Mike

Posted on
Mon Nov 16, 2015 4:06 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.02.03 - Bug Fix

kw123 wrote:
When I switch off maps no more errors.

It looks as if the db function is not initialized --
it states no>>>in Line '3279' has error='[Errno 2] No such file or directory: u'/users/karlwachs/maps/db.track''<<<
Code: Select all
            if iTrackHistory:
                trackTimeNextReset = time.time()+int(iTimeTrack)
                try:
                    # Open the current tracking database
                    db = TinyDB(iMapStore+'/db.track')
                    indigo.server.log(" itrackH defined")

                except  Exception, e:
                    indigo.server.log( u"in Line '%s' has error='%s'" % (sys.exc_traceback.tb_lineno, e) )
                    errorHandler('runConcurrent - TinyDB access failed')


after that it thinks it is initialized, but using
for recordsProcessed in db.all():
fails.


The directory is present.

Do I miss something I needed to setup?

Karl


Karl

Looks as if it's getting a reoccurring error during the initialisation phase on reload. To be honest I need some more information on the second issue as that's the root cause. Have you had a chance to look at the error log for iFindStuff that's part of this release. You'll find it in the Logs folder at /Library/Application Support/Perceptive Automation/Indigo 6/Logs. Can you send me a copy of the file?

Actually thinking about it this could be the root of the problem. Is your system a standard installation? Do you have the directory '/Library/Application Support/Perceptive Automation/Indigo 6/Logs/iFindStuffErrors.log'. The path is hard coded and would throw an error if this path didn't exist. You can change your path on line 161 of the plugin and that would resolve your issue. As I've had no other user reports I'm guessing that a difference in Indigo Environment is probably the cause.

I think that you're right that all of the other issues are simply symptoms of a single issue in the initialisation process as the except would mean that it fails to initialise db and that would cause the other problems you're seeing.

Send me the file or let me know how you get on :D

Thanks

Mike

Posted on
Tue Nov 17, 2015 7:31 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Latest Version 1.02.03 - Bug Fix

I am out right now will do it later tonight. I do have a standard install though. No special paths etc


Sent from my iPhone using Tapatalk

Posted on
Tue Nov 17, 2015 10:26 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Latest Version 1.02.03 - Bug Fix

Mike,

my fault. I typed the directory for the maps incorrectly, forgot /documents/ in the path name..

One more comment: it looks as if "db" and "trackTimeNextReset" do not get defined, only after reload, not when saving config.(*)
in Line '333x' has error='local variable 'trackTimeNextReset' referenced before assignment' when I switch it on.
After reload everything works fine.

thanks again for this great plugin. Learning a lot looking at your code.
looking forward to xmass ;)

Karl

(*)
def validatePrefsConfigUi():
is empty, I always save/ set the changes there.

Posted on
Wed Nov 18, 2015 3:17 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.02.03 - Bug Fix

kw123 wrote:
Mike,

my fault. I typed the directory for the maps incorrectly, forgot /documents/ in the path name..

One more comment: it looks as if "db" and "trackTimeNextReset" do not get defined, only after reload, not when saving config.(*)
in Line '333x' has error='local variable 'trackTimeNextReset' referenced before assignment' when I switch it on.
After reload everything works fine.

thanks again for this great plugin. Learning a lot looking at your code.
looking forward to xmass ;)

Karl

(*)
def validatePrefsConfigUi():
is empty, I always save/ set the changes there.


Your right - it's laziness. I need to tighten the code. I've realised how to trap the directory thing now... :oops:

Chat soon

Mike

Posted on
Wed Nov 18, 2015 11:40 am
TOPS offline
User avatar
Posts: 169
Joined: Jun 17, 2015
Location: London, England

Re: Latest Version 1.02.03 - Bug Fix

:( :( Hi Mike,

Its back again......and I have no errors in the Event Log.......any ideas,

Regards,

Dave
Attachments
IMG_0200.PNG
IMG_0200.PNG (273.48 KiB) Viewed 5825 times

Posted on
Thu Nov 19, 2015 10:25 am
TOPS offline
User avatar
Posts: 169
Joined: Jun 17, 2015
Location: London, England

Re: Latest Version 1.02.03 - Bug Fix

Hi Mike

The plugin reset itself overnight with Google as expected, so the "To Many's" went away....but at approximately 4pm today they came back, again I have no errors in the log. I checked the Google Maps Developer API and I have not exceeded my calls....

Any ideas???

Cheers

Dave

Posted on
Sat Nov 21, 2015 10:44 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Latest Version 1.02.03 - Bug Fix

Mike,

I am heavily using the plugin now, a question:

it looks to me as if the information of the plugin is sometimes > 5 minutes old. (using plug.executeAction("refreshFrequencyOn", deviceId) and then the callback through the call to FINGSCAN.

here my setup:
variable for frequency is tuned to get a refresh from iFind ~ some seconds before I come home(and several times before that). Indeed iFind is calling fingscan at the proper requested time. The information available often does not change i.e. it calls fingscan at a requested intervals, but the states i.e. distance often has the same information as it had the call before. Is that a limitation from apple?

Why is this important for me: I like to use the distance/time & calculated speed to predict arrival time and time the updates so that I can determine that I am arriving home some seconds before I am home. Currently, if I drive by car the info is about 5 minutes old. - the iPhone is recognized by FING/Wifi 5 minutes earlier than from iFind.
It works most of the time when I am walking ~ 2 km away and then returning. The information update frequency is ok.

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest