Hi. I am using my HA-System in combination with Alexa / AWS Lambda.
I’ve setup Duckdns with LetsEncrypt and it works. My AWS lambda function can access my HA (https).
Now I’d like to avoid using https when at home. At home I’d like to call my HA over http. Therefor I’ve installed nginx and followed the installation guide.
This works as well. Now my HA is accessible over http and I am also able to call my HA over https when not at home (local network). But now my AWS Lambda function is not working anymore. I get the following error:
errorMessage": "HTTPSConnectionPool(host='www.XXX.duckdns.org', port=443): Max retries exceeded with url: /api/alexa/smart_home (Caused by SSLError(SSLError(1, '[SSL: TLSV1_UNRECOGNIZED_NAME] tlsv1 unrecognized name (_ssl.c:997)')))
I am using a self signed certificate (DuckDns creates a certificate when installed). The used script can be found in the HA documentation.
I hope one might help me out here. I am out of ideas…
Hi. Ok I figured it out. There was an issue with my ssl certificate and the duckdns setup.
I renewed my certificate and my connection is secure now. I installed the official nginx addon and everything seems fine.
The only issue now is that I get an error when I call the URL https://xxx.duckdns.org/api/alex/smart_home. I get the following error ERR_SSL_UNRECOGNIZED_NAME_ALERT. I am no nginx expert but it looks like there is an forwarding error.
Could you provide the full nginx configuration and may check the certificates in the local network and from outside.
To check the certificates you could use openssl: echo | openssl s_client xxx.duckdns.org:443 2>/dev/null | openssl x509 -noout -text
One problem might be that you use different certificates for external access (created by duckdns addon) and internal access and one (the external) is not used for connections.
The error message refers to multiple problems that can occure by misconfiguration in respect to TLS.