Compare commits

...

5 Commits

Author SHA1 Message Date
Philip Abbey
6721a13e99 Update HomeAssistantApp.mc
Faster custom Glance update.
2026-02-28 18:51:42 +00:00
Philip Abbey
b6cec5a6d4 Update Glance.md
Fixed typo.
2026-02-28 18:10:49 +00:00
Philip Abbey
75ccf7dc01 Merge branch 'main' into 343-glance-text-not-visible-on-venu-33s-works-on-one-out-8f-3-devices 2026-02-28 18:09:43 +00:00
Philip Abbey
6596b5fa5d Markdown documentation linting 2026-02-28 18:01:50 +00:00
Philip Abbey
b94343de4f Revise troubleshooting guide for API and SSL issues
Updated troubleshooting documentation for API testing and SSL certificate issues, including clearer instructions and formatting improvements.

Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2026-02-28 16:47:20 +00:00
7 changed files with 21 additions and 30 deletions

View File

@@ -22,7 +22,7 @@ Thank you to all those who have provided positive feedback, code and language tr
> [!IMPORTANT]
> **The intended audience for this application are those comfortable with configuring a HomeAssistant** (e.g. editing the YAML configuration files) and debugging why URLs don't work. It does not require programming skills, but the menu is configured via JSON which feels like "coding" (more like "describing"). If you are not comfortable with this relatively low level of configuration, you may like to try other Garmin applications instead.
>
> [!IMPORTANT]
> Remember, you are expecting to define a customised menu making use of several options using your Home Assistant's custom entities on a small (portable) device. **There is no "_simple_" way to configure the menu with the ever increasing options demanded by the user community.** Was your Home Assistant trivial to setup? No!
>
@@ -392,9 +392,8 @@ Two words. Perhaps too lazy to consider why others gave rave reviews and ponder
<img src="images/etiquette/2026-01-21 GHA_Bad_Review.png" width="70%" title="Two words">
<hr>
---
Blaming the wrong application. Just rude. Please get your facts straight. And it was such a simple workaround for the Garmin Connect IQ app bug.
<img src="images/etiquette/2025-11-19%20GHA_Bad_Review.png" width="85%" title="Misplaced blame">
s

View File

