[New device support]: Bosch Radiator Thermostat II
Link
https://www.bosch-smarthome.com/at/de/produkte/geraete/heizkoerper-thermostat/
Database entry
{"id":22,"type":"EndDevice","ieeeAddr":"0x18fc26000002a2d7","nwkAddr":39513,"manufId":4617,"manufName":"BOSCH","powerSource":"Battery","modelId":"RBSH-TRV0-ZB-EU","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":769,"inClusterList":[0,1,3,4,32,513,516,2821],"outClusterList":[10,25],"clusters":{"genBasic":{"attributes":{"modelId":"RBSH-TRV0-ZB-EU","manufacturerName":"BOSCH","powerSource":3,"zclVersion":8,"appVersion":1,"stackVersion":5,"hwVersion":1,"dateCode":"20220627","swBuildId":"3.02.05"}},"genPollCtrl":{"attributes":{"checkinInterval":6480}},"hvacThermostat":{"attributes":{"20496":0}}},"binds":[{"cluster":32,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c20f21","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":5,"hwVersion":1,"dateCode":"20220627","swBuildId":"3.02.05","zclVersion":8,"interviewCompleted":true,"meta":{},"lastSeen":1668172257367,"defaultSendRequestWhen":"active"}
Comments
Here are some things I found out and got working already:
- It pairs successfully after adding the Install Code
- I cannot get it to read the temperature or write the temperature. Maybe I'm just not understanding the concepts of z2mqtt that well. Here is my first draft of a config:
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['RBSH-TRV0-ZB-EU'],
model: 'Radiator thermostat II',
vendor: 'Bosch',
description: 'Radiator thermostat',
fromZigbee: [],
toZigbee: [fz.thermostat, fz.hvac_user_interface],
exposes: [
e.child_lock(),
exposes.climate()
.withSetpoint('current_heating_setpoint', 5, 30, 0.5, ea.STATE_SET)
.withLocalTemperature()
],
};
module.exports = definition;
Comment: The setpoint range and interval should be correct.
External converter
No response
Supported color modes
No response
Color temperature range
No response
This seems to be a duplicate of #14005 - though more people with this device should hopefully speed things up :)
You might want to add a fromZigbee converter to read back the temperature from the device.
If you have the Z2M GUI enabled, you can see what clusters are supported by the endpoints, in the device clusters tab.
You can also see what the device reports back using the device dev tab and reading from the various clusters.
Try adding fz.thermostat to your fromZigbee section - also remove what you have from your toZigbee section (for now)
@danieledwardgeorgehitchcock I've played around a bit with the dev tab you mentioned.
Via Endpoint 1, Cluster hvacThermostat I can read the following attributes: maxHeatSetpointLimit minHeatSetpointLimit localTemp occupiedHeatingSetpoint
I can also set the last one if I write instead of reading it.
For the last one I get this answer:
Read result of 'hvacThermostat': {"occupiedHeatingSetpoint":2000}
It's the current heating setpoint which is set at 20°C.
How would I now add these commands to converter file @niklasarnitz started above?
So, I personally would look at getting the read attributes in and working first - This is what fromZigbee converters do. I'd then work on the write attributes which are things like your occupiedHeatingSetpoint, etc which is what toZigbee converters do.
Here is something that should get you some of the way to a functional product:
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['RBSH-TRV0-ZB-EU'],
model: 'Radiator thermostat II',
vendor: 'Bosch',
description: 'Radiator thermostat',
fromZigbee: [fz.thermostat, fz.hvac_user_interface],
toZigbee: [tz.thermostat_occupied_heating_setpoint],
exposes: [
exposes.climate()
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5, ea.STATE_SET)
.withLocalTemperature()
],
};
module.exports = definition;
I'll be trying this tomorrow. But the last thread entry by @danieledwardgeorgehitchcock should propably work.
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['RBSH-TRV0-ZB-EU'],
model: 'Radiator Thermostat II',
vendor: 'Bosch',
description: 'Radiator Thermostat',
fromZigbee: [fz.thermostat, fz.hvac_user_interface, fz.battery],
toZigbee: [tz.thermostat_occupied_heating_setpoint],
exposes: [
e.battery(),
exposes.climate()
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5, ea.STATE_SET)
.withLocalTemperature()
],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['hvacThermostat', 'genPowerCfg']);
await reporting.thermostat_occupied_heating_setpoint(endpoint);
await reporting.thermostatTemperature(endpoint);
await reporting.batteryVoltage(endpoint);
await reporting.battery(endpoint);
},
};
module.exports = definition;
This is my current result. Changing the setpoint works, temperature gets reported and also the battery percentage:

What would definetly be nice to have: A current running state of the device to have it display that (in my case) in Home Assistant.
When using @itkama 's config, I get a few different errors:
When I try and refresh the temperature:
Debug 2022-11-12 03:19:28 Received MQTT message on 'zigbee2mqtt/0x18fc26000002a2d7/get' with data '{"local_temperature":""}'
Error 2022-11-12 03:19:28 No converter available for 'local_temperature' ("")
And it seems that the binding process of genPowerCfg fails:
x18fc26000005976f/1 genPowerCfg from '0x00124b0024c20f21/1' failed (AREQ - ZDO - bindRsp after 10000ms)
zigbee2mqtt_1 | at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
zigbee2mqtt_1 | at listOnTimeout (node:internal/timers:559:17)
zigbee2mqtt_1 | at processTimers (node:internal/timers:502:7))
zigbee2mqtt_1 | Zigbee2MQTT:info 2022-11-12 03:12:37: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/configure', payload '{"data":{"id":"0x18fc26000005976f"},"error":"Failed to configure (Bind 0x18fc26000005976f/1 genPowerCfg from '0x00124b0024c20f21/1' failed (AREQ - ZDO - bindRsp after 10000ms))","status":"error","transaction":"uxdrr-1"}'
Setting the temperature works.
Here's a screenshot of my GUI:

