mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 23:37:16 +00:00
Merge pull request #9766 from s-hadinger/zigbee_fix_zbbind
Zigbee fix ZbBind
This commit is contained in:
commit
c01a804108
@ -817,7 +817,6 @@ void ZbBindUnbind(bool unbind) { // false = bind, true = unbind
|
|||||||
if (!root) { ResponseCmndChar_P(PSTR(D_JSON_INVALID_JSON)); return; }
|
if (!root) { ResponseCmndChar_P(PSTR(D_JSON_INVALID_JSON)); return; }
|
||||||
|
|
||||||
// params
|
// 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
|
uint16_t dstDevice = BAD_SHORTADDR; // BAD_SHORTADDR is broadcast, so considered invalid
|
||||||
uint64_t dstLongAddr = 0;
|
uint64_t dstLongAddr = 0;
|
||||||
uint8_t endpoint = 0x00; // 0x00 is invalid for the src endpoint
|
uint8_t endpoint = 0x00; // 0x00 is invalid for the src endpoint
|
||||||
@ -884,7 +883,7 @@ void ZbBindUnbind(bool unbind) { // false = bind, true = unbind
|
|||||||
} else {
|
} else {
|
||||||
buf.add8(ZDO_BIND_REQ);
|
buf.add8(ZDO_BIND_REQ);
|
||||||
}
|
}
|
||||||
buf.add16(srcDevice);
|
buf.add16(src_device.shortaddr);
|
||||||
buf.add64(srcLongAddr);
|
buf.add64(srcLongAddr);
|
||||||
buf.add8(endpoint);
|
buf.add8(endpoint);
|
||||||
buf.add16(cluster);
|
buf.add16(cluster);
|
||||||
@ -916,7 +915,7 @@ void ZbBindUnbind(bool unbind) { // false = bind, true = unbind
|
|||||||
buf.add16(toGroup);
|
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
|
#endif // USE_ZIGBEE_EZSP
|
||||||
|
|
||||||
ResponseCmndDone();
|
ResponseCmndDone();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user