Skip to content

Commit

Permalink
0.7.5
Browse files Browse the repository at this point in the history
Remove ALL GoogleMaps API Usage
Use as Crow-Flies GPS calculation
Use estimate travel time - 16.7 m/s (60km/hr - plugin config setting to adjust
Means traveltimes more approximate than before - but on testing seems

Remove API for Maps - still using GoogleMaps just not with API
[May break on 11th June - may not...]

Add 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
  • Loading branch information
ghawken committed May 5, 2018
1 parent 61d7ddc commit 70161e2
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 106 deletions.
2 changes: 1 addition & 1 deletion iFindFriendsMini.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>0.7.0</string>
<string>0.7.5</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>CFBundleDisplayName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<Name>Refresh Data For All Friends</Name>
<CallbackMethod>actionrefreshdata</CallbackMethod>
</Action>

<Action id="refreshMaps" uiPath="DeviceActions">
<Name>Refresh Maps For All Friends</Name>
<CallbackMethod>actionrefreshmaps</CallbackMethod>
</Action>
<Action id="changeRefresh" uiPath="DeviceActions">
<Name>Change Refresh Data interval</Name>
<CallbackMethod>changeInterval</CallbackMethod>
Expand Down
26 changes: 21 additions & 5 deletions iFindFriendsMini.indigoPlugin/Contents/Server Plugin/Devices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,28 @@
<TriggerLabel>Device online?</TriggerLabel>
<ControlPageLabel>Device online?</ControlPageLabel>
</State>
<State id="mapUpdateNeeded">
<ValueType>Boolean</ValueType>
<TriggerLabel>Map needs to be updated</TriggerLabel>
<ControlPageLabel>Map needs to be updated</ControlPageLabel>
</State>
<State id="mapLastUpdated">
<ValueType>String</ValueType>
<TriggerLabel>Time Map Last Updated</TriggerLabel>
<ControlPageLabel>Time Map Last Updated</ControlPageLabel>
</State>

<State id="deviceLastUpdated">
<ValueType>String</ValueType>
<TriggerLabel>Device Last Updated</TriggerLabel>
<ControlPageLabel>Device Last Updated</ControlPageLabel>
</State>
<State id="distanceSinceCheck">
<ValueType>String</ValueType>
<TriggerLabel>Distance Travelled since last checked</TriggerLabel>
<ControlPageLabel>Distance Travselled since last check</ControlPageLabel>
</State>

<State id="deviceTimestamp">
<ValueType>String</ValueType>
<TriggerLabel>Device Timestamp</TriggerLabel>
Expand All @@ -145,13 +161,13 @@

<State id="homeDistance">
<ValueType>Number</ValueType>
<TriggerLabel>Distance (meters to home</TriggerLabel>
<TriggerLabel>Distance meters to home</TriggerLabel>
<ControlPageLabel>Distance to home in meters</ControlPageLabel>
</State>
<State id="homeTime">
<ValueType>Number</ValueType>
<TriggerLabel>Time to home Driving, in minutes</TriggerLabel>
<ControlPageLabel>Time to home Driving, in minutes</ControlPageLabel>
<TriggerLabel>Time to home Driving approx, in seconds</TriggerLabel>
<ControlPageLabel>Time to home Driving approx, in seconds</ControlPageLabel>
</State>
<State id="homeDistanceText">
<ValueType>String</ValueType>
Expand Down Expand Up @@ -182,8 +198,8 @@
</State>
<State id="otherTime">
<ValueType>Number</ValueType>
<TriggerLabel>Time to Other Geofence in minutes</TriggerLabel>
<ControlPageLabel>Time to Other Geofence in minutes</ControlPageLabel>
<TriggerLabel>Time to Other Geofence in seconds</TriggerLabel>
<ControlPageLabel>Time to Other Geofence in seconds</ControlPageLabel>
</State>
<State id="id">
<ValueType>String</ValueType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<Description>Zoom Size of Map default 15</Description>
</Field>

<Field id="googleAPI" type="textfield" tooltip="Google Mapping API Key" defaultValue="">
<Field id="googleAPI" type="textfield" tooltip="Google Mapping API Key" defaultValue="" hidden="true">
<Label>Enter Google API Here:</Label><Label/>
<Description>Google API Key for Mapping</Description>
</Field>
Expand All @@ -100,7 +100,11 @@
<Label>Meters/Second for Travel calculation:</Label><Label/>
<Description>Enter travel speed for approx travel time calculations in meters/second eg. 16.7 m/s = 60km/hr</Description>
</Field>

<Field id="anotherspace221" type="label" fontSize="small" alignText="right">
<Label>Approx speed in meters/sec for calculation of travel time from distance
eg. 60km/hr average seems to work well - 16.7m/s
</Label>
</Field>

<Field id="space226" type="separator"/>

Expand Down
Loading

0 comments on commit 70161e2

Please sign in to comment.