zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Support for Aqara motion sensor T1 (RTCGQ12LM; lumi.motion.agl02)

Open Otnow opened this issue 5 years ago • 66 comments

Information about the device + link

Aqara motion sensor T1 (RTCGQ12LM; lumi.motion.agl02)

It has 1 parameter for customization:

  • Detection period (2-199s, step: 1s) - although stated 1-200s

RTCGQ12LM

  • https://www.aqara.com/cn/productDetail/d17 (https://www.aqara.com/cn/productInner/d17)
  • https://fccid.io/2AKIT-AS011
  • https://www.reddit.com/r/Aqara/comments/kuskin/quick_test_aqara_motion_sensor_t1_rtcgq12lm/
  • https://aliexpress.com/item/1005001889397376.html?&sku_id=12000018069572598

data/database.db entry of the device

{"id":46,"type":"EndDevice","ieeeAddr":"0x04cf8cdf3c7fd37e","nwkAddr":56004,"manufId":4447,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.motion.agl02","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":263,"inClusterList":[0,1030,3,1],"outClusterList":[3,25],"clusters":{"genBasic":{"attributes":{"modelId":"lumi.motion.agl02","manufacturerName":"LUMI","powerSource":3,"zclVersion":3,"appVersion":29,"stackVersion":2,"hwVersion":1,"dateCode":"20200327","swBuildId":"2019\u0000www."}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":29,"stackVersion":2,"hwVersion":1,"dateCode":"20200327","swBuildId":"2019\u0000www.","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1610396769681}

Additional info

Zigbee2mqtt pairing log
  • Zigbee2MQTT:debug 2021-01-11 23:25:46: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
  • Zigbee2MQTT:info 2021-01-11 23:25:46: Zigbee: allowing new devices to join.
  • Zigbee2MQTT:info 2021-01-11 23:25:47: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":104,"product":0,"revision":"0x26680700","transportrev":0},"type":"ConBee2/RaspBee2"},"log_level":"debug","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.17.0"}'
  • Zigbee2MQTT:info 2021-01-11 23:25:57: Device '0x04cf8cdf3c7fd37e' joined
  • Zigbee2MQTT:info 2021-01-11 23:25:57: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_joined"}'
  • Zigbee2MQTT:info 2021-01-11 23:25:57: Starting interview of '0x04cf8cdf3c7fd37e'
  • Zigbee2MQTT:info 2021-01-11 23:25:57: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"started"},"type":"device_interview"}'
  • Zigbee2MQTT:info 2021-01-11 23:25:57: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_connected"}'
  • Zigbee2MQTT:info 2021-01-11 23:25:57: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"pairing"}'
  • Zigbee2MQTT:debug 2021-01-11 23:26:01: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.agl02"}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:01: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:02: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:02: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:03: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:03: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:04: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:04: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:05: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"appVersion":29}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:05: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:06: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:06: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:07: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:07: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:08: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20200327"}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:08: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:debug 2021-01-11 23:26:09: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-11 23:26:09: Skipping message, definition is undefined and still interviewing
  • Zigbee2MQTT:info 2021-01-11 23:26:09: Successfully interviewed '0x04cf8cdf3c7fd37e', device has successfully been paired
  • Zigbee2MQTT:warn 2021-01-11 23:26:09: Device '0x04cf8cdf3c7fd37e' with Zigbee model 'lumi.motion.agl02' and manufacturer name 'LUMI' is NOT supported, please follow https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
  • Zigbee2MQTT:info 2021-01-11 23:26:09: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":null,"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"successful","supported":false},"type":"device_interview"}'
  • Zigbee2MQTT:info 2021-01-11 23:26:09: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"date_code":"20200327","definition":null,"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":56004,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":false,"type":"EndDevice"}]'
  • Zigbee2MQTT:info 2021-01-11 23:26:09: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"friendly_name":"0x04cf8cdf3c7fd37e","supported":false},"type":"pairing"}'
Dump zigbee-packets with ZBOSS Sniffer and Wireshark

The dump was made according to this instruction:

Recorded events in the dump:

  • sensor pairing
  • changing sensor settings
    • Detection period = 199s - dump entry №121
    • Detection period = 2s - dump entry №183
  • motion detections

Environment:

  • Sensor firmware version: 0.0.0_0029
  • Aqara Hub M1S (ZHWG15LM) firmware version: 3.1.0_0005.0517
  • Aqara Home app version: 2.2.4

Otnow avatar Jan 11 '21 20:01 Otnow

Try with adding to devices.js

    {
        zigbeeModel: ['lumi.motion.agl02'],
        model: 'RTCGQ12LM',
        vendor: 'Xiaomi',
        description: 'Aqara human body movement and illuminance sensor',
        meta: {battery: {voltageToPercentage: '3V_2100'}},
        fromZigbee: [fz.xiaomi_battery, fz.occupancy_with_timeout, fz.RTCGQ11LM_illuminance, fz.RTCGQ11LM_interval],
        toZigbee: [],
        exposes: [e.battery(), e.occupancy(), e.illuminance_lux().withProperty('illuminance'),
            e.illuminance().withUnit('lx').withDescription('Measured illuminance in lux')],
    },

sjorge avatar Jan 11 '21 21:01 sjorge

Try with adding to devices.js

Zigbee2mqtt pairing log with modify devices.js
  • Zigbee2MQTT:debug 2021-01-12 00:30:03: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
  • Zigbee2MQTT:info 2021-01-12 00:30:03: Zigbee: allowing new devices to join.
  • Zigbee2MQTT:info 2021-01-12 00:30:04: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":104,"product":0,"revision":"0x26680700","transportrev":0},"type":"ConBee2/RaspBee2"},"log_level":"debug","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.17.0"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:13: Device '0x04cf8cdf3c7fd37e' joined
  • Zigbee2MQTT:info 2021-01-12 00:30:13: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_joined"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:13: Starting interview of '0x04cf8cdf3c7fd37e'
  • Zigbee2MQTT:info 2021-01-12 00:30:13: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"started"},"type":"device_interview"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:13: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_connected"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:13: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"pairing"}'
  • Zigbee2MQTT:debug 2021-01-12 00:30:19: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.agl02"}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:20: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:21: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:22: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:23: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"appVersion":29}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:24: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:25: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:26: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20200327"}' from endpoint 1 with groupID null
  • Zigbee2MQTT:debug 2021-01-12 00:30:27: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID null
  • Zigbee2MQTT:info 2021-01-12 00:30:27: Successfully interviewed '0x04cf8cdf3c7fd37e', device has successfully been paired
  • Zigbee2MQTT:info 2021-01-12 00:30:27: Device '0x04cf8cdf3c7fd37e' is supported, identified as: Xiaomi Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Measured illuminance in lux","name":"illuminance_lux","property":"illuminance","type":"numeric","unit":"lx"},{"access":1,"description":"Measured illuminance in lux","name":"illuminance","property":"illuminance","type":"numeric","unit":"lx"},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"successful","supported":true},"type":"device_interview"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance_lux/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance lux","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_lux_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"date_code":"20200327","definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Measured illuminance in lux","name":"illuminance_lux","property":"illuminance","type":"numeric","unit":"lx"},{"access":1,"description":"Measured illuminance in lux","name":"illuminance","property":"illuminance","type":"numeric","unit":"lx"},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":42597,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":true,"type":"EndDevice"}]'
  • Zigbee2MQTT:info 2021-01-12 00:30:27: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara T1 human body movement and illuminance sensor","friendly_name":"0x04cf8cdf3c7fd37e","model":"RTCGQ12LM","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
  • Zigbee2MQTT:debug 2021-01-12 00:30:27: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
  • Zigbee2MQTT:debug 2021-01-12 00:30:27: Received MQTT message on 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
  • Zigbee2MQTT:debug 2021-01-12 00:30:27: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance_lux/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance lux","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_lux_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
  • Zigbee2MQTT:debug 2021-01-12 00:30:27: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
  • Zigbee2MQTT:debug 2021-01-12 00:30:27: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'

