tschamm / boschshcpy

Bosch Smart Home Controller API Python Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing tls_ca_chain.pem, invalid path

cofw2005 opened this issue · comments

I am currently running Home Assistant Core 2023.4.2 in python 3.11.3 virtual environment.

When I tried to add Integration Boschshc, I received this error, cannot find the certificate bundle, invalid path: /srv/homeassistant/lib/python3.11/site-packages/boschshcpy/tls_ca_chain.pem.

I did some investigation, also have seen the posts here, but so far I still cannot solve it, please kindly help. Below are what I have tried:

I used "pip freeze" to check the package version, I got that the boschshcpy on my pi is version 0.2.43. However if check the package version in the virtual environment which installs the Home Assistant. I got version 0.2.35. Both are lower that required. And I checked in the folder /srv/homeassistant/lib/python3.11/site-packages/boschshcpy/, there is no file "tls_ca_chain.pem", also no file "rawscan.py".

I tried to install the lastest boschshcpy package 0.2.56 with pip in virtual environment. After that it works, I can see the new files in the folder. And I did successfully add the Integration. I got the entities in work.
But after a restart of home assistant, the version of boschshcpy was back to 0.2.35 again, the certificate was gone. The Integration showed an error, didn't work again. I tried several times, a restart of home assistant always rolled back the version to 0.2.35.

One more hint, after several tries I gave up, because the Integration only provided some sensors which is not what I need. But even though after I removed the Integration Boschshc from home assistant, I currently still receive the error message every several minutes.

As I understand the customer components Boschshcpy-hass also works based on the package. So if I cannot solve this issue, I also cannot use the customer component, right? Can anyone help me? Thanks in advance!

I did some further search, and found such information from home assistant develoment docs:

Where Home Assistant looks for integrations
Home Assistant will look for an integration when it sees the domain referenced in the config file (i.e. mobile_app:) or if it is a dependency of another integration. Home Assistant will look at the following locations:
<config directory>/custom_components/<domain>
homeassistant/components/<domain> (built-in integrations)
You can override a built-in integration by having an integration with the same domain in your /custom_components folder. The manifest.json file requires a version tag when you override a core integration.

Now I know that the version is defined in the manifest.json file, then I looked at the file /srv/homeassistant/lib/python3.11/site-packages/homeassistant/components/bosch_sch/manifest.json , I found this "requirements": ["boschshcpy==0.2.35"],
Finally I figured that out this is the reason every restart home assistant roll back the version to 0.2.35.
Because it says an override is possible, then I just download the boschshc-hass package and unzip it into custom_components folder, the manifest.json file with "requirements": ["boschshcpy==0.2.56"], now overrided the one in build-in folder. After restart home assistant, how I get 0.2.56 version running. And of course I successfully added the bosch controller too.
I feel so good that finally make it work.

This issue can be closed.