core
core copied to clipboard
Environment Canada integration becomes unavailable constantly
The problem
I'm having an issue where the Environment Canada integration becomes unavailable constantly for me. The error seems to imply it is a network issue but when the issue is happening I can ping google.ca just fine. Here's an example of the history where you can see it gets the data for a bit then becomes unavailable (ignore the long cloudy event because that's from me shutting down my server for the night):
It has always done this since installing and I don't know why. All entities except for the AQI become unavailable at the same time. This Home Assistant install is running in a VM (TrueNAS) so maybe that's part of the issue but a friend of mine is doing the same thing and has no issues. The VM was set up to be on an ethernet bridge and I can't really think of any setup issue that would be causing it. I was going to try to run HAOS on bare metal but I can't even set up the integration anymore on any of my installs.
I'm hoping something I've mentioned can point to the root cause of the issue or maybe the integration can be designed to not become unavailable until the next weather check since it seems the integration checks every hour, and it has the correct data but then 20 minutes later or so it becomes unavailable.
What version of Home Assistant Core has the issue?
2023.5.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Environment Canada
Link to integration documentation on our website
https://www.home-assistant.io/integrations/environment_canada
Diagnostics information
home-assistant_environment_canada_2023-06-05T02-32-07.208Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Error requesting environment_canada weather data: Cannot connect to host dd.weather.gc.ca:443 ssl:default [Name does not resolve]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/env_canada/ec_aqhi.py", line 146, in get_aqhi_data
response = await session.get(
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host dd.weather.gc.ca:443 ssl:default [Name does not resolve]
2023-06-04 22:20:43.279 DEBUG (MainThread) [env_canada.ec_aqhi] Retrieving AQHI failed
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
infos = await self._loop.getaddrinfo(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
return await self.run_in_executor(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
Additional information
No response
Hey there @gwww, @michaeldavie, mind taking a look at this issue as it has been labeled with an integration (environment_canada) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of environment_canada can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign environment_canadaRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
environment_canada documentation environment_canada source (message by IssueLinks)
I get this, but it still seems to work. Logger: py.warnings Source: components/environment_canada/init.py:117 First occurred: 05:13:25 (1 occurrences) Last logged: 05:13:25
/usr/local/lib/python3.11/site-packages/PIL/Image.py:992: UserWarning: Palette images with Transparency expressed in bytes should be converted to RGBA images warnings.warn(
Same problem, i'm in 2023.6.2
Same problems. On 2023.7.1
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still an issue
Can you provide any more information on your setup, as well as any relevant logs?