After pairing, no sensor events appear.

Sensor exposes in Web-interface:

battery - N/A % occupancy - N/A illuminance_lux - N/A lx illuminance - N/A lx linkquality - 47 lqi

Otnow avatar Jan 11 '21 22:01 Otnow

If you remove all entries from fromZigbee, restart z2m... do any messages show up for missing converters?

sjorge avatar Jan 11 '21 22:01 sjorge

If you remove all entries from fromZigbee, restart z2m... do any messages show up for missing converters?

Only such events appeared
  • Zigbee2MQTT:debug 2021-01-12 01:27:45: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"modelId":"lumi.motion.agl02"}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:46: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"manufacturerName":"LUMI"}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:47: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"powerSource":3}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:48: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"zclVersion":3}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:49: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"appVersion":29}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:50: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"stackVersion":2}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:51: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"hwVersion":1}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:52: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"dateCode":"20200327"}'
  • Zigbee2MQTT:debug 2021-01-12 01:27:53: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"swBuildId":"2019\u0000www."}'

Moreover, after listening to the zigbee-traffic, I see that the sensor does not respond to movement (there are no corresponding events - "Report Attributes") after pairing with the zigbee-stick.

Otnow avatar Jan 11 '21 22:01 Otnow

@Otnow I think you have to sniff the traffic with the original gateway as we need to figure out how to configure the detection period. So start sniffing, pair it with the gateway, change detection period. https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

Koenkk avatar Jan 12 '21 19:01 Koenkk

@Otnow I think you have to sniff the traffic with the original gateway as we need to figure out how to configure the detection period. So start sniffing, pair it with the gateway, change detection period. https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

I already made such a dump in advance and placed it in the initial post in the Additional info section under the spoiler Dump zigbee-packets with ZBOSS Sniffer and Wireshark )

Otnow avatar Jan 12 '21 23:01 Otnow

@Otnow sorry for being blind. I've created an initial pr, it only allows setting the detection period: https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files

Seems that something non standard is used for occupancy. Can you provide the packet numbers of occupancy: true and false (please provide multiple)

Koenkk avatar Jan 13 '21 18:01 Koenkk

Seems that something non standard is used for occupancy. Can you provide the packet numbers of occupancy: true and false (please provide multiple)

When motion is detected, only 1 event is generated: dump entries № 214, 220, 226, 232, 238, 244, 251, 257, 263 (events were generated every 2 seconds, because detection period = 2s). There are no events at the end of the detection period.

Otnow avatar Jan 13 '21 18:01 Otnow

By analogy with the Aqara T1 temperature, humidity and pressure sensor (WSDCGQ12LM), this code:

{
    zigbeeModel: ['lumi.motion.agl02'],
    model: 'RTCGQ12LM',
    vendor: 'Xiaomi',
    description: 'Aqara T1 human body movement and illuminance sensor',
    fromZigbee: [],
    toZigbee: [],
    meta: {},
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        const binds = ['msOccupancySensing'];			
        await reporting.bind(endpoint, coordinatorEndpoint, binds);
    },
	exposes: [],
},

allows you to generate a motion detection event in the log:

  • Zigbee2MQTT:debug 2021-01-13 22:16:02: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
  • Zigbee2MQTT:debug 2021-01-13 22:16:02: No converter available for 'RTCGQ12LM' with cluster 'msOccupancySensing' and type 'attributeReport' and data '{"occupancy":1}'
  • Zigbee2MQTT:debug 2021-01-13 22:18:00: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
  • Zigbee2MQTT:debug 2021-01-13 22:18:00: No converter available for 'RTCGQ12LM' with cluster 'msOccupancySensing' and type 'attributeReport' and data '{"occupancy":0}'

Otnow avatar Jan 13 '21 19:01 Otnow

Can you check updates of https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files?

Following should work now: occupancy, illuminance and battery (please check carefully in the logs if configure is succesfull, you can force it via https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgerequestdeviceconfigure)

Koenkk avatar Jan 13 '21 20:01 Koenkk

Can you check updates of https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files?

The test showed that motion events appear, but the set detection period is not observed, although the parameter is set normally. Also, illuminance and battery power are not displayed.

