Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge πŸŒ‰, get rid of your proprietary Zigbee bridges πŸ”¨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.78k stars 1.64k forks source link

Neo NAS-AB02B0 support new hardware identify #7051

Closed leroyloren closed 2 years ago

leroyloren commented 3 years ago

What happened

I have a new siren, but after successful pairing it does not transmit any information (only LQ). According to the information obtained, this is a new version of HW, which the existing integration of Z2M does not support.

What did you expect to happen

Z2M does not show any information from the device.

https://pastebin.com/6UVQu8gm

obrazek obrazek

How to reproduce it (minimal and precise)

Pair the device with the Z2M

Debug info

Zigbee2MQTT version: 1.18.2-dev commit: 2446e17 Adapter hardware: CC2531, Conbee II Adapter firmware version: zStack12 (20201127)

michalpulda commented 3 years ago

Hi, I have the same problem with this siren (version 3), it pairs with the z2m, completes the interview, but then it keeps blinking, sends only the linkquality. The strangest thing is that it had already worked on z2m before (I had to pair it with tuya's gateway first, so it worked), but I changed my HA hardware and then it didn't work anymore. Thanks.

I have seen this kind of behavior of a Tuya device described here https://github.com/zigpy/zha-device-handlers/issues/862#issuecomment-864629183

What has been observed is that after a device has been paired first to a Tuya gateway it is reporting fine when connected to other coordinator.

Pedder007 commented 3 years ago

Hi all, coming from the other β€šcaseβ€˜, reading here, I now tend to buy a Tuya GW to get my multi-sensors (also https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4790) at least working with a ConBee stick. Is there any preference for the wireless or the wired (LAN) version of the Tuya GW? - just to tackle these pair-issues once per affected device...

landish-2021 commented 3 years ago

I confirm that after pairing the siren to the Tuya gateway and disconnecting it from the gateway, without resetting to factory settings, the siren is paired with the SS2652Z Zigbee2MQTT cordinator and outputs data on its sensors to the home assistant.

GrimDeclaw commented 3 years ago

I confirm that after pairing the siren to the Tuya gateway and disconnecting it from the gateway, without resetting to factory settings, the siren is paired with the SS2652Z Zigbee2MQTT cordinator and outputs data on its sensors to the home assistant.

Well, Good to know!! Just to be sure, how do you pair the siren without factory resetting it? The only way I am aware of is "long press the button til the bip", which I'm guessing is the factory reset.

So the problem now is : what do the GW do on pairing that z2m doesn't? @BerndK Do you think that your tuya GW sniffing contains what we need? I can't do any sniffing as I don't own a tuya GW :(

landish-2021 commented 3 years ago

After I pair the siren from the beginning to the Tuya gateway and then disconnect it from the Tuya gateway, without resetting to factory settings (just select turn off the siren), then the siren is paired with another coordinator, (we do not press the pairing button on the siren in any case) just turn on the stick for pairing devices, I have this SS2652R with Zigbee2MQTT, and the siren then normally pairs and gives correct data on its sensors in the home assistant.

GrimDeclaw commented 3 years ago

Thanks!

adrianofox commented 3 years ago

After I pair the siren from the beginning to the Tuya gateway and then disconnect it from the Tuya gateway, without resetting to factory settings (just select turn off the siren), then the siren is paired with another coordinator, (we do not press the pairing button on the siren in any case) just turn on the stick for pairing devices, I have this SS2652R with Zigbee2MQTT, and the siren then normally pairs and gives correct data on its sensors in the home assistant.

You are right. I turned off the siren in the tuya app and then the z2m paired. Perfect. Thanks.

Pedder007 commented 3 years ago

Thanks a lot for the confirmation - so it seems to be regardless which Tuya GW I use. I will give it a try then to pair it with ConBee :-)

GrimDeclaw commented 3 years ago

After I pair the siren from the beginning to the Tuya gateway and then disconnect it from the Tuya gateway, without resetting to factory settings (just select turn off the siren), then the siren is paired with another coordinator, (we do not press the pairing button on the siren in any case) just turn on the stick for pairing devices, I have this SS2652R with Zigbee2MQTT, and the siren then normally pairs and gives correct data on its sensors in the home assistant.

