Reviewers needed: Environment Canada component with weather, sensor, and camera (radar) platforms

It eventually went away on its own. That seems to be consistent with your hunch as to it’s cause.

Okay, I made an adjustment in v0.0.10. Please give that a try. On my system I just had to edit the manifest.json file to require the new version and restart.

Update: Nope, had a similar problem today. I’ll keep tweaking.

I would love to try this component but i am completely confused on how to install it. I am running a plain setup on a CentOS VM and have attempted to follow the above instructions to no avail.

I would be gratefull for a bit of help. I am running Home Assistant 0.92.2 and my config is locate here:
/home/homeassistant/std/homeassistant

I ran the following commands:

sudo -u homeassistant -H -s
pip3 install env_canada==0.0.9 --target /home/homeassistant/std/homeassistant/deps/lib/python3.6/site-packages

With the following result:

Successfully installed beautifulsoup4-4.7.1 certifi-2019.3.9 chardet-3.0.4 env-canada-0.0.9 geographiclib-1.49 geopy-1.19.0 idna-2.8 imageio-2.5.0 numpy-1.16.3 pillow-6.0.0 requests-2.21.0 requests-futures-0.9.9 soupsieve-1.9.1 urllib3-1.24.3

Then I downloaded the following four files from the Dropbox:

__ init__.py, camera.py, sensor.py, weather.py

and installed them here:

/home/homeassistant/std/homeassistant/custom_components/environment_canada/…

I am not sure what is my next step? I restarted the service but I do not see any sensors or any mention in the log that the component is being loaded.

Sorry, I haven’t been keeping the Dropbox files up to date, but I’ve updated them just now.

Please copy over the latest files from Dropbox, including the manifest.json, and restart. I’m not sure that you need to install the env_canada package manually anymore, but if you get an error related to that please do the same install command as above but with env_canada==0.0.10.

Hopefully that will work for you, but if not please let me know.

Please Michael do not apologies, your efforts are much appreciated. I did as you suggested but I must be doing something fundamentally wrong in my setup. I see no mention of your component in the logs.

I can see in the thread that for the docker installation it was mentioned that ec_sensor.py was pointing to environment_canada.py

-v ~/home-assistant:/config
-v ~/home-assistant/ec_sensor.py:/usr/src/app/homeassistant/components/sensor/environment_canada.py \

Is this still relevant? I do not even have environment_canada.py file on my server but I do have env_canada.py installed:

/home/homeassistant/std/homeassistant/deps/lib/python3.6/site-packages/env_canada/env_canada.py

Have you added the components to your configuration.yaml? You need:

weather:
  - platform: environment_canada
sensor:
  - platform: environment_canada
camera:
  - platform: environment_canada

Bingo, that was dumb on my part, I assumed that the log was going to show the component. Thank you many times. I will report back my impressions etc… but it looks mighty good.

1 Like

Excellent. I’m still chasing down a couple edge cases related to alerts, but otherwise things seem pretty solid. After you’ve used it for a bit let me know what you think.

Michael I take this opportunity to congratulate you on your work with this component, it has been working wonderfully for me. I must admit that I am new to HA and the ease of use of your component is a testament to your fantastic job. I also want to thank all who participated on this thread, I have learned lots from all of you. i.e. I just finished adding the @rlongfield alert card code.

I do have a question about the install for this component. Since I am using HA that is not a Docker version, I noticed in the install that multiple folders from the install already existed in HA. I am assuming that if one of those folders code is updated in HA, this could potentially break HA?

Here are the folders that I am concerned with:

…/deps/lib/python3.6/certifi
…/deps/lib/python3.6/certifi-2019.3.9.dist-info
…/deps/lib/python3.6/chardet
…/deps/lib/python3.6/chardet-3.0.4.dist-info
…/deps/lib/python3.6/idna
…/deps/lib/python3.6/idna-2.8.dist-info
…/deps/lib/python3.6/requests
…/deps/lib/python3.6/requests-2.21.0.dist-info
…/deps/lib/python3.6/urllib3
…/deps/lib/python3.6/urllib3-1.24.3.dist-info

1 Like

Thanks, I’m glad it’s working for you. I wouldn’t worry too much about the dependencies, since the platform manages them. The manifest.json file specifies that the env_canada library is required, which itself has a bunch of (nested) dependencies. Python will handle making sure that everything that’s required is there, and nothing should break.

Everything working fine here across versions…at 0.93.2 now…

Works with lovelace custom card weather-card-chart as well.No precip daily values using that card but daily highs and lows work well.

https://community.home-assistant.io/t/lovelace-weather-card-with-chart

Does anyone here run this on Synology docker and care to help a docker newbie out?

I haven’t used Docker on Synology, but in the current version (I believe 0.92 and later) all you should need to do is:

  • Put the files from Dropbox at [config folder]/custom_components/environment_canada/
  • Update your configuration.yaml file to load the components (as per post #120).
  • Restart your container

Let me know if you have any trouble.

Oh…the other pip install is not needed now?

No, I don’t believe it is.

1 Like

thanks!! I think it got it working! finally some love for the Canucks!!

I just install the component on my testing install, when I add:

sensor:
  - platform: environment_canada

to my configuration.yaml quite a few devices that I have in my sensors.yaml disappear.

added screenshot

Because you just created two places for your sensors, one in the config file and another in sensors.yaml.

1 Like

Thanks @123 I knew it was something stupid like that.

Big news: the platforms have been merged into the dev branch! I hope that this means they’ll be incorporated into 0.95 in a couple weeks. Thanks to everyone who contributed and tested the code over the past few months, this wouldn’t have been possible without you!

4 Likes