As for the problem concerning the two Switch lines, I apologize Robert for not describing my problem precisely enough - it concerned an item of the Group type (which you couldn’t have guessed). That is my item:
Group:Switch:OR(ON, OFF) LedG "LED[(%d)]" <color>
This item is used on the standard sitemap in the form:
I use this sitemap in an android app, it works and looks like this:
[screenshot to be attached]
This means I have the option to Switch OFF the entire group, but at the same time I can see in parentheses how many members of the group are ON.
In the case of your Garmin app, this only works (allows to Switch OFF group while displaying the number of members are ON) when I use the line:
Switch item=LedG label="LED Group [(%d)]"
but on the watch it displays the value of members ON in double brackets: square brackets and parentheses, not like in Android only in parentheses.
[screenshot to be attached - today evening]
%s if I remember correctly is for string type items and %d is for number type items - so its not the case here.
I wanted to point out that this is not some big critical problem and if it is time-consuming then it is definitely better to put it aside and develop the project with other functionalities
EDIT:
We have to postpone the issue of the Switch item of the Group type which shows how many members are ON. Unfortunately, I am not able to reproduce the situation again. I could swear I saw “LED Group [(3)] switch” in the watch, but currently there are no brackets with a number
Reinstalling the Florian file helped - remote control from the watch returned.
OK, yes — the absence of a formatted state in square brackets is what I would have expected.
If you do see it again, please let me know — there might be a bug in the app at work here.
I think you’ve raised a valid use case, and I’d like to support it in the app — I’ll work on adding that.
Glad to hear it, I’ll add this to the troubleshooting section of the user manual.
Hi Robert. Running v0.3.3 on a Garmin Edge 540, I think I have it configured correctly, running a very simple sitemap, but when I access the app, I seem to get the following error:
Unfortunately, a recent update introduced a bug that causes the toggle switch to crash on Edge devices and some older watches (issue #153). I’ve already fixed the issue, and the fix will be included in the next release, which should be available in the coming days.
In the meantime, you can work around the problem by adding a mappings definition to the Switch element in your sitemap:
This release resolves the crash that occurred on Edge devices and certain older watch models. @g_g_rich — please let me know if the fix works for you.
Display of rendered state next to toggle switches
If a display pattern is defined for a Switch item—either in the item metadata or the sitemap—the resulting string will now be shown next to the toggle switch.
Example:
Group item=TEST_GROUP label="Group [(%d)]"
This would render as follows (see second menu item):
@stonke, let me know if this works for your use case.
Icon support
Icons can now be displayed next to items, either defined directly in the sitemap or via item metadata.
If an icon is defined in metadata but you don’t want it to appear, you can suppress it by setting the icon parameter to an empty string ("") in the sitemap.
The icons are built into the app, and while the current set is limited, more can be added on request. You can find the full list of supported icons in the Icons section.
Wherever openHAB supports dynamic state-based icons (e.g., for lights, rollershutters, or garage doors), the app supports them too.
Example screenshots:
As always, feel free to reach out if you have feedback or requests—especially if you’d like to see specific icons added!
I’ve just uploaded v0.4.0 Release Candidate 1 to the Beta app.
If you have the chance to test it with your sitemap, it would be a great help.
This release includes significant internal changes that I’d like to validate more broadly before making them available in the main release.
Why this version is important
Recent additions like support for groups and icons revealed some underlying issues:
Stack overflow: Garmin CIQ apps have a limited stack size. With as few as three levels of sitemap hierarchy, the previous recursive processing could cause a crash.
Watchdog timeout: Garmin enforces a limit on uninterrupted code execution time. In complex sitemaps with icons, this limit could be exceeded during startup, also resulting in a crash.
What has changed
Both issues have been addressed:
Sitemap processing is now performed iteratively instead of recursively, avoiding stack exhaustion.
Menu initialization at startup is now broken into smaller asynchronous tasks, similar to how updates are already handled, preventing watchdog timeouts.
Additional improvements
The Group element now supports all item types, not just those explicitly mapped to a widget.
Support for the newly released Venu X1 has been added.
Thanks in advance for testing and for your continued feedback.
wow ! Thanks for the amazing developement! I am trying 0.3.4 on my garmin vivoactive 5s. I only can use it by https://home.myopenhab.org not with my internal IP in my WLAN. (Android phone, https://192.168.1.52:8443, the http with Port 8181 also does not work. Where do I have to check the certificates?
How is it possible to change light switches or anything else?
Thanks,
Klaus
Unfortunately, on Android, Garmin only supports HTTPS connections with a trusted (i.e., not self-signed) SSL certificate. The easiest way to achieve this is by using myopenHAB.org, which provides a valid certificate out of the box.
A common option for obtaining a free, valid certificate is Let’s Encrypt, though keep in mind that these certificates need to be renewed every 90 days.
Interestingly, on iOS, Garmin does support plain HTTP connections.
If you’re using openHAB 4.3.x, the best option is to install the backport of the native JSON-based REST API. This allows external apps to send commands to openHAB items.
Alternatively, you can use a custom webhook set up through the webhook binding.
v0.4.0 has been released to the stable channel. For details on the changes, see the quoted post. If you experience any issues with the update, please don’t hesitate to reach out.
I’m using your evcc app on my Garmin since a long time and glad I discovered this one!
Just started to play with it, and looks great!
I’ve a small question: When I used sitemaps in the past, I created 2 items for my dimmers, so I hade a simple one of turing these light completed off are back on
Slider item=NHC_Bureau
Switch item=NHC_Bureau
But in the Garmin app I get the error: Switch 'Bureau' invalid state '61'
When I remove the Switch item, everything is ok.
Add a mapping does work, but than I need to set a fixed value for my dimmer mappings=[0="OFF", 100="ON"]
If I understand correctly, the item has a numeric state (0–100), but still accepts ON/OFF commands? And when switched OFF and then back ON, it returns to its previous dimmer level?
I’ve just uploaded Version 0.4.1, which includes the following enhancements:
Switch elements linked to Dimmer items are now correctly displayed as toggle switches (when no mappings are defined). For state display, a value of 0 is treated as OFF, and any value from 1 to 100 as ON.
The door and poweroutlet icons are now supported, including state-dependent rendering.