You are right. I turned off the siren in the tuya app and then the z2m paired. Perfect. Thanks.

Just for information : the siren stop blinking after tuya gw pairing right? Did it starts blinking again when your turn it back on and if so, did it correctly stops blinking again after z2m pairing done?

adrianofox commented 3 years ago

The siren starts blinking when you turn it off in the Tuya app. So when you activate the pairing mode on the z2m it appears on the HA (without pressing the button on the siren).

RaffoNin commented 3 years ago

I feel like the problem and the workaround (use of gateway) should be on a separate issue so the developer can see it. It's possible other Tuya devices could have the same problem in the future.

dfrome commented 3 years ago

better : If informed, developers would try to implement the necessary logic for NAS-AB02B0 to connect with z2m/home assistant (like it connects with a Tuya gateway). NAS-AB02B0 is documented as a compatible device with z2m / home assistant. I feel it's not in the spirit of the open source community to buy a tuya device and exchange data with a chinese server to get our things working.

Pedder007 commented 3 years ago

I will use the Tuya gateway definitly only to get the devices working and switch afterwards to my own GW ;-) Other devices (e. g. Broadlink) are not allowed to talk to the internet by FW rules and/or pihole ...

BerndK commented 3 years ago

I want to confirm that the workaround worked for me: 1 hold button, blinking 2 pairing with the tuya gateway (wireless one) (stopped blinking) 3 remove siren from gateway app (started blinking) 4 it automatically paired with my z2m stick (stopped blinking) and it worked as expected: reported data and was able to activate the alarm The indirection using Tuya gateway is not perfect, but worked for me.

BerndK commented 3 years ago

@GrimDeclaw

Well, Good to know!! Just to be sure, how do you pair the siren without factory resetting it? The only way I am aware of is "long press the button til the bip", which I'm guessing is the factory reset.

So the problem now is : what do the GW do on pairing that z2m doesn't? @BerndK Do you think that your tuya GW sniffing contains what we need? I can't do any sniffing as I don't own a tuya GW :(

Yes I 'recored' the Tyua pairing process in a separate file.

FutureCow commented 3 years ago

For those who got it working, what are the different melodies and volume for this device? Can you use it as a chime for a doorbell or is it to loud?

Tuan1984 commented 3 years ago

Now.. with people that do not have thw tuya gateway.. how do we get this working ..

GrimDeclaw commented 3 years ago

@GrimDeclaw

Well, Good to know!! Just to be sure, how do you pair the siren without factory resetting it? The only way I am aware of is "long press the button til the bip", which I'm guessing is the factory reset. So the problem now is : what do the GW do on pairing that z2m doesn't? @BerndK Do you think that your tuya GW sniffing contains what we need? I can't do any sniffing as I don't own a tuya GW :(

Yes I 'recored' the Tyua pairing process in a separate file.

Yep, that's the file I was using for my test, but apart the write that I already add into the config part I didn't find anything else about what the GW does and z2m doesn't

jabber77 commented 3 years ago

I hope you will find how to include this siren because I hasten to use. Buying a gateway to make it work with zigbee2mqtt is heresy ;-)

GrimDeclaw commented 3 years ago

Got my Tuya GW today, and confirm once again the working workaround... everything is working as expected (using a raspbee II module inside a rpi 4 btw) I tryed to snif the pairing process but still no luck, not seeing anything more (or less) than when I looked into @BerndK files

If I find more time, I'll try to sniff again later looking closely the frame number when the device stops blinking, might be a good clue!

dioxide-jazz commented 3 years ago

Hey all, I've been watching this issue for a while and i just stumbled upon this: https://github.com/TradeFace/tuyagateway Its a local python gateway for Tuya devices. I wonder if this could help those that don't have a Tuya GW, like myself.

zedmaster commented 3 years ago

Can anyone give me the way to learn how to develop the solution to this problem?

I have this siren standing here, and I want to help fix the problem.

Any idea how to get started?

GrimDeclaw commented 3 years ago

Hey all, I've been watching this issue for a while and i just stumbled upon this: https://github.com/TradeFace/tuyagateway Its a local python gateway for Tuya devices. I wonder if this could help those that don't have a Tuya GW, like myself.

At first glance, I don't see anything about Zigbee, so my guess would be : no :(

