SSL certificate for data storage integration expired?

For more as a year I am running a couple of Lora sensors connected with data storage integration to my local Home Assistant. It has been working seamlessly sofar.
Now suddenly I get the following SSL- CERTIFICATE_VERIFY_FAILED error in my Home Assistant log for the data Storage Integration link:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for ‘pv_bmp280.data.thethingsnetwork.org’. (_ssl.c:1056) 2019-02-22 12:49:32 ERROR (MainThread) [homeassistant.components.thethingsnetwork.sensor] Error while accessing: https://pv_bmp280.data.thethingsnetwork.org/api/v2/query/bmp280b

I don’t get any data anymore!
How can this be fixed?

That doesn’t say anything about expiration. Also, it’s a wildcard (which I assume has been there since December, as indeed it almost expires), so it should work for the given domain.

I see no issues going to https://pv_bmp280.data.thethingsnetwork.org/ in a browser.

…however, the same server IP address (for me, it resolves to 13.69.184.129) is used for integrations.thethingsnetwork.org, which nicely offers a different certificate for that domain. So, this needs SNI.

Again, I assume this has been like this for quite some time. Any idea if your “Home Assistant” (whatever that is) supports SNI?

Indeed I am also able to access the link https://pv_bmp280.data.thethingsnetwork.org from my local network.
Not clear to me why a local app on the same local network suddenly gets CERTIFICATE FAILURES, but…I am not really knowledgeable in this area.

I raised this issue with the https://www.home-assistant.io/ guys.
There seems to be a bug in Python 3.7 that could cause this error. Python 3.6 seems ok.

See: https://github.com/home-assistant/home-assistant/issues/21367#issuecomment-467397812

How can this be brought to the attention of the TTN developers?

I wonder whether it is because the hostname includes an underscore character. If you are able to remove it then that might be worth a try.

I registered a new application without an underscore in the name.
I registered the device to this new application.
Defined Data Storage Integration for the new application and now it works again!

Was it the new name or the new registration that made it work again?
Thanks anyhow.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.