Right, these struggles indicate some actions I shall take shortly:
Suggest Studio Code Server is installed for editing against the JSON schema
On error INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, perform a follow up repeat call with a plain text response expectation in order to display the error message received. This is however not as trivial as you might expect due to the way HTTP calls are made with asynchronous callback methods and how that affects the flow of control.
Hi. Not sure if posting in the correct place.
This is a great app for garmin
But the new timeout value introduced in v1.6 is not working for me.
No error, no app exit either
My json, after schema, reads:
"title": "Home",
"timeout": 5,
"items": [
is it ok?
can you update the sample schema in case it should be build differently?
thanks
I think this is the best place to post, then others can benefit from our conversation.
The new timeout feature is a global setting in the App settings rather than the JSON. It defaults to zero (disabled), so you should be able to amend it from there.
Hi @NP_Complete ,
I found the setting in the app settings. Everything ok.
I would like to suggest if you can reset the timeout counter while scrolling the screen.
When you are scrolling your items list, just looking at their states, the app closes.
It would be better if you start counting when there is no user interaction.
Another idea… watch screen wakes up when you rotate your wrist towards your face.
And turns off when you rotate away of your face.
If you can detect that gesture, you can exit the app on that trigger too.
Thanks, and nice work.
Yes indeed, however that is not possible. I tried. The solution here is the best simple one, so I suggest increasing the timeout value, e.g. 60s. I don’t get any scroll events from the menu interactions.
Another idea… watch screen wakes up when you rotate your wrist towards your face.
We also had the same other ideas. It would be nice, but again we can’t find a way to hook any screen on/off events.
I believe it does because one user submitted a Github pull request to ask for confirmation view timeout precisely to limit the risk further with sensitive devices. I personally would not advise it, but that’s your choice. So the current mitigations are:
Optional confirmation of action
Timeout on that confirmation (e.g. 3 secs, can be disabled)
The entity types are just that, entities. Best try it and see if it does what you want.
HI! I installed the app and entered all the fields but I have this error: no response, check internet connection. I confirm that the cell phone is connected via BT to the telephone.
Sorry to say, it looks pretty much as the error message says.
The error is caused by a Communications.NETWORK_REQUEST_TIMED_OUT response code. The app is unable to fetch the data it needs. You need to work the Internet connection lead a fair bit more. E.g. can you reach your menu definition from a web browser? Are the URLs correct? No I mean really correct, really really! There have been a few mistyped and failed copies resolved by correcting the URLs and API keys. Find some software that allows copy & paste of the text fields to your watch. For example I use Microsoft Windows “Phone Link” software for my Android phone.
192.168.1.145 is a private LAN IP address not accessible from the public Internet. This means it will only work on your private LAN. If you want this URL to work from anywhere, you need to setup your Home Assistant to be operable publically and supply the correct public domain name or IP address. Are you using mobile data to access this URL? Try you local LAN Wi-Fi instead.
How you achieve the functioning URLs is left to the user alone. Everyone’s circumstances are slightly different hence its your responsibility to get the working URLs.
You might like to setup Dynamic DNS and port forwarding on your router. That is out of scope of this thread! There are lots of help articles on the Internet.
This should return the following JSON formatted ASCII text:
{"message":"API running."}
If you get that response then ${URL} without the trailing \ is the correct API URL. But you do need to use the ${API_KEY} in that call, hence it won’t just work from a browser address bar.
A little more information is required to understand the causes. The -400 suggests that the responce returned something other than JSON, e.g. a plain text error code. Limitations of the Connect IQ API calls mean I can’t retrieve that after the response has been processed. So all we know is that the HTTP request was not JSON.
Further:
This URL should be publically accesible now, and no API key is required to access the menu definition as it is not served by the HomeAssistant API, the URL can in fact be anywhere on the Internet. But it is most convenient to have it all served by the Home Assistant web server (outside the HA API). When I click that link I get an HTTP response code:
So the URL still is not working. It might be correct, but I’m guessing you’ve not yet looked into setting up port forwarding on your router as I suggested above.
I think you need to setup port forwarding for HTTPS to your HomeAssistant IP address. That means you need:
HomeAssistant to be allocated a permanent / fixed IP address by DHCP. This is based on a mapping of MAC address to IP address (192.168.1.145).
You need HTTPS port 443 forwarded to that fixed IP address (192.168.1.145).
Then you might have a chance of an external HTTPS request reaching your HomeAssistant. But your setup might still have a web proxy, e.g. converting HTTPS to HTTP internally in your network before the HomeAssistant webserver. You need to follow this through and see where the HTTP GET request for the menu configuration is getting lost.
Once you have the menu being served to the web browser, you might have a chance of reaching the HomeAssistant API URL. But that test requires the API_KEY, and is therefore slightly harder.
Much of this is more about how to manage TCP/IP on your LAN rather than the actual Garmin application, and there are better thought out tutorials on forwarding web requests from public to private networks already on the Internet than my potted explanation here.
There are no confirmations on toggles. I’m not sure how we would do that, perhaps using a custom menu item class, and that’s a whole load of pain given we can currently use one out of a box for the current behaviour.
Confirmations were introduced for scenes and automations.
You could separate the toggle into two items, one for ‘on’ with an optional confirmation and one for ‘off’ with an optional confirmation.
Yes we did. We took out a free trial of Nabu Casa solely to find out why others might be struggling. We got it working in 5 minutes. Well, that’s the good news, the bad news is we did not discover why othersa were struggling!
As per the README.md linked above
If you are struggling with getting the application to work, please consult the trouble shooting guide first.
I checkd URLS, json files on web, and it is working.
It would be more helpful to know what error messages you were getting when it is not working:
It sounds lke you have got the configuration JSON file for the menu working - but I’ll state this assumption as your post was more general.
Did you positively confirm you had the API URL working? That requires a bit more effort, but not much.
In our experience, all the setup issues so far have been silly mistakes the eye did not catch. The only problems we’ve had to take action for are where the app failed to provide the user with a helpful error message, usually because of device specific issues we can’t test without buying every device we support. Hence we rely on the simulator (which is known to deviate from real life).
Honestly, I don’t know what helped, but it started working.
Previously I didn’t get any error, glances only showed that API and Menu were unavailable. After entering the application, there was a black screen.
I tried checking the URL several times, both the API and the JSON file, and verified the addresses according to your guide (thanks!).
Since the last time I checked the watch, I haven’t changed anything in HA or Garmin Connect, I only see that in LOGs that HA lost connection with Nebu Casa for a moment, maybe just restarting HA would help? Now I won’t know.