Commit Graph
100 Commits
Author SHA1 Message Date
Philip Abbey e2722319a6 add Wifi LTE command execution (#255)
Firstly, thank you to all the maintainers for your work on this very
useful application.

This PR adds the ability to execute Home Assistant commands over Wi-Fi
or LTE, behind an opt-in setting. While not a full "Wi-Fi mode," this
feature allows the app to function in limited scenarios where the phone
is unavailable but the device still has a direct network connection
(e.g. Wi-Fi or LTE).

When enabled:
- The app can launch with a cached menu without phone connection.
- On command execution, the user is prompted to confirm.
- Upon confirmation, a bulk sync is triggered to send the request to
Home Assistant.

This enables basic control even without Bluetooth connectivity — so I
can switch off that pesky bathroom light late at night when I don't have
my phone nearby.

I’ve seen a few issues suggesting similar functionality, and I believe
this strikes a useful balance between functionality and simplicity. That
said, I understand if this doesn't align with the intended featureset —
feel free to close if so.

This PR also adds a few string resources without translations. I'm not
sure if those are autogenerated or user-provided — happy to adjust if
needed.
2025-07-22 20:52:07 +01:00
Philip Abbey 3672a598fb Update HISTORY.md
Added v2.32
2025-07-18 20:49:10 +01:00
Philip Abbey f6d0916315 Update HomeAssistantTapMenuItem.mc
Requirement for use of the PIN was not being correctly extracted from the options. Goes to show why the security features should not be relied on! A recent compilation fix created this breaking change.
2025-07-18 20:46:49 +01:00
Philip Abbey 6db7b67536 Update HISTORY.md
Added v2.31 text
2025-07-11 09:43:30 +01:00
Philip Abbey e5df010af8 253 compilation failed on fenix5s (#254)
This is the fix to an annoying problem I faced as I was about to compile
the final v2.31 release. Please approve, but **don't merge** just yet.
I'll do that once the full device list compilation succeeds, just to
check if there are any residual issues.

Thanks
2025-07-11 09:31:37 +01:00
Philip Abbey ee964ce882 Update HomeAssistantMenuItemFactory.mc
Function documentation fix.
2025-07-11 01:11:00 +01:00
Philip Abbey ee9da24592 Fix for too many arguments to a function call on some devices 2025-07-11 01:06:15 +01:00
Philip Abbey 906cdf7371 Code documentation comments were not updated 2025-07-10 23:54:05 +01:00
Philip Abbey d141c03104 Review comment
Moved point of application exit for the menu item option.
2025-07-10 19:46:04 +01:00
Philip Abbey 842a31a1cc Review comment
enable => enabled
2025-07-10 18:24:30 +01:00
Philip Abbey 5639ff5c42 Amended heading levels in docs 2025-07-09 21:51:18 +01:00
Philip Abbey 8b3e86a00f Amended documentation for two new menu item options
The options are 'enable' and 'exit'.
2025-07-09 21:48:58 +01:00
Philip Abbey 6dbcea94cf Update HomeAssistantView.mc
Refined more precisely where the exit option can be used and enforced in the code.
2025-07-09 21:09:33 +01:00
Philip Abbey b28daacafd Update config.schema.json
Removed exit from non-actionable menu items.
2025-07-09 20:54:28 +01:00
Philip Abbey 029a9f373e Update config.schema.json
Added to boolean options for disable and exit.
2025-07-09 19:57:11 +01:00
Philip Abbey ec044c5408 Added two new options to menu items
1. The ability to disable a menu item without deleting it.
2. The option to quit the application on item selection.
2025-07-08 22:48:42 +01:00
Philip Abbey 659a060c76 Forgotten image used on App home page 2025-07-08 22:45:39 +01:00
Philip Abbey 90ed1f4bea Update HomeAssistantGlanceView.mc
Improved layout.
2025-07-06 19:02:59 +01:00
Philip Abbey 2117b27210 Update HISTORY.md
Added two images.
2025-07-06 19:01:27 +01:00
Philip Abbey df7874e825 Update HISTORY.md
Added link to Glance view for 2.30 text.
2025-07-06 17:32:12 +01:00
Philip Abbey f3c5947b82 Merge branch 'main' into 247-improve-the-glance-view 2025-07-06 14:49:49 +01:00
Philip Abbey 47a930828a Revised glance view
Refreshed default view and new customisable view.
2025-07-06 14:44:53 +01:00
Philip Abbey ef299bcaf6 Render correct icon in web editor for info types (#248) 2025-07-06 13:53:24 +01:00
Philip Abbey 4cf5a0ae26 Update HomeAssistantApp.mc
Fix the 'fixed' comment string.
2025-07-04 17:26:33 +01:00
Philip Abbey b44d4c6155 Update HomeAssistantApp.mc
Amended 4 comments
2025-07-04 17:20:48 +01:00
Philip Abbey f2d65aa6e3 Added correctly formatted code comments
The newer SDK support tooltips to show the function prototype and help text, so best to make good use of it.
2025-07-04 16:57:25 +01:00
Philip Abbey 6b2aa3135a Added support for 3 new devices (#237) 2025-05-27 06:37:19 +01:00
Philip Abbey 907848b5fb Added support for 3 new devices 2025-05-24 15:53:19 +01:00
Philip Abbey ada18f8323 Update export.cmd
'--api-level' command line switch removed from SDK 8.1.0
2025-04-24 22:38:10 +01:00
Philip Abbey f74a3168de Update manifest.xml
The App ID should not have been changed from the test app.
2025-04-24 22:30:43 +01:00
Philip Abbey 7e58e5416d Support for Vivoactive 6 device
This required an update to the SDK to version 8.1.0. The new SDK found some new code warnings for unreachable code previously known to be reached based on stricter type checking, so fixed in this commit too.
2025-04-24 22:26:18 +01:00
Philip Abbey 1f7090092f 227 enhancement glance info cachingprevious results instead of unconfigured (#228)
Not as the issue requested, but instead pulling the settings from
persistent storage before checking the URL status, preventing
"Unconfigured" being initially displayed when it should be "Checking..."
as coded.
2025-04-21 15:31:30 +01:00
Philip Abbey 4ed132b9ca Update HISTORY.md
Added ver 2.27 text.
2025-04-21 13:59:13 +01:00
Philip Abbey fd213cc210 Update HomeAssistantApp.mc
Update the Settings object from persistent storage before checking the URLs work and reporting the status to the Glance view.
2025-04-21 13:56:08 +01:00
Philip Abbey 7423e609d8 Update TroubleShooting.md
SSL Certificate Validation Issues

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-04-21 09:26:33 +01:00
Philip Abbey 9df43cdb01 Explaining HTTPS Certificate Problems
Partial and Full chain certificates.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2025-04-21 09:15:55 +01:00
Philip Abbey 28f4ffc70b 223 code refactoring (#224)
Code refactoring and amended fix for responsive menu that was removed by
bug fix in v2.25.
2025-03-28 19:37:15 +00:00
Philip Abbey e8f2c0d3bb Amended menu item class inheritance 2025-03-28 00:22:09 +00:00
Philip Abbey 71cba8c21c Code attribution for author of PIN entry.
Prior to sorting out inheritance.
2025-03-28 00:20:53 +00:00
Philip Abbey 236a4969d7 Menu item code tidy
Prior to sorting out inheritance.
2025-03-27 20:45:51 +00:00
Philip Abbey e41f451fbc Update HomeAssistantApp.mc
Fix for lost speedup from v2.24 when fixing a bug in v2.25.
2025-03-27 20:45:02 +00:00
Philip Abbey c13e898e59 Update HISTORY.md
v2.25
2025-03-27 07:35:44 +00:00
Philip Abbey a77870c2eb Fix for 2 bugs in issue 221 (#222)
Template rendering and Webhook ID on initial start.

Please review and (hopefully) approve, but don't merge as I need to
deploy to the beta app.
2025-03-27 06:32:27 +00:00
Philip Abbey 155649f162 Fix for 2 bugs in issue 221
Template rendering and Webhook ID on initial start.
2025-03-26 22:37:33 +00:00
Philip Abbey 7a14a65ba3 Update HISTORY.md
2.24 text
2025-03-23 16:54:52 +00:00
Philip Abbey adf69d7dec Rearranging Web API Requests
Making sure the menu update API call is completed before the Webhook IDs are fetched in order to reduce latency to usefulness.
2025-03-23 16:54:13 +00:00
Philip Abbey d105e69484 Update WebhookManager.mc
Removed Settings.unsetWebhookId() where it might be causing problems with replacement "Garmin Device" in Home Assistant.
2025-03-23 16:01:53 +00:00
Philip Abbey 184e2ac80e Add 4 new devices
approachs50, descentg2, descentmk1, and gpsmap66
2025-03-23 15:59:29 +00:00
Philip Abbey b82e63d191 Documentation update 2025-01-19 19:47:42 +00:00
Philip Abbey ed4646511f Added 5 new Instinct devices
Small (imperfect) fix for 2 colour device icons.
2025-01-19 18:47:38 +00:00
Philip Abbey fd58625640 Info only menu item 2025-01-19 13:44:53 +00:00
Philip Abbey 816f2e6399 Update Actions.md
Documentation for the `service` field after a recently uncovered issue with its value. See https://github.com/house-of-abbey/GarminHomeAssistant/issues/205.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2024-12-31 18:02:03 +00:00
Philip Abbey f171f913ac Update README.md (#202)
Documented a workaround to communicate with Home Assistant using HTTP.
2024-12-08 21:57:51 +00:00
Philip Abbey 2a3514de64 Update HISTORY.md
Version number typo.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2024-11-20 17:59:11 +00:00
Philip Abbey b6719365b2 Changes as per issue. 2024-11-19 21:56:32 +00:00
philipabbey 2a7528ea86 Apply automatic changes 2024-11-18 19:57:22 +00:00
Philip Abbey 11ecf88ee2 An assortment of cosmetic changes
JSON schema fix to remove 'template' as a valid option, punctuation in strings, whitespace, and a new application history entry.
2024-11-18 19:39:13 +00:00
Philip Abbey fb68ce2fba Feature: PIN confirmation dialog (#192)
## About this PR:
Being one of those incorrigible fools who want to open and unlock stuff
using my watch, I thought of a way to improve security when calling a
HomeAssistant service from the Garmin App.

This change adds a PIN confirmation dialog that is displayed whenever a
`pin` property has been set in the `tap_action`. Because of the size of
the screen, PINs consist of a sequence of abritrary length using the
digits 1-4.

![2024-10-16 11_16_09-CIQ Simulator - Venu® Sq 2 Music (5 0
0)](https://github.com/user-attachments/assets/f6e09c00-5dde-4972-b7dc-256d4d94e99e)

Due to public visibility of the dashboard config, a pin mask can be
configured in the app's settings to transcode the PIN on the watch for
additional security. Using a cipher for PIN encryption has been
discarded due to the complexity involved in generating the encrypted
PINs for the end user.

The PIN dialog is configured to allow up to 4 erraneous PIN inputs in 2
minutes, a 5th failure will lock the PIN dialog (for all actions) for 10
minutes. Entering a correct PIN will reset the failure count.

## Changes included in this PR:
- PIN confirmation screen
- called whenever a `pin` has been configured in a `tap_action`. This
overrides the `confirm` property. Users without a touchscreen will be
routed to the regular confirmation dialog.
- optional `pin_mask` configuration setting, which will be used to
transcode the digits of the PIN (see documentation change)
	- german translation of the `pin_mask` label
	- failed attemps and PIN lock are stored in application storage
- Addition of `pin` field to the JSON Schema
- Additions to the docs

Tested on a few devices in the simulator, tested and running as a beta
on a Venu 2 Sq Music.

## Disclaimer:
This is my first attempt at a Monkey C project.
I probably learned more from looking at the existing app than from the
sdk samples. Awesome work!

I added this mainly because I wanted a feature like that for myself,
thought it is a good thing to add and because I was interested in
developing for Garmin devices.
I would be glad if you like the idea and are open to review it and
include it in the app.

I have tried to use coding style and conventions from the existing
project as far as I could see them.
2024-11-18 19:00:05 +00:00
Philip Abbey 2000a30276 Update README.md
Garmin Express known issue.
2024-11-07 20:01:56 +00:00
Philip Abbey 04c61981ea Update Switches.md
Action from "Allow confirming switch toggle" https://github.com/house-of-abbey/GarminHomeAssistant/issues/190, make documentation clearer.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2024-10-06 15:35:35 +01:00
Philip AbbeyandJoseph Abbey a48ab486ae 2 fixes as required by issue 185
Solution to a race condition with starting updates and amendment to error message presentation on Webhook ID creation failure.

Co-Authored-By: Joseph Abbey <me@josephabbey.dev>
2024-09-07 20:27:58 +01:00
Philip Abbey 060cd2729f Update README.md
Additional information on toasts with Forerunner 55 device.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2024-09-07 11:06:11 +01:00
Philip Abbey 73a38e9b4e Update HISTORY.md
v2.21 amendment.
2024-09-06 17:32:50 +01:00
Philip Abbey cd8f5d900e Restyle 182 add support for the latest devices released from garmin (#184)
Automated style fixes for #183, created by [Restyled][].

The following restylers [made
fixes](https://restyled.io/gh/house-of-abbey/repos/GarminHomeAssistant/jobs/4778343):

-
[whitespace](https://github.com/restyled-io/restyler-whitespace/blob/master/README.md)


To incorporate these changes, merge this Pull Request into the original.
We
recommend using the Squash or Rebase strategies.


**NOTE**: As work continues on the original Pull Request, this process
will
re-run and update (force-push) this Pull Request with updated style
fixes as
necessary. If the style is fixed manually at any point (i.e. this
process finds
no fixes to make), this Pull Request will be closed automatically.

Sorry if this was unexpected. To disable it, see our [documentation][].

[restyled]: https://restyled.io
[documentation]:
https://github.com/restyled-io/restyled.io/wiki/Disabling-Restyled
2024-09-05 22:59:01 +01:00
Philip Abbey 881700d0ed Update HISTORY.md
v2.21 text
2024-09-05 21:28:33 +01:00
Philip Abbey 75ea23dfbd 7 New devices, mainly Fenix
SDK updated to 7.3.0 in order to get new devices to work in simulation. This means some function prototypes have had to be amended.
2024-09-05 21:23:49 +01:00
Philip Abbey 2e7216b6b2 v2.20 documentation update 2024-08-30 21:18:56 +01:00
Philip Abbey 4432c7b9a0 Update WebhookManager.mc
Speculative fix to handle the callback data from webhook generation perhaps not being Lang.Dict.
2024-08-30 15:49:06 +01:00
Philip Abbey 15e2b19193 Deprecate template type (#177) 2024-08-30 14:32:22 +01:00
Philip Abbey da2e94caa3 Update TroubleShooting.md
Added instructions for how to send the debug log from the watch.
2024-08-30 13:25:41 +01:00
Philip Abbey fb5c2193f1 Create debug_log_location.png
Need a picture to explain to users where to fetch the debug logs from. Only gives the error message, but not the location unfortunately.
2024-08-30 13:18:09 +01:00
Philip Abbey df3be94bf9 Documentation for v2.19 2024-08-29 23:12:13 +01:00
Philip Abbey b5140ce8b4 Added vibrate to confirm toggle items tapped 2024-08-29 21:13:55 +01:00
Philip Abbey 17a5d89998 Prevent negative heading values. 2024-08-29 21:00:50 +01:00
Philip Abbey 63bc127aec Perform all updates in one request (#173) 2024-08-29 20:55:40 +01:00
Philip Abbey bbd9119a07 Update HomeAssistantToggleMenuItem.mc
Prevent multiple toggles for initiating one action. Only set the state when the called service returns with the confirmed value.
2024-08-28 23:01:28 +01:00
Philip Abbey d387152593 Restyle 165 templating content for all types (#171)
Automated style fixes for #170, created by [Restyled][].

The following restylers [made
fixes](https://restyled.io/gh/house-of-abbey/repos/GarminHomeAssistant/jobs/4738467):

- [jq](https://stedolan.github.io/jq/)
- [prettier-json](https://prettier.io/docs/en/options.html#parser)
-
[whitespace](https://github.com/restyled-io/restyler-whitespace/blob/master/README.md)


To incorporate these changes, merge this Pull Request into the original.
We
recommend using the Squash or Rebase strategies.


**NOTE**: As work continues on the original Pull Request, this process
will
re-run and update (force-push) this Pull Request with updated style
fixes as
necessary. If the style is fixed manually at any point (i.e. this
process finds
no fixes to make), this Pull Request will be closed automatically.

Sorry if this was unexpected. To disable it, see our [documentation][].

[restyled]: https://restyled.io
[documentation]:
https://github.com/restyled-io/restyled.io/wiki/Disabling-Restyled
2024-08-25 19:47:20 +01:00
Philip Abbey 2ea349bfda Merge branch 'main' into 165-templating-content-for-all-types 2024-08-25 19:44:58 +01:00
Philip Abbey 1846d682f7 Update HISTORY.md
v2.18 text line amended.
2024-08-25 19:39:27 +01:00
Philip Abbey 685cda7924 Added template option to toggle menu items 2024-08-25 19:34:29 +01:00
Philip Abbey 72e825566c Update TemplateMenuItem.mc
Fixed System.println() calls.
2024-08-25 19:33:33 +01:00
Philip Abbey 1dc95eeac7 Added callback function to TemplateMenuItem 2024-08-25 18:53:32 +01:00
Philip Abbey 08829dac1f Update export.cmd
Trivial update to give the cmd.exe a title.
2024-08-25 16:50:08 +01:00
Philip Abbey ca6e0733c5 Added null checking to activity stats (#169)
Position.getInfo().* might return null sometimes, so best check and
avoid a numerical error.

@KPWhiver My co-author is away presently, would you mind giving this
simple change the once over? Thanks!
2024-08-25 16:15:01 +01:00
Philip Abbey 01f073e67b Update BackgroundServiceDelegate.mc
Only submitting non-null values to HA, not fake zeros for null values.
2024-08-25 13:50:29 +01:00
Philip Abbey 64a9c5f274 Added null checking to activity stats
Position.getInfo().* might return null sometimes, so best check and avoid a numerical error.
2024-08-25 13:07:23 +01:00
Philip Abbey ea32d71a2b Added templates to group items 2024-08-24 18:31:47 +01:00
Philip Abbey f2fb7f65a0 Merge branch 'main' of https://github.com/house-of-abbey/GarminHomeAssistant 2024-08-24 14:30:44 +01:00
Philip Abbey 1e103069bc Update README.md
Feature differences between Application and Widget.
2024-08-24 14:30:23 +01:00
Philip Abbey 520309729d Bug fix for activity reporting (#167)
Added 'has' clauses around additional ActivityMonitor.Info fields that
are not present on all devices. I have also checked the other reporting
fields to ensure they are not device dependent.
2024-08-24 14:26:54 +01:00
Philip Abbey d2aec16811 Update BackgroundServiceDelegate.mc
Failed to make commensurate changes to the background service code.
2024-08-24 14:21:02 +01:00
Philip Abbey a424e35784 Update WebhookManager.mc
Returned internationalized string for unavailable to "unknown" as per review comments advice.
2024-08-24 13:58:47 +01:00
Philip Abbey 5558e25bda Bug fix for activity reporting
Added 'has' clauses around additional ActivityMonitor.Info fields that are not present on all devices.
2024-08-24 12:28:54 +01:00
Philip Abbey 769731bff2 Send heartrate, floor, and respiration rate values to Home Assistant (#162)
This change sends the heartrate, respiration rate, stepcount, and floors
climbed/descended to Home Assistant as mobile app entities. There are a
lot more sensors that could potentially be added.

I have only tested this on a Vivoactive 4s as that is the only device I
own.

Let me know what you think and if there are any changes you would like
to see.
2024-08-20 09:01:00 +01:00
Philip Abbey 2c56155593 Merge branch 'main' into more-mobile-app-sensors
Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2024-08-19 12:36:33 +01:00
Philip Abbey c38f91f456 Fixed merge conflict
Fixed a merge conflict made by more recent changes to fix a bug (https://github.com/house-of-abbey/GarminHomeAssistant/pull/164)
2024-08-19 12:33:23 +01:00
Philip Abbey 51081ee2e6 Update HISTORY.md
Added v2.16
2024-08-18 13:03:30 +01:00
Philip Abbey 7c7130367f Update Settings.mc
Rearranged 'else' clauses.
2024-08-18 12:26:45 +01:00
Philip Abbey 42d1a7233c Update Settings.mc
Test the phone is connected before attempting WebHook HTTP requests.
2024-08-18 12:04:34 +01:00
Philip Abbey a213c6851e Largely cosmetic
Removed debug that escaped.
Belt & braces field to prevent the update chain being started twice.
2024-07-26 18:23:22 +01:00