@@ -11,6 +11,7 @@ The application is designed around a simple scrollable menu where menu items hav
**The intended audience for this application are those comfortable with configuring a HomeAssistant** (e.g. editing the YAML configuration files) and debugging why URLs don't work. It does not require programming skills, but the menu is configured via JSON which feels like "coding" (more like "describing"). If you are not comfortable with this relatively low level of configuration, you may like to try other Garmin applications instead.
**If you are struggling with getting the application to work, please consult the [troubleshooting guide](TroubleShooting.md) first.** Please also be aware of the [etiquette](Etiquette.md) the developers expect before:
1. Reaching out for help, in short read the instructions.
2. Reviewing the application publicly, in short be sure of your claims.
@@ -62,6 +63,7 @@ The following table lists the differences in functionality between the two. The
> Remember, you are expecting to define a customised menu making use of several options using your Home Assistant's custom entities on a small (portable) device. **There is no "_simple_" way to configure the menu with the ever increasing options demanded by the user community.** Was your Home Assistant trivial to setup? No!
>
> Therefore as developers we have two options:
>
> 1. Assistance via menu driven configuration with nested menus on a small screen whose implementation would expand the code beyond the capacity of smaller devices, or
> 2. As we have opted here, for assistance via some external configuration that is driven by code and can be authored using a more fully functional desktop or laptop PC.
>
@@ -314,6 +316,7 @@ A future move to v3.x will remove support for all deprecated JSON elements to si
## Editing the JSON file
You have options. The first is what we use.
1. **Best!** Use the GarminHomeAssistant [Web-based Editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) which includes `entity` and `action` name completion and validation by fetching data from your own HomeAssistant instance. _Pretty nifty eh?_ The other method listed below do not add this convenience and checking. NB. This has been tested in Microsoft Edge, Chrome and Firefox.
2. Use the [Studio Code Server](https://community.home-assistant.io/t/home-assistant-community-add-on-visual-studio-code/107863) addon for HomeAssistant. You can then edit your JSON file in place.
3. Locally installed VSCode, or if not installed, try
@@ -369,6 +372,7 @@ You may choose to cache your menu definition on your device in order to reduce t
**Summary:** The two cache options are therefore distinct, the **first is a manual** forced refresh (the old way). The menu is refreshed on start up and no restart is required. The **second enables automatic checking** after starting and after presenting a usable menu with no extra delay but then any detected changes require a restart.
Whilst it would be a smoother experience, there are no plans to make the menu definition update dynamically recreate the rendered menu items without a restart because:
1. Re-rendering the menu could change the selected item just as you action it.
2. V3.3 proved that older devices are now reaching their memory limits. If you have an old device with limited memory to spare you will probably find the App disables the automatic method for you. If your device crashes with this option turned on, best turn it off manually and let me know via a [Github issue](https://github.com/house-of-abbey/GarminHomeAssistant/issues). This will allow us to fine tune the conditions for insufficient memory. We will then ask you to perform a [small task to retrieve the debug information](https://developer.garmin.com/connect-iq/core-topics/debugging/) we need about memory usage.
3. Restarting is simple for the user and simpler for the code.

View File

@@ -117,6 +117,7 @@ pause
#### API: On-line
There's an online way of testing the API URL too, thanks to [REQBIN](https://reqbin.com/post-online). This has less setup and it can be saved if you log into the web site. Please note two things:
1. The URL entere below must include a trailing '/' unlike the URL entered into the watch settings.
2. The service imposes a limit on the number requests you can submit without a subscription, so click with purpose! NB. Changing browser buys you a few more clicks.
@@ -125,13 +126,10 @@ There's an online way of testing the API URL too, thanks to [REQBIN](https://req
#### SSL Certificate Chain
With thanks to [@ziceva](https://github.com/ziceva) for solving this problem. The symptoms are:
1. Using an API URL with SSL (HTTPS), the [web-based editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) running in a browser on the same phone running Garmin Connect works well.
2. The exact same configuration is set in the Garmin HomeAssistant application.
3. The Garmin HomeAssistant application reports:
```
API: not available
Menu: not available
```
3. The Garmin HomeAssistant application reports neither the API nor the menu are available.
**Solution: Make sure you use a _full chain_ certificate in your HTTPS proxy as some watches might be unable to validate the site certificate alone.**
@@ -147,7 +145,6 @@ To verify if you have this issue you can use a tool like [SSL Shoppers's SSL Che
![Full Chain Certificate](images/HTTPS_full_chain.png)
### Top Problems
1. Failure to copy & paste keys and URLs leading to minor and hard to see errors in strings, even with protestations they are the same! (No they weren't...)
@@ -158,17 +155,11 @@ To verify if you have this issue you can use a tool like [SSL Shoppers's SSL Che
The [editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) provides the following functions:
1. Syntax highlighting
2. Schema checking
![Schema checking](images/editor/schema_check.png)
3. Entity name completion
![Entity name completion](images/editor/entity_name_completion.png)
4. Rendering previews, to aid HA 'template' creation
![Syntax highlightingL](images/editor/template_preview1.png)
![Syntax highlightingL](images/editor/template_preview2.png)
@@ -185,6 +176,7 @@ On (1) you will initially be presented with the following message. Please do not
<div style="margin:30px;padding:20px;background-color:lightgrey;border:1px solid black;border-radius: 10px;">
# GarminHomeAssistant Web Editor
This is the web editor for the GarminHomeAssistant watch app, it offers enhanced schema checking and validation over the original JSON schema by using the HomeAssistant API to create a schema based on your HomeAssistant configuration.
This editor makes use of the same credentials as the watch app (these can be pasted in the top bar of this page). However in order for this editor to work, you will need to amend the CORS settings of your HomeAssistant instance. Add this to your configuration.yaml file:
@@ -215,7 +207,7 @@ For directions on how to write your menu.json file, please see the README in the
For this you will need to have already got the main application or widget working with a menu in order to prove that the API calls are successful. We have proven this works with both our home brew infrastructure as well as Nabu Casa. Now with a script similar to one of the following two, you should be able to fake the watch API call and verify receipt by HomeAssistant.
#### Battery: Linux, MacOS, UNIX, Cygwin etc
### Battery: Linux, MacOS, UNIX, Cygwin etc
Assume a file called: `send_battery.bash`
@@ -248,13 +240,13 @@ curl -s -X POST \
Execute:
```
```text
$ ./send_battery.bash 45 1
```
The output looks like this:
```
```text
Battery Level = 45
Battery Charging? = true
@@ -315,13 +307,13 @@ pause
Execute:
```
```text
> home_assistant_battery_level.cmd 41 1
```
The output looks like this:
```
```text
"Battery Level = 41"
"Battery Charging? = true"
@@ -345,7 +337,7 @@ There's an online way of testing the API URL too, thanks to [REQBIN](https://req
URL for copy & paste:
```
```text
https://<Your Domain>/api/webhook/<Your Webhook ID>
```
@@ -399,7 +391,7 @@ As a desperate measure to assist with debugging the HomeAssistant Application, y
The figure above shows how to find the file on Windows by attaching your watch by USB cable. Inside the `CIQ_LOG.YML` file there are often multiple entries, each looking like this:
```
```text
Error: Unexpected Type Error
Details: 'Failed invoking <symbol>'
Time: 2024-08-30T12:00:25Z

View File

@@ -18,7 +18,7 @@ With version 3.0 onwards the application now includes the ability to temporarily
5. On some Garmin devices, the HTTPS handshake is performed using **TLS 1.2**. If your server or proxy enforces a higher minimum (e.g., TLS 1.3), you will encounter an SSL handshake error with the message:
```
```text
HTTP request returned error code = 0
```

View File

@@ -1,6 +1,5 @@
[Home](../README.md) | [Switches](Switches.md) | [Actions](Actions.md) | [Templates](Templates.md) | [Numeric](Numeric.md) | [Glance](Glance.md) | [Background Service](../BackgroundService.md) | [Wi-Fi](../Wi-Fi.md) | [HTTP Headers](../HTTP_Headers.md) | [Trouble Shooting](../TroubleShooting.md) | [Version History](../HISTORY.md)
# Actions
Two simple examples using a scene and a cover as `tap` menu items.
@@ -47,8 +46,8 @@ For example:
"confirm": true
}
}
```
The `confirm` field may contain a string instead of a Boolean in order to provide a custom message to display instead of the default "Sure?" text.
```json

View File

@@ -2,8 +2,7 @@
# Glance
Since [version 2.30](../History.md), it is possible to ovverride the text displayed on the Glance view. This page explains how to customise the text.
Since [version 2.30](../History.md), it is possible to override the text displayed on the Glance view. This page explains how to customise the text.
## Status View
@@ -13,7 +12,6 @@ The status view displays the accessibility of HomeAssistant API to indicate if t
When API is inaccessible the field will turn red.
## Customised View
In order to customise the Glance view you need to add a `glance` field to the top level of the JSON menu file as illustrated here:
@@ -68,7 +66,6 @@ It is possible to revert to the default glance content without deleting the temp
So the glance view object has a `type` field with two possible values: `info` and `status`. When the type is `status` the `content` field is not required.
## Displayed Errors
The following shows the status Glance view when the API not available at the specified URL.

View File

@@ -998,11 +998,11 @@ class HomeAssistantApp extends Application.AppBase {
mIsApp = false; // A bit unnecessary given the default
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
Settings.update();
glanceTemplate();
updateStatus();
mGlanceTimer = new Timer.Timer();
mGlanceTimer.start(method(:updateStatus), Globals.scApiBackoffMs, true);
// Although this is now known immediately, wait before displaying so the status can be seen first.
glanceTemplate();
return [new HomeAssistantGlanceView(self)];
}