Log
  • debug 2021-01-14 00:55:18: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
  • info 2021-01-14 00:55:18: Zigbee: allowing new devices to join.
  • info 2021-01-14 00:55:18: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":true,"version":"1.17.0"}'
  • info 2021-01-14 00:55:30: Device '0x04cf8cdf3c7fd37e' joined
  • info 2021-01-14 00:55:30: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_joined"}'
  • info 2021-01-14 00:55:30: Starting interview of '0x04cf8cdf3c7fd37e'
  • info 2021-01-14 00:55:30: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"started"},"type":"device_interview"}'
  • info 2021-01-14 00:55:30: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_connected"}'
  • info 2021-01-14 00:55:30: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"pairing"}'
  • debug 2021-01-14 00:55:31: Device '0x04cf8cdf3c7fd37e' announced itself
  • info 2021-01-14 00:55:31: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_announce"}'
  • info 2021-01-14 00:55:31: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_announced"}'
  • debug 2021-01-14 00:55:34: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.agl02"}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:34: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"modelId":"lumi.motion.agl02"}'
  • debug 2021-01-14 00:55:35: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:35: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"manufacturerName":"LUMI"}'
  • debug 2021-01-14 00:55:38: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:38: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"powerSource":3}'
  • debug 2021-01-14 00:55:39: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:39: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"zclVersion":3}'
  • debug 2021-01-14 00:55:40: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"appVersion":29}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:40: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"appVersion":29}'
  • debug 2021-01-14 00:55:41: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:41: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"stackVersion":2}'
  • debug 2021-01-14 00:55:42: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:42: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"hwVersion":1}'
  • debug 2021-01-14 00:55:43: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20200327"}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:43: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"dateCode":"20200327"}'
  • debug 2021-01-14 00:55:44: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID 0
  • debug 2021-01-14 00:55:44: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"swBuildId":"2019\u0000www."}'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
  • info 2021-01-14 00:55:44: Successfully interviewed '0x04cf8cdf3c7fd37e', device has successfully been paired
  • info 2021-01-14 00:55:44: Device '0x04cf8cdf3c7fd37e' is supported, identified as: Xiaomi Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)
  • info 2021-01-14 00:55:44: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"successful","supported":true},"type":"device_interview"}'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"definition":null,"endpoints":{"1":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"10":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"11":{"bindings":[],"clusters":{"input":["ssIasAce"],"output":["ssIasZone","ssIasWd"]},"configured_reportings":[]},"110":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"12":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"13":{"bindings":[],"clusters":{"input":["genOta"],"output":[]},"configured_reportings":[]},"2":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"242":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"3":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"4":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"47":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"5":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"6":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"8":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]}},"friendly_name":"Coordinator","ieee_address":"0x00124b0014d9f126","interview_completed":true,"interviewing":false,"network_address":0,"supported":false,"type":"Coordinator"},{"date_code":"20200327","definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":2171,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":true,"type":"EndDevice"}]'
  • info 2021-01-14 00:55:44: Configuring '0x04cf8cdf3c7fd37e'
  • info 2021-01-14 00:55:44: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara T1 human body movement and illuminance sensor","friendly_name":"0x04cf8cdf3c7fd37e","model":"RTCGQ12LM","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
  • debug 2021-01-14 00:55:44: Received MQTT message on 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
  • debug 2021-01-14 00:55:44: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
  • debug 2021-01-14 00:55:44: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
  • debug 2021-01-14 00:55:44: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
  • debug 2021-01-14 00:55:44: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
  • debug 2021-01-14 00:55:47: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'genPowerCfg', data '{"batteryVoltage":31}' from endpoint 1 with groupID 0
  • info 2021-01-14 00:55:47: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":8,"linkquality":157,"occupancy":true,"voltage":3100}'
  • debug 2021-01-14 00:55:48: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
  • info 2021-01-14 00:55:48: Zigbee: disabling joining new devices.
  • debug 2021-01-14 00:55:48: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
  • info 2021-01-14 00:55:48: Zigbee: disabling joining new devices.
  • error 2021-01-14 00:55:48: Failed to configure '0x04cf8cdf3c7fd37e', attempt 1 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 genPowerCfg([{"attribute":"batteryPercentageRemaining","minimumReportInterval":3600,"maximumReportInterval":62000,"reportableChange":0}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:185:23) at Endpoint. (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:408:26) at Generator.next () at fulfilled (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:24:58))
  • info 2021-01-14 00:55:49: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":false,"version":"1.17.0"}'
  • info 2021-01-14 00:55:49: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":false,"version":"1.17.0"}'
  • debug 2021-01-14 00:56:35: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":2}'
  • debug 2021-01-14 00:56:35: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
  • info 2021-01-14 00:56:36: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":157,"occupancy":true,"voltage":3100}'
  • debug 2021-01-14 00:56:59: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
  • info 2021-01-14 00:56:59: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":134,"occupancy":true,"voltage":3100}'
  • info 2021-01-14 00:56:59: Configuring '0x04cf8cdf3c7fd37e'
  • error 2021-01-14 00:57:03: Failed to configure '0x04cf8cdf3c7fd37e', attempt 2 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 genPowerCfg([{"attribute":"batteryPercentageRemaining","minimumReportInterval":3600,"maximumReportInterval":62000,"reportableChange":0}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:185:23) at Endpoint. (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:408:26) at Generator.next () at fulfilled (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:24:58))
  • debug 2021-01-14 00:59:22: Saving state to file /share/zigbee2mqtt/state.json
  • debug 2021-01-14 01:00:30: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:00:30: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":144,"occupancy":false,"voltage":3100}'
  • info 2021-01-14 01:00:30: Configuring '0x04cf8cdf3c7fd37e'
  • error 2021-01-14 01:00:40: Failed to configure '0x04cf8cdf3c7fd37e', attempt 3 (Error: Bind 0x04cf8cdf3c7fd37e/1 msOccupancySensing from '0x00124b0014d9f126/1' failed (AREQ - ZDO - bindRsp after 10000ms) at Timeout._onTimeout (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7))
  • debug 2021-01-14 01:01:04: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:01:04: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":144,"occupancy":true,"voltage":3100}'
  • debug 2021-01-14 01:02:50: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:02:50: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":141,"occupancy":false,"voltage":3100}'
  • debug 2021-01-14 01:03:28: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":3}'
  • debug 2021-01-14 01:03:28: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
  • error 2021-01-14 01:03:38: Publish 'set' 'detection_period' to '0x04cf8cdf3c7fd37e' failed: 'Error: Write 0x04cf8cdf3c7fd37e/1 aqaraOpple({"258":{"value":3,"type":32}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null}) failed (Data request failed with error: 'Timeout' (9999))'
  • debug 2021-01-14 01:03:38: Error: Write 0x04cf8cdf3c7fd37e/1 aqaraOpple({"258":{"value":3,"type":32}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null}) failed (Data request failed with error: 'Timeout' (9999)) at ZStackAdapter. (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:339:27) at Generator.next () at fulfilled (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:24:58)
  • info 2021-01-14 01:03:38: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'detection_period' to '0x04cf8cdf3c7fd37e' failed: 'Error: Write 0x04cf8cdf3c7fd37e/1 aqaraOpple({"258":{"value":3,"type":32}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null}) failed (Data request failed with error: 'Timeout' (9999))'","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"zigbee_publish_error"}'
  • debug 2021-01-14 01:04:22: Saving state to file /share/zigbee2mqtt/state.json
  • debug 2021-01-14 01:05:13: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":2}'
  • debug 2021-01-14 01:05:13: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
  • debug 2021-01-14 01:05:16: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":3}'
  • debug 2021-01-14 01:05:16: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
  • info 2021-01-14 01:05:20: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":149,"occupancy":false,"voltage":3100}'
  • info 2021-01-14 01:05:21: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":139,"occupancy":false,"voltage":3100}'
  • debug 2021-01-14 01:05:25: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:05:25: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":162,"occupancy":true,"voltage":3100}'
  • debug 2021-01-14 01:07:11: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:07:11: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":160,"occupancy":false,"voltage":3100}'
  • debug 2021-01-14 01:08:19: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:08:19: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":162,"occupancy":true,"voltage":3100}'
  • debug 2021-01-14 01:09:22: Saving state to file /share/zigbee2mqtt/state.json
  • debug 2021-01-14 01:10:40: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:10:40: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":157,"occupancy":false,"voltage":3100}'
  • debug 2021-01-14 01:10:56: Received MQTT message on 'zigbee2mqtt/bridge/request/device/configure' with data '{"id":"0x04cf8cdf3c7fd37e","transaction":"mqqqu-1"}'
  • info 2021-01-14 01:10:56: Configuring '0x04cf8cdf3c7fd37e'
  • error 2021-01-14 01:11:00: Failed to configure '0x04cf8cdf3c7fd37e', attempt 4 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 genPowerCfg([{"attribute":"batteryPercentageRemaining","minimumReportInterval":3600,"maximumReportInterval":62000,"reportableChange":0}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:185:23) at Endpoint. (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:408:26) at Generator.next () at fulfilled (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:24:58))
  • info 2021-01-14 01:11:00: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/configure', payload '{"data":{"id":"0x04cf8cdf3c7fd37e"},"error":"Failed to configure (ConfigureReporting 0x04cf8cdf3c7fd37e/1 genPowerCfg([{"attribute":"batteryPercentageRemaining","minimumReportInterval":3600,"maximumReportInterval":62000,"reportableChange":0}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Status 'UNSUPPORTED_ATTRIBUTE'))","status":"error","transaction":"mqqqu-1"}'
  • debug 2021-01-14 01:11:01: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:11:01: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":115,"occupancy":true,"voltage":3100}'
  • debug 2021-01-14 01:12:57: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
  • info 2021-01-14 01:12:57: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":3,"linkquality":157,"occupancy":false,"voltage":3100}'

