Skip to content

Commit

Permalink
Add Google Maps API Support
Browse files Browse the repository at this point in the history
Added Google Maps API Support
  • Loading branch information
dgarozzo committed Dec 13, 2020
1 parent 3547512 commit 2eb5040
Show file tree
Hide file tree
Showing 6 changed files with 422 additions and 85 deletions.
4 changes: 2 additions & 2 deletions Bouncie.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>1.0.0</string>
<string>1.1.0</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>CFBundleDisplayName</key>
Expand All @@ -16,7 +16,7 @@
<array>
<dict>
<key>CFBundleURLName</key>
<string>https://forums.indigodomo.com/viewforum.php?f=69</string>
<string>https://forums.indigodomo.com/viewforum.php?f=348</string>
</dict>
</array>
</dict>
Expand Down
27 changes: 7 additions & 20 deletions Bouncie.indigoPlugin/Contents/Server Plugin/Actions.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
<?xml version="1.0"?>
<!-- By default sensor type devices will inherit all
SensorAction actions, which will be dispatched to
the actionControlSensor() method defined in plugin.py.
Additional custom actions can also be defined here. The
example below defines a custom action to modify the brightness
of the backlit display of the module, and to modify the custom
backlightBrightness state added to Devices.xml.
-->
<Actions>
<Action id="setBacklightBrightness" deviceFilter="self">
<Name>Set Backlight Brightness</Name>
<CallbackMethod>setBacklightBrightness</CallbackMethod>
<ConfigUI>
<Field id="description" type="textfield" hidden="true">
<Label>runtime calculated</Label>
</Field>
<Field id="brightness" type="textfield" defaultValue="80">
<Label>Backlight Brightness:</Label>
</Field>
</ConfigUI>
<Action id="getAddress" deviceFilter="self">
<Name>Get Address</Name>
<CallbackMethod>getAddress</CallbackMethod>
</Action>
<Action id="getETA" deviceFilter="self">
<Name>Get ETA</Name>
<CallbackMethod>getETA</CallbackMethod>
</Action>
</Actions>
25 changes: 21 additions & 4 deletions Bouncie.indigoPlugin/Contents/Server Plugin/Devices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,27 @@
<ControlPageLabel>webHookJSON-tripEnd</ControlPageLabel>
</State>

<!-- coming soon... with integration from Google Maps -->

<!--
<State id="googleapis-geocode" readonly="YES">
<ValueType>String</ValueType>
<TriggerLabel>googleapis-geocode</TriggerLabel>
<ControlPageLabel>googleapis-geocode</ControlPageLabel>
</State>
<State id="googleapis-distancematrix" readonly="YES">
<ValueType>String</ValueType>
<TriggerLabel>googleapis-distancematrix</TriggerLabel>
<ControlPageLabel>googleapis-distancematrix</ControlPageLabel>
</State>
<State id="currentStreet" readonly="YES">
<ValueType>String</ValueType>
<TriggerLabel>currentStreet</TriggerLabel>
<ControlPageLabel>currentStreet</ControlPageLabel>
</State>
<State id="formatted_address" readonly="YES">
<ValueType>String</ValueType>
<TriggerLabel>formatted_address</TriggerLabel>
<ControlPageLabel>formatted_address</ControlPageLabel>
</State>

<State id="ETA" readonly="YES">
<ValueType>String</ValueType>
<TriggerLabel>ETA</TriggerLabel>
Expand All @@ -176,7 +194,6 @@
<TriggerLabel>currentMilesFromHome</TriggerLabel>
<ControlPageLabel>currentMilesFromHome</ControlPageLabel>
</State>
-->
</States>
</Device>
</Devices>
5 changes: 2 additions & 3 deletions Bouncie.indigoPlugin/Contents/Server Plugin/Events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
</ConfigUI>
</Event>

<!-- coming soon... with integration from Google Maps -->

<!--
<Event id="location_updated">
<Name>Location Updated</Name>
Expand All @@ -86,6 +84,8 @@
</Field>
</ConfigUI>
</Event>
-->

<Event id="approaching_home">
<Name>Approaching Home</Name>
<ConfigUI>
Expand All @@ -95,7 +95,6 @@
</Field>
</ConfigUI>
</Event>
-->

<!--
<Event id="miles_to_home">
Expand Down
10 changes: 3 additions & 7 deletions Bouncie.indigoPlugin/Contents/Server Plugin/PluginConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@
<Label>Polling interval for Vehicle Data (seconds):</Label>
</Field>

<!-- coming soon... integration with Google Maps -->

<!--
<Field id="sep2" type="separator"/>

<Field id="instructionsGoogleMapsAPIKeyLabel" type="label" fontSize="small">
Expand All @@ -68,8 +65,7 @@
<Field id="homeAddress" type="textfield" defaultValue="123 Any St Philadelphia, PA 19380">
<Label>Home Address:</Label>
</Field>
-->


<Field id="sep3" type="separator"/>
<Field id="useWebhooks" type="checkbox" defaultValue="false">
<Label>Use Bouncie API Webhooks</Label>
Expand All @@ -79,7 +75,7 @@
</Field>

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

<Field id="logLevel" type="menu" defaultValue="20">
<Label>Event Logging Level:</Label>
<List>
Expand All @@ -89,7 +85,7 @@
<Option value="40">Error Messages</Option>
<Option value="50">Critical Errors Only</Option>
</List>
</Field>
</Field>

</PluginConfig>

Loading

0 comments on commit 2eb5040

Please sign in to comment.