Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.08k stars 1.68k forks source link

ZNCLDJ12LM (Aqara B1 Curtain Motor) missing state attributes battery, motor_state, running and voltage #19780

Closed allistermaguire closed 3 weeks ago

allistermaguire commented 11 months ago

What happened?

I recently added another ZNCLDJ12LM device and it is missing some state attributes: battery, motor_state, power_outage_count, running, state and voltage. This is what it has:

{
    "linkquality": 144,
    "options": {
        "hand_open": true,
        "reverse_direction": false
    },
    "position": 94,
    "update": {
        "installed_version": 24,
        "latest_version": 24,
        "state": "idle"
    }
}

It also never gets the genOta cluster when pairing. I can add it manually to the database.

What did you expect to happen?

I have six other B1's and they are all returning all the expected state attributes.

{
    "battery": 91,
    "linkquality": 144,
    "motor_state": "stop",
    "options": {
        "hand_open": true,
        "reverse_direction": false
    },
    "position": 0,
    "power_outage_count": 37,
    "running": false,
    "state": "OFF",
    "update": {
        "installed_version": 24,
        "latest_version": 24,
        "state": "idle"
    },
    "voltage": 3000
}

How to reproduce it (minimal and precise)

The last of the working B1 was paired when I was running version 1.28.4. I have tried pairing it multiple times, and it always has the same results.

I thought it might be counterfeit, so I purchased an Aqara E1 hub and paired it. It works as expected. I forced an update of the firmware, made no difference. You cannot get much information from the Aqara Home app, but it does display the battery level correctly.

Zigbee2MQTT version

1.33.2

Adapter firmware version

6.10.3.0 build 297

Adapter

ITead Sonoff Zigbee 3.0 USB Dongle Plus V2 model "ZBDongle-E"

Debug log

Debug for B1 with missing state attributes:

Debug 2023-11-20 15:43:31Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c8141e0/set' with data '{ "position": 89 }'
Debug 2023-11-20 15:43:31Publishing 'set' 'position' to '0x04cf8cdf3c8141e0'
Debug 2023-11-20 15:43:32Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c8141e0/set' with data '{ "position": 85 }'
Debug 2023-11-20 15:43:32Publishing 'set' 'position' to '0x04cf8cdf3c8141e0'
Debug 2023-11-20 15:43:33Received Zigbee message from '0x04cf8cdf3c8141e0', type 'attributeReport', cluster 'genAnalogOutput', data '{"61440":131072,"presentValue":0}' from endpoint 1 with groupID 0
Debug 2023-11-20 15:43:33Received Zigbee message from '0x04cf8cdf3c8141e0', type 'readResponse', cluster 'genAnalogOutput', data '{"presentValue":94}' from endpoint 1 with groupID 0
Info 2023-11-20 15:43:33MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c8141e0', payload '{"battery":null,"linkquality":148,"motor_state":null,"options":{"hand_open":true,"reverse_direction":false},"position":94,"power_outage_count":null,"running":null,"state":null,"update":{"installed_version":24,"latest_version":24,"state":"idle"},"update_available":null}'
Debug 2023-11-20 15:43:35Received Zigbee message from '0x00158d000267522f', type 'read', cluster 'genTime', data '["time"]' from endpoint 1 with groupID 0
Debug 2023-11-20 15:43:35Received Zigbee message from '0x04cf8cdf3c8141e0', type 'attributeReport', cluster 'genAnalogOutput', data '{"61440":131072,"presentValue":2}' from endpoint 1 with groupID 0
Debug 2023-11-20 15:43:35Received Zigbee message from '0x04cf8cdf3c8141e0', type 'attributeReport', cluster 'genAnalogOutput', data '{"61440":131072,"presentValue":0}' from endpoint 1 with groupID 0
Debug 2023-11-20 15:43:35Received Zigbee message from '0x04cf8cdf3c8141e0', type 'readResponse', cluster 'genAnalogOutput', data '{"presentValue":85}' from endpoint 1 with groupID 0
Info 2023-11-20 15:43:35MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c8141e0', payload '{"battery":null,"linkquality":148,"motor_state":null,"options":{"hand_open":true,"reverse_direction":false},"position":85,"power_outage_count":null,"running":null,"state":null,"update":{"installed_version":24,"latest_version":24,"state":"idle"},"update_available":null}'
Debug 2023-11-20 15:43:35Received Zigbee message from '0x04cf8cdf3c8141e0', type 'readResponse', cluster 'genAnalogOutput', data '{"presentValue":85}' from endpoint 1 with groupID 0
Info 2023-11-20 15:43:35MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c8141e0', payload '{"battery":null,"linkquality":148,"motor_state":null,"options":{"hand_open":true,"reverse_direction":false},"position":85,"power_outage_count":null,"running":null,"state":null,"update":{"installed_version":24,"latest_version":24,"state":"idle"},"update_available":null}'