Otnow avatar Jan 13 '21 22:01 Otnow

Made some more updates to https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files, battery and illuminance should work after this

, but the set detection period is not observed, although the parameter is set normally.

I don't understand what you mean with this, can you explain it further?

Koenkk avatar Jan 15 '21 17:01 Koenkk

Made some more updates to https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files, battery and illuminance should work after this

The battery power is now displayed, but the illuminance is still not:

- Zigbee2MQTT:error 2021-01-15 20:58:32: Failed to configure '0x04cf8cdf3c7fd37e', attempt 1 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 msIlluminanceMeasurement([{"attribute":"measuredValue","minimumReportInterval":15,"maximumReportInterval":3600,"reportableChange":500}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Timeout - 9879 - 1 - 14 - 1024 - 7 after 10000ms)
    at Timeout._onTimeout (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7))
Here is this error in the form of 2 zigbee packets (command and response)
No.     Time                          Source                Destination           Protocol Length Dectination Port Info
   1214 2021-01-15 20:59:14.927202    0x0000                0x2697                ZigBee HA 69                      ZCL: Configure Reporting, Seq: 18

Frame 1214: 69 bytes on wire (552 bits), 69 bytes captured (552 bits) on interface \\.\pipe\zboss_sniffer, id 0
    Interface id: 0 (\\.\pipe\zboss_sniffer)
        Interface name: \\.\pipe\zboss_sniffer
    Encapsulation type: IEEE 802.15.4 Wireless PAN (104)
    Arrival Time: Jan 15, 2021 20:59:14.927202000 RTZ 2 (зима)
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1610733554.927202000 seconds
    [Time delta from previous captured frame: 0.007457000 seconds]
    [Time delta from previous displayed frame: 0.007457000 seconds]
    [Time since reference or first frame: 970.230916000 seconds]
    Frame Number: 1214
    Frame Length: 69 bytes (552 bits)
    Capture Length: 69 bytes (552 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: wpan:zbee_nwk:zbee_aps:zbee_zcl]
ZBOSS dump, IN, page 0, channel 15
    .... ...0 = ZBOSS Direction: IN (0x0)
    0000 000. = Page: 2.4 GHz (0)
    Channel: 15
    Trace number: 0
IEEE 802.15.4 Data, Dst: 0x2697, Src: 0x0000
    Frame Control Field: 0x8861, Frame Type: Data, Acknowledge Request, PAN ID Compression, Destination Addressing Mode: Short/16-bit, Frame Version: IEEE Std 802.15.4-2003, Source Addressing Mode: Short/16-bit
        .... .... .... .001 = Frame Type: Data (0x1)
        .... .... .... 0... = Security Enabled: False
        .... .... ...0 .... = Frame Pending: False
        .... .... ..1. .... = Acknowledge Request: True
        .... .... .1.. .... = PAN ID Compression: True
        .... .... 0... .... = Reserved: False
        .... ...0 .... .... = Sequence Number Suppression: False
        .... ..0. .... .... = Information Elements Present: False
        .... 10.. .... .... = Destination Addressing Mode: Short/16-bit (0x2)
        ..00 .... .... .... = Frame Version: IEEE Std 802.15.4-2003 (0)
        10.. .... .... .... = Source Addressing Mode: Short/16-bit (0x2)
    Sequence Number: 175
    Destination PAN: 0x1a62
    Destination: 0x2697
    Source: 0x0000
    [Extended Source: TexasIns_00:14:d9:f1:26 (00:12:4b:00:14:d9:f1:26)]
    [Origin: 1]
    TI CC24xx-format metadata: FCS OK
        FCS Valid: True
        RSSI: -30 dB
        LQI Correlation Value: 108
ZigBee Network Layer Data, Dst: 0x2697, Src: 0x0000
    Frame Control Field: 0x0248, Frame Type: Data, Discover Route: Enable, Security Data
        .... .... .... ..00 = Frame Type: Data (0x0)
        .... .... ..00 10.. = Protocol Version: 2
        .... .... 01.. .... = Discover Route: Enable (0x1)
        .... ...0 .... .... = Multicast: False
        .... ..1. .... .... = Security: True
        .... .0.. .... .... = Source Route: False
        .... 0... .... .... = Destination: False
        ...0 .... .... .... = Extended Source: False
        ..0. .... .... .... = End Device Initiator: False
    Destination: 0x2697
    Source: 0x0000
    Radius: 30
    Sequence Number: 55
    [Extended Source: TexasIns_00:14:d9:f1:26 (00:12:4b:00:14:d9:f1:26)]
    [Origin: 1]
    ZigBee Security Header
        Security Control Field: 0x28, Key Id: Network Key, Extended Nonce
            ...0 1... = Key Id: Network Key (0x1)
            ..1. .... = Extended Nonce: True
        Frame Counter: 57977
        Extended Source: TexasIns_00:14:d9:f1:26 (00:12:4b:00:14:d9:f1:26)
        Key Sequence Number: 0
        Message Integrity Code: c4150f96
        [Key: 01030507090b0d0f00020406080a0c0d]
        [Key Origin: 24]
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Illuminance Measurement (0x0400)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 107
ZigBee Cluster Library Frame, Command: Configure Reporting, Seq: 18
    Frame Control Field: Profile-wide (0x10)
        .... ..00 = Frame Type: Profile-wide (0x0)
        .... .0.. = Manufacturer Specific: False
        .... 0... = Direction: Client to Server
        ...1 .... = Disable Default Response: True
    Sequence Number: 18
    Command: Configure Reporting (0x06)
    Reporting Configuration Record
        Direction: Reported (0x00)
        Attribute: Measured Value (0x0000)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Measured Value: 500 (=0.122018 [lx])
    Minimum Interval: 15
    Maximum Interval: 3600

No.     Time                          Source                Destination           Protocol Length Dectination Port Info
   1216 2021-01-15 20:59:14.931213    0x2697                0x0000                ZigBee HA 61                      ZCL: Default Response, Seq: 18

Frame 1216: 61 bytes on wire (488 bits), 61 bytes captured (488 bits) on interface \\.\pipe\zboss_sniffer, id 0
    Interface id: 0 (\\.\pipe\zboss_sniffer)
        Interface name: \\.\pipe\zboss_sniffer
    Encapsulation type: IEEE 802.15.4 Wireless PAN (104)
    Arrival Time: Jan 15, 2021 20:59:14.931213000 RTZ 2 (зима)
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1610733554.931213000 seconds
    [Time delta from previous captured frame: 0.001768000 seconds]
    [Time delta from previous displayed frame: 0.001768000 seconds]
    [Time since reference or first frame: 970.234927000 seconds]
    Frame Number: 1216
    Frame Length: 61 bytes (488 bits)
    Capture Length: 61 bytes (488 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: wpan:zbee_nwk:zbee_aps:zbee_zcl]
