deconz-rest-plugin
deconz-rest-plugin copied to clipboard
Thermostat offset unnecessarily clamped to -25/25 for Eurotronics SPZB001
Describe the bug
Using the REST API to set the thermostat offset on my Eurotronics SPZB001 with firmware 20191014 clampes the value from -25 to 25, although the thermostat is happily accepting values from -128 to 127.
Steps to reproduce the behavior
Use REST API / Homeassistant integration to set the offset to e.g. -460 (-4.6°C) offset, results in the value -25 to be sent to the device.
Expected behavior
The value -46 (-460/10) should be sent to the device.
Screenshots
Environment
- Host system: VM
- Running method: HASSIO Addon
- Firmware version: (26660700)
- deCONZ version: (2.13.4)
- Device: ConBee II
- Do you use an USB extension cable: yes
- Is there any other USB or serial devices connected to the host system? No
deCONZ Logs
Additional context
https://github.com/dresden-elektronik/deconz-rest-plugin/blame/a6e045824461c571e51bbd74b503ae153bd5073c/rest_sensors.cpp#L1238 This commit introduced clamping the offset for all devices not explicitly handled otherwise. I propose removing this in the else case. I'd also be happy with an exception for the SPZB001.
There is no information in the template. I'm closing the report.
Sorry, i fat-fingered the submit button early. I have edited the report. Can you please reopen it?
Thank you!
Sure :)
Thank you :)
In current master the clamping happens here https://github.com/dresden-elektronik/deconz-rest-plugin/blame/master/rest_sensors.cpp#L979
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
Still relevant
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
Still relevant.
I realized I didn't include a screenshot of the device details.

Anything else I can do to get this looked at?
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
Still relevant.
@Mimiix Any suggestion who the best person to tag would be? Maybe @SwoopX, since they seem to be the last person to work on this?
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
Bump
Anything I can do to get this looked at?
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
Bump
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
bump
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
bump
@Mimiix @SwoopX what can I do to get this looked at?
Not sure. I'll ask @manup to check.
Thank you :)
Just did a little test with my SPZB001 when I write a value below 500 (5°C) to the Current Temperature Setpoint 0x4003 attribute, like 0, the device clamps it automatically to min. 500.
From the manual control buttons on the device the minimum settable value is 5°C, however max. value seems to be 30°C.
Hi @manup,
thank you for having a look :)
My issue is with the Local Temperature Calibration 0x0010. The SPZB001 accepts a (raw) range of -128 to 127 (= -1280 to 1270 using the REST API). This, however, gets clamped down to -25 to 25 at https://github.com/dresden-elektronik/deconz-rest-plugin/blame/master/rest_sensors.cpp#L1115. (I am currently running deCONZ 2.16.1)
Clamping happens for all devices that are not handled otherwise. Does this make sense? Is a range of -25/25 the default for most devices, except the SPZB001?
In any case, an exception for the SPZB001 would be nice, clamping to -128/127, or not clamping at all.
Thank you again for your help :)
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
I propose something like this:
diff --git a/rest_sensors.cpp b/rest_sensors.cpp
index d9fa48eb..8711fa4b 100644
--- a/rest_sensors.cpp
+++ b/rest_sensors.cpp
@@ -1108,6 +1108,16 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
updated = true;
}
}
+ else if (sensor->modelId() == QLatin1String("SPZB0001"))
+ {
+ if (data.integer < -128) { data.integer = -128; }
+ if (data.integer > 127) { data.integer = 127; }
+
+ if (addTaskThermostatReadWriteAttribute(task, deCONZ::ZclWriteAttributesId, 0x0000, THERM_ATTRID_LOCAL_TEMPERATURE_CALIBRATION, deCONZ::Zcl8BitInt, data.integer))
+ {
+ updated = true;
+ }
+ }
else if (sensor->type() == "ZHAThermostat")
{
if (!devManaged)
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
I'm currently working on the DDF version. Then you should be able to set whatever you want or amend any boundaries at will.
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.