astroweather
astroweather copied to clipboard
suddenly failing with the following error
I hope you can assist in the error that i am now receiving in home assistant: 7timer as far as i can see does not use a certificate
Came to say I am receiving the same error. Error log:
This error originated from a custom integration.
Logger: custom_components.astroweather Source: helpers/update_coordinator.py:315 integration: AstroWeather (documentation, issues) First occurred: 3:38:38 AM (43 occurrences) Last logged: 4:26:06 AM
Unexpected error fetching astroweather data: Error requesting data: Cannot connect to host www.7timer.info:443 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'www.7timer.info'. (_ssl.c:1000)")]
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 102, in get_location_data return await self._get_location_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 128, in _get_location_data await self.retrieve_data_seventimer() File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 597, in retrieve_data_seventimer json_data_astro = await self.async_request_seventimer("astro", "get") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 646, in async_request_seventimer raise RequestError(f"Error requesting data: {err}") from None pyastroweatherio.errors.RequestError: Error requesting data: Cannot connect to host www.7timer.info:443 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'www.7timer.info'. (_ssl.c:1000)")]
Restarted HA and also tried reinstalling the integration.
Confirmed. 7Timers availability is currently unreliable. It is used for the source for seeing, transparency, and lifted index. For this reason some more error handling is now implemented in pyastroweatherio to allow AstroWeather to function even if there is no data available from 7Timer. Condition forecast is then based on clouds and calmness (with an upcoming version of AsterWeather) only.
If anyone knows a free API source a seeing forecast, please report back.
For now, please change the manifest.json
in the custom_components/astroweather
folder to the following:
"requirements": [
"pyastroweatherio==0.43.1.dev8"
],
Example of bad weather:
I know Accuweather has a "free" API. You can do only so many requests per day before it cuts you off but all you need is an API key from their website.
worth noting here that this is a bigger issue than reliability
the certificate used now is a squarespace wildcard cert
we don’t need to use SSL though. there is no redirect from http → https, and it seems that the SSL part of this site goes to a squarespace under construction holding page
and the non SSL rewrites to http://167.99.8.254/
https://community-assets.home-assistant.io/original/4X/e/a/8/ea890ef6925abe316c13b2fc32f0ed2fb9527fde.png
shenanigans for sure, the IP 167.99.8.254 is a digital ocean site. I think what they should be doing is getting the likes of cloudflare infront of this and transferring the DNS away from squarespace.
however moving to a non SSL source for now would fix this issue, except for reliability
I made the change for "pyastroweatherio==0.43.1.dev8" in the manifest.json, and this does not work, still the same error on setup
change the
manifest.json
in thecustom_components/astroweather
I made the change, restarted HA, and the integration is now running.
change the
manifest.json
in thecustom_components/astroweather
I made the change, restarted HA, and the integration is now running.
very strange as mine does not after the change and restart of home assistant
change the
manifest.json
in thecustom_components/astroweather
I made the change, restarted HA, and the integration is now running.
Same for me. after the change, integration works. Will we get an update?
So, the 7timer service is still down and is currently being discussed in the issue tracker of 7timer. I'm thinking of replacing 7timer with some seeing estimations based on math :-) let's see how good this will match the "official" services like meteoblue for which no free API is available. So yes, I will work on an update/alternative for sure, but time is limited at the moment.
Thanks for your work!
But moon data is not affected? (Moonrise and Moonset) should now work with the new string in manifest.json?
@Maddin1684
very strange as mine does not after the change and restart of home assistant
I don't know what to say...
Thanks for your work!
But moon data is not affected? (Moonrise and Moonset) should now work with the new string in manifest.json?
Everything besides transparency, seeing, and lifted index should work normally. Things like rising/setting etc. are calculated in AstroWeather.
Things like rising/setting etc. are calculated in AstroWeather
Or via Node-RED! See https://community.home-assistant.io/t/my-new-moon-device-from-node-red-node-red-contrib-sun-position/683868
I made the manifest change and restarted, which results in:
Logger: pyastroweatherio.client
Source: helpers/update_coordinator.py:271
First occurred: 07:39:14 (1 occurrences)
Last logged: 07:39:14
Error requesting data: Cannot connect to host www.7timer.info2:443 ssl:default [Name does not resolve]
mnanifest.json
{
"domain": "astroweather",
"name": "AstroWeather",
"codeowners": [
"@mawinkler"
],
"config_flow": true,
"dependencies": [],
"documentation": "https://github.com/mawinkler/astroweather",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/mawinkler/astroweather/issues",
"requirements": [
"pyastroweatherio==0.43.1.dev8"
],
"version": "0.42.3"
}
card
dev tools states
And now it is working. Weird. Could have been a cache thing.
7timer.info2 [Name does not resolve]
I was thinking along the lines of caching somehow, somewhere as 7timer.info2 doesn't resolve for me either and was going to suggest checking...
but I'm glad it's working for you now!
mine is working too now also
Update: 7timer is still down but I'm in contact with the maintainer. The underlying data is functional, but not the API endpoint. In parallel, I played a little with calculating the seeing myself based on temperature, humidity, wind speed, and altitude which gives some results, but verifying them around the globe with the current unstable weather conditions is hard.
So please be patient, I hope to get AstroWeather up again with not only cloud and wind conditions.
Thanks for your temporary fix. I can confirm that it is also working for me adter restarting HA.
I really love your intefrarion and want you let to know that I appreciate your woek on this :)
I did nothing and it came back this afternoon (April 26 CDT).
Michael
7timer is up again and AstroWeather should return automatically with the known functionality. I continue to work on the redesign to make AstroWeather more resilient and provide new functionality. In case anyone is curious, there is a redesign branch in all three repos. Thank you for your patience.