Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.79k 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)

Koenkk 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

Thanks, ordered it.

ristomatti 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

Thanks, ordered it.

I bought from this one, 7€ less https://www.aliexpress.com/item/1005002697132083.html. Crappy to realise the nicer looking white one apparently would have been the one that works. :smile:

@Koenkk I tried sending my contribution to this effort via PayPal but somehow it redirected me to the account page after setting the sum and message. I then decided to join as a sponsor instead to support the continued awesome work you're doing!

sim0njo commented 2 years ago

Hi,

I am facing the same problems with the NAS-AB02 siren and also with a TS0215A personal alarm button (and possibly other recent bought devices). These 2 devices DO NOT work with Tasmota but do work with Tuya gateway.

Scrolling through the list of issues I found an interesting link https://e2e.ti.com/blogs_/b/process/posts/the-key-to-security-zigbee-3-0-s-security-features

It seems that Zigbee 3.0 allows for a more secure link by changing the APS key during device pairing.

What I understand is that there is a NWK (network layer) key and an APS (application support layer) key to make the link encryption secure, but the APS key seems to be well known and the NWK key can be obtained from the communication of a pairing device. Huh, secure?

This is described in several articles on how to sniff Zigbee networks, I tried it out with Boss Sniffer+Wireshark and it works as explained.

I also traced the pairing of the TS0215A with the Tuya hub and after some looking I found following sequence of msgs:

Client -> Server : Request Key Server -> Client : Transport Key Client -> Server : Verify Key Server -> Client : Confirm Key

After this sequence the APS key is replaced for that device and the device stops it's blinking led indicating successful pairing. I need to trace the pairing of the NAS-AB02 with Tuya gateway to confirm this, but I assume this will be the same.

Pressing the button on the TS0215A device results in a ZCL IAS ACE: Emergency msg being sent by the device, but strange enough I don't see the APS key, only the NWK key.

Could we from that derive that it suffices to respond to the Request Key msg during pairing to solve the issue ?

Anyway, I will do some more tracing in the next days and try to understand it.

beatmag commented 2 years ago

Been looking at this siren too.

Just wondering if any one has tried with zigbee 3.0 firmware on the cc2531?

Could it be that it needs zigbee 3?

losip commented 2 years ago

I have one of these which is exhibiting same symptoms as others have found. I also have a Tuya gateway and a CC2531 based Zboss sniffer, whose app calls Wireshark. The Tuya gateway operates this Neo alarm properly so I set about sniffing the pairing and operation. I failed dismally, possibly due to my inexperience with Wireshark because the trace was full of irrelevant stuff much of which has a different (and unknown) network key. I could see the pairing request but it shed no light.

In the end, I decided it was easier to tip @Koenkk a handful of coffees in the hope that someone with more expertise can sort it out

beatmag commented 2 years ago

Does it work properly if you use the work around? Ie pair with that gateway then pair onto cc2531.

Does it fully work?

Which tuya gateway do I need to buy? I saw a few will the zigbee 3 gateway work??

losip commented 2 years ago

@beatmag No, it resumes silence when paired with Zigbee2MQTT even after working properly with the Tuya gateway

leroyloren commented 2 years ago

Hi @Koenkk, I understand that by committing https://github.com/Koenkk/zigbee-herdsman/commit/71c89ce6cae2ce26b3d50ade7281de9d05f3fcc8 can I test the functionality of the device now? (via dev branch)

Koenkk commented 2 years ago

Good news, I got mine working 🎉

Changes will be available in the dev branch in a 4 hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html). (might require repairing of the device)

csowada commented 2 years ago

I can confirm,pairing is successful now (docker x64) 👍 . But too late to play with the different alarms here ;-)

rbert001 commented 2 years ago

Thank you.. I'll give this device a chance again !!

antfurn commented 2 years ago

What is the process for getting this awesome fix ported into ZHA?

ristomatti commented 2 years ago

Do you by any chance need batteries for the device to properly pair? Mine pairs at first but then all values but link quality are empty. Something has changed though as previously I immediately got the "No converter available" issue but now I noticed it only after some back and forth disconnecting/pairing/power cycling.

Here's the part from the log that seemd interesting. Please let me know if this is missing something. If it helps, I can also open it up and check if there's some version info.