ZBOSS dump, IN, page 0, channel 15
    .... ...0 = ZBOSS Direction: IN (0x0)
    0000 000. = Page: 2.4 GHz (0)
    Channel: 15
    Trace number: 0
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x2697
    Frame Control Field: 0x8861, Frame Type: Data, Acknowledge Request, PAN ID Compression, Destination Addressing Mode: Short/16-bit, Frame Version: IEEE Std 802.15.4-2003, Source Addressing Mode: Short/16-bit
        .... .... .... .001 = Frame Type: Data (0x1)
        .... .... .... 0... = Security Enabled: False
        .... .... ...0 .... = Frame Pending: False
        .... .... ..1. .... = Acknowledge Request: True
        .... .... .1.. .... = PAN ID Compression: True
        .... .... 0... .... = Reserved: False
        .... ...0 .... .... = Sequence Number Suppression: False
        .... ..0. .... .... = Information Elements Present: False
        .... 10.. .... .... = Destination Addressing Mode: Short/16-bit (0x2)
        ..00 .... .... .... = Frame Version: IEEE Std 802.15.4-2003 (0)
        10.. .... .... .... = Source Addressing Mode: Short/16-bit (0x2)
    Sequence Number: 17
    Destination PAN: 0x1a62
    Destination: 0x0000
    Source: 0x2697
    [Extended Source: XIAOMIEl_df:3c:7f:d3:7e (04:cf:8c:df:3c:7f:d3:7e)]
    [Origin: 845]
    TI CC24xx-format metadata: FCS OK
        FCS Valid: True
        RSSI: -30 dB
        LQI Correlation Value: 108
ZigBee Network Layer Data, Dst: 0x0000, Src: 0x2697
    Frame Control Field: 0x0248, Frame Type: Data, Discover Route: Enable, Security Data
        .... .... .... ..00 = Frame Type: Data (0x0)
        .... .... ..00 10.. = Protocol Version: 2
        .... .... 01.. .... = Discover Route: Enable (0x1)
        .... ...0 .... .... = Multicast: False
        .... ..1. .... .... = Security: True
        .... .0.. .... .... = Source Route: False
        .... 0... .... .... = Destination: False
        ...0 .... .... .... = Extended Source: False
        ..0. .... .... .... = End Device Initiator: False
    Destination: 0x0000
    Source: 0x2697
    Radius: 30
    Sequence Number: 42
    [Extended Source: XIAOMIEl_df:3c:7f:d3:7e (04:cf:8c:df:3c:7f:d3:7e)]
    [Origin: 845]
    ZigBee Security Header
        Security Control Field: 0x28, Key Id: Network Key, Extended Nonce
            ...0 1... = Key Id: Network Key (0x1)
            ..1. .... = Extended Nonce: True
        Frame Counter: 36
        Extended Source: XIAOMIEl_df:3c:7f:d3:7e (04:cf:8c:df:3c:7f:d3:7e)
        Key Sequence Number: 0
        Message Integrity Code: fb2d750d
        [Key: 01030507090b0d0f00020406080a0c0d]
        [Key Origin: 24]
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Illuminance Measurement (0x0400)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 35
ZigBee Cluster Library Frame, Command: Default Response, Seq: 18
    Frame Control Field: Profile-wide (0x18)
        .... ..00 = Frame Type: Profile-wide (0x0)
        .... .0.. = Manufacturer Specific: False
        .... 1... = Direction: Server to Client
        ...1 .... = Disable Default Response: True
    Sequence Number: 18
    Command: Default Response (0x0b)
    Response to Command: 0x06
    Status: Unsupported Cluster (0xc3)

I don't understand what you mean with this, can you explain it further?

I set the detection period = 5s:

- Zigbee2MQTT:debug 2021-01-15 20:59:05: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":5}'
- Zigbee2MQTT:debug 2021-01-15 20:59:05: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'

But the generated events of the beginning and the end of the movement show the delay significantly more than 5s, in fact - 106s:

- Zigbee2MQTT:debug 2021-01-15 21:02:22: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 21:02:22: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":5,"linkquality":136,"occupancy":true,"voltage":3100}'
- Zigbee2MQTT:debug 2021-01-15 21:04:08: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 21:04:08: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":5,"linkquality":136,"occupancy":false,"voltage":3100}'
Full Log
- Zigbee2MQTT:debug 2021-01-15 20:57:39: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
- Zigbee2MQTT:info  2021-01-15 20:57:39: Zigbee: allowing new devices to join.
- Zigbee2MQTT:info  2021-01-15 20:57:39: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":true,"version":"1.17.0"}'
- Zigbee2MQTT:info  2021-01-15 20:57:49: Device '0x04cf8cdf3c7fd37e' joined
- Zigbee2MQTT:info  2021-01-15 20:57:49: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_joined"}'
- Zigbee2MQTT:info  2021-01-15 20:57:49: Starting interview of '0x04cf8cdf3c7fd37e'
- Zigbee2MQTT:info  2021-01-15 20:57:49: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"started"},"type":"device_interview"}'
- Zigbee2MQTT:info  2021-01-15 20:57:49: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_connected"}'
- Zigbee2MQTT:info  2021-01-15 20:57:49: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"pairing"}'
- Zigbee2MQTT:debug 2021-01-15 20:57:50: Device '0x04cf8cdf3c7fd37e' announced itself
- Zigbee2MQTT:info  2021-01-15 20:57:50: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_announce"}'
- Zigbee2MQTT:info  2021-01-15 20:57:50: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_announced"}'
- Zigbee2MQTT:debug 2021-01-15 20:57:52: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.agl02"}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:57:53: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"modelId":"lumi.motion.agl02"}'
- Zigbee2MQTT:debug 2021-01-15 20:57:53: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:57:53: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"manufacturerName":"LUMI"}'
- Zigbee2MQTT:debug 2021-01-15 20:57:56: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:57:56: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"powerSource":3}'
- Zigbee2MQTT:debug 2021-01-15 20:57:57: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:57:57: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"zclVersion":3}'
- Zigbee2MQTT:debug 2021-01-15 20:57:58: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"appVersion":29}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:57:58: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"appVersion":29}'
- Zigbee2MQTT:debug 2021-01-15 20:57:59: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:58:00: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"stackVersion":2}'
- Zigbee2MQTT:debug 2021-01-15 20:58:01: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:58:01: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"hwVersion":1}'
- Zigbee2MQTT:debug 2021-01-15 20:58:02: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20200327"}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:58:02: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"dateCode":"20200327"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:03: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID 0
- Zigbee2MQTT:debug 2021-01-15 20:58:03: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"swBuildId":"2019\u0000www."}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: Successfully interviewed '0x04cf8cdf3c7fd37e', device has successfully been paired
- Zigbee2MQTT:info  2021-01-15 20:58:03: Device '0x04cf8cdf3c7fd37e' is supported, identified as: Xiaomi Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"successful","supported":true},"type":"device_interview"}'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"definition":null,"endpoints":{"1":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"10":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"11":{"bindings":[],"clusters":{"input":["ssIasAce"],"output":["ssIasZone","ssIasWd"]},"configured_reportings":[]},"110":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"12":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"13":{"bindings":[],"clusters":{"input":["genOta"],"output":[]},"configured_reportings":[]},"2":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"242":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"3":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"4":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"47":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"5":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"6":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"8":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]}},"friendly_name":"Coordinator","ieee_address":"0x00124b0014d9f126","interview_completed":true,"interviewing":false,"network_address":0,"supported":false,"type":"Coordinator"},{"date_code":"20200327","definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":9879,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":true,"type":"EndDevice"}]'
- Zigbee2MQTT:info  2021-01-15 20:58:03: Configuring '0x04cf8cdf3c7fd37e'
- Zigbee2MQTT:info  2021-01-15 20:58:03: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara T1 human body movement and illuminance sensor","friendly_name":"0x04cf8cdf3c7fd37e","model":"RTCGQ12LM","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:03: Received MQTT message on 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:03: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:03: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:03: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:03: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
- Zigbee2MQTT:debug 2021-01-15 20:58:06: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'genPowerCfg', data '{"batteryVoltage":31}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 20:58:06: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"linkquality":136,"voltage":3100}'
- Zigbee2MQTT:debug 2021-01-15 20:58:14: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
- Zigbee2MQTT:info  2021-01-15 20:58:14: Zigbee: disabling joining new devices.
- Zigbee2MQTT:debug 2021-01-15 20:58:14: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
- Zigbee2MQTT:info  2021-01-15 20:58:14: Zigbee: disabling joining new devices.
- Zigbee2MQTT:info  2021-01-15 20:58:14: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":false,"version":"1.17.0"}'
- Zigbee2MQTT:info  2021-01-15 20:58:14: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"1.17.0","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":false,"version":"1.17.0"}'
- Zigbee2MQTT:error 2021-01-15 20:58:32: Failed to configure '0x04cf8cdf3c7fd37e', attempt 1 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 msIlluminanceMeasurement([{"attribute":"measuredValue","minimumReportInterval":15,"maximumReportInterval":3600,"reportableChange":500}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Timeout - 9879 - 1 - 14 - 1024 - 7 after 10000ms)
    at Timeout._onTimeout (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7))
