Latest Version 1.0.55 - Variable Calculations

Posted on
Tue Oct 20, 2015 5:46 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Latest Version 1.0.55 - Variable Calculations

Hi all

I've released version 1.0.55 which provides some new features for updating frequency of iDevices.

Working with kw123, thanks Karl for the support, I've added some new features and fixed a couple as well. These features are primarily around how the update frequency is determined. Karl is looking to integrate some of the features of Fingscan with iFindStuff as they're complementary in what they try to achieve. It's a good example of how one plugin can support another. I'm working on integrating Fingscan with NEST Home for a similar reason.

You can download and install the latest version from this link:https://www.dropbox.com/s/vtnxa5ssxvroga2/iFindStuff.zip?dl=1

What's new in version 1.0.55?

    B79 - Using a variable for frequency updates instead of a calculated value doesn't seem to be working properly - can you investigate? Sure can and that was the case. Effectively iFindStuff simply ignored the variable value and recalculated the field anyway - every 10 seconds! :shock: I need to get better at spotting the difference between greater than and less than in a line of code :oops: You'll find it works now.

    F25 - I'd like three new actions added to the plugin to manage if a device is using a variable or calculating the update frequency: Toggle, On and Off. You'll find there are three new options available under iFindStuff Actions, They are:

      Toggle Update Frequency - This changes the calculation method for updates from Calculated to Variable or vice versa depending on the current setting

      Change Update Frequency from Calculated to Variable - This changes the calculation method for updates from Calculated to Variable

      Change Update Frequency from Variable to Calculated - This changes the calculation method for updates from Variable to Calculated

    You'll also notice that there is a new state for every device called calculateMethod. The value of this state is either Variable or Calculated depending on the method being used.

    When run each action will force an immediate refresh (well within 10 seconds) update of the device and either calculate a new update frequency or refer to a variable of the form [NAMEOFIDEVICE]FREQ - e.g. MIKEIPHONEFREQ. If the variable doesn't exist it will be created automatically and placed in an iFindStuff folder under variables.

    F26 - I find it difficult to remember what units are being used for ranges and distances - can this be added? There are now two new states for each device: rangeUnits and distanceUnits. These represent the current units being applied in the plugin.

      Metres: rangeUnit = metres, distanceUnit = metres

      Metric: rangeUnit = metres, distanceUnit = kilometres

      Imperial: rangeUnit = feet, distanceUnit = miles

I'm going to spend some time updating the manual to reflect all of the changes in the past couple of weeks. There have been some significant improvements and I think that there are more that we haven't thought of yet so let me know your ideas, issues and updates.

Many thanks as usual :D

Regards

Mike

Posted on
Tue Oct 20, 2015 6:29 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Latest Version 1.0.55 - Variable Calculations

Mike,

thanks so much .. seems to be working fine,
just the "indigo.server.log('Action: '+dev.name+iMessage)" is always on.

i am working on a refresh model that uses speed between home and current point to determine the next update:
if you drive home, walk home drive away walk away ==> set refresh timer to
min(20,max(500,distance/1000 . *1500./max(speed,0.1) )) ## speed in m/s, distance in m
that will set the timer to 50 if you drive at 50m/s and to 300 if you walk @ 1km away from home
at 100m it would be 20 seconds
at 10km it would be 500

or so need.. to tune the numbers and may be also add the last speed, distance measurement (70% current+30% last) to smooth it out a bit.

need to do some dangerous testing... drive and look at the indigo log to check the results..

Karl

and thanks for converting us to metres. But it is still Whisky

Posted on
Tue Oct 20, 2015 6:36 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.0.55 - Variable Calculations

kw123 wrote:
Mike,

thanks so much .. seems to be working fine,
just the "indigo.server.log('Action: '+dev.name+iMessage)" is always on.

i am working on a refresh model that uses speed between home and current point to determine the next update:
if you drive home, walk home drive away walk away ==> set refresh timer to
min(20,max(500,distance/1000 . *1500./max(speed,0.1) )) ## speed in m/s, distance in m
that will set the timer to 50 if you drive at 50m/s and to 300 if you walk @ 1km away from home
at 100m it would be 20 seconds
at 10km it would be 500