Received Zigbee message from '0x804b50fffe046f18', type 'raw', cluster 'manuSpecificTuya', data '{"data":[9,4,17,0,6,68],"type":"Buffer"}' from endpoint 1 with groupID 0

No converter available for 'NAS-AB02B0' with cluster 'manuSpecificTuya' and type 'raw' and data '{"data":[9,4,17,0,6,68],"type":"Buffer"}'

Received Zigbee message from '0x804b50fffe046f18', type 'attributeReport', cluster 'genBasic', data '{"65503":"\u0000\u0000\u0000\u0000\u0005\u0000\u0000\u0000\u0000\u00111�\u001e)\u00122�\u001e)\u0012\u0000\u0000\u0000\u0000\u0007\u0000\u0000\u0000\u0000\u0007\u0000\u0000\u0000\u0000\u0011\u0000\u0000\u0000\u0000\u0012\u0000\u0000\u0000\u0000\u0012\u0000\u0000\u0000\u0000\f\u0000\u0000\u0000\u0000\f\u0000\u0000\u0000\u0000\u0005"}' from endpoint 1 with groupID 0

Received Zigbee message from '0x804b50fffe046f18', type 'attributeReport', cluster 'genBasic', data 
'{"65503":"\u0000\u0000\u0000\u0000\u0011̐\u001e)\u0012͐\u001e)\u0012\u0000\u0000\u0000\u0000\u0005\u0000\u0000\u0000\u0000\f\u0000\u0000\u0000\u0000\u0011��\u001e)\u0012��\u001e)\u0012"}' from endpoint 1 with groupID 0

Device is shown up this way:

image

Enjoy-Combi commented 2 years ago

Working good, melody, volume,...as expected. Thank you !

ristomatti commented 2 years ago

Is the data packet sequence logged with the "No converter found" message relevant in identifying the correct converter to use? If it is, I might be out of luck since I didn't find the same mentioned on any issue thread (besides my previous post):

No converter available for 'NAS-AB02B0' with cluster 'manuSpecificTuya' and type 'raw' and data '{"data":[9,4,17,0,6,68],"type":"Buffer"}'
Lefuneste83 commented 2 years ago

Congratulations for the debug work !!

I confirm that the alarm properly pairs in Dev Branch. In current Master branch, the alarm seems to pair as well as I get all entities published in HA, but the alarm itself keeps blinking and I get repeating "device left the network" messages every now and then in Z2M console. So the alarm itself is not happy with the pairing.

How do we know when this commit will be pushed to the master branch ?

Koenkk commented 2 years ago

fix will be included in the next release on 1 december

ristomatti commented 2 years ago

@Koenkk Sorry but did you notice my comment above? Or should I open a new issue as this clearly worked for some. Dev version unfortunately did not fix the issue on my device.

whiskeytangocharlie commented 2 years ago

This has worked for me! Thank you very much! I am a man of my word and will be donating to you @Koenkk

Koenkk commented 2 years ago

@ristomatti

ristomatti commented 2 years ago

are you sure you are on the latest-dev?

I was pretty sure I was, but I decided to double check to not waste your time. I had indeed rebuilt my Docker image with the tag latest-dev... but I had not pulled an update to the image first :man_facepalming:. It worked on the first try. Thanks @Koenkk!

The issue shall remain closed.

And for the record for others who might still be having issues:

Zigbee2MQTT version 1.22.0-dev commit: d192bbd Coordinator CC2652R (Electrolama zzh) / zStack3x0 Coordinator revision 20210708

Database entry

{
  "id": 41,
  "type": "EndDevice",
  "ieeeAddr": "0x804b50fffe046f18",
  "nwkAddr": 6881,
  "manufId": 4098,
  "manufName": "_TZE200_d0yu2xgi",
  "powerSource": "Battery",
  "modelId": "TS0601",
  "epList": [
    1
  ],
  "endpoints": {
    "1": {
      "profId": 260,
      "epId": 1,
      "devId": 81,
      "inClusterList": [
        0,
        4,
        5,
        61184
      ],
      "outClusterList": [
        25,
        10
      ],
      "clusters": {
        "genBasic": {
          "attributes": {
            "65506": 31,
            "65508": 1,
            "modelId": "TS0601",
            "manufacturerName": "_TZE200_d0yu2xgi",
            "powerSource": 3,
            "zclVersion": 3,
            "appVersion": 85,
            "stackVersion": 0,
            "hwVersion": 1,
            "dateCode": ""
          }
        }
      },
      "binds": [],
      "configuredReportings": [],
      "meta": {}
    }
  },
  "appVersion": 85,
  "stackVersion": 0,
  "hwVersion": 1,
  "dateCode": "",
  "zclVersion": 3,
  "interviewCompleted": true,
  "meta": {
    "configured": -925140590
  },
  "lastSeen": 1636913362609,
  "useImplicitCheckin": true
}

