Namron Zigbee Termostat problems with temp. setting on version 2.21.2

I am wondering if it has to do with deconz or home assistant. The rest api is deconz side. If it works correct with that we can be certain it’s the ha integration.

If the oniy change is the version of the addon i wouldn’t wage of it being the integration. Perhaps a namron ddf migration happened recently?

Unfortunately, there are no changes to the DDF (I have also verified with an old DDF).

Please test using the rest api.

Documentation can be found here
https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/

The url you linked in the first post also links to the documentation

Nothing has changed to the devices in the code base.

You can enable debug logging for the deConz integration and then perform a few actions and then we can see what responses we get from deconz

Id rather start with raw deconz rest api to rule out home assistant in full.

Ok, I have done some testing, hope this might help.

Working: turn thermostat on/off:

~ curl -H 'Content-Type: application/json' -X PUT -d '{"mode": "off"}' http://172.30.33.0:40850/api/445A30xxxx/sensors/71/config
[{"success":{"/sensors/71/config/mode":"off"}}]                
~ curl -X GET http://172.30.33.0:40850/api/445A30xxxx/sensors/71                                                                
{"config":{"heatsetpoint":1950,"mode":"off","offset":0,"on":true,"reachable":true},"ep":1,"etag":"edbe66b2e451bff5e1d8119f231d27e6","lastannounced":null,"lastseen":"2023-04-11T18:48Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Termostat kjeller","state":{"lastupdated":"2023-04-11T18:46:54.201","on":false,"temperature":1956},"swversion":"6.9.1.0_r4","type":"ZHAThermostat","uniqueid":"1f:ff:00:01:00:00:03:cb-01-0201"}#

~ curl -H 'Content-Type: application/json' -X PUT -d '{"mode": "heat"}' http://172.30.33.0:40850/api/445A30xxxx/sensors/71/config
[{"success":{"/sensors/71/config/mode":"heat"}}]#                                                                                                                         
~ curl -X GET http://172.30.33.0:40850/api/445A30xxxx/sensors/71                                                                 
{"config":{"heatsetpoint":1950,"mode":"heat","offset":0,"on":true,"reachable":true},"ep":1,"etag":"6cebb2eb1a3af85bb8f4bc8443346404","lastannounced":null,"lastseen":"2023-04-11T18:48Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Termostat kjeller","state":{"lastupdated":"2023-04-11T18:46:54.201","on":false,"temperature":1956},"swversion":"6.9.1.0_r4","type":"ZHAThermostat","uniqueid":"1f:ff:00:01:00:00:03:cb-01-0201"}

Not working - set heatpoint:

~ curl -H 'Content-Type: application/json' -X PUT -d '{"heatsetpoint": 2200}' http://172.30.33.0:40850/api/445A30xxxx/sensors/71/config
[{"success":{"/sensors/71/config/heatsetpoint":2200}}]

~ curl -X GET http://172.30.33.0:40850/api/445A30xxxx/sensors/71                                                                       
{"config":{"heatsetpoint":2200,"mode":"heat","offset":0,"on":true,"reachable":true},"ep":1,"etag":"37b39178940d2c20e6cf0a9196f931cd","lastannounced":null,"lastseen":"2023-04-11T18:48Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Termostat kjeller","state":{"lastupdated":"2023-04-11T18:46:54.201","on":false,"temperature":1956},"swversion":"6.9.1.0_r4","type":"ZHAThermostat","uniqueid":"1f:ff:00:01:00:00:03:cb-01-0201"}

With config heatsetpoint nothing changes on the thermostat, but API returns the value. After a few seconds, the correct (unchanged) value is returned:

~ curl -X GET http://172.30.33.0:40850/api/445A30xxxx/sensors/71
{"config":{"heatsetpoint":1950,"mode":"heat","offset":0,"on":true,"reachable":true},"ep":1,"etag":"d176980e901e012d4a39aa38d12dbc31","lastannounced":null,"lastseen":"2023-04-11T18:57Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Termostat kjeller","state":{"lastupdated":"2023-04-11T18:57:46.187","on":false,"temperature":2006},"swversion":"6.9.1.0_r4","type":"ZHAThermostat","uniqueid":"1f:ff:00:01:00:00:03:cb-01-0201"}

I’m also having the same issue…

Thanks for testing!

@smanar I remember we had a report like this for another TRV. Do you remember?

IDK, there is so much ^^.
What is the previous working version ?

You can try overwrite totaly the legacy code, with replacing on the DDF (the generic config_heatsetpoint_item.json file haven’t part for “write” part)

        {
          "name": "config/heatsetpoint",
          "default": 0
        },

By

        {
          "name": "config/heatsetpoint",
          "parse": {"fn": "zcl", "at": "0x0012", "cl": "0x0201", "ep": 1, "eval": "Item.val = Attr.val;"},
          "write": {"fn": "zcl", "at": "0x0012", "cl": "0x0201", "ep": 1, "dt": "0x29", "eval": "Item.val;"},
          "read": { "fn": "zcl" ,"at": "0x0012", "cl": "0x0201", "ep": 1}
        },

And BTW this device don’t have bind for the heatpoint attribute.

        {
          "at": "0x0012",
          "dt": "0x29",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },

Hi @Smanar

Sorry for the late reply. I created a custom copy of the DDF, and replace the heatsetpoint-part. Now it’s working again like magic. Are you able to desecribe to a newbe what the change actually is doing?

I haved done anything with the bindings part, as I wasn’t sure where to put it.

As I see it, the device has never worked regarding heatsetpoint since the DDF was added to deconz. The secret sauce in that sense is the write function, as it was missing.

When setting the hetsetpoint via API, it is checked if the device is supported by DDF or not. As it is, a respective state change is added to adjust the temperature. However, state changes can only work if there’s an appropriate write function available in the DDF or the respective generic item. In both cases, there is no write function, so the desired temperature is never written to the device. The legacy method of writing that change is also never called, as it follows after checking availability of the DDF with an else clause. Having that said, the fix to the DDF is “just” adding the write function.

I’d also assume the current DDF implementation is lacking some settings, as the screenshots of the thermostat cluster in the associated Github issue are incomplete. @hawthorne maybe you can share them here for the sake of completeness?

Well, strangely enough, this thermostat has been working for almost a year now (I have two, on two different locations). Rpi, HA, Conbee2, latest firmware.

I just modified a copy of this DDF: deconz-rest-plugin/4512737_thermostat.json at master · dresden-elektronik/deconz-rest-plugin · GitHub. Added parse/write/read and removed default=0.

Hi. I am experiencing the same issue and can’t seem to solve it. The UI of the DDF editor shows all the config suggested by @Smanar, but the code preview still won’t show them.

I haven’t figured out how to access the file system of deConz in order to manipulate DDFs directly.
I consider myself an advanced user and am capable of coding - but right now I am lost. Can somebody help me pls?

How can I find out which DDF my device actually is using (might have screwed up with a custom file?)?
How can I transfer DDFs from/to deConz via Home Assistant or any other side channel?

Appreciate any help, thanks in advance!!

Hi @leclu ,

I really feel you pain. I have noe idea why it’s not possible to edit this directly, since the procedure is way to difficult for most users.

Check this out for more info:

I use the “SSH & Web Terminal” in Home Assistant, you have to disable protection mode in the add-on.

2 Likes

The reason it’s difficult is that home assistant makes it difficult. Using windows or Linux is as easy as replacing the file.

However, it must be recognized that having the possibility of copying and pasting in the DDF editor of deConz with the possibility of saving only in the “custom” folder specific to each system would save everyone a lot of time. and avoid having to juggle with different OS and directories at each of our interventions…

1 Like

Agree.

Feel free to open an feature request :slight_smile:

1 Like

What I find curious is that the UI of the in-built DDF shows a config that matches what @Smanar wrote in his post.
However, when opening the preview, the code does not reflect that. Meaning: the code still says

        {
          "name": "config/heatsetpoint",
          "default": 0
        },

I managed to modify this via SSH and while the code lines reflect that change within the SSH terminal, they do not in the deConz DDF editor GUI (Preview tab).

I now duplicated the file to a custom folder under /data and it seems to work. But to be honest, I am not entirely happy with that workaround, considering there is an on-board DDF that is supposed to work for this device.

There is a recent PR that solve the problem for all devices Fix resource item `config/heatsetpoint` not having a default write function by SwoopX · Pull Request #6908 · dresden-elektronik/deconz-rest-plugin · GitHub

1 Like