Thermostat Battery Status

Thermostat Battery Status.

In the past the thermostat battery status was given as value. (35%)
The latest deConz version is given not a value but as Status OK.
Now, other program’s like Domoticz are confused.
They expect a value, not status ok.
Why has this been changed

Strange, what is your device ?
Some TRV have battery level and other have lowbattery status, but there is no 'battery status"

The thermstat central heating valve.
TZE200_zivfvd7h TS0601 ZHAThermostat
In the past they showed the percentage.
Something changed in time. Now Domoricz is confused.

Ok so there is something strange ^^.
Nothing have moved for thoses device on code, this one is still managed by legacy core.
Can you share the device json ?
You can find it on domoticz/custom/deconz/sensors/(guilty sensor) and clicking on the icon "device data (the third), there is no confidential data on it.

What is your recent change on deconz ?

BTW, there was a recent update on domoticz about a blocking issue if you use the setting “ENABLEBATTERYWIDGET” on the deconz plugin.

I have not found the:
“ENABLEBATTERYWIDGET” on the deconz plugin.

{
“config”: {
“heatsetpoint”: 1800,
“locked”: false,
“mode”: “auto”,
“offset”: 22884,
“on”: true,
“preset”: “auto”,
“reachable”: true,
“schedule”: {},
“schedule_on”: false,
“setvalve”: true,
“windowopen_set”: true
},
“ep”: 1,
“etag”: “e132d6ea538edd0aae349ec96fc9b979”,
“lastannounced”: “2024-04-18T06:51:02Z”,
“lastseen”: “2024-04-28T06:18Z”,
“manufacturername”: “_TZE200_zivfvd7h”,
“modelid”: “TS0601”,
“name”: “CV Ilse”,
“state”: {
“lastupdated”: “2024-04-28T06:18:52.199”,
“lowbattery”: false,
“on”: false,
“temperature”: 1930,
“valve”: 0
},
“type”: “ZHAThermostat”,
“uniqueid”: “00:3c:84:ff:fe:cb:b5:44-01-0201”,
“id”: “110”,
“deviceclass”: “sensors”
}

afbeelding
afbeelding

Don’t worry, it’s a special setting on the hardware page, if you don’t know what is it, it mean you don’t use it.

So you are right, IDK what happen on code, but yes first version was using battery level Siterwell TRV GS361A-H04 / _TZE200_ zivfvd7h / TS0601 · Issue #4770 · dresden-elektronik/deconz-rest-plugin · GitHub
And it seem this device realy support it.

I don’t have time to search what have moved in legacy code, but if you are agree, we can try to support this device with DDF.
Do you know how work DDF ?

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_zivfvd7h",
  "modelid": "TS0601",
  "vendor": "Tuya",
  "product": "Nedis TRV",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_THERMOSTAT",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xef00"
      ],
      "meta": {
        "values": {
          "config/mode": {"auto": 0, "heat": 1, "off": 2}
        }
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "refresh.interval": 86400,
          "parse": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "../tuya/tuya_swversion.js"},
          "read": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "parse": {"fn": "tuya", "dpid": 21, "eval": "Item.val = Attr.val;"},
          "read": {"fn": "none"}
        },
        {
          "name": "config/heatsetpoint",
          "parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = Attr.val * 10;"},
          "write": {"fn": "tuya", "dpid": 2, "dt": "0x2b", "eval": "Item.val / 10;"},
          "read": {"fn": "none"}
        },
        {
          "name": "config/locked",
          "parse": {"fn": "tuya", "dpid": 7, "eval": "Item.val = Attr.val;"},
          "write": {"fn": "tuya", "dpid": 7, "dt": "0x10", "eval": "Item.val;"},
          "read": {"fn": "none"}
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/windowopen_set",
          "parse": {"fn": "tuya", "dpid": 18, "eval": "Item.val = Attr.val;"},
          "write": {"fn": "tuya", "dpid": 18, "dt": "0x10", "eval": "Item.val;"},
          "read": {"fn": "none"}
        },
        {
          "name": "config/mode",
          "values": [
              ["auto", 0], ["heat", 1], ["off", 2]
          ],
          "parse": {"fn": "tuya", "dpid": 106, "eval": "if (Attr.val == 0) { Item.val = 'auto' } else if (Attr.val == 1) { Item.val = 'heat' } else { Item.val = 'off' }"},
          "write": {"fn": "tuya", "dpid": 106, "dt": "0x30", "eval": "if (Item.val == 'auto') { 0 } else if (Item.val == 'heat') { 1 } else { 2 }"},
          "read": {"fn": "none"}
        },
        {
          "name": "config/preset",
          "parse": {"fn": "tuya", "dpid": 4, "script": "tuya_trv_preset.js"},
          "write": {"fn": "tuya", "dpid": 4, "dt": "0x30", "script": "tuya_trv_preset_set.js"},
          "read": {"fn": "none"}
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "parse": {"fn": "tuya", "dpid": 3, "eval": "Item.val = Attr.val * 10;"},
          "read": {"fn": "none"}
        },
        {
          "name": "state/valve",
          "parse": {"fn": "tuya", "dpid": 109, "eval": "Item.val = Attr.val > 5;"},
          "read": {"fn": "none"}
        }
      ]
    }
  ]
}

Hi, thanks for having a look.
No, I do not know, how the DDF works.
For these things I have to rely others.

You are using docker or normal OS ?
If you are using normal OS

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home/<DECONZUSER>/.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

So just create a text file with the DDF contain (better to use /usr/share/deCONZ/devices/ else you will need to clone more files) , and name the file as_you_want.json and restart deconz

You can compare device json after.

Hi,

I have created the DDF in the folder: /usr/share/deCONZ/devices/ , as you suggested.
Sadly it did not solve the issue, deConz is still informing me that the Battery status is OK.
But, I would like to see the battery value in % as in the past.
The system has loaded the DDF, I checked that.
CV Ilse is the problem one, CV Fleur is an other type.
afbeelding

Can you take a look in the API, like you have done previsouly ?
Because on the new DDF, I m using “config/battery” and have removed “state/lowbattery”. If i m right just with a reload deconz will remove and add new field.

Perhaps just need some time, for the device make a battery report ?

And you will not have a battery level visible in deconz, as this device use the tuya cluster, but you can have it in the API (to be used by domoticz)

And on your capture, there is not writted “DDF” like for the dimmer switch, mean it don’t use DDF.
Try selecting the node and make “edit DDF” on editor title you will see the file name (and a part of path)

Hi, I waited 24 hours before I came to an conclusion.
Battery status is only read a few times a day.
The DDF was not read, for that reason, I copied the file to:
.local/share/dresden-elektronik/deCONZ/devices/cvvalve.json
After restarting deConz, the system picked up the changed DDF.
Not Successfully, the valve is not read correctly any more.
(all three valves do not function any more)


The Thermostatic valves lost there names. In de Phoscon app, No Info.
However, I can Control the valves with Domoticz, there all is OK.
afbeelding

But how you are sure of that ? On your capture there is no “DDF” written on the node title. “state/lowbattery” is removed ?

Not Successfully, the valve is not read correctly any more.

I can Control the valves with Domoticz, there all is OK.

Here I don’t understand, it works or not ? Or you can send order, but not receive data ?

Hi,
Something did not went OK, after the DDF was loaded.
I have restored the system there I need the Central heating thermostatic valves running.
This configurations is almost running for 5 years or more.
The only things which changed where some Heating valves placements. (1.5 years ago)
However, the last year, many thing started to work incorrectly, like the battery status value.
The last years I had to reconfigure some light and switch there the system was not working correctly any more. It worked for years, but some one made some changes.
The same for the Battery value, why they changed the value in status OK, I do not understand.
Why changing things which works properly, is just strange.
There the heating system is too important, I already checked Domoticz Plugin. (MQTT)
Maybe I continue there, I will see.

Thanks anyway,
.

What is your deconz version ?
Deconz evolve, and sometime, some things are broken. Honnestly IDK what happen to your devices but they are using the old legacy code, and now deconz use DDF, so to make something, better to use the DDF way.
A DDF works or not, if you have corrected placed it, you need to have a “DDF” in the node title. This DDF is working for another TRV but it can need adjustement for your device.

To check if the DDF is working you can just make a right clic then edit DDF and on the editor title need to see “devices/cvvalve.json”.

And have found another post with the config/battery was already removed

You are sure you had battery level previously and not just a lowbattery notification ? Perhaps this issue is not recent.

Hi, the battery levels where working correctly in the past.
When the battery levels where low, Domoticz changed the color of the control into yellow.
That is the reason I noticed the change.
After replacing the batteries, Domoticz did not go back to the original color. (warning)
I checked the Phoscon App and noticed the change. (no value, but status)
Presently there are many issues with the battery readings and values.
I am running Ubuntu and deConz 2.26.3 with Conbee III stick version 26510900.
My Switches (HUE) normally running more than 2 years on a battery, one is already reduced to 13%.
The other switch is still on 100%, Both there batteries where replaced around Christmas time.
That things are moved to DDf, does not mean you should change or adjust the working.
As you are writing, the original configuration was made in 2021.
In the Picture you can see that CV Ilse does not have a battery value anymore.
afbeelding

Ha yes it’s possible, restart domoticz can solve the issue, but I will check this code part this afternoon.

About battery leak, are you using the last firmware ? it solve some of then, but from my memory still issue on conbee 3 and ikea ConBee III Dead Network after firmware update - #5 by Haerteleric

In the Picture you can see that CV Ilse does not have a battery value anymore.

If this device is the tuya one, it can’t have one, this device use tuya cluster, for battery too, no standard requests and deconz (the application, not the API part) is not able to use them to display the battery icon.

Edit:

Have checked the domoticz plugin code again, I don’t see the issue.
The red/yellow state on widget need to be removed on next device report without lowbattery=true.
so perhaps just need some time, idk how much talkative can be the device.