Bosch Smart Home

It’s working nicely now. Thanks.
The issue was the mDNS not working in docker as you sugested. I struggled to get it working with --networking=host but then found out host networking is not available on Mac OS (I was testing this on my laptop). I moved over to testing on a Linux machine and with the --network=host enabled it started working fine.
Thanks for the help and the hard work creating this :slight_smile:

Hi i work in the Bosch Smart Home Supportcenter. If you want use our products, you will need a bridge. The best solution is, you will use Google Assistent, Siri or Alexa. Our system is closed like iOS on iPhone. But we have Partners like Apple, Google, Phillips Hue, LedVance and Amazon. This Products can trigger our system.

Hopefully this helps

I just strat on Hass World,

My Hass test setup is done a Vm base on debian + venv setup.

Hass version : Home Assistant 2020.12.1

I’m trying to set up my Bosch Smart Home Gateway.

I done about “Official” BSH how to and i manage to create a Postman user using Postman.

On Hass i manage to install this plugin, and my gateway is well discovery.

Now i’m stuck on SSL page.

Plugin speak about public and private key, but Official how to spoke about certificat an key : Who is who ?

On plugin Github dev ask for path : Directory where is store *.pem files : ok
But what is the syntaxe ?

//home/homeassistant/files.pem ?

Some help can be appriciate

Welcome @Deennoo

I assume you generated both files like this:
openssl req -x509 -nodes -days 9999 -newkey rsa:2048 -keyout client-key.pem -out client-cert.pem.

So you have now the public certificate client-cert.pem as well as the private key client-key.pem. In the bosch_shc component, you have to provide absolute path to both files, so /home/homeassistant/client-cert.pem and /home/homeassistant/client-key.pem should be correct. In Postman, those files are named with CRT file as well as KEY file.

Edit: Please do not forget to register the new client, as described here: Register a New Client to the Bosch Smart Home Controller

Regards, Thomas

thx for your answer, i’m done now, i have to use the cert file input i have created on user creation on Postman (and remove the one already set on postman exemple).

1 Like

Hi Thomas,

Thank you very much for your efford! I could follow your instructions to the point where i have to configure the Bosch SHC. Unfortunately this device is not available/discovered although i did youd custom_component installation. Any hints?

best regards

Erik

Hi Erik,
welcome! What’s the kind of setup you’re running your home assistant system? If you use docker, please make sure that you have set the --network=host option set (see comments 134 – 140).

Have you tried adding the Bosch SHC device manually (Settings -> Integration -> Add Integration -> Bosch SHC)? If so, what kind of error do you get?

Regards, Thomas

I´m running it on a pi 3. If i try adding it manually i can´t find Bosch SHC in the list.

Thank you Thomas,

with your help i got it to work. I did not create the \config\custom_components\bosch_shc subdirectory so the device was not installed. I also tried to use an encrypted key like suggested on the bosch git hub which does not work! For this integrations the key must not be encrypted!

Regards, Erik

1 Like

Hi Thomas,
thanks for your work on this! Works like a charm as of now. I am looking for a way to use the smoke detectors as a burglar alarm system. Reason is: I already have Hue motion detectors and want to use those as the trigger.

Do you know how to activate the siren on those? I failed to find the solution sifting through the api and trying out a bunch of stuff.
Regards, Christian

Hi, i move my hA from Synology–>Docker to Synology --> VM.
All works fine, but i have this errors:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 30, in _process
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 424, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 429, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.boschshc.logbook'
2021-01-10 20:49:26 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing bosch_shc/media_source.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 30, in _process
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 424, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 429, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.boschshc.media_source'
2021-01-10 20:49:26 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing bosch_shc/system_health.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 30, in _process
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 424, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 429, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.boschshc.system_health'
2021-01-10 20:49:26 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing bosch_shc/group.py

What can i do?

Hi Frank,

this looks weird, and I assume it has nothing to do with the bosch_shc custom component itself. I guess your HA installation tries to import bosch_shc the wrong way, however I have never seen this error by myself. I guess something went wrong during your switch to the VM.
What happens, if you start over with a clean (test) installation of HA in your VM?

EDIT: Please double-check if your custom component is placed in the correct folder. You can perhaps try to install some other component as custom component first and see if something else goes wrong.

Regards, Thomas

I made a clean install and all is fine. Thanks

Hi
are there any plans to provide the rating information from the Twinguard as Entity?

  • combinedRating: GOOD, BAD,MEDIUM
  • description: WARM,WARM_STUFFY,LITTLE_WARM,WARM_DRY,OK,LITTLE_STUFFY,LITTLE_HUMID,WARM_HUMID,HUMID_STUFFY,HUMID
  • temperatureRating: GOOD,MEDIUM,BAD
  • humidityRating: GOOD,MEDIUM,BAD
  • purityRating: GOOD,MEDIUM,BAD

The state is returned as text, values I have seen so far are included in the list.

regards
Armin

Hi Armin,

thanks for your request!
You can update the custom component, the airquality sensor should show up now. The other values are available as state_attributes of the airquality sensor.

Cheers, Thomas

Thanks for the quick response and implementation.
Works for me:
grafik

Hi there,

unfortunatly I cannot get it to work and fail at step 4: bosch_shc integration in HA.

My Bosch SHC isn’t discovered automatically and searching it manually doesn’t work either (“connection failed”).

Here is part of the error log:

2021-01-17 14:10:52 WARNING (MainThread) [custom_components.bosch_shc.config_flow] Error looking up mDNS entry

I am running Home Assistant on a Synology NAS with docker. I read almost every post in this topic and know, that I’m not the first to encounter this problem with mDNS. But I am no “tech wiz” and did not figure out how to fix is.

Any help would be highly appreciated! For example: how can I use the “–network=host” option? If someone can point me to a guide where this is explained, it might be enough to get the integration running.

Best regards
Patrick

Hi Patrick,

I think you’re not the first one who struggles getting mDNS running with Docker on Synology (for some starting point, see the link above). However, I think this problem is not directly related with the bosch_shc custom component, but with your installation method.

Good luck :slight_smile:
Thomas

Yes, you are correct; it had nothing to do with the component. I finally (!!!) figured it out and everything seems to work fine now. I “simply” had to edit the config json of the docker container to move it from the network “bridge” to “host”.

Thanks for the good work, I’m looking forward integrating my bosch equipment to the component :wink:

1 Like

So no idea on how to directly trigger the alarms on the smoke detector? I figured there must be away, since the official app offers a testing routine that also triggers the alarm.

Regards, Christian