From faeeb82bb5cf471a521bec4d76d72604e65505e2 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sat, 7 Nov 2020 17:54:17 +0100 Subject: [PATCH] Zigbee fix ZbBind --- tasmota/xdrv_23_zigbee_A_impl.ino | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tasmota/xdrv_23_zigbee_A_impl.ino b/tasmota/xdrv_23_zigbee_A_impl.ino index d1a20f219..c6b12a1f5 100644 --- a/tasmota/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/xdrv_23_zigbee_A_impl.ino @@ -817,7 +817,6 @@ void ZbBindUnbind(bool unbind) { // false = bind, true = unbind if (!root) { ResponseCmndChar_P(PSTR(D_JSON_INVALID_JSON)); return; } // params - uint16_t srcDevice = BAD_SHORTADDR; // BAD_SHORTADDR is broadcast, so considered invalid uint16_t dstDevice = BAD_SHORTADDR; // BAD_SHORTADDR is broadcast, so considered invalid uint64_t dstLongAddr = 0; uint8_t endpoint = 0x00; // 0x00 is invalid for the src endpoint @@ -884,7 +883,7 @@ void ZbBindUnbind(bool unbind) { // false = bind, true = unbind } else { buf.add8(ZDO_BIND_REQ); } - buf.add16(srcDevice); + buf.add16(src_device.shortaddr); buf.add64(srcLongAddr); buf.add8(endpoint); buf.add16(cluster); @@ -916,7 +915,7 @@ void ZbBindUnbind(bool unbind) { // false = bind, true = unbind buf.add16(toGroup); } - EZ_SendZDO(srcDevice, unbind ? ZDO_UNBIND_REQ : ZDO_BIND_REQ, buf.buf(), buf.len()); + EZ_SendZDO(src_device.shortaddr, unbind ? ZDO_UNBIND_REQ : ZDO_BIND_REQ, buf.buf(), buf.len()); #endif // USE_ZIGBEE_EZSP ResponseCmndDone();