- Zigbee2MQTT:debug 2021-01-15 20:58:56: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 20:58:56: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"linkquality":105,"occupancy":true,"voltage":3100}'
- Zigbee2MQTT:info  2021-01-15 20:58:56: Configuring '0x04cf8cdf3c7fd37e'
- Zigbee2MQTT:debug 2021-01-15 20:59:05: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":5}'
- Zigbee2MQTT:debug 2021-01-15 20:59:05: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
- Zigbee2MQTT:error 2021-01-15 20:59:25: Failed to configure '0x04cf8cdf3c7fd37e', attempt 2 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 msIlluminanceMeasurement([{"attribute":"measuredValue","minimumReportInterval":15,"maximumReportInterval":3600,"reportableChange":500}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Timeout - 9879 - 1 - 18 - 1024 - 7 after 10000ms)
    at Timeout._onTimeout (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7))
- Zigbee2MQTT:info  2021-01-15 20:59:25: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":5,"linkquality":131,"occupancy":true,"voltage":3100}'
- Zigbee2MQTT:debug 2021-01-15 21:01:02: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 21:01:02: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":5,"linkquality":131,"occupancy":false,"voltage":3100}'
- Zigbee2MQTT:info  2021-01-15 21:01:02: Configuring '0x04cf8cdf3c7fd37e'
- Zigbee2MQTT:error 2021-01-15 21:01:30: Failed to configure '0x04cf8cdf3c7fd37e', attempt 3 (Error: ConfigureReporting 0x04cf8cdf3c7fd37e/1 msIlluminanceMeasurement([{"attribute":"measuredValue","minimumReportInterval":15,"maximumReportInterval":3600,"reportableChange":500}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'Timeout' (9999))
    at ZStackAdapter.<anonymous> (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:339:27)
    at Generator.next (<anonymous>)
    at fulfilled (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:24:58))
- Zigbee2MQTT:debug 2021-01-15 21:01:58: Saving state to file /share/zigbee2mqtt/state.json
- Zigbee2MQTT:debug 2021-01-15 21:02:22: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 21:02:22: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":5,"linkquality":136,"occupancy":true,"voltage":3100}'
- Zigbee2MQTT:debug 2021-01-15 21:04:08: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":0}' from endpoint 1 with groupID 0
- Zigbee2MQTT:info  2021-01-15 21:04:08: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":5,"linkquality":136,"occupancy":false,"voltage":3100}'

Otnow avatar Jan 15 '21 18:01 Otnow

@Otnow can you provide a sniff with the Xiaomi gateway from pairing till a illuminance report is send?

Koenkk avatar Jan 16 '21 11:01 Koenkk

@Otnow can you provide a sniff with the Xiaomi gateway from pairing till a illuminance report is send?

RTCGQ12LM_2.pcapng.gz - encrypted pcapng-dump (Network Key for decryption entries: 21724f48ad8ebbc4f96ae7000506d3fc) RTCGQ12LM_2.zip - decrypted plain text dump

Recorded events in the dump:

  • sensor pairing
  • №75 - gateway wrote attribute 0x00ff (?)
  • №79 - sensor reported attribute 0x00ff (?)
  • №83 - sensor reported attribute 0x0020 (Battery Voltage)
  • №85 - sensor reported attribute 0x00f7 (?)
  • №93 - sensor reported attribute 0x00f7 (?)
  • №136 - gateway wrote attribute 0x0102 = 2 (I set in the app: detection period = 2s)
  • №233 - sensor reported attribute 0x0112 = 65543 (in the app is displayed as motion event with 7 Lux)
  • №299 - sensor reported attribute 0x0112 = 65603 (in the app is displayed as motion event with 67 Lux)
  • №384 - sensor reported attribute 0x0112 = 65543 (in the app is displayed as motion event with 7 Lux)
  • №392 - sensor reported attribute 0x0112 = 65595 (in the app is displayed as motion event with 59 Lux)

Otnow avatar Jan 16 '21 19:01 Otnow

Can you update to the latest zigbee2mqtt dev branch first (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html), apply latest changes from https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079 and check if illuminance is reported now?

Can you also provide a sniff when pairing it with Zigbee2MQTT?

Koenkk avatar Jan 16 '21 20:01 Koenkk

Can you update to the latest zigbee2mqtt dev branch first (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html), apply latest changes from Koenkk/zigbee-herdsman-converters#2079 and check if illuminance is reported now? Can you also provide a sniff when pairing it with Zigbee2MQTT?

After pairing the sensor with a zigbee-stick, no motion events are generated in zigbee-traffic. Accordingly, they are not in the Zigbee2MQTT log either, as are the illuminance values. The battery power value is not detected again. It was only possible to set the value of the detection period.

Zigbee2mqtt log
- info  2021-01-18 03:41:36: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"2ef2c54","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":false,"version":"1.17.0-dev"}'
- debug 2021-01-18 03:41:57: Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"transaction":"f3bml-2","value":true}'
- info  2021-01-18 03:41:57: Zigbee: allowing new devices to join.
- info  2021-01-18 03:41:57: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"value":true},"status":"ok","transaction":"f3bml-2"}'
- info  2021-01-18 03:42:09: Device '0x04cf8cdf3c7fd37e' joined
- info  2021-01-18 03:42:09: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_joined"}'
- info  2021-01-18 03:42:09: Starting interview of '0x04cf8cdf3c7fd37e'
- info  2021-01-18 03:42:09: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"started"},"type":"device_interview"}'
- info  2021-01-18 03:42:09: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_connected"}'
- info  2021-01-18 03:42:09: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"pairing"}'
- debug 2021-01-18 03:42:09: Device '0x04cf8cdf3c7fd37e' announced itself
- info  2021-01-18 03:42:09: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_announce"}'
- info  2021-01-18 03:42:09: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_announced"}'
- debug 2021-01-18 03:42:12: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.agl02"}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:12: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"modelId":"lumi.motion.agl02"}'
- debug 2021-01-18 03:42:13: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:13: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"manufacturerName":"LUMI"}'
- debug 2021-01-18 03:42:16: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:16: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"powerSource":3}'
- debug 2021-01-18 03:42:17: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:17: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"zclVersion":3}'
- debug 2021-01-18 03:42:18: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"appVersion":35}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:18: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"appVersion":35}'
- debug 2021-01-18 03:42:19: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:19: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"stackVersion":2}'
- debug 2021-01-18 03:42:20: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:20: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"hwVersion":1}'
- debug 2021-01-18 03:42:21: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20201113"}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:21: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"dateCode":"20201113"}'
- debug 2021-01-18 03:42:22: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID 0
- debug 2021-01-18 03:42:22: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"swBuildId":"2019\u0000www."}'
- info  2021-01-18 03:42:22: MQTT publish: topic 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
- info  2021-01-18 03:42:22: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
- info  2021-01-18 03:42:22: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
- info  2021-01-18 03:42:22: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
- info  2021-01-18 03:42:22: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
- info  2021-01-18 03:42:22: Successfully interviewed '0x04cf8cdf3c7fd37e', device has successfully been paired
- info  2021-01-18 03:42:22: Device '0x04cf8cdf3c7fd37e' is supported, identified as: Xiaomi Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)
- info  2021-01-18 03:42:22: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"successful","supported":true},"type":"device_interview"}'
- info  2021-01-18 03:42:22: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"definition":null,"endpoints":{"1":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"10":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"11":{"bindings":[],"clusters":{"input":["ssIasAce"],"output":["ssIasZone","ssIasWd"]},"configured_reportings":[]},"110":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"12":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"13":{"bindings":[],"clusters":{"input":["genOta"],"output":[]},"configured_reportings":[]},"2":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"242":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"3":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"4":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"47":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"5":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"6":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"8":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]}},"friendly_name":"Coordinator","ieee_address":"0x00124b0014d9f126","interview_completed":true,"interviewing":false,"network_address":0,"supported":false,"type":"Coordinator"},{"date_code":"20201113","definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":7848,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":true,"type":"EndDevice"}]'
- info  2021-01-18 03:42:22: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara T1 human body movement and illuminance sensor","friendly_name":"0x04cf8cdf3c7fd37e","model":"RTCGQ12LM","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
- debug 2021-01-18 03:42:22: Received MQTT message on 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
- debug 2021-01-18 03:42:22: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
- debug 2021-01-18 03:42:22: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
- debug 2021-01-18 03:42:22: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
- debug 2021-01-18 03:42:22: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
- debug 2021-01-18 03:42:28: Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"transaction":"f3bml-3","value":false}'
- info  2021-01-18 03:42:28: Zigbee: disabling joining new devices.
- info  2021-01-18 03:42:29: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"value":false},"status":"ok","transaction":"f3bml-3"}'
- debug 2021-01-18 03:42:42: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":0}'
- debug 2021-01-18 03:42:42: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
- info  2021-01-18 03:42:43: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":0,"linkquality":92}'
- debug 2021-01-18 03:42:44: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":2}'
- debug 2021-01-18 03:42:44: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
- info  2021-01-18 03:42:44: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":120}'