GrimDeclaw commented 3 years ago

Can anyone give me the way to learn how to develop the solution to this problem?

I have this siren standing here, and I want to help fix the problem.

Any idea how to get started?

No sure, but the solution should be in the protocol sniffing between the siren and the GW during the pairing process, trying to find out what is missing in the z2m pairing process (the siren doesn't stop blinking when paired to z2m directly while it does when pairing to tuya GW)

zedmaster commented 3 years ago

As far as I understand, I need a tuya gateway to be able to pair the siren on HA. To be able to scan the pairing to solve the problem in zigbee2mqtt I need a gateway too.

Since I will have to spend to solve the problem, buying another siren and sensors, or a gateway.

Which tuya zigbee gateway do you recommend to buy? (if you can send me the aliexpress link, thank you)

Morphy99 commented 3 years ago

@zedmaster not a gateway but a working (sort of) device https://www.aliexpress.com/item/1005002631521488.html Can't get it to interview successfully but it's supposed to be supported

Looks a lot nicer but has a little less functionality.

zedmaster commented 3 years ago

I need to other CC2531 to sniffer and not a one gateway.... https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

I am looking for someone who has already done this. Any volunteers to teach?

As I don't have another CC2531 I will provide.

Morphy99 commented 3 years ago

I need to other CC2531 to sniffer and not a one gateway.... https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

I am looking for someone who has already done this. Any volunteers to teach?

As I don't have another CC2531 I will provide.

@GrimDeclaw has already tried sniffing but not found anything. I think maybe these are locked to mac address of tuya gateways maybe?

FutureCow commented 3 years ago

Here is another sniff between the NAS-AB02B0 and a Tuya Gateway. Don't know if there is something useful inside? Neo_NAS-AB02B0.zip

Bazz-Man commented 3 years ago

I have this same issue but I have a working unit and non-working unit. The working one was bought about 1.5 years ago, the non-working one was bought last week. I am using a CC2531 co-ordinator version 20201127

I've looked at the zigbee2MQTT debug logs to compare the two and the non-working one seems to stop communicating after a 'commandSetTimeRequest'. I am happy to do some more other captures if I'm told what and how to capture it. The specific parts are as follows:

WORKING UNIT: ....... Received Zigbee message from '0x842e14fffedb8478', type 'commandSetTimeRequest', cluster 'manuSpecificTuya', data '{"payloadSize":2560}' from endpoint 1 with groupID 0 Debug No converter available for 'NAS-AB02B0' with cluster 'manuSpecificTuya' and type 'commandSetTimeRequest' and data '{"payloadSize":2560}' Debug Received Zigbee message from '0x842e14fffedb8478', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,58],"type":"Buffer"},"datatype":2,"dp":106,"fn":0,"status":0,"transid":2}' from endpoint 1 with groupID 0 Info MQTT publish: topic 'zigbee2mqtt/0x842e14fffedb8478', payload '{"alarm":null,"battery_low":null,"duration":null,"humidity":58,"humidity_alarm":null,"humidity_max":null,"humidity_min":null,"linkquality":84,"melody":null,"power_type":null,"temperature":null,"temperature_alarm":null,"temperature_max":null,"temperature_min":null,"volume":null}' Debug Received Zigbee message from '0x842e14fffedb8478', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,245],"type":"Buffer"},"datatype":2,"dp":105,"fn":0,"status":0,"transid":2}' from endpoint 1 with groupID 0 Info MQTT publish: topic 'zigbee2mqtt/0x842e14fffedb8478', payload '{"alarm":null,"battery_low":null,"duration":null,"humidity":58,"humidity_alarm":null,"humidity_max":null,"humidity_min":null,"linkquality":86,"melody":null,"power_type":null,"temperature":"24.5","temperature_alarm":null,"temperature_max":null,"temperature_min":null,"volume":null}' Debug Received Zigbee message from '0x842e14fffedb8478', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,0,246],"type":"Buffer"},"datatype":2,"dp":105,"fn":0,"status":0,"transid":2}' from endpoint 1 with groupID 0 Info MQTT publish: topic 'zigbee2mqtt/0x842e14fffedb8478', payload '{"alarm":null,"battery_low":null,"duration":null,"humidity":58,"humidity_alarm":null,"humidity_max":null,"humidity_min":null,"linkquality":81,"melody":null,"power_type":null,"temperature":"24.6","temperature_alarm":null,"temperature_max":null,"temperature_min":null,"volume":null}' Debug Received Zigbee message from 'Spare Spot 2', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":1,"fileVersion":8,"imageType":0,"manufacturerCode":4687}' from endpoint 11 with groupID 0 Debug Received Zigbee message from 'Conservatory Sensor', type 'commandStatusChangeNotification', cluster 'ssIasZone', data '{"extendedstatus":0,"zonestatus":0}' from endpoint 1 with groupID 0 Info MQTT publish: topic 'zigbee2mqtt/Conservatory Sensor', payload '{"battery":80,"battery_low":false,"linkquality":84,"occupancy":false,"tamper":false,"voltage":2900}' Debug Received Zigbee message from '0x842e14fffedb8478', type 'raw', cluster 'manuSpecificTuya', data '{"data":[9,9,17,0,11,64],"type":"Buffer"}' from endpoint 1 with groupID 0 Debug No converter available for 'NAS-AB02B0' with cluster 'manuSpecificTuya' and type 'raw' and data '{"data":[9,9,17,0,11,64],"type":"Buffer"}'