Interestingly I get the same error when trying to refresh the temperature manually. But the thermostat seems to be doing that itself quite frequently in the background. But those messages from the thermostat only started appearing once I poked it via the dev console.
Does it work for you if you ask for it manually?

Also added the temperature calibration:
const fz = require("zigbee-herdsman-converters/converters/fromZigbee");
const tz = require("zigbee-herdsman-converters/converters/toZigbee");
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ["RBSH-TRV0-ZB-EU"],
model: "Radiator Thermostat II",
vendor: "Bosch",
description: "Radiator Thermostat",
fromZigbee: [fz.thermostat, fz.battery],
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature_calibration, tz.thermostat_local_temperature],
exposes: [
e.battery(),
exposes.climate()
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5, ea.STATE_SET)
.withLocalTemperature()
.withLocalTemperatureCalibration(-30, 30, 0.1) //Values are a guess and stolen from a eurotronic thermostat valve
],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat']);
await reporting.thermostat_occupied_heating_setpoint(endpoint);
await reporting.thermostatTemperature(endpoint);
await reporting.thermostatTemperatureCalibration(endpoint);
await reporting.battery(endpoint);
},
};
module.exports = definition;
It seems to have the same problem that the refresh button doesn't work. Using the slider does though.
Refresh now works for me. Also the Local Temp works.
But here is another error:
zigbee2mqtt_1 | Zigbee2MQTT:error 2022-11-12 17:00:27: Failed to configure 'EG_Zimmer_Straße_Thermostat_Rechts', attempt 2 (ReferenceError: reporting is not defined
zigbee2mqtt_1 | at Object.configure (/app/dist/util/externally-loaded.js:23:9)
zigbee2mqtt_1 | at Configure.configure (/app/lib/extension/configure.ts:115:37)
zigbee2mqtt_1 | at EventEmitter.<anonymous> (/app/lib/extension/configure.ts:80:62)
zigbee2mqtt_1 | at EventEmitter.emit (node:events:525:35)
zigbee2mqtt_1 | at EventBus.emitLastSeenChanged (/app/lib/eventBus.ts:52:22)
zigbee2mqtt_1 | at Controller.<anonymous> (/app/lib/zigbee.ts:66:27)
zigbee2mqtt_1 | at Controller.emit (node:events:513:28)
zigbee2mqtt_1 | at Controller.selfAndDeviceEmit (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:515:14)
zigbee2mqtt_1 | at Controller.onZclOrRawData (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:727:18)
zigbee2mqtt_1 | at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:144:70))
Refresh now works for me. Also the Local Temp works.
But here is another error:
zigbee2mqtt_1 | Zigbee2MQTT:error 2022-11-12 17:00:27: Failed to configure 'EG_Zimmer_Straße_Thermostat_Rechts', attempt 2 (ReferenceError: reporting is not defined zigbee2mqtt_1 | at Object.configure (/app/dist/util/externally-loaded.js:23:9) zigbee2mqtt_1 | at Configure.configure (/app/lib/extension/configure.ts:115:37) zigbee2mqtt_1 | at EventEmitter.<anonymous> (/app/lib/extension/configure.ts:80:62) zigbee2mqtt_1 | at EventEmitter.emit (node:events:525:35) zigbee2mqtt_1 | at EventBus.emitLastSeenChanged (/app/lib/eventBus.ts:52:22) zigbee2mqtt_1 | at Controller.<anonymous> (/app/lib/zigbee.ts:66:27) zigbee2mqtt_1 | at Controller.emit (node:events:513:28) zigbee2mqtt_1 | at Controller.selfAndDeviceEmit (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:515:14) zigbee2mqtt_1 | at Controller.onZclOrRawData (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:727:18) zigbee2mqtt_1 | at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:144:70))
Add const reporting = require('zigbee-herdsman-converters/lib/reporting'); into your declarations at the top of your file
@danieledwardgeorgehitchcock I'm getting this error now:
Failed to configure 'Manuel Thermostat', attempt 3 (TypeError: reporting.thermostat_occupied_heating_setpoint is not a function at Object.configure (/app/dist/util/externally-loaded.js:25:25) at Configure.configure (/app/lib/extension/configure.ts:115:13))
replace await reporting.thermostat_occupied_heating_setpoint(endpoint); with await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
New error now popping up (it's still working though):
Failed to configure 'Manuel Thermostat', attempt 1
(Error: ConfigureReporting 0x18fc26000002fc33/1 hvacThermostat([{"attribute":"localTemperatureCalibration","minimumReportInterval":0,"maximumReportInterval":3600,"reportableChange":0}],
{"sendWhen":"active","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
failed (Status 'UNREPORTABLE_ATTRIBUTE')
at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:317:28)
at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:694:22)
at Object.thermostatTemperatureCalibration (/app/node_modules/zigbee-herdsman-converters/lib/reporting.js:151:9)
at Object.configure (/app/dist/util/externally-loaded.js:27:9)
at Configure.configure (/app/lib/extension/configure.ts:115:13))
It's telling you what the issue is. localTemperatureCalibration is not reportable from the device
The question would be why it is telling me this? Via the console of this device it is possible:

You're reading an attribute there, not asking it to report it given a threshold or interval. Try doing the same thing manually in the reporting tab and you'll likely get the same error...
Is there any progress so that the new device info can be added and published in a near future?
I have a working device config now.
I’ll create a PR shortly.
Added by @niklasarnitz (in https://github.com/Koenkk/zigbee-herdsman-converters/pull/4983)
Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)