image

ristomatti commented 2 years ago

@Koenkk The duration setting seems to behave a bit weird* but I'll need to play around with it a bit to understand if this is a property of the device, bug or perhaps a side effect of the setting homeassistant_legacy_triggers: true. It would be a separate issue regardless.

*) Setting the duration has an effect if done immediately before enabling the alarm but resets to null afterwards. It also resets to null after changing any other setting.

beatmag commented 2 years ago

Hi everyone. My sirens arrive just yesterday. I updated the code to the dev branch and tried to pair the siren. It does the interview and seems ok. No errors nothing.

But the lights keep flashing and don't really get any status updates at all.

I'm on cc2531. Latest 3.0 coordinator firmware.

I pressed the reset button till it beeps once then it leaves and pairs again. But I can't get the lights to switch off and no status updates.

Can anyone think of anything?

beatmag commented 2 years ago

Forgot to mention I also don't have batteries installed into the siren yet.

ristomatti commented 2 years ago

@beatmag Batteries were not needed for me. When I properly had the dev branch running, it "just worked".

beatmag commented 2 years ago

Thanks everyone.

I followed the switch to dev instructions and now it's working fine!!!!

Getting status updates etc. will test more.

Blinking lights have disappeared.

jusxon commented 2 years ago

After updating to 1.22.1-1 and adding my second Neo NAS-AB02B0 it paired fine and everything works great, however, the other NAS-AB02B0 that I paired while on 1.22.0-3 last week still continues to blink and only shows link quality. I have tried removing it from Z2M and resetting the alarm multiple times with the reset button, but the same issue persists.

Any tips from anyone experienced using these or what are the chances the alarm is bad?

BillPil commented 2 years ago

@jusxon This is exactly what I am facing too.

Koenkk commented 2 years ago

try to reconfigure the device from the frontend (yellow refresh button)

jusxon commented 2 years ago

I was able to get it working by deleting the alarm from Z2M, resetting the alarm, pairing back to Z2M, and then reconfiguring.

BillPil commented 2 years ago

I followed the above and worked for me well too. Thanks!

whiskeytangocharlie commented 2 years ago

Is it possible to deliver a payload that does more than one thing? At the minute when I send a payload to turn the volume up and set the melody to something else it will only send the first part of the payload and turn the volume up. Payload = {"volume":"high"," melody":3} If I send Payload = {" melody":3,"volume":"high"} Then it only sets the melody and doesn't change the volume.

dfrome commented 2 years ago

hello, I upvoted this topic in April 2021, and wanted to say I'm happy it has been resolved. I updated today my zigbee2mqtt version to 1,22 and tested the siren successfully. For my original purpose (call children for dinner!), I had in between crafted a makeshift siren with an MQTT-driven-electric motor and an old bell, this has been working for months already, so I don't even know if I'm going to replace it with the NEO siren, but at least now I have an additional toy to play with...

thanks and keep up the good work.

Vladyno commented 2 years ago

Has anyone in the NR already been able to change melodies and other parameters at the same time? It's not working yet.

losip commented 2 years ago

Works for me - but I do publish separate messages for each parameter I want to change, e.g melody, volume and duration

Vladyno commented 2 years ago

@losip Would you please have a pattern of your flow there?

losip commented 2 years ago

This is what I use to make the dog bark when the postman presses the button on the door: alias: Door Bell pushed description: '' trigger:

losip commented 2 years ago

Sorry, when pasting my - signs have been changed to bullets (dots) but you get the idea

smpillai11 commented 2 years ago

@Koenkk when will this fix be available in stable for HA addon? Thanks