From ac97a8af0d0682ea46974b0787fb7fe2e5416cd4 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Mon, 29 Sep 2025 21:00:13 +0100 Subject: [PATCH 1/3] New devices and SDK demanded code updates The SDK upgrade called for more careful specification of "or Null" on some fields in classes. The new devices have been added with their resource needs. Need to check if there's an issue with Edge 850 device. --- HISTORY.md | 1 + manifest.xml | 9 +++++++++ monkey.jungle | 18 ++++++++++++++++- resources-icons-56 - DELETE/drawables.xml | 23 ++++++++++++++++++++++ resources-icons-56 - DELETE/error.svg | 1 + resources-icons-56 - DELETE/group_type.svg | 7 +++++++ resources-icons-56 - DELETE/info_type.svg | 1 + resources-icons-56 - DELETE/tap_type.svg | 1 + resources-launcher-38-38/drawables.xml | 17 ++++++++++++++++ resources-launcher-38-38/launcher.svg | 4 ++++ source/Alert.mc | 10 +++++----- source/HomeAssistantApp.mc | 2 +- source/HomeAssistantToggleMenuItem.mc | 2 +- source/Settings.mc | 8 ++++---- source/WifiLteExecutionConfirmDelegate.mc | 2 +- 15 files changed, 93 insertions(+), 13 deletions(-) create mode 100644 resources-icons-56 - DELETE/drawables.xml create mode 100644 resources-icons-56 - DELETE/error.svg create mode 100644 resources-icons-56 - DELETE/group_type.svg create mode 100644 resources-icons-56 - DELETE/info_type.svg create mode 100644 resources-icons-56 - DELETE/tap_type.svg create mode 100644 resources-launcher-38-38/drawables.xml create mode 100644 resources-launcher-38-38/launcher.svg diff --git a/HISTORY.md b/HISTORY.md index 575ee81..0290da9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -50,3 +50,4 @@ | 3.2 | Only enable or disable sensors on HomeAssistant when the background service options is changed, i.e. do not call the API to enable on start up every time. | | 3.3 | Providing automatic detection for menu definition updates, but still requires an application restart. | | 3.4 | Fixed a bug where templates failed to display in toggle menu items (at least on some devices). Fixed a bug where a menu item requesting to exit on completion appeared to indicate failure when using Wi-Fi or LTE. The fix uses a delay in exiting the application modelled as sufficient for a Venu 2 device, so this might need tweaking for other devices. Attempt to fixed an "Out of Memory" bug caused by v3.3 by making automatic checking for menu updates both optional and automatically turned off when insufficient memory is available. This last bug is device dependent and may require another attempt. Internationalisation improvements with thanks to @krzys_h for a new automated translations script. | +| 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. | diff --git a/manifest.xml b/manifest.xml index 4675040..d17e98b 100644 --- a/manifest.xml +++ b/manifest.xml @@ -57,11 +57,14 @@ + + + @@ -89,6 +92,7 @@ + @@ -117,6 +121,7 @@ + @@ -124,6 +129,7 @@ + @@ -147,11 +153,14 @@ + + + diff --git a/monkey.jungle b/monkey.jungle index 02e1cc0..c76e83d 100644 --- a/monkey.jungle +++ b/monkey.jungle @@ -20,7 +20,7 @@ project.manifest = manifest.xml # Device References # * https://developer.garmin.com/connect-iq/compatible-devices/ -# * https://developer.garmin.com/connect-iq/reference-guides/devices-reference/ +# * https://developer.garmin.com/connect-iq/device-reference/ # # Widget launcher icon, multiple resolutions # https://forums.garmin.com/developer/connect-iq/f/discussion/255433/widget-launcher-icon-multiple-resolutions/1563305 @@ -77,14 +77,20 @@ edge520plus.resourcePath = $(edge520plus.resourcePath);resources-launcher-35-35; # Screen Size 246x322 launcher icon size 35x35 edge530.resourcePath = $(edge530.resourcePath);resources-launcher-35-35;resources-icons-28 edge540.resourcePath = $(edge540.resourcePath);resources-launcher-35-35;resources-icons-28 +# Screen Size 420x600 launcher icon size 56x56 +edge550.resourcePath = $(edge550.resourcePath);resources-launcher-56-56;resources-icons-55 # Screen Size 200x265 launcher icon size 35x35 edge820.resourcePath = $(edge820.resourcePath);resources-launcher-35-35;resources-icons-24 # Screen Size 246x322 launcher icon size 35x35 edge830.resourcePath = $(edge830.resourcePath);resources-launcher-35-35;resources-icons-28 edge840.resourcePath = $(edge840.resourcePath);resources-launcher-35-35;resources-icons-28 +# Screen Size 420x600 launcher icon size 56x56 +edge850.resourcePath = $(edge850.resourcePath);resources-launcher-56-56;resources-icons-55 # Screen Size 240x400 launcher icon size 36x36 edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;resources-icons-28 edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28 +# Screen Size 240x320 launcher icon size 36x36 +edgemtb.resourcePath = $(edgemtb.resourcePath);resources-launcher-36-36;resources-icons-32 # Screen Size 280x280 launcher icon size 40x40 enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32 enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32 @@ -128,6 +134,7 @@ fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launc fenix843mm.resourcePath = $(fenix843mm.resourcePath);resources-launcher-60-60;resources-icons-48 # Screen Size 454x454 launcher icon size 65x65 fenix847mm.resourcePath = $(fenix847mm.resourcePath);resources-launcher-65-65;resources-icons-53 +fenix8pro47mm.resourcePath = $(fenix8pro47mm.resourcePath);resources-launcher-65-65;resources-icons-53 # Screen Size 260x260 launcher icon size 40x40 fenix8solar47mm.resourcePath = $(fenix8solar47mm.resourcePath);resources-launcher-40-40;resources-icons-30 # Screen Size 280x280 launcher icon size 40x40 @@ -173,6 +180,7 @@ fr970.resourcePath = $(fr970.resourcePath);resources-launcher-65-65;resources-ic # Screen Size 240x400 launcher icon size 38x33 gpsmap66.resourcePath = $(gpsmap66.resourcePath);resources-launcher-33-33;resources-icons-28 gpsmap67.resourcePath = $(gpsmap67.resourcePath);resources-launcher-33-33;resources-icons-28 +gpsmaph1.resourcePath = $(gpsmaph1.resourcePath);resources-launcher-33-33;resources-icons-28 # Screen Size 176x176 launcher icon size 62x62 instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w # Screen Size 163x156 launcher icon size 54x54 @@ -187,6 +195,8 @@ instinct3amoled50mm.resourcePath = $(instinct3amoled50mm.resourcePath);resources instinct3solar45mm.resourcePath = $(instinct3solar45mm.resourcePath);resources-launcher-62-62;resources-icons-18-w # Screen Size 176x176 launcher icon size 26x26 instinctcrossover.resourcePath = $(instinctcrossover.resourcePath);resources-launcher-26-26;resources-icons-21-w +# Screen Size 390x390 launcher icon size 38x38 +instinctcrossoveramoled.resourcePath = $(instinctcrossoveramoled.resourcePath);resources-launcher-38-38;resources-icons-46 # Screen Size 166x166 launcher icon size 52x52, but the icon size used here is reduced as the menu items were clipped. instincte40mm.resourcePath = $(instincte40mm.resourcePath);resources-launcher-52-52;resources-icons-18-w # Screen Size 176x176 launcher icon size 62x62, but the icon size used here is reduced as the menu items were clipped. @@ -223,6 +233,10 @@ venu2s.resourcePath = $(venu2s.resourcePath);resources-launcher-61-61;resources- venu3.resourcePath = $(venu3.resourcePath);resources-launcher-70-70;resources-icons-53 # Screen Size 390x390 launcher icon size 70x70 venu3s.resourcePath = $(venu3s.resourcePath);resources-launcher-70-70;resources-icons-46 +# Screen Size 390x390 launcher icon size 54x54 +venu441mm.resourcePath = $(venu441mm.resourcePath);resources-launcher-54-54;resources-icons-46 +# Screen Size 454x454 launcher icon size 65x65 +venu445mm.resourcePath = $(venu445mm.resourcePath);resources-launcher-65-65;resources-icons-53 # Screen Size 390x390 launcher icon size 60x60 venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-icons-46 # Screen Size 240x240 launcher icon size 36x36 @@ -232,6 +246,8 @@ venusq2.resourcePath = $(venusq2.resourcePath);resources-launcher-40-40;resource venusq2m.resourcePath = $(venusq2m.resourcePath);resources-launcher-40-40;resources-icons-38 # Screen Size 240x240 launcher icon size 36x36 venusqm.resourcePath = $(venusqm.resourcePath);resources-launcher-36-36;resources-icons-28 +# Screen Size 448x486 launcher icon size 65x65 +venux1.resourcePath = $(venux1.resourcePath);resources-launcher-65-65;resources-icons-53 # Screen Size 240x240 launcher icon size 40x33 vivoactive3.resourcePath = $(vivoactive3.resourcePath);resources-launcher-33-33;resources-icons-28 vivoactive3m.resourcePath = $(vivoactive3m.resourcePath);resources-launcher-33-33;resources-icons-28 diff --git a/resources-icons-56 - DELETE/drawables.xml b/resources-icons-56 - DELETE/drawables.xml new file mode 100644 index 0000000..33c0707 --- /dev/null +++ b/resources-icons-56 - DELETE/drawables.xml @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/resources-icons-56 - DELETE/error.svg b/resources-icons-56 - DELETE/error.svg new file mode 100644 index 0000000..4c627e3 --- /dev/null +++ b/resources-icons-56 - DELETE/error.svg @@ -0,0 +1 @@ + diff --git a/resources-icons-56 - DELETE/group_type.svg b/resources-icons-56 - DELETE/group_type.svg new file mode 100644 index 0000000..74eee53 --- /dev/null +++ b/resources-icons-56 - DELETE/group_type.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/resources-icons-56 - DELETE/info_type.svg b/resources-icons-56 - DELETE/info_type.svg new file mode 100644 index 0000000..c00383a --- /dev/null +++ b/resources-icons-56 - DELETE/info_type.svg @@ -0,0 +1 @@ + diff --git a/resources-icons-56 - DELETE/tap_type.svg b/resources-icons-56 - DELETE/tap_type.svg new file mode 100644 index 0000000..70fab7d --- /dev/null +++ b/resources-icons-56 - DELETE/tap_type.svg @@ -0,0 +1 @@ + diff --git a/resources-launcher-38-38/drawables.xml b/resources-launcher-38-38/drawables.xml new file mode 100644 index 0000000..44c0b71 --- /dev/null +++ b/resources-launcher-38-38/drawables.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/resources-launcher-38-38/launcher.svg b/resources-launcher-38-38/launcher.svg new file mode 100644 index 0000000..bb9d1cd --- /dev/null +++ b/resources-launcher-38-38/launcher.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/source/Alert.mc b/source/Alert.mc index edc67c6..6878089 100644 --- a/source/Alert.mc +++ b/source/Alert.mc @@ -46,27 +46,27 @@ class Alert extends WatchUi.View { function initialize(params as Lang.Dictionary) { View.initialize(); - mText = params[:text] as Lang.String; + mText = params[:text] as Lang.String?; if (mText == null) { mText = "Alert"; } - mFont = params[:font] as Graphics.FontType; + mFont = params[:font] as Graphics.FontType?; if (mFont == null) { mFont = Graphics.FONT_MEDIUM; } - mFgcolor = params[:fgcolor] as Graphics.ColorType; + mFgcolor = params[:fgcolor] as Graphics.ColorType?; if (mFgcolor == null) { mFgcolor = Graphics.COLOR_BLACK; } - mBgcolor = params[:bgcolor] as Graphics.ColorType; + mBgcolor = params[:bgcolor] as Graphics.ColorType?; if (mBgcolor == null) { mBgcolor = Graphics.COLOR_WHITE; } - mTimeout = params[:timeout] as Lang.Number; + mTimeout = params[:timeout] as Lang.Number?; if (mTimeout == null) { mTimeout = 2000; } diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index 4fa18fe..d9b3c61 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -769,7 +769,7 @@ class HomeAssistantApp extends Application.AppBase { break; case Communications.BLE_QUEUE_FULL: - // System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid."); +System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid."); if (mIsApp) { ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String); } diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index 342fad8..aeaffbe 100644 --- a/source/HomeAssistantToggleMenuItem.mc +++ b/source/HomeAssistantToggleMenuItem.mc @@ -23,7 +23,7 @@ using Toybox.Timer; // class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { private var mData as Lang.Dictionary; - private var mTemplate as Lang.String; + private var mTemplate as Lang.String?; private var mExit as Lang.Boolean; private var mConfirm as Lang.Boolean; private var mPin as Lang.Boolean; diff --git a/source/Settings.mc b/source/Settings.mc index 3bde5f7..4dc435e 100644 --- a/source/Settings.mc +++ b/source/Settings.mc @@ -29,10 +29,10 @@ using Toybox.Time; // (:glance, :background) class Settings { - private static var mApiKey as Lang.String = ""; - private static var mWebhookId as Lang.String = ""; - private static var mApiUrl as Lang.String = ""; - private static var mConfigUrl as Lang.String = ""; + private static var mApiKey as Lang.String? = ""; + private static var mWebhookId as Lang.String? = ""; + private static var mApiUrl as Lang.String? = ""; + private static var mConfigUrl as Lang.String? = ""; private static var mCacheConfig as Lang.Boolean = false; private static var mClearCache as Lang.Boolean = false; private static var mMenuCheck as Lang.Boolean = false; diff --git a/source/WifiLteExecutionConfirmDelegate.mc b/source/WifiLteExecutionConfirmDelegate.mc index 0cae605..5b3e800 100644 --- a/source/WifiLteExecutionConfirmDelegate.mc +++ b/source/WifiLteExecutionConfirmDelegate.mc @@ -30,7 +30,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate { :url as Lang.String?, :id as Lang.Number?, :exit as Lang.Boolean - }; + }?; private static var mTimer as Timer.Timer?; private var mHasToast as Lang.Boolean = false; From 6fc6be2eef7ae014e3be64979070bd9ae650d8d3 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Tue, 30 Sep 2025 16:53:04 +0100 Subject: [PATCH 2/3] Update HomeAssistantApp.mc Removed debug print statements. --- source/HomeAssistantApp.mc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index d9b3c61..9bbb5d0 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -769,7 +769,7 @@ class HomeAssistantApp extends Application.AppBase { break; case Communications.BLE_QUEUE_FULL: -System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid."); + // System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUEUE_FULL, API calls too rapid."); if (mIsApp) { ErrorView.show(WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String); } @@ -797,6 +797,7 @@ System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: BLE_QUE break; case 200: + // System.println("HomeAssistantApp onReturnFetchApiStatus() Response Code: 200."); if ((data != null) && (data instanceof Lang.Dictionary) && data["message"].equals("API running.")) { mApiStatus = WatchUi.loadResource($.Rez.Strings.Available) as Lang.String; } else { From 06e7c89b60e53328b6b6a4bad5e1bedb654cd2b1 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Tue, 30 Sep 2025 16:58:34 +0100 Subject: [PATCH 3/3] Amended documentation for Edge devices --- HISTORY.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 0290da9..571d871 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -50,4 +50,4 @@ | 3.2 | Only enable or disable sensors on HomeAssistant when the background service options is changed, i.e. do not call the API to enable on start up every time. | | 3.3 | Providing automatic detection for menu definition updates, but still requires an application restart. | | 3.4 | Fixed a bug where templates failed to display in toggle menu items (at least on some devices). Fixed a bug where a menu item requesting to exit on completion appeared to indicate failure when using Wi-Fi or LTE. The fix uses a delay in exiting the application modelled as sufficient for a Venu 2 device, so this might need tweaking for other devices. Attempt to fixed an "Out of Memory" bug caused by v3.3 by making automatic checking for menu updates both optional and automatically turned off when insufficient memory is available. This last bug is device dependent and may require another attempt. Internationalisation improvements with thanks to @krzys_h for a new automated translations script. | -| 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. | +| 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. The simulation of the Edge 850 device was off, as it failed to update the display and text was the wrong colour, but the buttons menu items operated HA correctly. The assumption is the simulation model is buggy until someone [reports](https://github.com/house-of-abbey/GarminHomeAssistant/issues) otherwise. | diff --git a/README.md b/README.md index ecb13d2..023f49f 100644 --- a/README.md +++ b/README.md @@ -354,7 +354,7 @@ Check the latest unresolved [issues](https://github.com/house-of-abbey/GarminHom 5. Parameters to tap menu items cannot have their parameter usage verified. If you get this wrong and crash the application, that's your fault not the application's. In this case, start by removing the parameters for the menu item causing the crash, and add them back one at a time until you find your fault. **Please don't give the application a poor review for your bad parameter definition!** -6. We are unable to support Edge 540, Edge 840 and Edge 1050 devices at this time. The simulation of these devices has two unexpected errors when toggling or executing taps. We get both `Communications.NETWORK_RESPONSE_OUT_OF_MEMORY` and `Communications.BLE_QUEUE_FULL` even though the memory usage is about 6% of the available RAM. Based on a lead from user @Petucky, both devices are being re-enabled as testing on a real Edge 840 device has proven successful, however we remain unable to support either devices until the simulator is fixed. +6. We are unable to support Edge 540, Edge 840 and Edge 1050 devices at this time. The simulation of these devices has two unexpected errors when toggling or executing taps. We get both `Communications.NETWORK_RESPONSE_OUT_OF_MEMORY` and `Communications.BLE_QUEUE_FULL` even though the memory usage is about 6% of the available RAM. Based on a lead from user @Petucky, both devices are being re-enabled as testing on a real Edge 840 device has proven successful, however we remain unable to support either devices until the simulator is fixed. The Edge 850 device has different display update issues but is functional. Again the assumption is the simulation model is buggy. Please [report](https://github.com/house-of-abbey/GarminHomeAssistant/issues) your experience on real devices to us so we can withdraw support or confirm they are working. 7. We are unable to support HTTP natively (without the workaround specified earlier). This is a limitation placed upon us by the Connect IQ API which for security reasons refuses to work with HTTP requests. There is nothing developers can do about this limitation. See the [Trouble Shooting](TroubleShooting.md#do-it-yourself-setup) guide for an example setup. We would appreciate it if users did not leave poor reviews for the lack of this feature which is beyond our control to fix.