Debug for fully working device

Debug 2023-11-20 15:44:22Received MQTT message on 'zigbee2mqtt/0x54ef44100007151e/set' with data '{ "position": 93 }'
Debug 2023-11-20 15:44:22Publishing 'set' 'position' to '0x54ef44100007151e'
Debug 2023-11-20 15:44:23Received MQTT message on 'zigbee2mqtt/0x54ef44100007151e/set' with data '{ "position": 85 }'
Debug 2023-11-20 15:44:23Publishing 'set' 'position' to '0x54ef44100007151e'
Debug 2023-11-20 15:44:25Received Zigbee message from '0x54ef44100007151e', type 'attributeReport', cluster 'genMultistateOutput', data '{"61440":9818624,"presentValue":2}' from endpoint 1 with groupID 0
Info 2023-11-20 15:44:25MQTT publish: topic 'zigbee2mqtt/0x54ef44100007151e', payload '{"battery":89,"linkquality":208,"motor_state":"stop","options":{"hand_open":true,"reverse_direction":false},"position":96,"power_outage_count":19,"running":false,"state":"OFF","update":{"installed_version":24,"latest_version":24,"state":"idle"},"update_available":null,"voltage":3000}'
Debug 2023-11-20 15:44:25Received Zigbee message from '0x54ef44100007151e', type 'attributeReport', cluster 'genAnalogOutput', data '{"61440":131072,"presentValue":85}' from endpoint 1 with groupID 0
Info 2023-11-20 15:44:25MQTT publish: topic 'zigbee2mqtt/0x54ef44100007151e', payload '{"battery":89,"linkquality":208,"motor_state":"stop","options":{"hand_open":true,"reverse_direction":false},"position":85,"power_outage_count":19,"running":false,"state":"OFF","update":{"installed_version":24,"latest_version":24,"state":"idle"},"update_available":null,"voltage":3000}'
Debug 2023-11-20 15:44:25Received Zigbee message from '0x54ef44100007151e', type 'readResponse', cluster 'genAnalogOutput', data '{"presentValue":85}' from endpoint 1 with groupID 0
Info 2023-11-20 15:44:25MQTT publish: topic 'zigbee2mqtt/0x54ef44100007151e', payload '{"battery":89,"linkquality":208,"motor_state":"stop","options":{"hand_open":true,"reverse_direction":false},"position":85,"power_outage_count":19,"running":false,"state":"OFF","update":{"installed_version":24,"latest_version":24,"state":"idle"},"update_available":null,"voltage":3000}'
allistermaguire commented 11 months ago

Logs from pairing:

