Page 2 of 2

Re: Garmoticz

Posted: Saturday 07 December 2019 6:56
by akamming
pezku wrote: Thursday 05 December 2019 15:20 Help!

I'm only getting a brief Loading rooms followed by Network timeout -300 with Garmoticz on Vivoactive 3.

I have gone through all the trouble to setup HTTPS on Windows with Lets encrypt certificates and a dyn DNS.

I can access Domoticz no problem over https from my phone or desktop, locally or over internet.
Other widgets on the watch can fetch data from internet, eg. weather.

Any ideas I could try to get Garmoticz to work?
hmmm… i don't know yet. Can you send me you connection settings in a direct message, i can try to see what goes wrong...

Re: Garmoticz

Posted: Saturday 07 December 2019 6:58
by akamming
Geitje wrote: Friday 06 December 2019 23:44 I tried the other option (compiling app). I downgraded GCM to 4.19 (HTTP support), removed Garmoticz first from my Vivoactive HR, then sideloaded it following instructions in the tutorial. But only after adding the HTTP line to the settings.xml and set the right credentials in Eclipse. All succeeded, but when starting the widget, clicking away the loading screen, GCM in my android crashed imediately when loading rooms. In my Vivoactive "loading rooms" keeps stays on the display.

Any clues?
could you run it in the simulator? And if so...did that work?

Re: Garmoticz

