For those who need implemente the solution.
In the solution, thank very much the help of the developer @Trakker2 kkossev from hubitat, who has it implemented in his hubitat DTH.
He confirmed, I need to read basic cluster 0x0000, these six attributes during pairing, to unlock these Tuya devices.
tuyaBlackMagic() {return zigbee.readAttribute(0x0000, [0x0004, 0x000, 0x0001, 0x0005, 0x0007, 0xfffe], [:], delay=200)}
Thanks to @nayelyz and the smartthings team for focusing on finding a way to send the reading of the 5 attributes in a single command, which was essential for unlocking and that cannot be sent without modifying the read_attribute function of the lua libraries.
I made the modification to apply it in the driver Zigbee Multi Switch and Child Mc and passed it to @nayelyz and I donβt know if it could be implemented in the default libraries in the future
Call to modified read_attribute_function
local attr_ids = {0x0004, 0x0000, 0x0001, 0x0005, 0x0007,0xFFFE}
device:send(read_attribute_function (device, data_types.ClusterId(0x0000), attr_ids))
Modified read_attribute_function included in the driver code:
local function read_attribute_function(device, cluster_id, attr_id)
print("<<<< attr_id >>>>",utils.stringify_table(attr_id))
--local read_body = read_attribute.ReadAttribute({ attr_id })
local read_body = read_attribute.ReadAttribute( attr_id )
local zclh = zcl_messages.ZclHeader({
cmd = data_types.ZCLCommandId(read_attribute.ReadAttribute.ID)
})
local addrh = messages.AddressHeader(
zb_const.HUB.ADDR,
zb_const.HUB.ENDPOINT,
device:get_short_address(),
device:get_endpoint(cluster_id.value),
zb_const.HA_PROFILE_ID,
cluster_id.value
)
local message_body = zcl_messages.ZclMessageBody({
zcl_header = zclh,
zcl_body = read_body
})
return messages.ZigbeeMessageTx({
address_header = addrh,
body = message_body
})
end