RTCGQ12LM_3.pcapng.gz - encrypted pcapng-dump (Network Key for decryption entries: 01030507090b0d0f00020406080a0c0d) RTCGQ12LM_3.zip - decrypted plain text dump

Recorded events in the dump:

  • sensor pairing
  • №181 - coordinator wrote attribute 0x0102 = 2 (I set in the web-interface Zigbee2mqtt: detection period = 2s)
  • Next, I make movements in front of the sensor, but it does not respond to them (there are no corresponding events "Report Attributes", as when working with the original gateway)

Environment:

  • Sensor firmware version: 0.0.0_0035
  • Ebyte E18-2G4U04B (CC2531) firmware version: zStack30x (20190425)
  • Zigbee2mqtt version: 1.17.0-dev (2ef2c54)

Otnow avatar Jan 18 '21 01:01 Otnow

Updated https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files again, can you check what works and provide a sniff?

Koenkk avatar Jan 18 '21 16:01 Koenkk

Updated https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/files again, can you check what works and provide a sniff?

As before after pairing the sensor with a zigbee-stick, no motion events are generated in zigbee-traffic. Accordingly, they are not in the Zigbee2MQTT log either, as are the illuminance values. But the battery power value is detected again.

Zigbee2mqtt log
- info  2021-01-19 05:08:10: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"2ef2c54","coordinator":{"meta":{"maintrel":2,"majorrel":2,"minorrel":7,"product":2,"revision":20190425,"transportrev":2},"type":"zStack30x"},"log_level":"debug","network":{"channel":15,"extendedPanID":"0x00124b0014d9f126","panID":6754},"permit_join":false,"version":"1.17.0-dev"}'
- debug 2021-01-19 05:10:22: Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"transaction":"qgakc-1","value":true}'
- info  2021-01-19 05:10:22: Zigbee: allowing new devices to join.
- info  2021-01-19 05:10:22: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"value":true},"status":"ok","transaction":"qgakc-1"}'
- info  2021-01-19 05:10:36: Device '0x04cf8cdf3c7fd37e' joined
- info  2021-01-19 05:10:36: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_joined"}'
- info  2021-01-19 05:10:36: Starting interview of '0x04cf8cdf3c7fd37e'
- info  2021-01-19 05:10:36: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"started"},"type":"device_interview"}'
- info  2021-01-19 05:10:36: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_connected"}'
- info  2021-01-19 05:10:36: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"pairing"}'
- debug 2021-01-19 05:10:37: Device '0x04cf8cdf3c7fd37e' announced itself
- info  2021-01-19 05:10:37: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e"},"type":"device_announce"}'
- info  2021-01-19 05:10:37: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"0x04cf8cdf3c7fd37e"},"type":"device_announced"}'
- debug 2021-01-19 05:10:40: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.agl02"}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:40: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"modelId":"lumi.motion.agl02"}'
- debug 2021-01-19 05:10:41: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:41: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"manufacturerName":"LUMI"}'
- debug 2021-01-19 05:10:44: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:44: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"powerSource":3}'
- debug 2021-01-19 05:10:45: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:45: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"zclVersion":3}'
- debug 2021-01-19 05:10:46: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"appVersion":35}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:46: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"appVersion":35}'
- debug 2021-01-19 05:10:47: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:47: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"stackVersion":2}'
- debug 2021-01-19 05:10:48: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:48: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"hwVersion":1}'
- debug 2021-01-19 05:10:49: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20201113"}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:49: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"dateCode":"20201113"}'
- debug 2021-01-19 05:10:50: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"2019\u0000www."}' from endpoint 1 with groupID 0
- debug 2021-01-19 05:10:50: No converter available for 'RTCGQ12LM' with cluster 'genBasic' and type 'readResponse' and data '{"swBuildId":"2019\u0000www."}'
- info  2021-01-19 05:10:50: MQTT publish: topic 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
- info  2021-01-19 05:10:50: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
- info  2021-01-19 05:10:50: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
- info  2021-01-19 05:10:50: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
- info  2021-01-19 05:10:50: MQTT publish: topic 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
- info  2021-01-19 05:10:50: Successfully interviewed '0x04cf8cdf3c7fd37e', device has successfully been paired
- info  2021-01-19 05:10:50: Device '0x04cf8cdf3c7fd37e' is supported, identified as: Xiaomi Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)
- info  2021-01-19 05:10:50: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","status":"successful","supported":true},"type":"device_interview"}'
- info  2021-01-19 05:10:50: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"definition":null,"endpoints":{"1":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"10":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"11":{"bindings":[],"clusters":{"input":["ssIasAce"],"output":["ssIasZone","ssIasWd"]},"configured_reportings":[]},"110":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"12":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"13":{"bindings":[],"clusters":{"input":["genOta"],"output":[]},"configured_reportings":[]},"2":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"242":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"3":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"4":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"47":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"5":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"6":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"8":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]}},"friendly_name":"Coordinator","ieee_address":"0x00124b0014d9f126","interview_completed":true,"interviewing":false,"network_address":0,"supported":false,"type":"Coordinator"},{"date_code":"20201113","definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":15078,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":true,"type":"EndDevice"}]'
- info  2021-01-19 05:10:50: Configuring '0x04cf8cdf3c7fd37e'
- info  2021-01-19 05:10:50: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara T1 human body movement and illuminance sensor","friendly_name":"0x04cf8cdf3c7fd37e","model":"RTCGQ12LM","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
- debug 2021-01-19 05:10:50: Received MQTT message on 'homeassistant/binary_sensor/0x04cf8cdf3c7fd37e/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"motion","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
- debug 2021-01-19 05:10:50: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"battery","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e battery","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
- debug 2021-01-19 05:10:50: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"device_class":"illuminance","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e illuminance","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_illuminance_zigbee2mqtt","unit_of_measurement":"-","value_template":"{{ value_json.illuminance }}"}'
- debug 2021-01-19 05:10:50: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/detection_period/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e detection period","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_detection_period_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_period }}"}'
- debug 2021-01-19 05:10:50: Received MQTT message on 'homeassistant/sensor/0x04cf8cdf3c7fd37e/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x04cf8cdf3c7fd37e"],"manufacturer":"Xiaomi","model":"Aqara T1 human body movement and illuminance sensor (RTCGQ12LM)","name":"0x04cf8cdf3c7fd37e","sw_version":"Zigbee2MQTT 1.17.0-dev"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","name":"0x04cf8cdf3c7fd37e linkquality","state_topic":"zigbee2mqtt/0x04cf8cdf3c7fd37e","unique_id":"0x04cf8cdf3c7fd37e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
- info  2021-01-19 05:10:59: Successfully configured '0x04cf8cdf3c7fd37e'
- info  2021-01-19 05:11:01: MQTT publish: topic 'zigbee2mqtt/bridge/devices', payload '[{"definition":null,"endpoints":{"1":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"10":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"11":{"bindings":[],"clusters":{"input":["ssIasAce"],"output":["ssIasZone","ssIasWd"]},"configured_reportings":[]},"110":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"12":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"13":{"bindings":[],"clusters":{"input":["genOta"],"output":[]},"configured_reportings":[]},"2":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"242":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"3":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"4":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"47":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"5":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"6":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]},"8":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[]}},"friendly_name":"Coordinator","ieee_address":"0x00124b0014d9f126","interview_completed":true,"interviewing":false,"network_address":0,"supported":false,"type":"Coordinator"},{"date_code":"20201113","definition":{"description":"Aqara T1 human body movement and illuminance sensor","exposes":[{"access":1,"description":"Indicates whether the device detected occupancy","name":"occupancy","property":"occupancy","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Raw measured illuminance","name":"illuminance","property":"illuminance","type":"numeric"},{"access":3,"description":"Time in seconds till occupancy goes to false","name":"detection_period","property":"detection_period","type":"numeric","unit":"s","value_max":199,"value_min":2},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ12LM","vendor":"Xiaomi"},"endpoints":{"1":{"bindings":[{"cluster":"msOccupancySensing","target":{"endpoint":1,"ieee_address":"0x00124b0014d9f126","type":"endpoint"}},{"cluster":"genPowerCfg","target":{"endpoint":1,"ieee_address":"0x00124b0014d9f126","type":"endpoint"}},{"cluster":"msIlluminanceMeasurement","target":{"endpoint":1,"ieee_address":"0x00124b0014d9f126","type":"endpoint"}}],"clusters":{"input":["genBasic","msOccupancySensing","genIdentify","genPowerCfg"],"output":["genIdentify","genOta"]},"configured_reportings":[{"attribute":"batteryVoltage","cluster":"genPowerCfg","maximum_report_interval":62000,"minimum_report_interval":3600,"reportable_change":0}]}},"friendly_name":"0x04cf8cdf3c7fd37e","ieee_address":"0x04cf8cdf3c7fd37e","interview_completed":true,"interviewing":false,"model_id":"lumi.motion.agl02","network_address":15078,"power_source":"Battery","software_build_id":"2019\u0000www.","supported":true,"type":"EndDevice"}]'
- debug 2021-01-19 05:11:07: Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"transaction":"qgakc-2","value":false}'
- info  2021-01-19 05:11:07: Zigbee: disabling joining new devices.
- info  2021-01-19 05:11:07: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"value":false},"status":"ok","transaction":"qgakc-2"}'
- debug 2021-01-19 05:11:31: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":0}'
- debug 2021-01-19 05:11:31: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
- info  2021-01-19 05:11:32: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":0,"linkquality":165}'
- debug 2021-01-19 05:11:32: Received MQTT message on 'zigbee2mqtt/0x04cf8cdf3c7fd37e/set' with data '{"detection_period":2}'
- debug 2021-01-19 05:11:32: Publishing 'set' 'detection_period' to '0x04cf8cdf3c7fd37e'
- info  2021-01-19 05:11:33: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"detection_period":2,"linkquality":126}'
- debug 2021-01-19 05:11:34: Received Zigbee message from '0x04cf8cdf3c7fd37e', type 'attributeReport', cluster 'genPowerCfg', data '{"batteryVoltage":31}' from endpoint 1 with groupID 0
- info  2021-01-19 05:11:34: MQTT publish: topic 'zigbee2mqtt/0x04cf8cdf3c7fd37e', payload '{"battery":100,"detection_period":2,"linkquality":120,"voltage":3100}'

RTCGQ12LM_4.pcapng.gz - encrypted pcapng-dump (Network Key for decryption entries: 01030507090b0d0f00020406080a0c0d) RTCGQ12LM_4.zip - decrypted plain text dump

Recorded events in the dump:

  • sensor pairing
  • №258 - coordinator wrote attribute 0x0102 = 2 (I set in the web-interface Zigbee2mqtt: detection period = 2s)
  • №262 - sensor reported attribute 0x0020 (Battery Voltage)
  • Next, I make movements in front of the sensor, but it does not respond to them (there are no corresponding events "Report Attributes", as when working with the original gateway)

Environment:

  • Sensor firmware version: 0.0.0_0035
  • Ebyte E18-2G4U04B (CC2531) firmware version: zStack30x (20190425)
  • Zigbee2mqtt version: 1.17.0-dev (2ef2c54)

Otnow avatar Jan 19 '21 02:01 Otnow

Don't understand why no occupancy is reported. Can you try again with: https://github.com/Koenkk/zigbee-herdsman-converters/pull/2079/commits/79c3986231d25f4a636921e4842f9ed091170c79 with this you reported that occupancy worked.

Koenkk avatar Jan 19 '21 17:01 Koenkk