Bosch Thermostat 2

Is it possible to connect the Bosch Thermostat 2 only by using ZigBee? So not using the Bosch Controller to connect to Home Assistent?

3 Likes

The answer is yes if it is a standard Zigbee device, such devices are supported directly if you use a new/modern Zigbee Coordinator radio adapter (like example Home Assistant SkyConnect USB dongle) with Home Assistant’s “Zigbee Home Automation” integration (more commonly referred to as the “ZHA” integration), read the introduction → https://www.home-assistant.io/integrations/zha#introduction as well as the section about what devices are supported by default out-of-the-box → https://www.home-assistant.io/integrations/zha#knowing-which-devices-are-supported …or better yet read through the whole ZHA integration documentation :wink:

To add new devices to the network that require the combination of src_ieee (IEEE address of the joining ZB3 device) and the device’s unique “install code” (install code of the joining device) that are written on some Zigbee devices (or their accompanying box/sticker) then you need to add the device by calling the permit service on the zha domain and manually typing in the src_ieee and install_code there, see → https://www.home-assistant.io/integrations/zha#service-zhapermit

Note that commissioning Zigbee 3.0 devices via “Install Code” or “QR Code” via the ‘zha.permit’ service has so far only been implemented for ‘ezsp’ (Silicon Labs EmberZNet) or ‘znp’ (Texas Instruments) radio type in ZHA. Other radio types such as example ConBee/RaspBee and ZiGate are missing support for “install code” in their respective radio libraries for zigpy or manufacturer’s firmware commands/APIs (so you need to address that as a feature request to the respective manufacturer’s firmware developers and zigpy radio library developers). See → https://www.home-assistant.io/integrations/zha#limitations

Also take note that if a device does not show all expected attributes as entities (e.i. sensors and configuration options) in Home Assistant’s ZHA integration even after the device is successfully paired/joined and connected for a while for the interviewing process to finish then that device will likley need a custom “ZHA Device Handler” (also known as “ZHA quirk”) that is unique for its device signature and functions/features, so do submit an issue as Device support request with device signature, etc. for tracking to the “ZHA Device Handlers” (also known as “ZHA quirks”) repository on GitHub → https://github.com/zigpy/zha-device-handlers/issues/

Submit a device feature request → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

The reason why some devices require “ZHA Device Handlers” is explained in this ZHA docs section here → https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling (be sure to also read the explanation why most other devices do not here → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices)

1 Like

Hey @hraschan,
Did you figure out how to do it? I didn’t manage to get the Thermostats interviewed by Z2MQTT.

1 Like

The connection was easy with ZHA. Using them in multiple automations now. Just give ZHA a shot. @FlyingUnicorn

7 Likes

I have mine working in Z2MQTT. Did you add the install code (qr code) from the battery compartment? Then it should start the interviewing process and add the thermostat without problems.

2023-01-29 12_16_27-Zigbee2MQTT – Home Assistant

1 Like

Awesome, thanks!! I’ll test it out later today :ok_hand:t3:

1 Like

How did you manage to pair the device? My thermostat keeps searching for networks but isn’t discovered by ZHA.

To pair it with ZHA I had to use the zha permit service call and supply the IEEE Address and the install code from the back of the cover

https://www.home-assistant.io/integrations/zha/#service-zhapermit

By the way, also check out and please vore in this indirectly related feature request asking for QR code scanning support to be added to the ZHA integration and Home Assistant’s companion apps → Zigbee device provisioning by scanning QR Code = QR camera scanner in ZHA's UI config and companion apps to include new Zigbee 3.0 devices to Home Assistant's ZHA integration?

Thanks for that hint. Tried it, unfortunately I receive an unknown error… :frowning:

Failed to call service zha.permit. Unknown error