NON-Working Unit: ......... Debug Received Zigbee message from '0x804b50fffe0481e1', type 'commandSetTimeRequest', cluster 'manuSpecificTuya', data '{"payloadSize":2816}' from endpoint 1 with groupID 0 Debug No converter available for 'NAS-AB02B0' with cluster 'manuSpecificTuya' and type 'commandSetTimeRequest' and data '{"payloadSize":2816}' Debug Received Zigbee message from '0x804b50fffe0481e1', type 'raw', cluster 'manuSpecificTuya', data '{"data":[9,5,17,0,12,68],"type":"Buffer"}' from endpoint 1 with groupID 0 Debug No converter available for 'NAS-AB02B0' with cluster 'manuSpecificTuya' and type 'raw' and data '{"data":[9,5,17,0,12,68],"type":"Buffer"}'

GrimDeclaw commented 3 years ago

Not sure if it is still related or not, but I made some testing today after the tuya GW workaround. The siren kind of work, as I can setup everything, but it is soooo laggy!

I tried with simple topic 'zigbee2mqtt/0x804b50fffe048417/set', payload '{"alarm":true}' and it take between 2 to 15sec to respond (when it does.... sometimes nothing happens). Tried within HA, or with mosquitto_pub directly , same behaviour.

Anybody see the same behaviour, or is it just me? I didn't try the smartlife app because I uninstalled it just after the pairing ^^ Maybe it is due to the raspbeeII or anything else... I don't know!

Boxter83 commented 3 years ago

Hi I have the same experience with extreme delay, approx 2-5 sec. I send mqtt message directly with Mqtt explorer, so it's not a problem with the smart home system or rule engine.

Den lΓΆr 14 aug. 2021 20:26GrimDeclaw @.***> skrev:

Not sure if it is still related or not, but I made some testing today after the tuya GW workaround. The siren kind of work, as I can setup everything, but it is soooo laggy!

I tried with simple topic 'zigbee2mqtt/0x804b50fffe048417/set', payload '{"alarm":true}' and it take between 2 to 15sec to respond (when it does.... sometimes nothing happens). Tried within HA, or with mosquitto_pub directly , same behaviour.

Anybody see the same behaviour, or is it just me? I didn't try the smartlife app because I uninstalled it just after the pairing ^^ Maybe it is due to the raspbeeII or anything else... I don't know!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/7051#issuecomment-898941532, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWE4KFCB7S34V237Z75XZDT42YMVANCNFSM42YZA2QQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

realPy commented 3 years ago

Have the same problem. I have read the code converters neo.js and it's currently coded as a standard zigbee device. Tuya device is special as mentionned in the z2m docs. It's required some additional code:

https://www.zigbee2mqtt.io/how_tos/how_to_support_new_tuya_devices.html

realPy commented 3 years ago

Thanks to @BerndK i have quickly check the the dump.

I think one message is missing : In the tuya pair , the gateway send a End Device Timeout Response, Success

