Bosch Smart Home

Thanks Thomas,

I did not even realize that this was not included until now. So now I got this device class in my instance as well! Really cool.

I also realized that you have added entities for the motion sensor. I could not spend much time with it until now. But from my first impression it looked like it did not quite behave as expected. But I really need to spend some more time with this feature!

Best wishes,
Kai

Works great. Just one thing, I somehow now have battery entities for all my wall thermostats (which don’t have a battery) that is also marked as restored with a hint that it may be orphaned.

This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.

If the entity is no longer in use, you can clean it up by removing it.

Not sure if that is just an issue in my config/install.

Hello everyone,

I just installed the boschshc-hass. I can find and add the integration. Unfortunately, once I enter the IP of my SHC (no autodiscover unfortunately), I get the error: Failed to connect. IP is correct, I already created a new client with postman.

I’m using HA (2021.1.5) running in a docker container.

The server has two different IPs, not sure if this is related. But all other integrations (and auto discover) seems to work.

Any help is appreciated!

Best,
Philip

Hi Philip,

welcome :slight_smile: This issue is most probable not related to bosch_shc, but to your installation method using docker. Did you already try the hint from post #138?

Best, Thomas

The code for supporting BWTH reused the already available THB wallthermostat code, but THB is battery powered. Of course this does not make sensor for 220V powered BWTH wall thermostats :smirk:

The updated component checks if the batterylevel service is available, and if not no battery sensor is added. Thus the entity should not show up for BWTH thermostats anymore.

Dear @tschamm,

thanks for your reply. As you probably mentioned, I already opened an issue in your git repository. But I understand that the missing mDNS functionality of my setup has nothing todo with bosch_shc. So maybe a reach a larger audience here.

My problem is: The server running HA is located in a complete other network and is connecting via VPN into my network. So the VPN adapter of the server is in the same network as my whole smart home infrastructure. That’s why everything can be controlled perfectly. But it seems to be an issue running mDNS on a VPN adapter. So it seems there is no way for me to get mDNS running.

What I don’t understand: Why is bosch_shc relying (and forcing) on mDNS if the IP is known and unicast communication is working?

Thanks,
Philip

Hi @philjak,

I understand your problem and I would be very happy to implement a solution. In principle, you’re right that bosch_shc should not rely on mDNS. However, HA forces us to provide a unique identifier for each device, and the SHC provides neither a serial nor its mac address. As the IP could change, this is not wanted to be used (c.f. here) :frowning:
I already opened an API issue, which is confirmed but not yet closed.

So good news: I’m happy to relax the mDNS dependency, if someone comes up with a good idea how we can fulfill the HA requirement without the serial or the mac address given.

Regards, Thomas

Dear @tschamm,

Thanks again for your quick reply. In my opinion, it would be enough to tell people to make sure the ip does not change when a static ip is going to be entered. It’s the same when adding the Philip Hue bridge, right?

But in case you really want to identify the SHC by a unique identifier, what about obtaining the Mac from the ARP cache? I think using a package like


could do.

But to be honest, I’d prefer using a simple heuristic: if you use some kind of auto-discover, you’ll benefit from it in future in case the ip changes (use unique identifier based on mDNS infos). If you configure a static IP: it’s up to you to make sure the IP stays the same.

In case you’re not happy with my “heuristic”: could you maybe give me a pointer where I could change this behavior so I could fork the repo until the Bosch guys come up with an API improvement? So I could start setting up my system which is currently getting dusty :slight_smile:

Thanks a lot!
Philip

I already had get-mac used as a fallback, but seems this did not work for your setup neither. So now obtaining a unique identifier first tries zeroconf, if this fails it tries get-mac for the IP address obtained from the SHC, and finally it uses the IP (together with a warning).

I changed the interface, such that we can better adapt to a unique identifier provided by Bosch later (c.f. commit 71bc659 and 3ee577b).

Hopefully dust did not yet do any harm to your devices :joy:

This is so awesome, thank you very much! I got the devices on Thursday, so it’s not that much dust yet, fortunately :slight_smile: But I’m really happy to get things started now – and there is really much to do. Many flows I need to migrate from my old iSmartAlarm + IFTTT system.

I will definitely buy you a coffee, after all I have taken a few hours of your sleep.

Take care!

1 Like

Hello everyone,

thanks to Thomas, I was able to add my SHC to Home Assistant. I’m not an expert in HA, so maybe I’m simply searching using the wrong terms (service, events etc.), but could someone tell my if:

Is it possible to receive an event in HA if my armed alarm fires? So the if the alarm goes on?

The idea behind this: I want to start a send out emails and telephone calls in case of an intrusion.

One workaround would be, to define the state of an alarm on my own, right? For instance: If the system is “armed” and a sensor changes from “closed” to “open” or a motion has been detected.

Thanks!

Best,
Philip

//Edit: I tried to start an alarm while listening to bosch_shc.event in the developer view, but I didn’t get any information.

You‘re initial guess to look for bosch_shc.event was correct, however currently only scenario trigger events, motion detector events and button events are implemented.

I like your idea to add alarm events from the smoke detectors as well as alarm events triggered by the intrusion detection system to this mechanism. This can be added in the binary sensor resp. alarm control panel platform. Code can be copied from motion detection events I guess.

Edit: you can already trigger your automation if the binary state of your smoke detector goes to on, which is true for intrusion alarms as well as fire alarms.

Regards, Thomas

Hey @tschamm,

Edit: you can already trigger your automation if the binary state of your smoke detector goes to on , which is true for intrusion alarms as well as fire alarms.

Super-cool. Thank you! I did my first tests without the smoke detector to not wake up the kids. But very nice to know that there is a binary state that I can make use of!

Best,
Philip

Hi @philjak,

alarm events for Smoke Detector devices are added in the bosch_shc branch feature/smoke_alarm_events. I did not test it for myself yet (kids :sleeping:). The bosch_shc.event should report primary, secondary and intrusion alarm, as well as off/idle. I will merge it as soon as it is tested, but perhaps not before next weekend.

Best, Thomas

Hey @tschamm, I still owe you feedback regarding the event based alarm detection. I hope kids and wife will be out for few hours soon :smiley:

But one other question: I just received my Bosch 360° camera. And I was thinking to enable the camera whenever the system is armed (rather than when a alarm has been triggered). But I don’t see the camera as device. I looked into the boschshcpy and it seems that the Device Model CAMERA_360 is not part of it yet.

I double-checked with Postman if setting PrivacyMode via
{{shc_api}}/devices/{{device_id}}/services/PrivacyMode/state
is working as well and it does!

So my hope is the Device Model CAMERA_360 could be implemented in the exact same way as CameraEyes. What do you think?

Best,
Philip

//Edit: Ok, seems there is no CameraLight mode:

{
        "@type": "device",
         ...
        "deviceServiceIds": [
            "CameraNotification",
            "PrivacyMode"
        ],
        "manufacturer": "BOSCH",
        "roomId": "hz_6",
        "deviceModel": "CAMERA_360",
         ....
        "profile": "GENERIC",
        "name": "Kamera Flur",
        "status": "AVAILABLE",
        "childDeviceIds": []
    },

// Edit 2:

I created two PRs

I hope that’s in your favour.

Best,
Philip

1 Like

Hi Thomas,

the last update did break my Bosch SHC integration.

This is the log entry:

Log entry
Logger: homeassistant.setup
Source: setup.py:138 
First occurred: 22:44:21 (1 occurrences) 
Last logged: 22:44:21

Setup failed for bosch_shc: Unable to import component: cannot import name 'IntrusionDetectionControlService' from 'boschshcpy.services_impl' (/usr/local/lib/python3.8/site-packages/boschshcpy/services_impl.py)

Best regards,
Kai

Thanks for reporting @kai-seipp, I forgot to remove import leftovers.

Best, Thomas

Thanks, that did the trick. All good again.

1 Like

Hi all,

the last days I did some updates to the custom component. Following the installation option via HACS default, I thought it would be better to support component releases in the future. The current release is 0.2.14 with added support for Camera360 (thanks to @philjak) .

There is also a pre-release for 0.3.0. I’ve spend some time in improving the SSL handling (SSL connection is now verified against the Bosch provided Smart Home Controller Productive Root CA).
In addition, I improved the configuration process for new users. The previously necessary step to create a self-signed certificate/key pair, register it via Postman (and base64-encoding your system password), copy both files to your HA instance and provide the correct path was really aweful and error prone.
Good news: This is now all done by the custom component itself, created certificate/key pair is deployed to <ha_config_dir>/bosch_shc/bosch_shc-{cert,key}.pem.

These are non-braking changes, so you won’t have to re-initialize your component configuration, as the underlying component configuration values are still the same. :slight_smile:

If you want to test the beta of 0.3.0, just look for the beta release inside HACS and install it. I’m happy to receive feedback from you if things shouldn’t work as expected.

Cheers, Thomas

Thank you Thomas for the efforts you are putting into this! I just upgraded to 0.2.14 and noticed some errors in the logile - what does that mean?

2021-03-02 09:11:35 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.kamera_eingangstur is taking over 10 seconds
2021-03-02 09:12:05 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.kamera_eingangstur is taking over 10 seconds
2021-03-02 09:12:25 WARNING (MainThread) [homeassistant.components.switch] Updating bosch_shc switch took longer than the scheduled update interval 0:00:30
2021-03-02 09:12:25 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.kamera_eingangstur fails