Info 2023-11-20 16:43:11Device '0x04cf8cdf3c8141e0' joined
Info 2023-11-20 16:43:11MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c8141e0","ieee_address":"0x04cf8cdf3c8141e0"},"type":"device_joined"}'
Info 2023-11-20 16:43:11Starting interview of '0x04cf8cdf3c8141e0'
Info 2023-11-20 16:43:11MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c8141e0","ieee_address":"0x04cf8cdf3c8141e0","status":"started"},"type":"device_interview"}'
Info 2023-11-20 16:43:23Successfully interviewed '0x04cf8cdf3c8141e0', device has successfully been paired
Info 2023-11-20 16:43:23Device '0x04cf8cdf3c8141e0' is supported, identified as: Xiaomi Aqara B1 curtain motor (ZNCLDJ12LM)
Info 2023-11-20 16:43:23MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara B1 curtain motor","exposes":[{"features":[{"access":7,"label":"State","name":"state","property":"state","type":"enum","values":["OPEN","CLOSE","STOP"]},{"access":7,"description":"Position of this cover","label":"Position","name":"position","property":"position","type":"numeric","unit":"%","value_max":100,"value_min":0}],"type":"cover"},{"access":1,"description":"Remaining battery in %, can take up to 24 hours before reported.","label":"Battery","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Whether the motor is moving or not","label":"Running","name":"running","property":"running","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"The current state of the motor.","label":"Motor state","name":"motor_state","property":"motor_state","type":"enum","values":["closing","opening","stop"]},{"access":1,"description":"Number of power outages (since last pairing)","label":"Power outage count","name":"power_outage_count","property":"power_outage_count","type":"numeric"},{"access":1,"description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"ZNCLDJ12LM","options":[{"access":2,"description":"Inverts the cover position, false: open=100,close=0, true: open=0,close=100 (default false).","label":"Invert cover","name":"invert_cover","property":"invert_cover","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"Xiaomi"},"friendly_name":"0x04cf8cdf3c8141e0","ieee_address":"0x04cf8cdf3c8141e0","status":"successful","supported":true},"type":"device_interview"}'
Debug 2023-11-20 16:44:04Received Zigbee message from '0x04cf8cdf3c8141e0', type 'attributeReport', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0

and battery from the Aqara home app IMG_3723

maxs67 commented 10 months ago

Still no fix, have the same problem with an new installation.

allistermaguire commented 10 months ago

@maxs67 Good to know I am not the only person with the issue. Are you using an EZSP Adapter? I am trying to narrow down if it is the Zigbee coordinator or something else.

maxs67 commented 10 months ago

@allistermaguire I'm using a zigstar adapter. I had to install domoticz compleet new, and on the new installation I don't get the battery, motor_state, power_outage_count, running, state and voltage. In the old installation was all ok. I don't know where to look for a solution.

allistermaguire commented 10 months ago

Thanks @maxs67, that is based on Texas Instruments chipset, mine is Silicon Labs which is still considered experimental as it doesn’t have backup/restore functionality with zigbee2mqtt.

My plan Z was to change my adapter, or try a newer firmware but now I know that won’t help.

I at least know which version it worked with and when it stopped, it isn’t a massive jump but still a reasonable number of PR’s.

maxs67 commented 9 months ago

@allistermaguire can I rolback to the working version? with version it was?

allistermaguire commented 8 months ago

Hi @maxs67, the version I was running when I added my last ZNCLDJ12LM successfully was 1.28.4.

I have since tested rolling back to that version, and my most recent ZNCLDJ12LM still doesn't have all the attributes.

zvezdochet2004 commented 7 months ago

Hello. I have the same problem. Current version: 1.36.0-1

allistermaguire commented 7 months ago

Hi @zvezdochet2004 can you provide some additional information on your setup? ie: do you have Aqara B1's that have all attributes and some with missing attributes? did they in the past? what sort of adapter are you using? etc

I am using EZSP, and the latest version has introduced Ember which is only supported with the latest adapter firmware, so I can not go back easily to a previous version.

zvezdochet2004 commented 7 months ago

I have 4 devices B1 (ZNCLDJ12LM). There are no devices left with the battery charge attribute present. The attribute stopped coming more than 6 months ago. I have two stick v4. First is connected via USB, the second via LAN (ZigStar GW6). ZNCLDJ12LM updated via OTA to version 2019www.

P.S. I am sorry for my English

allistermaguire commented 7 months ago

Thanks @zvezdochet2004. The 6 month timeframe aligns with what I see, but I only have 1 of 6 B1's with missing attributes, it was the last one added since something changed in Zigbee2MQTT.

For yours to stop working; did they just stop? or did you have to repair them for some reason, and then once they were repaired they had missing attributes?

I have not wanted to try repairing a B1's that is currently reporting all attributes, in case it stops.

zvezdochet2004 commented 7 months ago

I don’t remember such details anymore. I reconnected the devices and at some point noticed that the battery level attribute was missing

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days