Skip to content

Commit

Permalink
Zigbee send Tuya 'magic spell' to unlock devices when pairing (#18144)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger committed Mar 9, 2023
1 parent 513b0fe commit d7d23c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Support for multiple MCP23008 as switch/button/relay
- Support for multiple PCF8574 as switch/button/relay
- Extended Tariff command for forced tariff (#18080)
- Zigbee send Tuya 'magic spell' to unlock devices when pairing

### Breaking Changed
- Shelly Pro 4PM using standard MCP23xxx driver and needs one time Auto-Configuration
Expand Down
10 changes: 8 additions & 2 deletions tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_8_parsers.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1395,15 +1395,21 @@ void Z_SendSimpleDescReq(uint16_t shortaddr, uint16_t groupaddr, uint16_t cluste
// Iterate among
//
void Z_SendDeviceInfoRequest(uint16_t shortaddr) {
ZCLFrame zcl(4); // message is 4 bytes
ZCLFrame zcl(12); // message is 12 bytes
zcl.shortaddr = shortaddr;
zcl.cluster = 0;
zcl.cluster = 0x0000;
zcl.cmd = ZCL_READ_ATTRIBUTES;
zcl.clusterSpecific = false;
zcl.needResponse = true;
zcl.direct = false; // discover route
zcl.payload.add16(0x0005);
zcl.payload.add16(0x0004);
// Tuya needs a magic spell reading more attributes
// cf https://github.com/zigpy/zha-device-handlers/issues/2042
zcl.payload.add16(0x0000); // Manufacturer Name
zcl.payload.add16(0x0001); // Application Version
zcl.payload.add16(0x0007); // Power Source
zcl.payload.add16(0xfffe); // Unknown
zigbeeZCLSendCmd(zcl);
}

Expand Down

0 comments on commit d7d23c7

Please sign in to comment.