Hi all,
trying to get this VS Code extension working with my OpenHab2 server. I have got a Letsencrypt certificate installed and working in a nginx reverse proxy, basically following this guide:
I have no problem connecting through app or browser, and the certificate is valid for my internal domain. My server is named
openhab.internal.mydomain.com
, and this is what my settings.json looks like:
{
"openhab.host": "https://openhab.internal.mydomain.com",
"openhab.port": 443,
"openhab.username": "openhab",
"openhab.password": "supersecretpassword",
"openhab.useRestApi": true
}
When I try to connect to OpenHab from Visual Code I get the following error message:
"Error while connecting to openHAB REST API. Hostname/IP does not match certificate's altnames: Host: openhab. is not in the cert's altnames: DNS:openhab.internal.mydomain.com"
It seems like Visual Code tries to communicate using the short name “openhab
” instead of the FQDN “openhab.internal.mydomain.com
” and of course, this does not match the name specified in the certificate.
Any suggestions what I am doing wrong?