130 42.796866 0x0000 0x3c76 ZigBee 67 End Device Timeout Response, Success

In the zigbee2mqtt version, this message is missing.

@Koenkk Help please how can we send this command?

rbert001 commented 3 years ago

Has anyone already being able to get the v3 working ?

realPy commented 3 years ago

I think the v3 waiting the end of device request success to accept the pairing. This components require to implement this functionnality on zstack and also modify herdsman . I currently read the spec and the herdmans code

eliasmainetti commented 3 years ago

Has anyone already being able to get the v3 working ?

Not working yet 😞

realPy commented 3 years ago

For people who have the gateway :

After pairing correctly , if you power on the Neo , the light stay on 1 minutes or just down when it's plugged?

uefik commented 3 years ago

Connect and light off

realPy commented 2 years ago

Hi , Go back with resume of my current work:

I've succesfull add lots of missing packet and still not work... (default response on all manuSpecificTuya command and write sequence on 0xFFDE attributes) => not correct the problem

Have not found a way to send The End Device time out request success on herdmans ( and begin to think that's impossible without a firmware z-stack update)

I'm not expert but i think the problem is deep in z stack and can't be correct without change the z-stack firmware.

Another big difference with the 2 pairing files is the Zigbee 3 protocol:

The device try to "secure" the device on zigbee3 (https://e2e.ti.com/blogs_/b/process/posts/the-key-to-security-zigbee-3-0-s-security-features) and this feature doesn't exist on zigbee2mqtt. This is a possible reason why the device is stuck on blink light and refuse to work correctly. If we read the sequence "pairing with tuya gateway" , the secure sequence is on parallel with the read parameters.. This can be why we can get interview but not interact. As I understand the secure zigbee3 is after the interview.

The device ask the gateway capabilities with a Node Descriptor Response, Nwk Addr: 0x0000, Status: Success The tuya give a manufactor code (x1002) and a Stack compliance revision at 22 . This field is empty on zigbee2mqtt and the device not invoke a verify key.

If the zigbee3 is present, a sequence invoke a Verify Key and and confirm Key success

Possible other theory:

The device is locked on a "whitelist manufactor gateway " ( the 0x1002 ) (i will try to spoof this manufactor code if i can :/ ) :

jabber77 commented 2 years ago

have you advanced on the subject ?

dinhchinh82 commented 2 years ago

I've also tried an other Zigbee temperature sensor with LCD display and got same issue. It can be interviewed but no sensor data. https://neocoolcam.en.alibaba.com/product/1600218194302-900039197/NEO_hot_temperature_and_humidity_Sensor_tuya_App_Control_Push_Alarm_To_Smartphone_zigbee_temperature_and_humidity_Sensor.html

whiskeytangocharlie commented 2 years ago

I'm having the same problem. @Koenkk will tip you the price of a tuya gateway if you get this working for us please :P

dndll commented 2 years ago

Same problem here, it's probably waiting on that last packet to register the endpoints.

neriumrevolta commented 2 years ago

Same issue here :/

ristomatti commented 2 years ago

One more joining the club. Could someone using the Tuya gateway workaround done tell me if it's worth it to buy one just for this or rather donate the money to @Koenkk and buy two more siren devices of another type?

I bought two of these specifically going for the ugly orange color one to match the picture on the supported devices list. My intention is to have one at home and another one at vacation home. Planned use is both a simple burglar alarm but also to be able to do a short beep on high prio human errors (like forgetting the oven/stove on or not closing the freezer door properly).

Koenkk commented 2 years ago

Is this the correct link: https://nl.aliexpress.com/item/1005002631521488.html ?

michalpulda commented 2 years ago

Is this the correct link: https://nl.aliexpress.com/item/1005002631521488.html ?

I think that's another one. I bought mine here: https://www.aliexpress.com/item/1005001771868387.html

GrimDeclaw commented 2 years ago

I second @michalpulda, mine is also his link, not yours @Koenkk I'm now using deconZ, so I can no longer test anything without breaking my install, sorry

dfrome commented 2 years ago

HI, yes, we're talking about the one pointed out by @michalpulda , which we can find also referenced as a working device for zigbe2mqtt here: https://zigbee.blakadder.com/Neo_NAS-AB02B0.html