or so need.. to tune the numbers and may be also add the last speed, distance measurement (70% current+30% last) to smooth it out a bit.

need to do some dangerous testing... drive and look at the indigo log to check the results..

Karl

and thanks for converting us to metres. But it is still Whisky


No problems - let me know how it performs.

Actually it was a conscious decision to leave it on :D But you're right - I'll add it to the iDebug 3 list so it only appears when that's debugging.

Dangerous testing - :shock: Maybe better to be a passenger? :D

Posted on
Sun Oct 25, 2015 7:13 pm
GlennNZ offline
User avatar
Posts: 1572
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Latest Version 1.0.55 - Variable Calculations

Thanks for IFindStuff - fantastic development process

Having one small issue where fails to calculate travel distance - always says 1min regardless of where or how far away device is.
Believe have correctly setup Google API (both of them)

When I enable logs get
Failed to calculate bearing numbers or update correctly - advise Developer
see attachment.

This appears repeatedly?

Thanks

Also have this occasionally appear - trying to track down the trigger
iFindStuff Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 3968, in refreshMaps
<type 'exceptions.TypeError'>: refreshAllDevices() takes exactly 2 arguments (1 given)

Glenn
Attachments
Log.txt
log of issues
(3.99 KiB) Downloaded 127 times

Posted on
Wed Oct 28, 2015 2:35 pm
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.0.55 - Variable Calculations

GlennNZ wrote:
Thanks for IFindStuff - fantastic development process

Having one small issue where fails to calculate travel distance - always says 1min regardless of where or how far away device is.
Believe have correctly setup Google API (both of them)

When I enable logs get
Failed to calculate bearing numbers or update correctly - advise Developer
see attachment.

This appears repeatedly?

Thanks

Also have this occasionally appear - trying to track down the trigger
iFindStuff Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 3968, in refreshMaps
<type 'exceptions.TypeError'>: refreshAllDevices() takes exactly 2 arguments (1 given)

Glenn


Glenn

I've been away but I'm back now. I'll look at this in the morning and come back to you.

Thanks for testing!

Mike

Posted on
Wed Oct 28, 2015 9:45 pm
GlennNZ offline
User avatar
Posts: 1572
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Latest Version 1.0.55 - Variable Calculations

Thanks for update

Further testing suggests that sometimes calculates correct travel time and presume bearing calculation doesn't fail as per the log. Haven't quite figure out the why of it though

Could it be the negatives in the lat/long given I'm on the 'wrong side' of the globe :wink:

Glenn

(Sorry just tried download log above and had issues - rename it to .doc and correctly opens although weird formatting)

Posted on
Thu Oct 29, 2015 2:34 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.0.55 - Variable Calculations

GlennNZ wrote:
Thanks for update

Further testing suggests that sometimes calculates correct travel time and presume bearing calculation doesn't fail as per the log. Haven't quite figure out the why of it though

Could it be the negatives in the lat/long given I'm on the 'wrong side' of the globe :wink:

Glenn

(Sorry just tried download log above and had issues - rename it to .doc and correctly opens although weird formatting)


We already have quite a few AUS and NZ users and our worked ok for them so I'm sure we'll sort it :)

Posted on
Fri Oct 30, 2015 11:34 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Latest Version 1.0.55 - Variable Calculations

GlennNZ wrote:
Thanks for update

Further testing suggests that sometimes calculates correct travel time and presume bearing calculation doesn't fail as per the log. Haven't quite figure out the why of it though

Could it be the negatives in the lat/long given I'm on the 'wrong side' of the globe :wink:

Glenn

(Sorry just tried download log above and had issues - rename it to .doc and correctly opens although weird formatting)


Thanks for all the support. You'll find that you identified two error in the code which I've now been able to resolve. Can you download the latest version and see how it goes?

Thanks

Mike :D

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests