Zigbee2Mqtt baterylevel updates not working

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Zigbee2Mqtt baterylevel updates not working

Post by rini52 »

Today I changed over from the Plugin Z2M version to the AutoDetect version in lan of Z2M. The devices I'm using are KaKU ZSDR-850 and ZCO-900 (heiman hs3sa etc) in combination with a re-flashed Sonoff zigbee 3 dongle plus. All worked okay under the plugin version and you could see in Domoticz that the switches were updated ever hour(which fits the reporting setting of the device). After changing over all was auto detected correctly and testing the alarms worked. However the battery settings/Last-seen were not updated. You could see that a MQTT message was generated every hour :
(2022-06-10 21:39:04MQTT publish: topic 'zigbee2mqtt/ZB_smoke_woonkamer', payload '{"ac_status":false,"battery":100,"battery_low":false,"last_seen":"2022-06-10T21:39:04+02:00","linkquality":51,"restore_reports":true,"smoke":true,"supervision_reports":false,"tamper":false,"test":false,"trouble":false}')

The text device(last seen option of the frontend) was updated correctly, but the device switch(with the Last-seen and batterylevel ) not. Only if you publish a mqtt with a smoke change (true or false),that simulates pushing the test buton of the smoke-sensor) the "Last-seen and batterylevel gets updated in Domoticz device(also in the text last-seen box).
Has anybody a work around for this , since I'm using the battery level for automatic checking of the battery state and text boxes are excluded apparently. Should act similar as in the plugin version. Maybe someone can update the code to act like in the Plugin vesrion?

Thks
Rini
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Re: Zigbee2Mqtt baterylevel updates not working

Post by rini52 »

Sorry forgot setup versions:
Rasberrypi 4B; Linux pi-host 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux (64bit)
Sonofdongle: Zigbee2MQTT version1.25.2 commit: 3c5854f
Coordinator type
zStack3x0
Coordinator revision
20220219
Frontend version
0.6.97
Domoticz 2022.1 build c9526851b.

mosquitto,domoticz,zigbee2Mqtt all in seperate docker containers.
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Re: Zigbee2Mqtt baterylevel updates not working

Post by rini52 »

Update
The new Domoticz 2022.2 is even worse!!! . Now even the "last_seen" item is not updated any more. The Zigbee2Mqtt is updated correctly but the Domomitcz sensors are note. Mqtt_explorer shows that the messages are transmitted. But apparently the Domoticz Auto-detect version is not not picking them up.

Homeastiant_discovery-item (last_seen):

{
"availability": [
{
"topic": "zigbee2mqtt/bridge/state",
"value_template": "{{ value_json.state }}"
},
{
"topic": "zigbee2mqtt/ZB_smoke_woonkamer/availability",
"value_template": "{{ value_json.state }}"
}
],
"availability_mode": "all",
"device": {
"identifiers": [
"zigbee2mqtt_0x000d6f00166ac2c2"
],
"manufacturer": "Trust",
"model": "Smoke detector (ZSDR-850)",
"name": "ZB_smoke_woonkamer",
"sw_version": "1.1.1"
},
"device_class": "timestamp",
"enabled_by_default": false,
"entity_category": "diagnostic",
"icon": "mdi:clock",
"json_attributes_topic": "zigbee2mqtt/ZB_smoke_woonkamer",
"name": "ZB_smoke_woonkamer_last_seen",
"state_topic": "zigbee2mqtt/ZB_smoke_woonkamer",
"unique_id": "0x000d6f00166ac2c2_last_seen_zigbee2mqtt",
"value_template": "{{ value_json.last_seen }}"
}

homeassistant_domoticz/sensor/0x000d6f00166ac2c2/last_seen/config



The update message:
{
"ac_status": false,
"battery": 100,
"battery_low": false,
"last_seen": "2022-11-09T15:49:32+01:00",
"linkquality": 131,
"restore_reports": true,
"smoke": false,
"supervision_reports": false,
"tamper": false,
"test": false,
"trouble": false
}

zigbee2mqtt/ZB_smoke_woonkamer

So what is wrong in Domoticz??????

Please Help
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
User avatar
waltervl
Posts: 5906
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee2Mqtt baterylevel updates not working

Post by waltervl »

Do you see updates of these devices in the domoticz log?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Re: Zigbee2Mqtt baterylevel updates not working

Post by rini52 »

Nope.

Z2M sees the updates and is sending messages . But Domoticz is not picking them up or ?. Tried to birdge the messagages to my broker in Oman to test HA. The messages are received, but only partly picked up by HA and discovered. Little confused....
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest