Zigbee support Philips presence sensor

This commit is contained in:
Stephan Hadinger 2020-08-25 19:54:19 +02:00
parent e11020f0c7
commit d8eae92091
1 changed files with 10 additions and 0 deletions

View File

@ -1018,6 +1018,16 @@ void ZCLFrame::parseReportAttributes(JsonObject& json, uint8_t offset) {
}
i += parseSingleAttribute(json, key, _payload, i);
}
// Issue Philips outdoor motion sensor SML002, see https://github.com/Koenkk/zigbee2mqtt/issues/897
// The sensor expects the coordinator to send a Default Response to acknowledge the attribute reporting
if (0 == _frame_control.b.disable_def_resp) {
// the device expects a default response
SBuffer buf(2);
buf.add8(_cmd_id);
buf.add8(0x00); // Status = OK
ZigbeeZCLSend_Raw(_srcaddr, 0x0000, 0x0000 /*cluster*/, _srcendpoint, ZCL_DEFAULT_RESPONSE, false /* not cluster specific */, _manuf_code, buf.getBuffer(), buf.len(), false /* noresponse */, zigbee_devices.getNextSeqNumber(_srcaddr));
}
}
// ZCL_READ_ATTRIBUTES