Koenkk / zigbee2mqtt

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

Ledvance Smart+ Motion Sensor #5701

Closed CBismark closed 3 years ago

CBismark commented 3 years ago

Hello everyboy,

I tried to pair a Ledvance Smart+ Motion Sensor, but that didn't work. I was under the impression that this device is basically an OSRAM Smart+ Motion sensor, which is supported. However, that didn't turn out to be the truth.

Below the database entry generated by zigbee2mqtt.

{"id":22,"type":"EndDevice","ieeeAddr":"0x000d6f000bb30004","nwkAddr":29656,"manufId":4174,"epList":[1,2],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,1,3,32,1026,1280,2821],"outClusterList":[25],"clusters":{},"binds":[],"meta":{}},"2":{"epId":2,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}}},"interviewCompleted":false,"meta":{},"lastSeen":1610388791828}

As you cansee, the interview doesn't complete.

Any chance this device can be supported?

Kind Regards,

Christoph

Koenkk commented 3 years ago

Can you provide the herdsman debug log when pairing it?

To enable herdsman debug logging, see https://www.zigbee2mqtt.io/information/debug.html#zigbee-herdsman-debug-logging

CBismark commented 3 years ago

log.txt From the point where I started the pairing process: (0x000d6f000bb30004 is the device)

Koenkk commented 3 years ago

Can you provide it till interview failed?

CBismark commented 3 years ago

I added the full log. But if I unterstand you correctly, you wanted the log until an interview failed happens and, well that doesn't really happen. log.txt

As you can see, repeatedly the device rejoins,gets an updated network address and then it says: not interviewing:

zigbee-herdsman:controller:log Device '0x000d6f000bb30004' joined +2s zigbee-herdsman:deconz:driver networkstate: 2 apsDataConfirm: 0 apsDataIndication: 0 configChanged: 0 apsRequestFreeSlots: 1 +3ms zigbee-herdsman:controller:log Device '0x000d6f000bb30004' accepted by handler +0ms zigbee-herdsman:controller:log Device '0x000d6f000bb30004' is already in database with different networkAddress, updating networkAddress +1ms zigbee-herdsman:controller:log Not interviewing '0x000d6f000bb30004', completed 'false', in progress 'true' +2ms

Not sure whats going on there. I also can't seem to get the device into the state from the beginning, no matter how long I leave the battery out and how long or short I press the button during inserting the battery again. Tried it the way it says for the OSRAM sensor: https://www.zigbee2mqtt.io/devices/AC01353010G.html

Kind Regards,

Christoph

Koenkk commented 3 years ago

Very strange, I'm afraid we have to sniff the traffic while joining to get more info: https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

CBismark commented 3 years ago

Hm okay sounds doable. I got some extra CC2531 lying around here, but no programmer to flash them. Maybe I can get one and then try that. I'll be in contact once I got results!

CBismark commented 3 years ago

I bought a CCDebugger and flashed an old CC2531 with it, sniffed while powering on the motion sensor. Here is the result as a Wireshark Capture File. Where it says 'Beacon' is when I put the battery in the sensor.

EDIT: forgot to change permit_join to true, here is the new sniff:

sniff.zip

Koenkk commented 3 years ago

I think the devices keeps resetting because the Match descriptor request is never answered. This device expects cluster 0x0500 as an output cluster. @chrishae can you add this cluster?

image

ChrisHae commented 3 years ago

There is already the Cluster 0x500 in the deCONZ adapter. @CBismark Which FW version do you use? You should updat to the latest: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually You can also try to re-pair the motion sensor when you delete it from the z2mqtt database first. @Koenkk Shouldn't the IAS Zone enroll Request be independent of the match descriptor request?

Edit: never the less, I will upload a update that checks the simple descriptors and writes missing clusters. Perhaps it is really missing in your setup.

CBismark commented 3 years ago

Did a Firmware update and the problem persists. Sniffed again, maybe you can make something out of it: @ChrisHae I usually delete from configuration and database (while zigbee2mqtt is stopped), then try to pair.

EDIT: Sorry, uploaded without zigbee2mqtt running. THis time the correct sniffer sniff3.zip

ChrisHae commented 3 years ago

@CBismark Do you have deCONZ installed? You could already check if the cluster 0x500 is missing. The Z2mqtt code is coming soon. image

CBismark commented 3 years ago

@ChrisHae I don't have a Linux with a GUI installed, only running OpenHAB on the standard openHabian (Raspian). If I would install deconz as a service, can I also check for the Cluster?

ChrisHae commented 3 years ago

Ok, I have added the simple descriptor and cluster check to zigbee-herdsman code. Wait until new z2mqtt release and then try it again. It should be visible in the debug log during startup. If this does not solve the problem, then it must be something else.

Koenkk commented 3 years ago

@ChrisHae your fix is available in the latest dev now. (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

CBismark commented 3 years ago

Thank you both a lot for the quick help. With dev branch interviewing and pairing worked and the device is now recognized as a Motion Sensor-A. I'll close this now.