My logs show two Errors:
homeassistant.components.websocket_api.http.connection:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 646, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 756, in admin_handler
    await result
  File "/usr/src/homeassistant/homeassistant/components/zha/api.py", line 1231, in permit
    await application_controller.permit_with_key(
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 109, in permit_with_key
    raise NotImplementedError()
NotImplementedError

and
homeassistant.helpers.script.websocket_api_script:

raceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 756, in admin_handler
    await result
  File "/usr/src/homeassistant/homeassistant/components/zha/api.py", line 1231, in permit
    await application_controller.permit_with_key(
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 109, in permit_with_key
    raise NotImplementedError()
NotImplementedError

Does anyone have experience with that= I’m running Hassio in a container on a Proxmox hypervisor, the Conbee II is passed through to home assistant and working fine.

Thanks a lot!

I’m using the Sonoff P dongle (TI).
It seems that the code is not implemented for the deconz handler.

If so then should report that as an issue to zigpy-deconz (deconz radio library for zigpy that ZHA depends on for ConBee/RaspBee serial protocol hardware abstraction interface) → https://github.com/zigpy/zigpy-deconz/issues

FYI, went ahead and opened issues at respective deconz repositories for Dresden-Elektronik and zigpy:

and

Thanks a lot @Hedda - but looks like I need to be patient and hope that the functionality will be implemented for ConBee II

I am not so optimistic that install-code and qr-code support will be added to ConBee / RaspBee soon, so if you need/want to use this feature today then probably best to buy a new Silicon Labs or Texas Instruments based Zigbee Coordinator adapter instead, see → Zigbee buyer's guide

FYI, ChrisHae from Dresden Elektronik wrote a reply there that ConBee / RaspBee firmware deconz serial interface does not currently support joining/paring via install code (or QT code) but a firmware update that will add it is on their roadmap for ConBee 2 / RaspBee 2, (though not for the original ConBee / RaspBee which firmware is no longer getting updated features), see ChrisHae’s reply here → Does deCONZ serial protocol for ConBee/RaspBee Zigbee Coordinator adapters not support joining/pairing via install code and qr code? · Issue #20 · dresden-elektronik/deconz-serial-protocol · GitHub

One possible workaround could be to migrate your Zigbee network in ZHA to a newer/modern Silicon Labs EmberZNet (EZSP) or a Texas Instruments Z-Stack (ZNP) based Zigbee Coordinator adapter, (like, for example, a “Sonoff ZBDongle-E” or a “Sonoff ZBDongle-P”), as those support joining/pairing via install code and qr code, and then migrate back (or not), see → https://www.home-assistant.io/integrations/zha#to-migrate-to-a-new-zigbee-coordinator-radio-inside-zha

Another related tip specific to the Bosch Thermostat 2 device is that it might be worth alsy try upgrading the OTA firmware on that Bosch Radiator Thermostat II device (via Zigbee2MQTT), as that was at least mentioned in the Zigbee2MQTT community → [New device support]: Bosch Radiator Thermostat II · Issue #14926 · Koenkk/zigbee2mqtt · GitHub

By the way, for manually upgrading firmware in ZHA after a device has already been joined/paired, see ZHA Toolkit → https://github.com/mdeweerd/zha-toolkit#ota_notify

FYI, someone submitted a firmware upgrade image file for Bosch BTH-RA (a.k.a. Smart Thermostat 2) to https://github.com/Koenkk/zigbee-OTA/ as per this PR https://github.com/Koenkk/zigbee-OTA/pull/279https://github.com/Koenkk/zigbee-OTA/tree/master/images/Bosch

If you are using the ZHA integration then a tip is to use ZHA-Toolkit to download and upgrade that Zigbee OTA firmware image on that specific device once you have successfully paired/joined it to ZHA → https://github.com/mdeweerd/zha-toolkit/blob/main/README.md#ota_notify—downloadtrigger-device-fw-update

Hi,

just to make sure there’s currently no way to use the Bosch Thermostat II with ZHA using a Conbee 2, right?

Just trying to confirm before I send the four new thermostats back :confused:

1 Like

That is correct, at least until developers that the Desden Elektronik company employee adds support for the missing/needed “install code” feature via a firmware update, see → Does deCONZ serial protocol for ConBee/RaspBee Zigbee Coordinator adapters not support joining/pairing via install code and qr code? · Issue #20 · dresden-elektronik/deconz-serial-protocol · GitHub

Until then the best workaround is to instead just buy a brand new Texas Instruments or Silicon Labs based Zigbee Coordinator radio adapter/dongle (that has their newer Zigbee radio chips which support newer more modern firmware) and then simply migrate your Zigbee network to that new adapter/dongle.

If you are currently using the Phoscon/deCONZ or Zigbee2MQTT applications as your Zigbee gateway application then it is unfortunately only possible to do partial Zigbee network migration (and even that not fully seamlessly), but it is possible to do a fully seamless migration if you are already using Home Assistant’s own native ZHA integration as long as you first upgrade to latest ConBee/RaspBee firmware. See → https://www.home-assistant.io/integrations/zha#migrating-to-a-new-zigbee-coordinator-adapter-inside-zha

Otherwise you could try performing a two-step partial migration if using Phoscon/deCONZ or Zigbee2MQTT as then you can first migrate to Home Assistant’s own native ZHA integration, but be warned that will only be a partial migration that require repairing some devices and reconfiguring all automations that use any of them, checkout these migration guides → https://skyconnect.home-assistant.io/zigbee-migration-selection/

As for which dongles you should buy I recommend Home Assistant SkyConnect if both want to sponsor Nabu Casa development and like something that is very easy to maintain as long as using Home Assistant’s own native ZHA integration, otherwise recommend that you check out both ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus” (model “ZBDongle-P” which is best for Zigbee2MQTT) as well as their other variant which is “Sonoff Zigbee 3.0 USB Dongle Plus V2” (model “ZBDongle-E” for ZHA). Note that if you plan on using Zigbee2MQTT (Z2M) then currently only Texas Instruments CC2652 or CC1352 based adapters are recommended.

Thanks a lot @Hedda!

As I really like the thermostats I bought a Sonoff dongle with CC2652P and also moved from ZHA to Zigbee2MQTT in the process.

Everything working now :slightly_smiling_face:

1 Like

Just to add to this: I switched to a SkyConnect Dongle, which enabled the use of pairing codes. Pairing works as expected now.

However, there is a slight “problem” when using this thermostat in conjunction with ZHA. The heater modes as well as on/off do not work due to some issues with the ZHA quirk. The fix is already requested with [Device Support Request] Full implementation of BOSCH Radiator Thermostat II (BTH-RA) · Issue #2476 · zigpy/zha-device-handlers (github.com) but for now, only the temperature settings work fine for me. Just keep this in mind.

2 Likes