Bosch Smart Home

I reviewd the requests activity, its really nice that you put so much work in this. hopefully the bosch smart home is defaultly integrated soon, because i now have a house of bosch smart home systems and would love to use in in home assistant. so nice that you put it to the core :slight_smile: thank you so much!

1 Like

The Integration worked fine for me so far. But suddenly I’m getting a lot of error-messagen in the log. Maybe it has something to do with the latest Core Updates. Is there anything I can do about it?

2021-05-21 05:21:35 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out. (read timeout=15). Waiting 15 seconds. 2021-05-21 05:22:30 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out. (read timeout=15). Waiting 15 seconds. 2021-05-21 05:26:10 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out. (read timeout=15). Waiting 15 seconds. 2021-05-21 05:30:00 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out. (read timeout=15). Waiting 15 seconds. 2021-05-21 05:32:14 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out. (read timeout=15). Waiting 15 seconds. 2021-05-21 05:36:31 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out. (read timeout=15). Waiting 15 seconds. 2021-05-21 05:39:58 ERROR (SHCPollingThread) [boschshcpy] Error in polling thread: HTTPSConnectionPool(host='192.168.178.xx', port=8444): Read timed out.. Waiting 15 seconds.

Hi @fogger
I updated my system in the morning to 2021.5.5, I don’t get the errors from the polling thread.
Did you try a restart if this fixes the issue?

Yes I tried several restarts since yesterday. The issue persists. I’ll try a rollback to an earlier version next.

The integration is no longer working for me. For that I decided to fully delete it and set it up again from scratch.

The end ist, that I am no longer able to setup the integration because the authentication is unsuccessfull in the step where I have to configure the cert and the key:

2021-05-22 18:02:06 ERROR (SyncWorker_1) [root] Body: None
2021-05-22 18:02:06 ERROR (SyncWorker_1) [root] Headers: {'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'api-version': '1.0', 'Content-Type': 'application/json'}
2021-05-22 18:02:06 ERROR (SyncWorker_1) [root] URL: https://192.168.178.132:8444/smarthome/information
2021-05-22 18:02:06 ERROR (SyncWorker_1) [root] Failed to get information from SHC controller: API call returned non-OK result (code 400)!: b''

Even if I try to call that function using Postman, which works fine with every function the Connect-Box realy offers, I am getting back a 400 error. I am no even able to find the 8444/smarthome/information function in the Postman collection … Any hint what I am doing wrong?

Hi @markusmazurczak,
this is not the indended behavior of the lib. Which version of the integration are you using? If you are on the current master (0.4.2, have a look in custom_components/bosch_shc/manifest.json), you should not need to configure the cert and key anymore, but only provide your SHC system password (not in base64 encoded).

Edit: I also take a look into postman collection, it seems the call to https://{{host}}:8444/smarthome/information is not part of the collection, but it’s still responding with a correct result. Just out of curiosity: which version has your SHC installed? Mine has 10.0.1991-18647 installed.

Best, Thomas

Hi @tschamm,

well … updating the custom component did the job :slight_smile:
I was running on a pretty old version (do not know which one exactly but at least something between 6 or 8 month old).

My SHC is running with version 10.0.1991-18647.

If I execute a GET on https://{{host}}:8444/smarthome/information I am getting back a HTTP 400

Hi, Hoping for a hint to fix the Bosch integration.
All was working fine until today when I restarted HA for an unrelated reason. When it came back up it was not talking with the bosch SHC. I think the errors were authentication related.
I figured maybee the Bosch firmware changed at some point and maybee I needed to update the integration.
HA is 2020.12.1
bosch_shc WAS commit 9683c52bf219f8fbd82cac7f9dd8b7ed97cecbc6 and WAS working fine.
The bosch firmware is 10.0.1991-18647
Now I updated to bosch_shc v0.4.2 and I get the following error
Logger: homeassistant.setup
Source: setup.py:138
First occurred: 19:51:19 (1 occurrences)
Last logged: 19:51:19

Setup failed for bosch_shc: No setup function defined.

I COULD delete everything ad start again but it would be great to fix without having to re do all the integration.
Calls made via postman seem to work fine.

Thanks
Ben

Hi, that sounds tricky… The firmware did have a breaking change introduced beginning of May (new API version needed), so this could be the root cause after the restart. I never encountered this error you’re reporting. I’m not even sure if 0.4.2 works with HA version from 2020, I never did test backwards compatibility…

You can test two things:

  • Is the folder of you custom component still correct? When moving to HACS, I needed to move all the code in the repository into the subfolder custom_components.
  • Can you have a look into /.storage/core.config_entries, if the entry looks ok?

Cheers, Thomas

Thanks Thomas,
Mybee its best for me to do an upgrade of HA then. Will give that a try tomorrow.
I did notice the folder moved and I compensated for that.
As for the config, the relavent section is

            {
                "entry_id": "22477001bf5800d4fc88150ff9f557c4",
                "version": 1,
                "domain": "bosch_shc",
                "title": "shc028664",
                "data": {
                    "ssl_certificate": "/config/ha_clientcert_for_bosch.pem",
                    "ssl_key": "/config/ha_clientcert_for_bosch.key",
                    "host": "10.0.0.80"
                },
                "options": {},
                "system_options": {
                    "disable_new_entities": false
                },
                "source": "zeroconf",
                "connection_class": "local_poll",
                "unique_id": "64-da-a0-02-86-64"
            },

I was thinking to upgrade anyway but this was just a simple restart for some other reason and it caught me out, else I would have planned it properly.

The config looks fine for me, at the moment I have no other idea. I keep my fingers crossed :crossed_fingers:

Thanks for the confirmation :+1:

Hi! Awesome, that this well built component is now part of the core. With the latest release of HA I wanted to migrate to integrated component. However, connecting to my BSH Controller seems to work fine, but there are no devices listed:

  1. Delete previous integration
  2. Delete folder custom_components/bosch_shc + manually created certs
  3. Restart HA → No errors. Deletion seems fine. (I’m not too worried to setup the devices again)
  4. Shutdown HA → Upgrade → Startup
  5. Controller detected
  6. Setup connection to controller → certs are created,…

Unfortunately I can only see the controller as the only device. No connected devices (Smart Plugs, Twinguard,…). Any ideas?

Update. Just skimmed through the code. The integration doesn’t seem feature complete yet. However it should still display at least some devices?

1 Like

You’re right about only parts are included. Currently the setup process and the binary sensors (smoke detectors) are shipped, with the next release the sensors and hopefully the covers will be shipped.

I do my best, but delays result mainly from the PR Reviews. PRs should be small and only one platform/feature at a time, which I can understand given the high quality of the comments provided.

For the time being, I suggest you stick to the HACS component until everything is merged.

Best, Thomas

1 Like

Ok, makes sense. Then I’ll just wait a few more releases.

Best Patrick

I upgraded to the latest HA docker image and all works fine now. Thanks :slight_smile:

1 Like

Hi, I am relatively new to Home Assistant and to using this Community.
I have a short question. At the moment only Window Sensors are supported by the official Integration in HA right? Everything else is in developing state?

Hi @danielschmitz87

you’re right, the available features of the official integration is still very small. I suggest you install the custom component, via HACS (see above post #169) or from the repository. If you are unsure, I suggest using HACS. IMHO, based on the issues reported on github, the HACS version can be considered pretty stable.

Until everything is merged into the official integration, I try to keep the code of the custom component up to date to the PR’s requested changes.

Best, Thomas

Thank you very much. Do you have plans, integrating the Bosch Smart Home Eyes Cameras?
I am talking about the Camera Stream or a Picture Snapshot.

By the way your HACS Integration works perfect :slight_smile:

Thanks for your feedback! The Eyes Camera is already integrated, however the camera neither provides an image nor a picture via the API. There’s also a github issue for this feature request: Local API to access pictures from a camera · Issue #30 · BoschSmartHome/bosch-shc-api-docs · GitHub