Koenkk / zigbee2mqtt

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

[New device support]: New Support for Aliexpress Smoke Detector #24916

Open markro76 opened 1 week ago

markro76 commented 1 week ago

Link

https://de.aliexpress.com/item/1005006862684253.html?spm=a2g0o.order_list.order_list_main.48.21ef5c5fXBHDNu&gatewayAdapt=glo2deu

Database entry

{"id":41,"type":"EndDevice","ieeeAddr":"0xa4c138ffd7a8e9b2","nwkAddr":47773,"manufId":4417,"manufName":"_TZE284_rccxox8p","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0,60672],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"stackVersion":0,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1732536980570}

Zigbee2MQTT version

1.41.0-1

Comments

Please Help

Device '0xa4c138ffd7a8e9b2' with Zigbee model 'TS0601' and manufacturer name '_TZE284_rccxox8p' is NOT supported, please follow https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html

External definition


const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE284_rccxox8p',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

module.exports = definition;

What does/doesn't work with the external definition?

all

oyooyo commented 4 days ago

I just received the same device and realized it's not yet supported by zb2mqtt. But it appears to be more or less identical to a smoke detector called "PA-44Z": https://www.zigbee2mqtt.io/devices/PA-44Z.html

"PA-44Z" not only looks identical, it contains manufacturer ID "_TZE200_rccxox8p", which is very similar to "_TZE284_rccxox8p".

So I tried to simply add manufacturer id '_TZE284_rccxox8p' to the "PA-44Z" definition and at first sight it seems to work fine.

markro76 commented 4 days ago

I have no plan to write an new Config. Can you please give me the .js File from your Config.

Many Thanks

oyooyo commented 4 days ago

I haven't written a new config either as I have no experience with that too. All I did was opening the file "devices/tuya.js" from the "zigbee-herdsman-converters" package (just search for a file named tuya.js) with a text editor and then simply changing this line:

        fingerprint: tuya.fingerprint('TS0601', ['_TZE200_m9skfctm', '_TZE200_rccxox8p']),

to

        fingerprint: tuya.fingerprint('TS0601', ['_TZE200_m9skfctm', '_TZE200_rccxox8p', '_TZE284_rccxox8p']),

That's probably not the proper way to do it, as I assume those changes will get overwritten when updating zigbee2mqtt. But by that time the device will hopefully be supported out of the box, so I hope it will be okay.

markro76 commented 4 days ago

I can´t find the file. Can you tell me were i can find the File ?

oyooyo commented 4 days ago

Try <Directory where you installed zigbee2mqtt>/node_modules/zigbee-herdsman-converters/devices/tuya.js, but I am not 100% sure if it is always in this location.

p.s.: I had to unpair/remove the device from zigbee2mqtt and pair it again before the device was properly recognized by zb2mqtt after I made the changes.

atsoller commented 3 days ago

Any Idea how to make these changes permanent in a docker container. I am running zigbee2mqtt in home assistant. I can change the file in the container, but aber a restart ist is changed back.

markro76 commented 3 days ago

I have the same Problem. I Hope the device will have support in the next Version of zigbee2mqtt :-)

atsoller commented 2 days ago

If you have Terminal installed in HA you need to switch off save mode. Than you an switch into the z2mqtt conternair with this command. docker exec -it $(docker ps | grep zigbee2mqtt | cut -d" " -f 1) /bin/sh Change to the directory cd node_modules/zigbee-herdsman-converters/devices/ and you can edit the file tuya.js, You need to install a editor or work wirh the installed Vi editor. So its good if you know a bit about linux.. But as I wrote before, i can not get it to work. I guess the fille is always updated when restarting the container. Maybe someone who knows more about containers can help with that..