Page 1 of 1

Version 0.8.0 Removing All Google API Usage

PostPosted: Sat May 05, 2018 9:06 pm
by GlennNZ
New Version 0.8.0

Removes all Google API usage completely.

https://github.com/Ghawken/IndigoPlugin ... i/releases



Changes:


Use as Crow-Flies GPS calculation (rather than google calculated road/car travel distance)
Change to travelTime to using adjustable speed to estimate travel time - 16.7 m/s (60km/hr) - plugin config setting to adjust
(Means traveltimes more approximate than before - but on testing seems as good as past results)

Remove API key from Map Image Generation - still using GoogleMaps just not with API key.
This may break on 11th June - may not... if so will deal with it then.

Add new Friend Device States:
distanceSinceCheck - meters moved since last information received if >100 will redo maps
mapLastUpdated - time of last map generation
otherDistance/homeDistance in meters as crow flies
otherTime/homeTime - calculated travel based on config m/s setting
otherTime/homeTime in seconds currently

Add Action:
Regenerate all Maps

Change to only updating maps when distance travelled > 100meters

Add Additional Map Sources for after 11th June..

Some positives and negatives with each
- ArcGis World Imagery - Satellite Map Similiar to Google Maps Satellite. No Central Marker possible - add to the control page would be my suggestion
- ArcGis World 2d
- ArcGis World Street Map
- OpenStreetMaps - Good quality street map. Can use markers seperate for each device.

Add Friend Device Options 'Mapping Label': Primarily for OpenStreetMap
eg. lightblue1 etc
Color and then displayed number
Can label each device with different number.

None of these options easily allow the ALL map including all devices.


Please test and let me know if any issues and will post to Store.

Glenn

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Sun May 06, 2018 6:47 am
by autolog
Hi Glenn,
Thanks for the update which I have now installed. :D

For the most part, it appears to be working in that the state is changing when the address changes.

I am getting the occaisional error in the log:
FindFriendsMini Exception in refreshDataforDev: argument of type 'NoneType' is not iterable
FindFriendsMini Error Exception:
Traceback (most recent call last):
File "plugin.py", line 1099, in refreshDataForDev
if 'formattedAddressLines' in follow['location']['address']:
TypeError: argument of type 'NoneType' is not iterable

FindFriendsMini Possibility missing some data from icloud: Is your account setup with FindFriends enabled on iOS/Mobile device?


On the initial install I got these errors:
ndFriendsMini Plugin version: 0.8.0
FindFriendsMini Plugin ID: com.GlennNZ.indigoplugin.FindFriendsMini
FindFriendsMini Indigo version: 7.1.2
FindFriendsMini Python version: 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
FindFriendsMini Python Directory: /System/Library/Frameworks/Python.framework/Versions/2.7
FindFriendsMini Major Problem equals: 0
FindFriendsMini ==================================================================================================================================
Started plugin "FindFriendsMini 0.8.0"
Trigger Location Change [AAAAA]
Error device "FindFriends AAAAA" state key mapUpdateNeeded not defined (ignoring update request)
Trigger Location Change [BBBBB]
Error device "FindFriends BBBBB" state key mapUpdateNeeded not defined (ignoring update request)
Action Collection Location [AAAAA] changed:
Trigger Location Change [CCCCC]
Error device "FindFriends CCCCC" state key mapUpdateNeeded not defined (ignoring update request)

I edited and saved each of the devices and then reloaded the plugin and the error didn't repeat.

I also have had this error once (on the initial install:
FindFriendsMini Error Error within iDistance Calculationmath domain error
Traceback (most recent call last):
File "plugin.py", line 1744, in iDistance
arc = math.acos( cos )
ValueError: math domain error

Since the reload of the plugin, it hasn't occurred again.

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Sun May 06, 2018 9:54 am
by ZachBenz
Any chance of keeping an option to optionally continue using the Google API? I prefer some of its features, even with the changes in cost.

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Sun May 06, 2018 3:12 pm
by GlennNZ
autolog wrote:
Hi Glenn,
Thanks for the update which I have now installed. :D

For the most part, it appears to be working in that the state is changing when the address changes.

I am getting the occaisional error in the log:
FindFriendsMini Exception in refreshDataforDev: argument of type 'NoneType' is not iterable
FindFriendsMini Error Exception:
Traceback (most recent call last):
File "plugin.py", line 1099, in refreshDataForDev
if 'formattedAddressLines' in follow['location']['address']:
TypeError: argument of type 'NoneType' is not iterable

FindFriendsMini Possibility missing some data from icloud: Is your account setup with FindFriends enabled on iOS/Mobile device?


Since the reload of the plugin, it hasn't occurred again.[/quote]

Thanks for the feedback.

The initial errors are to be expected - as you have done open the friendsdevice, edit, and save. (Or create a new device)

Interestingly the other formattedAddress error has probably been there the whole time - just previously didn’t catch with exception logging so wasn’t noticed. Will have a look at and at check - found the issue - probably differences in what plugin receives from findfriends from country to country. Will add a fix for it soon.

Glenn

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Sun May 06, 2018 3:29 pm
by GlennNZ
ZachBenz wrote:
Any chance of keeping an option to optionally continue using the Google API? I prefer some of its features, even with the changes in cost.

Hmmm...
There is the older version.... :shock:

What in particularly do you want to keep? & how much $$ are willing to risk?
- The crow-flies distance to me seems as good as the google road distance.
- The non-google time may be more approximate (simply distance * config travel speed) - but again the google time was a bit hit and miss. (giving really wrong times for very long distances) This approach seems more uniform across all distances.
- The maps are still there (may go away 11th June) but I am just not using API key.

The issue with leaving it in any fashion will be at my current usage (before these changes) costs would be around $100-$200/month.

There needs to be no risk landing any user with that - hence saver option deleting any possibility.

Currently after these changes (restricting when API access) even if left API mapping and distance features probably would fall well below free limit - but still cannot guarantee enough.


Glenn

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Mon May 07, 2018 2:48 am
by GlennNZ
autolog wrote:
Hi Glenn,
Thanks for the update which I have now installed.


https://github.com/Ghawken/IndigoPlugin ... /releases/

Version 0.8.1 - includes fixes for these issues.

Glenn

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Mon May 07, 2018 3:36 am
by autolog
Hi Glenn,
Thanks for the speedy update. :D
I'll let you know if anything untoward occurs.

Re: Version 0.8.0 Removing All Google API Usage

PostPosted: Mon May 07, 2018 7:00 pm
by ZachBenz
GlennNZ wrote:
ZachBenz wrote:
Any chance of keeping an option to optionally continue using the Google API? I prefer some of its features, even with the changes in cost.

Hmmm...
There is the older version.... :shock:

What in particularly do you want to keep? & how much $$ are willing to risk?
Glenn


Alright, I'll quell my fear of change and give the new version a whirl. :-) The main thing I wanted to keep was the mapping, but sounds like a bridge to cross after 11 June if necessary.