core: Environment Canada does not load after 2021.12.0

The problem

Environment Canada does not start after 2012.12.0 upgrade. It seems something has changed with the radar component which is preventing the entire integration to load.

What version of Home Assistant Core has the issue?

core-2021.12.0

What was the last working version of Home Assistant Core?

core-2021.11.5

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/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Cannot connect to host maps.geogratis.gc.ca:80 ssl:default [Connect call failed ('192.67.45.111', 80)]

Additional information

The host indicated indeed does not respond, which could be a transient issue. Investigating the source code, it seems it comes from the library code related to radars. The official weather Canada app for android seems to be working, including the radar. I had no issues on HA 2021.11.x

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 21 (10 by maintainers)

Most upvoted comments

I totally agree, I think we should do both. The map being unavailable shouldn’t cause the radar module to fail, and the radar component failing should’t cause the sensors and weather to fail either.

Edit: I’ve pushed v0.5.19 of the library which gracefully handles this error condition.

The appears to only be for part of the weather data (radar maps), and not the most significant portions like temperature or conditions. If I’m wrong, then I agree this can be closed. Otherwise, it would be much better if the integration could log the error and continue gathering the information it can.

— Andrew

On Dec 11, 2021, at 22:24, Chris Turra @.***> wrote:

i am seeing the same as @deviantintegral shared above and i have not yet upgraded to 2012.12.0 (still running 2012.11.5).

from the home assistant logs…

2021-12-11 10:03:03 WARNING (MainThread) [homeassistant.config_entries] Config entry ‘<REDCATED>’ for environment_canada integration not ready yet: Cannot connect to host maps.geogratis.gc.ca:80 ssl:default [Connect call failed (‘192.67.45.111’, 80)]; Retrying in background i can manually confirm the same thing from my local machine…

$ dig +short maps.geogratis.gc.ca wms.sst-sw.rncan.gc.ca. 192.67.45.111

$ curl -v maps.geogratis.gc.ca

  • Trying 192.67.45.111:80…
  • connect to 192.67.45.111 port 80 failed: Connection refused
  • Failed to connect to maps.geogratis.gc.ca port 80 after 100 ms: Connection refused
  • Closing connection 0 curl: (7) Failed to connect to maps.geogratis.gc.ca port 80 after 100 ms: Connection refused at this point, we just need to wait for weather canada’s api to be available once again. this issue can probably be closed as there’s nothing the home-assistant project can do to resolve or work around this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

I’m going to try to modify the env_canada library so that it can return the radar GIF without the map, which should get things running again.

To clarify; all entities are showing as unavailable for me too. However, it seems as if only radar images are actually down, and the integration should be able to make only that entity unavailable, letting the others function.

i am seeing the same as @deviantintegral shared above and i have not yet upgraded to 2012.12.0 (still running 2012.11.5).

from the home assistant logs…

2021-12-11 10:03:03 WARNING (MainThread) [homeassistant.config_entries] Config entry '<REDCATED>' for 
  environment_canada integration not ready yet: Cannot connect to host maps.geogratis.gc.ca:80 ssl:default 
  [Connect call failed ('192.67.45.111', 80)]; Retrying in background

i can manually confirm the same thing from my local machine…

$ dig +short maps.geogratis.gc.ca
wms.sst-sw.rncan.gc.ca.
192.67.45.111

$ curl -v maps.geogratis.gc.ca
*   Trying 192.67.45.111:80...
* connect to 192.67.45.111 port 80 failed: Connection refused
* Failed to connect to maps.geogratis.gc.ca port 80 after 100 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to maps.geogratis.gc.ca port 80 after 100 ms: Connection refused

at this point, we just need to wait for weather canada’s api to be available once again. this issue can probably be closed as there’s nothing the home-assistant project can do to resolve or work around this.

edit: coming back to cross out my last part of this comment. at the time i was writing it, i had misunderstood the scope of the impact. sorry for those who were upset enough with it to give me a 👎🏼

Actually, scratch that. Looking at the code, it seems like it’s the HA component and not the underlying library that should be updated.

@michaeldavie I just tried env_canada==0.5.19 using “Custom deps deployment” add-on and it works for me. Let us know when the change officialy reaches production.

Of course radar works on top of black map lol image

It looks like Environment Canada’s app has failed over to Google as a backup.

For me it’s knocked out everything (temperature, humidity, forecast, etc), all unavailable. Figure it might be on Env. Canada’s side though.