Posted: Saturday 07 December 2019 20:47
by Geitje
In the simulator it works. First it did not (https needed-error, unticked "use device https requirements", now it works. See screenshot (I have 2 rooms: Switches and Dummy Switches, this is obslete, still have to change that.)
What I noticed also:
- When sideloading the app to my Vivoactive, I don't get a completed-messege or something like that. It also seems to stop halfway the progress bar. I do not know if this is normal behaviour?
- I cannot change the settings of the widget in the connect IQ app. It simply does not display a settings-button (only remove and look up in store buttons).

I also did an reset (system > restore defaults) on my watch, not helping....

Re: Garmoticz

Posted: Sunday 08 December 2019 10:38
by akamming
Geitje wrote: Saturday 07 December 2019 20:47 - When sideloading the app to my Vivoactive, I don't get a completed-messege or something like that. It also seems to stop halfway the progress bar. I do not know if this is normal behaviour?
unfortunately yes. The garmin tools don't have a well design Customer Journey..
Geitje wrote: Saturday 07 December 2019 20:47 - I cannot change the settings of the widget in the connect IQ app. It simply does not display a settings-button (only remove and look up in store buttons).
that's also normal behaviour (and another example of bad customer journey in dev tools by garmin). As stated above. This is how i change settings on a side loaded app:
- use the instructions to run the app with the simulator. Use your own device model in the simulator ofcourse.
- in eclipse use the settings editor to create the settings file in the simulator
- then copy the settings file from C:\Users\[username]\AppData\Local\Temp\GARMIN\APPS\SETTINGS to the settings map on your device (and make sure is has the same name as the app)

If the same settings file in the simulator makes the app run ok, but with a downgraded garmin connect app on a real devices causes error -300, then i think this workaround also no longer works (cause this was the original error) and using https is then the only option....

Re: Garmoticz

Posted: Sunday 08 December 2019 10:38
by akamming
Geitje wrote: Saturday 07 December 2019 20:47 - When sideloading the app to my Vivoactive, I don't get a completed-messege or something like that. It also seems to stop halfway the progress bar. I do not know if this is normal behaviour?
unfortunately yes. The garmin tools don't have a well design Customer Journey..
Geitje wrote: Saturday 07 December 2019 20:47 - I cannot change the settings of the widget in the connect IQ app. It simply does not display a settings-button (only remove and look up in store buttons).
that's also normal behaviour (and another example of bad customer journey in dev tools by garmin). As stated above. This is how i change settings on a side loaded app:
- use the instructions to run the app with the simulator. Use your own device model in the simulator ofcourse.
- in eclipse use the settings editor to create the settings file in the simulator
- then copy the settings file from C:\Users\[username]\AppData\Local\Temp\GARMIN\APPS\SETTINGS to the settings map on your device (and make sure is has the same name as the app)

If the same settings file in the simulator makes the app run ok, but with a downgraded garmin connect app on a real devices causes error -300, then i think this workaround also no longer works (cause this was the original error) which leaves using https as the only option to make it work....

you could try downgrading to an even lower version of garmin connect...

Re: Garmoticz

Posted: Monday 09 December 2019 0:29
by Geitje
I tried this 3 times, and last one succeeded! (do not know why copying did not succeed at first...)
Now it is working, even with GCM 4.19.1. Finally :roll:
Thanks for your support @akamming!
akamming wrote: Sunday 08 December 2019 10:38 ...
- then copy the settings file from C:\Users\[username]\AppData\Local\Temp\GARMIN\APPS\SETTINGS to the settings map on your device (and make sure is has the same name as the app)
...

Re: Garmoticz

Posted: Tuesday 10 December 2019 13:56
by pezku
akamming wrote: Saturday 07 December 2019 6:56
pezku wrote: Thursday 05 December 2019 15:20 Help!

I'm only getting a brief Loading rooms followed by Network timeout -300 with Garmoticz on Vivoactive 3.

I have gone through all the trouble to setup HTTPS on Windows with Lets encrypt certificates and a dyn DNS.

I can access Domoticz no problem over https from my phone or desktop, locally or over internet.
Other widgets on the watch can fetch data from internet, eg. weather.

Any ideas I could try to get Garmoticz to work?
hmmm… i don't know yet. Can you send me you connection settings in a direct message, i can try to see what goes wrong...
Seems that I can't, because not enough posts.. Dunno if I can reply if you can send me first? Thanks anyway!

Edit: Never mind, now I have three posts and can send private messages :D. I'll send you details.

Re: Garmoticz

Posted: Wednesday 11 December 2019 15:00
by akamming
I just tested. In the simulator i get the normal error for an invalid user. On my handset i get the -300 when i have an invalid user.

So i think the username/password combination is wrong. But if you can give me the credentials of a test user, i can confirm for you…

i tried to send back to you, but my private messages stay in the outbox… does someone know how to fix that?

Re: Garmoticz

Posted: Saturday 14 December 2019 0:31
by Geitje
I had that once, just kept trying and it worked eventually....
akamming wrote: Wednesday 11 December 2019 15:00 i tried to send back to you, but my private messages stay in the outbox… does someone know how to fix that?

Re: Garmoticz

Posted: Tuesday 17 December 2019 21:34
by akamming
pezku wrote: Tuesday 10 December 2019 13:56 Edit: Never mind, now I have three posts and can send private messages :D. I'll send you details.
I saw you private message with a test user. i got the same error -300.

So i tried debugging what went wrong and found out you have a problem with your certificate

when i give the command

Code: Select all

curl https://<yourdomaindetailsintheprivatemessage> 
i get this error message

Code: Select all

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Re: Garmoticz

Posted: Wednesday 18 December 2019 22:15
by pezku
akamming wrote: Tuesday 17 December 2019 21:34
pezku wrote: Tuesday 10 December 2019 13:56 Edit: Never mind, now I have three posts and can send private messages :D. I'll send you details.
I saw you private message with a test user. i got the same error -300.

So i tried debugging what went wrong and found out you have a problem with your certificate

when i give the command

Code: Select all

curl https://<yourdomaindetailsintheprivatemessage> 
i get this error message

Code: Select all

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

After googling it seems that the problem is probably that I'm not using Lets encrypt's "fullchain.pem" certificate. Couldn't find any quick solution how to implement that with Windows IIS server.
Actually I don't have a clue what kind of certificate Win-acme installs from Lets encrypt, but this is quite out of scope of this topic...

Thanks anyway for the tip! I need to look this with better time.

Re: Garmoticz

Posted: Wednesday 18 December 2019 22:40
by akamming
pezku wrote: Wednesday 18 December 2019 22:15 After googling it seems that the problem is probably that I'm not using Lets encrypt's "fullchain.pem" certificate. Couldn't find any quick solution how to implement that with Windows IIS server.
Actually I don't have a clue what kind of certificate Win-acme installs from Lets encrypt, but this is quite out of scope of this topic...
This is how i do it on my rpi: Every month i run this script automatically to create a new certificate (got this somewhere in a forum and finetuned it for my own system).

Code: Select all

#!/bin/bash
certbot --force-renew --webroot -w /home/domoticz/domoticz/www renew
cat /etc/letsencrypt/live/<domain>/privkey.pem > /tmp/server_cert.pem
cat /etc/letsencrypt/live/<domain>/fullchain.pem >> /tmp/server_cert.pem
cat /etc/ssl/certs/dhparam.pem >> /tmp/server_cert.pem
mv /tmp/server_cert.pem /home/domoticz/domoticz/<certificate name>.pem
cp /home/domoticz/domoticz/<certificatename>.pem /home/domoticz/domoticz/<certificate name>.pem.bak
chown domoticz:domoticz /home/domoticz/domoticz/*pem
service domoticz restart
The dhparam.pem file needs to be created once, this can be done with the command

Code: Select all

openssl dhparam -out dhparam.pem 1024
(this will take a while....)

This procedure gives me a valid new certificate every month automatically

I know this does not work for you, cause you're on windows, but you should be able to convert this to a windows script to make it work

Re: Garmoticz

Posted: Monday 01 March 2021 23:01
by bartolomeo
Hi,

What can I do with that? This method with letsencrypt works not for my system (?)

Code: Select all


pi@domoticz:/etc/letsencrypt $ sudo ./letsencrypt-auto
Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.
Please visit https://certbot.eff.org/ to check for other alternatives.


Re: Garmoticz

Posted: Tuesday 02 March 2021 9:24
by EddyG

Re: Garmoticz

Posted: Tuesday 02 March 2021 15:28
by bartolomeo
Barely after reading your post. Thank's! But in truth I am not even sure which options should i choose. "My HTTP website is running ...???... on .... Is raspbian 10 = debian 10 (buster)"? I could try to follow the instructions, but are there any additional steps for Domoticz?

Re: Garmoticz

Posted: Saturday 17 February 2024 11:26
by akamming
I have not maintained this app for a long time, but since I have a new Garmin forerunner again I just recompiled the app and fixed the api so it can talk to domoticz (as of 2023.2) again

New app was uploaded to Garmin ConnectIQ store

Re: Garmoticz

Posted: Friday 01 March 2024 11:56
by akamming
Just released a new version of the app. Until 5 minutes ago i though i myself was the only user (but i like controlling my house with my watch, so its worth the effort), but in the statistics I see almost a hundred users... So there should be some active users on the forum here.

So my request is:
- I really revamped the interface: Newer watches have new connectIQ versions, which gives lots more opportunities.
- The new interface is in EXPERIMENTAL state, but is available: Using garmin connect: Select the EXPERIMENTAL interface in the settings. (will only work on devices as of ConnectIQ as of 3.2.0)
- And i would really like feedback

So pls start to use it and let me know what you think of it...

The Garmin app can be found here: https://apps.garmin.com/apps/43f29073-d ... 7255?tid=0

Re: Garmoticz

Posted: Monday 06 May 2024 17:44
by sebllultra
Hi, thanx a lot for the appli.

For me, blinds does not work anymore (certainly due to domoticz update).
And the only update that is not fine for me is that last one remembered the room i used last time. It was easy to remomber the button combination to open the gate on my bike. Now it is harder (and gate does not work anymore ;-) )

But nevertheless, it's fine.

Re: Garmoticz

Posted: Sunday 11 August 2024 17:13
by TroisSix
Hi
Really like your application, working fine with my epix, thank you!!
Does someone know how to set a default room id to avoid a big list of rooms to scroll? :-)