Compare commits

..

26 Commits

Author SHA1 Message Date
6b2aa3135a Added support for 3 new devices (#237) 2025-05-27 06:37:19 +01:00
907848b5fb Added support for 3 new devices 2025-05-24 15:53:19 +01:00
5f34f870d9 Support for Vivoactive 6 device (#230)
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-25 07:59:58 +01:00
ada18f8323 Update export.cmd
'--api-level' command line switch removed from SDK 8.1.0
2025-04-24 22:38:10 +01:00
f74a3168de Update manifest.xml
The App ID should not have been changed from the test app.
2025-04-24 22:30:43 +01:00
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
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
4ed132b9ca Update HISTORY.md
Added ver 2.27 text.
2025-04-21 13:59:13 +01:00
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
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
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
5ee8a6cc6a Update index.html
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-03-30 15:25:54 +01:00
5e35276628 Update main.js
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
2025-03-30 15:22:49 +01:00
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
e8f2c0d3bb Amended menu item class inheritance 2025-03-28 00:22:09 +00:00
71cba8c21c Code attribution for author of PIN entry.
Prior to sorting out inheritance.
2025-03-28 00:20:53 +00:00
236a4969d7 Menu item code tidy
Prior to sorting out inheritance.
2025-03-27 20:45:51 +00:00
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
c13e898e59 Update HISTORY.md
v2.25
2025-03-27 07:35:44 +00:00
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
155649f162 Fix for 2 bugs in issue 221
Template rendering and Webhook ID on initial start.
2025-03-26 22:37:33 +00:00
1ae4085113 219 new garmin device keeps replacing previous device (#220) 2025-03-23 16:59:52 +00:00
7a14a65ba3 Update HISTORY.md
2.24 text
2025-03-23 16:54:52 +00:00
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
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
184e2ac80e Add 4 new devices
approachs50, descentg2, descentmk1, and gpsmap66
2025-03-23 15:59:29 +00:00
22 changed files with 311 additions and 193 deletions

View File

@ -36,3 +36,9 @@
| 2.21 | Added 7 new devices (`edge1050`, `enduro3`, `fenix843mm`, `fenix847mm`, `fenix8solar47mm`, `fenix8solar51mm`, `fenixe`) and upgraded the SDK to 7.3.0. Fix for a bug on Edge devices introduced by v2.16 activity reporting improvements. |
| 2.22 | Major feature release adding an optional PIN to menu items. This significant new feature has been provided by [moesterheld](https://github.com/moesterheld). Please do not rely on this application for security. Use at your own risk! |
| 2.23 | Added "info" menu item for displaying information via a template without a tap or toggle. Essentially like the old 'template' type that was deprecated when all items were amended to display evaluated templates. That action removed the display only items too hastily. Added 5 new devices in the model range Instinct 3 and Instinct E. |
| 2.24 | Experiment to prevent new Webhook IDs being created unnecessarily. Reduced the latency for the first menu update. Added 4 new devices: approachs50, descentg2, descentmk1, and gpsmap66. |
| 2.25 | 2 Bug fixes. First time startup issues caused by v2.24 change and a fix for pure numbers in returned templates. |
| 2.26 | Retry responsive menu fix failed in v2.24. Cosmetic internal class changes. |
| 2.27 | Trivial bug fix for the glance view to prevent the "Unconfigured" result being erroneously displayed because the settings were not yet pulled from persistent storage. |
| 2.28 | Added support for Vivoactive 6 device which also required an SDK update to 8.1.0. |
| 2.29 | Added support for three new devices, Forerunners 570 42mm & 47mm and 970. |

View File

@ -120,6 +120,32 @@ There's an online way of testing the API URL too, thanks to [REQBIN](https://req
![API Test REQBIN](images/api_test_online.png)
#### 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 Home Assistant application.
3. The Garmin Home Assistant application reports:
```
API: not available
Menu: not 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.**
Most web browsers and OSes probably have the latest Certificate Authorities (CAs) trusted out-of-the-box and so they do not need the full chain to verify the certificates. Garmin watches may not have the latest CAs and that is why the Troubleshooting web page does not catch this problem. E.g. It turns out some Garmin watches do not have the LetsEncrypt CA marked as trusted.
To verify if you have this issue you can use a tool like [SSL Shoppers's SSL Checker](https://www.sslshopper.com/ssl-checker.html), which will catch this issue. The following two screen captures illustrate the difference between partial and full chain certificates respectively.
##### Partial Chain Certificate
![Partial Chain Certificate](images/HTTPS_partial_chain.png)
##### Full Chain Certificate
![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...)

View File

@ -33,44 +33,49 @@ set DEVICE=venu2
set JUNGLE=monkey.jungle
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>] [-e]
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>]
rem [--disable-api-has-check-removal] [--disable-v2-opcodes] [-e]
rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-s
rem <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -c,--api-level <arg> API Level to target
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg>Output log zip file
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations] [p=optimize
rem performance, z=optimize code space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -s,--sdk-version <arg> SDK version to target (deprecated, use -c
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-t]
rem [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg> Output log zip file
rem --disable-api-has-check-removalDo not optimize out API has checks
rem --disable-v2-opcodes Do not use the v2 opcodes
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be
rem invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations]
rem [p=optimize performance, z=optimize code
rem space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling
rem (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list
rem (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
title Compiling for %DEVICE%

View File

@ -29,45 +29,49 @@ rem Assume we can create and use this directory
set DEST=export
set IQ=HomeAssistant-app.iq
rem C:\>java -jar %SDK_PATH%\monkeybrains.jar -h
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-c <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>] [-e]
rem usage: monkeyc [-a <arg>] [-b <arg>] [--build-stats <arg>] [-d <arg>]
rem [--debug-log-level <arg>] [--debug-log-output <arg>]
rem [--disable-api-has-check-removal] [--disable-v2-opcodes] [-e]
rem [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-s
rem <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -c,--api-level <arg> API Level to target
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg>Output log zip file
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations] [p=optimize
rem performance, z=optimize code space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -s,--sdk-version <arg> SDK version to target (deprecated, use -c
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
rem [-m <arg>] [--no-gen-styles] [-o <arg>] [-O <arg>] [-p <arg>] [-r] [-t]
rem [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
rem -a,--apidb <arg> API import file
rem -b,--apimir <arg> API MIR file
rem --build-stats <arg> Print build stats [0=basic]
rem -d,--device <arg> Target device
rem --debug-log-level <arg> Debug logging verbosity [0=errors, 1=basic,
rem 2=intermediate, 3=verbose]
rem --debug-log-output <arg> Output log zip file
rem --disable-api-has-check-removalDo not optimize out API has checks
rem --disable-v2-opcodes Do not use the v2 opcodes
rem -e,--package-app Create an application package.
rem --Eno-invalid-symbol Do not error when a symbol is found to be
rem invalid
rem -f,--jungles <arg> Jungle files
rem -g,--debug Print debug output
rem -h,--help Prints help information
rem -i,--import-dbg <arg> Import api.debug.xml
rem -k,--profile Enable profiling support
rem -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative,
rem 3=strict]
rem -m,--manifest <arg> Manifest file (deprecated)
rem --no-gen-styles Do not generate Rez.Styles module
rem -o,--output <arg> Output file to create
rem -O,--optimization <arg> Optimization level [0=none, 1=basic, 2=fast
rem optimizations, 3=slow optimizations]
rem [p=optimize performance, z=optimize code
rem space]
rem -p,--project-info <arg> projectInfo.xml file to use when compiling
rem -r,--release Strip debug information
rem -t,--unit-test Enables compilation of unit tests
rem -u,--devices <arg> devices.xml file to use when compiling
rem (deprecated)
rem -v,--version Prints the compiler version
rem -w,--warn Show compiler warnings
rem -x,--excludes <arg> Add annotations to the exclude list
rem (deprecated)
rem -y,--private-key <arg> Private key to sign builds with
rem -z,--rez <arg> Resource files (deprecated)
title Exporting Garmin Home Assistant Application
@ -96,7 +100,6 @@ echo.
-Dfile.encoding=UTF-8 ^
-Dapple.awt.UIElement=true ^
-jar %SDK_PATH%\monkeybrains.jar ^
--api-level 3.1.0 ^
--output %IQ% ^
--jungles %SRC%\monkey.jungle ^
--private-key %SRC%\..\developer_key ^

BIN
images/HTTPS_full_chain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -24,19 +24,16 @@
Use "Monkey C: Edit Application" from the Visual Studio Code command palette
to update the application attributes.
-->
<!--
Testing in VSCode requires monkey.jungle, so for convenience, swap between
watch-app and widget by changing which of the next two lines are commented out
-->
<iq:application id="98c36259-498a-4458-9cef-74a273ad2bc3" type="watch-app" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.1.0">
<!--
Use the following from the Visual Studio Code comand palette to edit
Use the following from the Visual Studio Code command palette to edit
the build targets:
"Monkey C: Set Products by Product Category" - Lets you add all products
that belong to the same product category
"Monkey C: Edit Products" - Lets you add or remove any product
-->
<iq:products>
<iq:product id="approachs50"/>
<iq:product id="approachs7042mm"/>
<iq:product id="approachs7047mm"/>
<iq:product id="d2air"/>
@ -46,6 +43,8 @@
<iq:product id="d2deltas"/>
<iq:product id="d2mach1"/>
<iq:product id="descentg1"/>
<iq:product id="descentg2"/>
<iq:product id="descentmk1"/>
<iq:product id="descentmk2"/>
<iq:product id="descentmk2s"/>
<iq:product id="descentmk343mm"/>
@ -105,6 +104,8 @@
<iq:product id="fr265"/>
<iq:product id="fr265s"/>
<iq:product id="fr55"/>
<iq:product id="fr57042mm"/>
<iq:product id="fr57047mm"/>
<iq:product id="fr645"/>
<iq:product id="fr645m"/>
<iq:product id="fr745"/>
@ -113,6 +114,8 @@
<iq:product id="fr945lte"/>
<iq:product id="fr955"/>
<iq:product id="fr965"/>
<iq:product id="fr970"/>
<iq:product id="gpsmap66"/>
<iq:product id="gpsmap67"/>
<iq:product id="instinct2"/>
<iq:product id="instinct2s"/>
@ -155,6 +158,7 @@
<iq:product id="vivoactive4"/>
<iq:product id="vivoactive4s"/>
<iq:product id="vivoactive5"/>
<iq:product id="vivoactive6"/>
</iq:products>
<!--
Use "Monkey C: Edit Permissions" from the Visual Studio Code command

View File

@ -34,6 +34,8 @@ project.manifest = manifest.xml
# Icon 55 53 48 46 42 37 32 30 28 26 24 21 19 18
# Screen 480 454 416 390 360 320 280 260 240 218 208 176 166 156
# Screen Size 390x390 launcher icon size 56x56
approachs50.resourcePath = $(approachs50.resourcePath);resources-launcher-56-56;resources-icons-46
# Screen Size 390x390 launcher icon size 70x70
approachs7042mm.resourcePath = $(approachs7042mm.resourcePath);resources-launcher-70-70;resources-icons-46
# Screen Size 454x454 launcher icon size 80x80
@ -50,6 +52,10 @@ d2deltas.resourcePath = $(d2deltas.resourcePath);resources-launcher-40-40;resour
d2mach1.resourcePath = $(d2mach1.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 176x176 launcher icon size 62x62
descentg1.resourcePath = $(descentg1.resourcePath);resources-launcher-62-62;resources-icons-21
# Screen Size 390x390 launcher icon size 60x60
descentg2.resourcePath = $(descentg2.resourcePath);resources-launcher-60-60;resources-icons-46
# Screen Size 240x240 launcher icon size 40x40
descentmk1.resourcePath = $(descentmk1.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
descentmk2.resourcePath = $(descentmk2.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 240x240 launcher icon size 40x40
@ -81,8 +87,7 @@ edgeexplore.resourcePath = $(edgeexplore.resourcePath);resources-launcher-36-36;
edgeexplore2.resourcePath = $(edgeexplore2.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
enduro.resourcePath = $(enduro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40
enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
enduro3.resourcePath = $(enduro3.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60
epix2.resourcePath = $(epix2.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390x390 launcher icon size 60x60
@ -109,7 +114,6 @@ fenix6spro.resourcePath = $(fenix6spro.resourcePath);resources-launcher-40-40;re
fenix6xpro.resourcePath = $(fenix6xpro.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 260x260 launcher icon size 40x40
fenix7.resourcePath = $(fenix7.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 260x260 launcher icon size 40x40
fenix7pro.resourcePath = $(fenix7pro.resourcePath);resources-launcher-40-40;resources-icons-30
fenix7pronowifi.resourcePath = $(fenix7pronowifi.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 240x240 launcher icon size 40x40
@ -118,7 +122,6 @@ fenix7s.resourcePath = $(fenix7s.resourcePath);resources-launcher-40-40;resource
fenix7spro.resourcePath = $(fenix7spro.resourcePath);resources-launcher-40-40;resources-icons-28
# Screen Size 280x280 launcher icon size 40x40
fenix7x.resourcePath = $(fenix7x.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 280x280 launcher icon size 40x40
fenix7xpro.resourcePath = $(fenix7xpro.resourcePath);resources-launcher-40-40;resources-icons-32
fenix7xpronowifi.resourcePath = $(fenix7xpronowifi.resourcePath);resources-launcher-40-40;resources-icons-32
# Screen Size 416x416 launcher icon size 60x60
@ -135,7 +138,6 @@ fenixchronos.resourcePath = $(fenixchronos.resourcePath);resources-launcher-36-3
fenixe.resourcePath = $(fenixe.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 390 x 390 launcher icon size 54x54
fr165.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 390 x 390 launcher icon size 54x54
fr165m.resourcePath = $(descentmk2s.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 240x240 launcher icon size 40x40
fr245.resourcePath = $(fr245.resourcePath);resources-launcher-40-40;resources-icons-28
@ -151,6 +153,10 @@ fr265.resourcePath = $(fr265.resourcePath);resources-launcher-60-60;resources-ic
fr265s.resourcePath = $(fr265s.resourcePath);resources-launcher-60-60;resources-icons-48
# Screen Size 208x208 launcher icon size 35x35
fr55.resourcePath = $(fr55.resourcePath);resources-launcher-35-35;resources-icons-24
# Screen Size 390x390 launcher icon size 54x54
fr57042mm.resourcePath = $(fr57042mm.resourcePath);resources-launcher-54-54;resources-icons-46
# Screen Size 454x454 launcher icon size 65x65
fr57047mm.resourcePath = $(fr57047mm.resourcePath);resources-launcher-65-65;resources-icons-53
# Screen Size 240x240 launcher icon size 40x40
fr645.resourcePath = $(fr645.resourcePath);resources-launcher-40-40;resources-icons-28
fr645m.resourcePath = $(fr645m.resourcePath);resources-launcher-40-40;resources-icons-28
@ -163,7 +169,9 @@ fr945lte.resourcePath = $(fr945lte.resourcePath);resources-launcher-40-40;resour
fr955.resourcePath = $(fr955.resourcePath);resources-launcher-40-40;resources-icons-30
# Screen Size 454x454 launcher icon size 65x65
fr965.resourcePath = $(fr965.resourcePath);resources-launcher-65-65;resources-icons-53
fr970.resourcePath = $(fr970.resourcePath);resources-launcher-65-65;resources-icons-53
# 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
# Screen Size 176x176 launcher icon size 62x62
instinct2.resourcePath = $(instinct2.resourcePath);resources-launcher-62-62;resources-icons-21-w
@ -221,7 +229,6 @@ venud.resourcePath = $(venud.resourcePath);resources-launcher-60-60;resources-ic
venusq.resourcePath = $(venusq.resourcePath);resources-launcher-36-36;resources-icons-28
# Screen Size 320x360 launcher icon size 40x40
venusq2.resourcePath = $(venusq2.resourcePath);resources-launcher-40-40;resources-icons-38
# Screen Size 320x360 launcher icon size 40x40
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
@ -233,5 +240,7 @@ vivoactive3mlte.resourcePath = $(vivoactive3mlte.resourcePath);resources-launche
vivoactive4.resourcePath = $(vivoactive4.resourcePath);resources-launcher-35-35;resources-icons-30
# Screen Size 218x218 launcher icon size 30x30
vivoactive4s.resourcePath = $(vivoactive4s.resourcePath);resources-launcher-30-30;resources-icons-26
# Screen Size 390x390 launcher icon size 70x70
vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-70-70;resources-icons-46
# Screen Size 390x390 launcher icon size 56x56
vivoactive5.resourcePath = $(vivoactive5.resourcePath);resources-launcher-56-56;resources-icons-46
# Screen Size 390x390 launcher icon size 54x54
vivoactive6.resourcePath = $(vivoactive6.resourcePath);resources-launcher-54-54;resources-icons-46

View File

@ -0,0 +1,17 @@
<!--
Distributed under MIT Licence
See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
tested on a Venu 2 device. The source code is provided at:
https://github.com/house-of-abbey/GarminHomeAssistant.
P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
-->
<drawables>
<bitmap id="LauncherIcon" filename="launcher.svg" />
</drawables>

View File

@ -0,0 +1,4 @@
<svg fill="none" height="56" viewBox="0 0 400 400" width="56" xmlns="http://www.w3.org/2000/svg">
<path d="M320 301.762C320 310.012 313.25 316.762 305 316.762H95C86.75 316.762 80 310.012 80 301.762V211.762C80 203.512 84.77 191.993 90.61 186.153L189.39 87.3725C195.22 81.5425 204.77 81.5425 210.6 87.3725L309.39 186.162C315.22 191.992 320 203.522 320 211.772V301.772V301.762Z" fill="#F2F4F9"/>
<path d="M309.39 186.153L210.61 87.3725C204.78 81.5425 195.23 81.5425 189.4 87.3725L90.61 186.153C84.78 191.983 80 203.512 80 211.762V301.762C80 310.012 86.75 316.762 95 316.762H187.27L146.64 276.132C144.55 276.852 142.32 277.262 140 277.262C128.7 277.262 119.5 268.062 119.5 256.762C119.5 245.462 128.7 236.262 140 236.262C151.3 236.262 160.5 245.462 160.5 256.762C160.5 259.092 160.09 261.322 159.37 263.412L191 295.042V179.162C184.2 175.822 179.5 168.842 179.5 160.772C179.5 149.472 188.7 140.272 200 140.272C211.3 140.272 220.5 149.472 220.5 160.772C220.5 168.842 215.8 175.822 209 179.162V260.432L240.46 228.972C239.84 227.012 239.5 224.932 239.5 222.772C239.5 211.472 248.7 202.272 260 202.272C271.3 202.272 280.5 211.472 280.5 222.772C280.5 234.072 271.3 243.272 260 243.272C257.5 243.272 255.12 242.802 252.91 241.982L209 285.892V316.772H305C313.25 316.772 320 310.022 320 301.772V211.772C320 203.522 315.23 192.002 309.39 186.162V186.153Z" fill="#18BCF2"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
//
//
// Description:

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
//
//
// Description:
@ -39,7 +39,6 @@ class HomeAssistantApp extends Application.AppBase {
private var mIsApp as Lang.Boolean = false; // Or Widget
private var mUpdating as Lang.Boolean = false; // Don't start a second chain of updates
private var mTemplates as Lang.Dictionary = {};
private var startUpdating as Lang.Boolean = false;
function initialize() {
AppBase.initialize();
@ -120,12 +119,16 @@ class HomeAssistantApp extends Application.AppBase {
return ErrorView.create(WatchUi.loadResource($.Rez.Strings.NoInternet) as Lang.String);
} else {
var isCached = fetchMenuConfig();
var ret = null;
fetchApiStatus();
if (isCached) {
return [mHaMenu, new HomeAssistantViewDelegate(true)];
ret = [mHaMenu, new HomeAssistantViewDelegate(true)];
} else {
return [new WatchUi.View(), new WatchUi.BehaviorDelegate()];
ret = [new WatchUi.View(), new WatchUi.BehaviorDelegate()];
}
// Separated from Settings.update() in order to call after fetchMenuConfig() and not call it on changes settings.
Settings.webhook();
return ret;
}
}
@ -209,7 +212,7 @@ class HomeAssistantApp extends Application.AppBase {
// asynchronous and affects how the views are managed.
(:glance)
function fetchMenuConfig() as Lang.Boolean {
// System.println("URL = " + Settings.getConfigUrl());
// System.println("Menu URL = " + Settings.getConfigUrl());
if (Settings.getConfigUrl().equals("")) {
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
WatchUi.requestUpdate();
@ -263,17 +266,17 @@ class HomeAssistantApp extends Application.AppBase {
private function buildMenu(menu as Lang.Dictionary) {
mHaMenu = new HomeAssistantView(menu, null);
mQuitTimer.begin();
if (startUpdating) {
if (!Settings.getWebhookId().equals("")) {
startUpdates();
}
} // If not, this will be done via a chain in Settings.webhook() and mWebhookManager.requestWebhookId() that registers the sensors.
}
function startUpdates() {
if (mHaMenu != null and !mUpdating) {
// Start the continuous update process that continues for as long as the application is running.
updateMenuItems();
mUpdating = true;
}
startUpdating = true;
}
function onReturnUpdateMenuItems(responseCode as Lang.Number, data as Null or Lang.Dictionary) as Void {
@ -465,6 +468,7 @@ class HomeAssistantApp extends Application.AppBase {
(:glance)
function fetchApiStatus() as Void {
// System.println("API URL = " + Settings.getApiUrl());
if (Settings.getApiUrl().equals("")) {
mApiStatus = WatchUi.loadResource($.Rez.Strings.Unconfigured) as Lang.String;
WatchUi.requestUpdate();
@ -543,8 +547,8 @@ class HomeAssistantApp extends Application.AppBase {
mIsGlance = true;
mApiStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
mMenuStatus = WatchUi.loadResource($.Rez.Strings.Checking) as Lang.String;
updateStatus();
Settings.update();
updateStatus();
mGlanceTimer = new Timer.Timer();
mGlanceTimer.start(method(:updateStatus), Globals.scApiBackoff, true);
return [new HomeAssistantGlanceView(self)];

View File

@ -22,8 +22,7 @@
using Toybox.Lang;
using Toybox.WatchUi;
class HomeAssistantGroupMenuItem extends WatchUi.IconMenuItem {
private var mTemplate as Lang.String or Null;
class HomeAssistantGroupMenuItem extends HomeAssistantMenuItem {
private var mMenu as HomeAssistantView;
function initialize(
@ -34,48 +33,23 @@ class HomeAssistantGroupMenuItem extends WatchUi.IconMenuItem {
:alignment as WatchUi.MenuItem.Alignment
} or Null
) {
if (options != null) {
options.put(:icon, icon);
} else {
options = { :icon => icon };
}
WatchUi.IconMenuItem.initialize(
HomeAssistantMenuItem.initialize(
definition.get("name") as Lang.String,
null,
null,
icon,
template,
options
);
mTemplate = template;
mMenu = new HomeAssistantView(definition, null);
}
function buildTemplate() as Lang.String or Null {
return mTemplate;
}
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
if (data == null) {
setSubLabel(null);
} else if(data instanceof Lang.String) {
setSubLabel(data);
} else if(data instanceof Lang.Dictionary) {
// System.println("HomeAsistantGroupMenuItem updateState() data = " + data);
if (data.get("error") != null) {
setSubLabel($.Rez.Strings.TemplateError);
} else {
setSubLabel($.Rez.Strings.PotentialError);
}
} else {
// The template must return a Lang.String, a number can be either integer or float and hence cannot be formatted locally without error.
setSubLabel(WatchUi.loadResource($.Rez.Strings.TemplateError) as Lang.String);
}
WatchUi.requestUpdate();
}
function getMenuView() as HomeAssistantView {
return mMenu;
}
function hasTemplate() as Lang.Boolean {
return mTemplate != null;
}
}

View File

@ -0,0 +1,79 @@
//-----------------------------------------------------------------------------------
//
// Distributed under MIT Licence
// See https://github.com/house-of-abbey/GarminHomeAssistant/blob/main/LICENSE.
//
//-----------------------------------------------------------------------------------
//
// GarminHomeAssistant is a Garmin IQ application written in Monkey C and routinely
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
//
//
// Description:
//
// Generic menu button with an icon that optionally renders a Home Assistant Template.
//
//-----------------------------------------------------------------------------------
using Toybox.Lang;
using Toybox.WatchUi;
using Toybox.Graphics;
class HomeAssistantMenuItem extends WatchUi.IconMenuItem {
private var mTemplate as Lang.String or Null;
function initialize(
label as Lang.String or Lang.Symbol,
template as Lang.String,
options as {
:alignment as WatchUi.MenuItem.Alignment,
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
} or Null
) {
WatchUi.IconMenuItem.initialize(
label,
null,
null,
options.get(:icon),
options
);
mTemplate = template;
}
function hasTemplate() as Lang.Boolean {
return mTemplate != null;
}
function buildTemplate() as Lang.String or Null {
return mTemplate;
}
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
if (data == null) {
setSubLabel($.Rez.Strings.Empty);
} else if(data instanceof Lang.String) {
setSubLabel(data);
} else if(data instanceof Lang.Number) {
var d = data as Lang.Number;
setSubLabel(d.format("%d"));
} else if(data instanceof Lang.Float) {
var f = data as Lang.Float;
setSubLabel(f.format("%f"));
} else if(data instanceof Lang.Dictionary) {
// System.println("HomeAssistantMenuItem updateState() data = " + data);
if (data.get("error") != null) {
setSubLabel($.Rez.Strings.TemplateError);
} else {
setSubLabel($.Rez.Strings.PotentialError);
}
} else {
// The template must return a Lang.String, Number or Float, or the item cannot be formatted locally without error.
setSubLabel(WatchUi.loadResource($.Rez.Strings.TemplateError) as Lang.String);
}
WatchUi.requestUpdate();
}
}

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
//
//
// Description:

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
//
//
// Description:
@ -22,9 +22,8 @@ using Toybox.Lang;
using Toybox.WatchUi;
using Toybox.Graphics;
class HomeAssistantTapMenuItem extends WatchUi.IconMenuItem {
class HomeAssistantTapMenuItem extends HomeAssistantMenuItem {
private var mHomeAssistantService as HomeAssistantService;
private var mTemplate as Lang.String;
private var mService as Lang.String or Null;
private var mConfirm as Lang.Boolean;
private var mPin as Lang.Boolean;
@ -39,53 +38,30 @@ class HomeAssistantTapMenuItem extends WatchUi.IconMenuItem {
data as Lang.Dictionary or Null,
icon as Graphics.BitmapType or WatchUi.Drawable,
options as {
:alignment as WatchUi.MenuItem.Alignment
:alignment as WatchUi.MenuItem.Alignment,
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
} or Null,
haService as HomeAssistantService
) {
WatchUi.IconMenuItem.initialize(
if (options != null) {
options.put(:icon, icon);
} else {
options = { :icon => icon };
}
HomeAssistantMenuItem.initialize(
label,
null,
null,
icon,
template,
options
);
mHomeAssistantService = haService;
mTemplate = template;
mService = service;
mConfirm = confirm;
mPin = pin;
mData = data;
}
function hasTemplate() as Lang.Boolean {
return mTemplate != null;
}
function buildTemplate() as Lang.String or Null {
return mTemplate;
}
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
if (data == null) {
setSubLabel($.Rez.Strings.Empty);
} else if(data instanceof Lang.String) {
setSubLabel(data);
} else if(data instanceof Lang.Dictionary) {
// System.println("HomeAsistantTemplateMenuItem updateState() data = " + data);
if (data.get("error") != null) {
setSubLabel($.Rez.Strings.TemplateError);
} else {
setSubLabel($.Rez.Strings.PotentialError);
}
} else {
// The template must return a Lang.String, a number can be either integer or float and hence cannot be formatted locally without error.
setSubLabel(WatchUi.loadResource($.Rez.Strings.TemplateError) as Lang.String);
}
WatchUi.requestUpdate();
}
function callService() as Void {
var hasTouchScreen = System.getDeviceSettings().isTouchScreen;
if (mPin && hasTouchScreen) {

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
//
//
// Description:
@ -42,7 +42,13 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
} or Null
) {
WatchUi.ToggleMenuItem.initialize(label, null, null, false, options);
WatchUi.ToggleMenuItem.initialize(
label,
null,
null,
false,
options
);
if (Attention has :vibrate) {
mHasVibrate = true;
}
@ -69,24 +75,31 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
return "{{states('" + mData.get("entity_id") + "')}}";
}
function updateState(data as Lang.String or Lang.Dictionary or Null) as Void {
function updateState(data as Lang.String or Lang.Dictionary or Lang.Number or Lang.Float or Null) as Void {
if (data == null) {
setSubLabel(null);
} else if(data instanceof Lang.String) {
setSubLabel(data);
} else if(data instanceof Lang.Number) {
var d = data as Lang.Number;
setSubLabel(d.format("%d"));
} else if(data instanceof Lang.Float) {
var f = data as Lang.Float;
setSubLabel(f.format("%f"));
} else if(data instanceof Lang.Dictionary) {
// System.println("HomeAsistantToggleMenuItem updateState() data = " + data);
// System.println("HomeAssistantToggleMenuItem updateState() data = " + data);
if (data.get("error") != null) {
setSubLabel($.Rez.Strings.TemplateError);
} else {
setSubLabel($.Rez.Strings.PotentialError);
}
} else {
// The template must return a Lang.String, a number can be either integer or float and hence cannot be formatted locally without error.
// The template must return a Lang.String, Number or Float, or the item cannot be formatted locally without error.
setSubLabel(WatchUi.loadResource($.Rez.Strings.TemplateError) as Lang.String);
}
WatchUi.requestUpdate();
}
function updateToggleState(data as Lang.String or Lang.Dictionary or Null) as Void {
if (data == null) {
setUiToggle("off");
@ -96,7 +109,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
setSubLabel($.Rez.Strings.Unavailable);
}
} else if(data instanceof Lang.Dictionary) {
// System.println("HomeAsistantToggleMenuItem updateState() data = " + data);
// System.println("HomeAssistantToggleMenuItem updateState() data = " + data);
if (mTemplate == null) {
if (data.get("error") != null) {
setSubLabel($.Rez.Strings.TemplateError);

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey & Someone0nEarth, 31 October 2023
// P A Abbey & J D Abbey & Someone0nEarth & moesterheld, 31 October 2023
//
//
// Description:

View File

@ -9,7 +9,7 @@
// tested on a Venu 2 device. The source code is provided at:
// https://github.com/house-of-abbey/GarminHomeAssistant.
//
// P A Abbey & J D Abbey, SomeoneOnEarth, 23 November 2023
// P A Abbey & J D Abbey, SomeoneOnEarth & moesterheld, 23 November 2023
//
//
// Description:
@ -69,7 +69,9 @@ class Settings {
mMenuAlignment = Properties.getValue("menu_alignment");
mIsSensorsLevelEnabled = Properties.getValue("enable_battery_level");
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
}
static function webhook() {
if (System has :ServiceDelegate) {
mHasService = true;
}
@ -106,13 +108,13 @@ class Settings {
unsetWebhookId();
}
}
// System.println("Settings update(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
// System.println("Settings webhook(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
// if (Background.getTemporalEventRegisteredTime() != null) {
// System.println("Settings update(): getTemporalEventRegisteredTime().value() = " + Background.getTemporalEventRegisteredTime().value().format("%d") + " seconds");
// System.println("Settings webhook(): getTemporalEventRegisteredTime().value() = " + Background.getTemporalEventRegisteredTime().value().format("%d") + " seconds");
// } else {
// System.println("Settings update(): getTemporalEventRegisteredTime() = null");
// System.println("Settings webhook(): getTemporalEventRegisteredTime() = null");
// }
}
}
static function getApiKey() as Lang.String {
return mApiKey;

View File

@ -120,25 +120,21 @@ class WebhookManager {
case Communications.BLE_HOST_TIMEOUT:
case Communications.BLE_CONNECTION_UNAVAILABLE:
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed.");
Settings.unsetWebhookId();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
break;
case Communications.BLE_QUEUE_FULL:
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: BLE_QUEUE_FULL, API calls too rapid.");
Settings.unsetWebhookId();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.ApiFlood) as Lang.String);
break;
case Communications.NETWORK_REQUEST_TIMED_OUT:
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection.");
Settings.unsetWebhookId();
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + WatchUi.loadResource($.Rez.Strings.NoResponse) as Lang.String);
break;
case Communications.NETWORK_RESPONSE_OUT_OF_MEMORY:
// System.println("WebhookManager onReturnRegisterWebhookSensor() Response Code: NETWORK_RESPONSE_OUT_OF_MEMORY, are we going too fast?");
Settings.unsetWebhookId();
// Ignore and see if we can carry on
break;

View File

@ -7,13 +7,13 @@
<link
rel="stylesheet"
data-name="vs/editor/editor.main"
href="https://unpkg.com/monaco-editor@0.45.0/min/vs/editor/editor.main.css" />
href="https://www.unpkg.com/monaco-editor@0.45.0/min/vs/editor/editor.main.css" />
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/toastify-js@1.12.0/src/toastify.css" />
href="https://www.unpkg.com/toastify-js@1.12.0/src/toastify.css" />
<style>
@import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css');
@import url('https://www.unpkg.com/@catppuccin/palette/css/catppuccin.css');
body {
display: flex;
@ -441,9 +441,9 @@ http:
</div>
</dialog>
<script src="https://unpkg.com/monaco-editor@0.45.0/min/vs/loader.js"></script>
<script src="https://unpkg.com/json-ast-comments@1.1.1/lib/json.js"></script>
<script src="https://unpkg.com/toastify-js@1.12.0/src/toastify.js"></script>
<script src="https://www.unpkg.com/monaco-editor@0.45.0/min/vs/loader.js"></script>
<script src="https://www.unpkg.com/json-ast-comments@1.1.1/lib/json.js"></script>
<script src="https://www.unpkg.com/toastify-js@1.12.0/src/toastify.js"></script>
<script type="module" src="./main.js"></script>
</body>
</html>

View File

@ -451,7 +451,7 @@ loadSchema();
// require is provided by loader.min.js.
require.config({
paths: {
vs: 'https://unpkg.com/monaco-editor@0.45.0/min/vs',
vs: 'https://www.unpkg.com/monaco-editor@0.45.0/min/vs',
},
});
require(['vs/editor/editor.main'], async () => {