Open metallmanu opened 1 year ago
I am planning to write a quirk to expose all of the endpoints to Home Assistant.
For now you can set the available modes by
-> going to the ZHA device page -> pressing the dot menu -> selecting "manage zigbee device" -> thermostat endpoint -> ctrl_sequence_of_oper (id: 0x001b) -> read current value (and post it here) :)
I have found the following so far
ControlSequenceOfOperation.Heating_Only ControlSequenceOfOperation.Cooling_Only
But there is probably an easier way to query all possible values from the device.
Ah, here they are: https://docs.bosch-iot-suite.com/gateway-software/API/modules/com.prosyst.mbs.zigbee.driver.api/com/prosyst/mbs/services/zigbee/zcl/hvac/ThermostatCluster.html
I am planning to write a quirk to expose all of the endpoints to Home Assistant.
For now you can set the available modes by
-> going to the ZHA device page -> pressing the dot menu -> selecting "manage zigbee device" -> thermostat endpoint -> ctrl_sequence_of_oper (id: 0x001b) -> read current value (and post it here) :)
I have found the following so far
ControlSequenceOfOperation.Heating_Only ControlSequenceOfOperation.Cooling_Only
But there is probably an easier way to query all possible values from the device.
Ah, here they are: https://docs.bosch-iot-suite.com/gateway-software/API/modules/com.prosyst.mbs.zigbee.driver.api/com/prosyst/mbs/services/zigbee/zcl/hvac/ThermostatCluster.html
Hey wow thats great. When I checked the cluster for me there are also Only the values ControlSequenceOfOperation.Heating_Only ControlSequenceOfOperation.Cooling_Only
Would be very nice to see a quirk for this 👏
If it is possible you can also add the Installation mode for the heating: 230V, 24V or Boiler and if there are NO or NC valves
@metallmanu There are also
ControlSequenceOfOperation.Heating_With_Reheat
ControlSequenceOfOperation.Cooling_With_Reheat
The others with the 4_Pipes from the specification do not work. No idea what they are for. Anyway, I think the issue is that the only SystemMode settings are
SystemMode.Heat
SystemMode.Cool
There is not SystemMode.Off
, that HA would probably expect. I guess I would need to map it to Off.
You can find all working Endpoints I could identify yesterday here
https://github.com/zigpy/zha-device-handlers/issues/2476#issuecomment-1796390877
Feel free to test it out and maybe extend the list. My thermostat seems to have connection issues and I may have missed some.
If it is possible you can also add the Installation mode for the heating: 230V, 24V or Boiler and if there are NO or NC valves
Oh, we may not have the same thermostat. I have the TRV for radiators. Not sure if this supports boilers etc. I could maybe support it as well though.
Oh yes it is another thermostat. I added the signature and diagnostic of mine. But it seems to be very similar to yours in states. For me the SystemMode.Off is working.
That is odd. I do have this one
Isn't yours a radiator thermostat as well? There may be many different version then.
I have this one:
It is for underfloor heating with cable system 230V. Therefore the cooling part is neccessary when you have a heat pump which can also cool the underfloor and also the valves control would be nice, because there are valves which are normaly open and some which are normaly closed. Hopefully your quirk will also work for this
I see. I just don't see how my radiator valve would be cooling anything. Radiators only heat usually. Really weird!
When you have a Heating pump instead of Oil, Gas etc. you can let cold water Flow through your heating cycle. Therefore you have to put the thermostat also in cooling Mode, so that the valve is Open when you want a cooler temperature and cold water can flow through your Radiator
Interesting. That makes sense. Guess it is a quite sophisticated thermostat. It is a pity that I am losing the connection frequently. I have to take out the batteries to be able to access it again. I put back the Tado now that I want to get rid of and will buy a radiator valve tomorrow, so the thermostat can calibrate itself to something. I will then try to implement the quirk.
I think the quirk for your device will be quite similar. There may be some endpoints working that don't work on mine and vice versa. Would be good if you could test those endpoints out, see what they return, compile a similar chart and post it here. On the Bosch documentation page you will find some examples. Some of them might be named a little differently though.
Ha! It seems like you can download diagnostic information using the button and it will show you all supported and unsupported attributes!
Yes the diagnostic is in my first post. Do you need more?
Well, a bit of patience I guess. I have only edited a quirk so far. A have just tried zigbee2mqtt and everything is supported there. Even endpoints that do not work with ZHA. I wonder why that is.
Pity that @dmulcahey is not responding atm. He is usually a great help!
Hi @metallmanu, @jclsn - I stubled accross this thread as I am facing the same issue with my Bosch Thermostat II 230V. Thx to your hints, I created a small quirk which enhances the Thermostat with the possibility to switch it into cooling mode.
However the widget now shows an additional button (the one on the left), which seems to be the auto mode, which is not supported by the affected thermostat.
Maybe you guys know how to remove that auto mode ?
Here is the simple quirk that I have written: rsbh_rth0_zb_eu.py.zip
@markoberholzer-es
A quirk only adds missing attributes that don't comply with the Zigbee specification. It does NOT at all determine what you see in Home Assistant.
The ZHA code takes care of creating entities for those attributes. There are e.g. different cluster handlers Tuya devices that creates entities for Tuya custom attributes. None of this exists for Bosch and therefore ZHA tries to create entities according to the Zigbee specification. The problem is though that Bosch exposes "Pause", "Manual" and "Schedule/Auto" on one attribute and "Cool" and "Heat" on another. My idea would be to combine these somehow in a Bosch thermostat cluster handler.
So you will not be able to fix it from the quirk side. The Bosch cluster handlers have to be added to the HA core, where ZHA lives. Probably here somewhere
https://github.com/home-assistant/core/blob/dev/homeassistant/components/zha/climate.py
I don't have the time or expertise yet to implement that unfortunately. It is also not documented specifically for ZHA. I guess if you know how to create general entities for HA, which is very well documented, it should not be too hard though.
Appologies @jclsn, if my comment upset you - I just wanted to share my findings after hours of digging through the repository.
I read through the Zigbee Cluster Library Specification and the problem is that the ctrl_sequence_of_oper
attribute of ther thermostat is set to Heating Only
(0x02). The quirk that I posted fixes that and it is now possible to change the modes through the GUI - the only issue is, as I mentioned, that the thermostat does not support the hvac mode heat_cool
- so possibly this has to be fixed in HA core.
@markoberholzer-es No reason to be sorry. I just confused this with the other thread where a few people have asked the same thing over and over. I can also be quite impulsive sometimes. I edited the post to make it easier to understand and sound a bit nicer hopefully :)
Yeah, there are different attributes. The ctrl_sequence_of_oper exists for almost every thermostat afaik and is never exposed in HA. If you want to have it, it would probably be best to add it as select entity.
https://github.com/home-assistant/core/blob/dev/homeassistant/components/zha/select.py
Then there is also the "heat" and "cool" and then "pause", "manual" and "auto". Those should probably be added to the climate entity. I suspect that it is not so easy, but I also could be wrong.
I have added you as collaborator on my branch for which I have already created a PR. None of the maintainers has paid attention to it yet though. I think no one has time atm unfortunately
@markoberholzer-es I did try to install your quirk.
But there is still no entity to switch to cooling mode. Hopefully you have a hint, why it is not working. Thanks in advance!
Yes, because you need cluster handlers for this, which need to be implemented in the HA core. I have already started doing that, but it is not easy and the ZHA devs are very busy atm.
Btw, @markoberholzer-es did nothing else than set the CtrlSequenceOfOper
attribute to HeatingAndCooling
in his quirk. This is not something that is going to be supported any time soon.
@markoberholzer-es I did try to install your quirk.
1. At first I enabled zha custom quirks and die save your quirk in this folder. 2. restart ha 3. removed Bosch Thermostat II 230V 4. added it by qr code.
But there is still no entity to switch to cooling mode. Hopefully you have a hint, why it is not working. Thanks in advance!
Hi @docloy - when the quirk is correctly applied, your Bosch Termostat should show the following modes:
If that is not the case - are your zha quirks correctly loaded ? Did you apply the following lines to your configuration.yaml?
zha:
enable_quirks: true
custom_quirks_path: /config/custom_zha_quirks/
@jclsn and @markoberholzer-es thanks for your reply and your input. In my configuration.yaml I have those 3 lines. But I don't know how to acitvate use the quirk. But through the zigbee device settings --> Manage Zigbee Device --> Clusters: BoschThermostatCluster (Endpoint id: 1, Id: 0x0201, Type: in) I can set manually the attribute and the value for cooling:
Attributes of the selected cluster: ctrl_sequence_of_oper (id: 0x001b)
Value: 0x00
And for heating:
Attributes of the selected cluster: ctrl_sequence_of_oper (id: 0x001b)
Value: 0x02
At the moment I'm fine with this solution because I have only to switch twice a year. Maybe it'll be implemented in core. Anyway I have no idea how to use quirks (would have been interesting as well).
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Poorly the issue is still open with the new updates of 2024.8
Logger: zigpy.quirks.v2 Quelle: custom_zha_quirks/RBSH_RTH0_ZB_EU.py:26 Erstmals aufgetreten: 23:29:54 (1 Vorkommnisse) Zuletzt protokolliert: 23:29:54
add_to_registry_v2 is deprecated and will be removed in a future release. Please QuirkBuilder() instead and ensure you call add_to_registry().
Problem description
The Bosch Smart Home Thermostat II Supports heating and cooling in the Bosch Smart Home App. Unfortunately this switch between heating and cooling is not possible through ZHA in Homeassistant. Over climate.set_hvac_mode it is only possible to switch between off and heating
Solution description
The hvac_modes cooling, heating and off are possible to choose
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]Device signature
Device signature
```json { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
Diagnostic information
```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.11.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "x86_64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "6.1.59", "supervisor": "2023.10.1", "host_os": "Home Assistant OS 11.1", "docker_version": "24.0.6", "chassis": "vm", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "waste_collection_schedule": { "version": "1.43.0", "requirements": [ "icalendar", "recurring_ical_events", "icalevents", "bs4", "lxml" ] }, "localtuya": { "version": "5.2.1", "requirements": [] }, "dwd_weather": { "version": "v2.0.12", "requirements": [ "simple_dwd_weatherforecast==2.0.23", "markdownify==0.6.5", "suntimes==1.1.2" ] }, "roborock": { "version": "1.0.12", "requirements": [ "python-roborock==0.34.6", "ical==5.0.0" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp", "universal_silabs_flasher" ], "requirements": [ "bellows==0.36.8", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.106", "zigpy-deconz==0.21.1", "zigpy==0.59.0", "zigpy-xbee==0.19.0", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.6", "universal-silabs-flasher==0.0.14", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 21837, "manufacturer": "Bosch", "model": "RBSH-RTH0-ZB-EU", "name": "Bosch RBSH-RTH0-ZB-EU", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "quirk_id": null, "manufacturer_code": 4617, "power_source": "Mains", "lqi": 176, "rssi": -56, "last_seen": "2023-11-07T09:42:08", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Logs
Logs
```python [Paste the logs here] ```Custom quirk
Custom quirk
```python [Paste your custom quirk here] ```Additional information
No response