Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.15k stars 1.68k forks source link

Aqara P1 (MS -S02 or RTCGQ14LM) - all relevant data isn't coming through #14884

Closed Jens-Wymeersch closed 1 year ago

Jens-Wymeersch commented 2 years ago

What happened?

I just bought 5 new P1 Aqara motion sensors (https://www.zigbee2mqtt.io/devices/RTCGQ14LM.html). The device(s) pair normally and are recognised correctly. However, occupancy, illumination, motion_sensitivity, detection_interval, trigger_indication and device_temperature are N/A or the button doesn't work.

The values that are visible are battery, voltage and linkquality.

What did you expect to happen?

I expected that all values would be visible, instead of a few that have hardly any meaning.

How to reproduce it (minimal and precise)

As I have 5 of these devices, I tried with at least 2 - same result and tried it with my demo environment. Also resulting in the same outcome.

Zigbee2MQTT version

1.28.2

Adapter firmware version

20220219

Adapter

ZZH!

Debug log

info  2022-11-08 17:05:34: Starting interview of '0x54ef4410004e37c4'
info  2022-11-08 17:05:36: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef4410004e37c4","ieee_address":"0x54ef4410004e37c4","status":"started"},"type":"device_interview"}'
debug 2022-11-08 17:05:36: Device '0x54ef4410004e37c4' announced itself
info  2022-11-08 17:05:37: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef4410004e37c4","ieee_address":"0x54ef4410004e37c4"},"type":"device_announce"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/binary_sensor/0x54ef4410004e37c4/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"motion","name":"0x54ef4410004e37c4 occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/illuminance_lux/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"illuminance","enabled_by_default":true,"name":"0x54ef4410004e37c4 illuminance lux","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_illuminance_lux_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"illuminance","enabled_by_default":false,"name":"0x54ef4410004e37c4 illuminance","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_illuminance_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/motion_sensitivity/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:tune","name":"0x54ef4410004e37c4 motion sensitivity","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_motion_sensitivity_zigbee2mqtt","value_template":"{{ value_json.motion_sensitivity }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/select/0x54ef4410004e37c4/motion_sensitivity/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef4410004e37c4/set/motion_sensitivity","device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"entity_category":"config","icon":"mdi:tune","name":"0x54ef4410004e37c4 motion sensitivity","options":["low","medium","high"],"state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_motion_sensitivity_zigbee2mqtt","value_template":"{{ value_json.motion_sensitivity }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/detection_interval/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"enabled_by_default":false,"name":"0x54ef4410004e37c4 detection interval","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_detection_interval_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_interval }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/number/0x54ef4410004e37c4/detection_interval/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef4410004e37c4/set/detection_interval","device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"max":65535,"min":2,"name":"0x54ef4410004e37c4 detection interval","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_detection_interval_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_interval }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/switch/0x54ef4410004e37c4/switch_trigger_indicator/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef4410004e37c4/set/trigger_indicator","device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"name":"0x54ef4410004e37c4 trigger_indicator","payload_off":"false","payload_on":"true","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_switch_trigger_indicator_zigbee2mqtt","value_template":"{% if value_json.trigger_indicator %} true {% else %} false {% endif %}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/device_temperature/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef4410004e37c4 device temperature","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef4410004e37c4 battery","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/voltage/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"0x54ef4410004e37c4 voltage","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"0x54ef4410004e37c4 linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/sensor/0x54ef4410004e37c4/update_state/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"0x54ef4410004e37c4 update state","state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
debug 2022-11-08 17:05:37: Received MQTT message on 'homeassistant/binary_sensor/0x54ef4410004e37c4/update_available/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410004e37c4"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef4410004e37c4","sw_version":"0.0.0_0005"},"device_class":"update","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef4410004e37c4 update available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x54ef4410004e37c4","unique_id":"0x54ef4410004e37c4_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'
debug 2022-11-08 17:05:37: Received Zigbee message from '0x54ef4410004e37c4', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0
info  2022-11-08 17:05:38: Successfully interviewed '0x54ef4410004e37c4', device has successfully been paired
info  2022-11-08 17:05:38: Device '0x54ef4410004e37c4' is supported, identified as: Xiaomi Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)
info  2022-11-08 17:05:39: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara P1 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":"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":7,"description":". Press pairing button right before changing this otherwise it will fail.","name":"motion_sensitivity","property":"motion_sensitivity","type":"enum","values":["low","medium","high"]},{"access":7,"description":"Time interval for detecting actions. Press pairing button right before changing this otherwise it will fail.","name":"detection_interval","property":"detection_interval","type":"numeric","unit":"s","value_max":65535,"value_min":2},{"access":7,"description":"When this option is enabled then blue LED will blink once when motion is detected. Press pairing button right before changing this otherwise it will fail.","name":"trigger_indicator","property":"trigger_indicator","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Temperature of the device","name":"device_temperature","property":"device_temperature","type":"numeric","unit":"°C"},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Voltage of the battery in millivolts","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ14LM","options":[{"access":2,"description":"Time in seconds after which occupancy is cleared after detecting it (default is \"detection_interval\" + 2 seconds). The value must be equal to or greater than \"detection_interval\", and it can also be a fraction.","name":"occupancy_timeout","property":"occupancy_timeout","type":"numeric","unit":"s","value_min":0,"value_step":0.1},{"access":2,"description":"Sends a message the last time occupancy (occupancy: true) was detected. When setting this for example to [10, 60] a `{\"no_occupancy_since\": 10}` will be send after 10 seconds and a `{\"no_occupancy_since\": 60}` after 60 seconds.","item_type":"number","name":"no_occupancy_since","property":"no_occupancy_since","type":"list"},{"access":2,"description":"Calibrates the illuminance value (percentual offset), takes into effect on next report of device.","name":"illuminance_calibration","property":"illuminance_calibration","type":"numeric"},{"access":2,"description":"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.","name":"device_temperature_calibration","property":"device_temperature_calibration","type":"numeric"}],"supports_ota":true,"vendor":"Xiaomi"},"friendly_name":"0x54ef4410004e37c4","ieee_address":"0x54ef4410004e37c4","status":"successful","supported":true},"type":"device_interview"}'
info  2022-11-08 17:05:39: Configuring '0x54ef4410004e37c4'
debug 2022-11-08 17:05:39: Received Zigbee message from '0x54ef4410004e37c4', type 'readResponse', cluster 'genPowerCfg', data '{"batteryVoltage":30}' from endpoint 1 with groupID 0
info  2022-11-08 17:05:39: MQTT publish: topic 'zigbee2mqtt/0x54ef4410004e37c4', payload '{"battery":100,"detection_interval":null,"device_temperature":null,"illuminance":null,"linkquality":185,"motion_sensitivity":null,"occupancy":null,"trigger_indicator":null,"update":{"state":null},"update_available":null,"voltage":3000}'
Jens-Wymeersch commented 2 years ago

@Koenkk Can you please advice what to do in this case ?

Koenkk commented 2 years ago

I don't have experience with these device but I know they require a newer adapter firmware. You are running the correct one but it could it be that you paired these devices while still on an older fw? ( <= 20210708) . If yes then try repairing them.

Jens-Wymeersch commented 2 years ago

@Koenkk I bought the devices a few weeks ago. I have 2 environments currently (both at the current firmware version) as I'm planning to move from one to another. In both I have the same problem... Also I tested multiple devices. Anything that can be done ? Maybe in the recent months they changed slightly.

I have paired them and un-paired them several time without success. Quite frustrated with this as these were not cheap !

Koenkk commented 2 years ago

Can you try to reconfigure them? (click the yellow refresh icon on the frontend, it might be needed to wake them up short before doing the reconfigure by pressing a button on the sensor)

Jens-Wymeersch commented 2 years ago

@Koenkk thanks for your quick reply. Unfortunately not resulting in success. At some point this error popped up :

error 2022-11-10 18:46:39: Failed to configure '0x54ef44100053de26', attempt 1 (Error: Read 0x54ef44100053de26/1 genPowerCfg(["batteryVoltage"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 8894 - 1 - 211 - 1 - 1 after 10000ms)
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7))
info  2022-11-10 18:46:39: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/configure', payload '{"data":{"id":"0x54ef44100053de26"},"error":"Failed to configure (Read 0x54ef44100053de26/1 genPowerCfg([\"batteryVoltage\"], {\"sendWhen\":\"immediate\",\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":true,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (Timeout - 8894 - 1 - 211 - 1 - 1 after 10000ms))","status":"error","transaction":"b1ek9-1"}'

In the OTA tab, I see the following version which looks a bit strange image

Koenkk commented 2 years ago

Can you try to re-pair the device close to the coordinator and try again?

Jens-Wymeersch commented 2 years ago

@Koenkk Thank you for your reply. The devices are less then 1m away. Any other ideas ?

Koenkk commented 2 years ago

Could you check if the issue is fixed with the following external converter:

const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').fromZigbee};
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['lumi.motion.ac02'],
    model: 'RTCGQ14LM',
    vendor: 'Xiaomi',
    whiteLabel: [{vendor: 'Xiaomi', model: 'MS-S02'}],
    description: 'Aqara P1 human body movement and illuminance sensor',
    fromZigbee: [fz.aqara_occupancy_illuminance, fz.aqara_opple, fz.battery],
    toZigbee: [tz.aqara_detection_interval, tz.aqara_motion_sensitivity, tz.RTCGQ14LM_trigger_indicator],
    exposes: [e.occupancy(), e.illuminance_lux().withProperty('illuminance'),
        e.illuminance().withUnit('lx').withDescription('Measured illuminance in lux'),
        exposes.enum('motion_sensitivity', ea.ALL, ['low', 'medium', 'high'])
            .withDescription('. Press pairing button right before changing this otherwise it will fail.'),
        exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
            .withDescription('Time interval for detecting actions. ' +
                'Press pairing button right before changing this otherwise it will fail.'),
        exposes.binary('trigger_indicator', ea.ALL, true, false).withDescription('When this option is enabled then ' +
            'blue LED will blink once when motion is detected. ' +
            'Press pairing button right before changing this otherwise it will fail.'),
        e.device_temperature(), e.battery(), e.battery_voltage()],
    meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        // await endpoint.read('genPowerCfg', ['batteryVoltage']);
        await endpoint.read('aqaraOpple', [0x0102], {manufacturerCode: 0x115f});
        await endpoint.read('aqaraOpple', [0x010c], {manufacturerCode: 0x115f});
        await endpoint.read('aqaraOpple', [0x0152], {manufacturerCode: 0x115f});
    },
    ota: ota.zigbeeOTA,
};

module.exports = definition;
Jens-Wymeersch commented 2 years ago

@Koenkk Thank you for your reply. I'm getting the following error after adding the converter via the UI.

/app/node_modules/zigbee-herdsman-converters/index.js:78
    definition.toZigbee.push(tz.scene_store, tz.scene_recall, tz.scene_add, tz.scene_remove, tz.scene_remove_all, tz.read, tz.write,
                        ^
TypeError: Cannot read properties of undefined (reading 'push')
    at Object.addDefinition [as addDeviceDefinition] (/app/node_modules/zigbee-herdsman-converters/index.js:78:25)
    at new ExternalConverters (/app/lib/extension/externalConverters.ts:15:17)
    at new Controller (/app/lib/controller.ts:84:58)
    at start (/app/index.js:108:18)
Koenkk commented 2 years ago

Can you confirm that the contents of ext_converter.js exactly match https://github.com/Koenkk/zigbee2mqtt/issues/14884#issuecomment-1312741386 ? I just tested this converter and it does not throw this error in my case.

Jens-Wymeersch commented 2 years ago

@Koenkk thanks for your reply. I finally was able to get the converter working but still didn't get the hoped result. Here are the logs from the moment I re-paired the device

info  2022-11-15 07:29:53: Accepting joining not in blocklist device '0x54ef44100053de26'
info  2022-11-15 07:29:53: Device '0x54ef44100053de26' joined
info  2022-11-15 07:29:55: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef44100053de26","ieee_address":"0x54ef44100053de26"},"type":"device_joined"}'
info  2022-11-15 07:29:55: Starting interview of '0x54ef44100053de26'
info  2022-11-15 07:29:56: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef44100053de26","ieee_address":"0x54ef44100053de26","status":"started"},"type":"device_interview"}'
debug 2022-11-15 07:29:56: Device '0x54ef44100053de26' announced itself
info  2022-11-15 07:29:58: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef44100053de26","ieee_address":"0x54ef44100053de26"},"type":"device_announce"}'
debug 2022-11-15 07:29:58: Received Zigbee message from 'Presence Sensor Living', type 'attributeReport', cluster 'aqaraOpple', data '{"322":1}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:58: lumi.motion.ac01: Processed data into payload {"presence":true}
info  2022-11-15 07:29:58: MQTT publish: topic 'zigbee2mqtt/Presence Sensor Living', payload '{"approach_distance":"medium","device_temperature":28,"linkquality":51,"monitoring_mode":"undirected","motion_sensitivity":"high","power_outage_count":6,"presence":true,"presence_event":"enter","update":{"state":"idle"},"update_available":null}'
debug 2022-11-15 07:29:58: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.motion.ac02"}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:58: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:58: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:58: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:58: Received Zigbee message from 'Presence Sensor Living', type 'attributeReport', cluster 'aqaraOpple', data '{"323":6}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:58: lumi.motion.ac01: Processed data into payload {"presence_event":"approach"}
info  2022-11-15 07:29:58: MQTT publish: topic 'zigbee2mqtt/Presence Sensor Living', payload '{"approach_distance":"medium","device_temperature":28,"linkquality":51,"monitoring_mode":"undirected","motion_sensitivity":"high","power_outage_count":6,"presence":true,"presence_event":"approach","update":{"state":"idle"},"update_available":null}'
debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"powerSource":3}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"zclVersion":3}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"appVersion":6}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing

debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"dateCode":"Jun  9 2022"}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing
debug 2022-11-15 07:29:59: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"0.0.0_0006"}' from endpoint 1 with groupID 0
debug 2022-11-15 07:29:59: Skipping message, definition is undefined and still interviewing
info  2022-11-15 07:29:59: Successfully interviewed '0x54ef44100053de26', device has successfully been paired
info  2022-11-15 07:29:59: Device '0x54ef44100053de26' is supported, identified as: Xiaomi Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)
info  2022-11-15 07:30:01: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara P1 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":"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":7,"description":". Press pairing button right before changing this otherwise it will fail.","name":"motion_sensitivity","property":"motion_sensitivity","type":"enum","values":["low","medium","high"]},{"access":7,"description":"Time interval for detecting actions. Press pairing button right before changing this otherwise it will fail.","name":"detection_interval","property":"detection_interval","type":"numeric","unit":"s","value_max":65535,"value_min":2},{"access":7,"description":"When this option is enabled then blue LED will blink once when motion is detected. Press pairing button right before changing this otherwise it will fail.","name":"trigger_indicator","property":"trigger_indicator","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Temperature of the device","name":"device_temperature","property":"device_temperature","type":"numeric","unit":"°C"},{"access":1,"description":"Remaining battery in %","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"description":"Voltage of the battery in millivolts","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"RTCGQ14LM","options":[{"access":2,"description":"Time in seconds after which occupancy is cleared after detecting it (default is \"detection_interval\" + 2 seconds). The value must be equal to or greater than \"detection_interval\", and it can also be a fraction.","name":"occupancy_timeout","property":"occupancy_timeout","type":"numeric","unit":"s","value_min":0,"value_step":0.1},{"access":2,"description":"Sends a message the last time occupancy (occupancy: true) was detected. When setting this for example to [10, 60] a `{\"no_occupancy_since\": 10}` will be send after 10 seconds and a `{\"no_occupancy_since\": 60}` after 60 seconds.","item_type":"number","name":"no_occupancy_since","property":"no_occupancy_since","type":"list"},{"access":2,"description":"Calibrates the illuminance value (percentual offset), takes into effect on next report of device.","name":"illuminance_calibration","property":"illuminance_calibration","type":"numeric"},{"access":2,"description":"Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.","name":"device_temperature_calibration","property":"device_temperature_calibration","type":"numeric"}],"supports_ota":true,"vendor":"Xiaomi"},"friendly_name":"0x54ef44100053de26","ieee_address":"0x54ef44100053de26","status":"successful","supported":true},"type":"device_interview"}'
info  2022-11-15 07:30:01: Configuring '0x54ef44100053de26'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/binary_sensor/0x54ef44100053de26/occupancy/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"motion","name":"0x54ef44100053de26 occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/illuminance_lux/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"illuminance","enabled_by_default":true,"name":"0x54ef44100053de26 illuminance lux","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_illuminance_lux_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/illuminance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"illuminance","enabled_by_default":false,"name":"0x54ef44100053de26 illuminance","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_illuminance_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/motion_sensitivity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:tune","name":"0x54ef44100053de26 motion sensitivity","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_motion_sensitivity_zigbee2mqtt","value_template":"{{ value_json.motion_sensitivity }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/select/0x54ef44100053de26/motion_sensitivity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef44100053de26/set/motion_sensitivity","device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"entity_category":"config","icon":"mdi:tune","name":"0x54ef44100053de26 motion sensitivity","options":["low","medium","high"],"state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_motion_sensitivity_zigbee2mqtt","value_template":"{{ value_json.motion_sensitivity }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/detection_interval/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"name":"0x54ef44100053de26 detection interval","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_detection_interval_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_interval }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/number/0x54ef44100053de26/detection_interval/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef44100053de26/set/detection_interval","device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"max":65535,"min":2,"name":"0x54ef44100053de26 detection interval","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_detection_interval_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_interval }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/switch/0x54ef44100053de26/switch_trigger_indicator/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef44100053de26/set/trigger_indicator","device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"name":"0x54ef44100053de26 trigger_indicator","payload_off":"false","payload_on":"true","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_switch_trigger_indicator_zigbee2mqtt","value_template":"{% if value_json.trigger_indicator %} true {% else %} false {% endif %}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/device_temperature/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef44100053de26 device temperature","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/battery/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef44100053de26 battery","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/voltage/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"0x54ef44100053de26 voltage","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"0x54ef44100053de26 linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/sensor/0x54ef44100053de26/update_state/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"0x54ef44100053de26 update state","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
info  2022-11-15 07:30:01: MQTT publish: topic 'homeassistant/binary_sensor/0x54ef44100053de26/update_available/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"update","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef44100053de26 update available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'

debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/binary_sensor/0x54ef44100053de26/occupancy/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"motion","name":"0x54ef44100053de26 occupancy","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_occupancy_zigbee2mqtt","value_template":"{{ value_json.occupancy }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/illuminance_lux/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"illuminance","enabled_by_default":true,"name":"0x54ef44100053de26 illuminance lux","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_illuminance_lux_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/illuminance/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"illuminance","enabled_by_default":false,"name":"0x54ef44100053de26 illuminance","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_illuminance_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/motion_sensitivity/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"entity_category":"config","icon":"mdi:tune","name":"0x54ef44100053de26 motion sensitivity","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_motion_sensitivity_zigbee2mqtt","value_template":"{{ value_json.motion_sensitivity }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/select/0x54ef44100053de26/motion_sensitivity/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef44100053de26/set/motion_sensitivity","device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"entity_category":"config","icon":"mdi:tune","name":"0x54ef44100053de26 motion sensitivity","options":["low","medium","high"],"state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_motion_sensitivity_zigbee2mqtt","value_template":"{{ value_json.motion_sensitivity }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/detection_interval/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"name":"0x54ef44100053de26 detection interval","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_detection_interval_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_interval }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/number/0x54ef44100053de26/detection_interval/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef44100053de26/set/detection_interval","device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"max":65535,"min":2,"name":"0x54ef44100053de26 detection interval","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_detection_interval_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_interval }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/switch/0x54ef44100053de26/switch_trigger_indicator/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x54ef44100053de26/set/trigger_indicator","device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"name":"0x54ef44100053de26 trigger_indicator","payload_off":"false","payload_on":"true","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_switch_trigger_indicator_zigbee2mqtt","value_template":"{% if value_json.trigger_indicator %} true {% else %} false {% endif %}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/device_temperature/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"temperature","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef44100053de26 device temperature","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_device_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.device_temperature }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/battery/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef44100053de26 battery","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.battery }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/voltage/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","name":"0x54ef44100053de26 voltage","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{ value_json.voltage }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"0x54ef44100053de26 linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/sensor/0x54ef44100053de26/update_state/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:update","name":"0x54ef44100053de26 update state","state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
debug 2022-11-15 07:30:01: Received MQTT message on 'homeassistant/binary_sensor/0x54ef44100053de26/update_available/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef44100053de26"],"manufacturer":"Xiaomi","model":"Aqara P1 human body movement and illuminance sensor (RTCGQ14LM)","name":"0x54ef44100053de26","sw_version":"0.0.0_0006"},"device_class":"update","enabled_by_default":true,"entity_category":"diagnostic","name":"0x54ef44100053de26 update available","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0x54ef44100053de26","unique_id":"0x54ef44100053de26_update_available_zigbee2mqtt","value_template":"{{ value_json['update']['state'] == \"available\" }}"}'

debug 2022-11-15 07:30:02: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'aqaraOpple', data '{"258":30}' from endpoint 1 with groupID 0

debug 2022-11-15 07:30:02: lumi.motion.ac02: Processed data into payload {"detection_interval":30}
info  2022-11-15 07:30:02: MQTT publish: topic 'zigbee2mqtt/0x54ef44100053de26', payload '{"battery":null,"detection_interval":30,"device_temperature":null,"illuminance":null,"linkquality":185,"motion_sensitivity":null,"occupancy":null,"trigger_indicator":null,"update":{"state":null},"update_available":null,"voltage":null}'

debug 2022-11-15 07:30:03: lumi.motion.ac02: Processed data into payload {"motion_sensitivity":"medium"}
info  2022-11-15 07:30:03: MQTT publish: topic 'zigbee2mqtt/0x54ef44100053de26', payload '{"battery":null,"detection_interval":30,"device_temperature":null,"illuminance":null,"linkquality":185,"motion_sensitivity":"medium","occupancy":null,"trigger_indicator":null,"update":{"state":null},"update_available":null,"voltage":null}'

Any ideas what to do from here ?

Koenkk commented 2 years ago

I see info 2022-11-15 07:30:01: Configuring '0x54ef44100053de26' but now the result of it. Can you configure it manually via the frontend; device -> press reconfigure and see if it is successful. Make sure to wakeup the device right before doing this by clicking a button on it.

Jens-Wymeersch commented 2 years ago

@Koenkk Attached you find the logs.

info  2022-11-15 21:32:14: Accepting joining not in blocklist device '0x54ef44100053de26'
debug 2022-11-15 21:32:14: Device '0x54ef44100053de26' announced itself
info  2022-11-15 21:32:15: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef44100053de26","ieee_address":"0x54ef44100053de26"},"type":"device_announce"}'

debug 2022-11-15 21:32:17: Retrieving state of '0x54ef44100053de26' after reconnect

debug 2022-11-15 21:32:47: Received MQTT message on 'zigbee2mqtt/bridge/request/device/configure' with data '{"id":"0x54ef44100053de26","transaction":"pwgfj-3"}'
info  2022-11-15 21:32:47: Configuring '0x54ef44100053de26'

error 2022-11-15 21:33:10: Failed to configure '0x54ef44100053de26', attempt 1 (Error: Read 0x54ef44100053de26/1 aqaraOpple([258], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 40397 - 1 - 176 - 64704 - 1 after 10000ms)
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7))
info  2022-11-15 21:33:10: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/configure', payload '{"data":{"id":"0x54ef44100053de26"},"error":"Failed to configure (Read 0x54ef44100053de26/1 aqaraOpple([258], {\"sendWhen\":\"immediate\",\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":true,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":4447,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (Timeout - 40397 - 1 - 176 - 64704 - 1 after 10000ms))","status":"error","transaction":"pwgfj-3"}'
Koenkk commented 1 year ago

debug 2022-11-15 21:32:14: Device '0x54ef44100053de26' announced itself

Is this always logged when pressing a button on the device?

error 2022-11-15 21:33:10: Failed to configure '0x54ef44100053de26', attempt 1 (Error: Read 0x54ef44100053de26/1 aqaraOpple([258], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 40397 - 1 - 176 - 64704 - 1 after 10000ms)

Looks that the device is sleeping, can you try to repair it very close to the coordinator and make sure to wakeup the device by clicking a button on it right before pressing configure?

Jens-Wymeersch commented 1 year ago

@Koenkk I'm only able to do a long press (re-pairing mode) - I got this error following re-configuration after long press

I'm less than 50 cm from the coordinator, but still the same result. What I do see is that the interview process is extremely quick.

Koenkk commented 1 year ago

@Jens-Wymeersch to do the full interview, force remove the device through the z2m frontend, restart z2m and re-pair.

Jens-Wymeersch commented 1 year ago

@Koenkk here are the results but no success

info  2022-11-19 10:37:15: Accepting joining not in blocklist device '0x54ef44100053de26'
debug 2022-11-19 10:37:15: Device '0x54ef44100053de26' announced itself
info  2022-11-19 10:37:16: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef44100053de26","ieee_address":"0x54ef44100053de26"},"type":"device_announce"}'
debug 2022-11-19 10:37:18: Retrieving state of '0x54ef44100053de26' after reconnect

debug 2022-11-19 10:37:26: Received MQTT message on 'zigbee2mqtt/bridge/request/device/configure' with data '{"id":"0x54ef44100053de26","transaction":"g6h29-2"}'
info  2022-11-19 10:37:26: Configuring '0x54ef44100053de26'
debug 2022-11-19 10:37:26: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'aqaraOpple', data '{"258":30}' from endpoint 1 with groupID 0
debug 2022-11-19 10:37:26: lumi.motion.ac02: Processed data into payload {"detection_interval":30}
info  2022-11-19 10:37:26: MQTT publish: topic 'zigbee2mqtt/0x54ef44100053de26', payload '{"battery":null,"detection_interval":30,"device_temperature":null,"illuminance":null,"linkquality":185,"motion_sensitivity":"medium","occupancy":null,"trigger_indicator":false,"update":{"state":null},"update_available":null,"voltage":null}'
debug 2022-11-19 10:37:26: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'aqaraOpple', data '{"268":2}' from endpoint 1 with groupID 0
debug 2022-11-19 10:37:26: lumi.motion.ac02: Processed data into payload {"motion_sensitivity":"medium"}
info  2022-11-19 10:37:26: MQTT publish: topic 'zigbee2mqtt/0x54ef44100053de26', payload '{"battery":null,"detection_interval":30,"device_temperature":null,"illuminance":null,"linkquality":185,"motion_sensitivity":"medium","occupancy":null,"trigger_indicator":false,"update":{"state":null},"update_available":null,"voltage":null}'
debug 2022-11-19 10:37:26: Received Zigbee message from '0x54ef44100053de26', type 'readResponse', cluster 'aqaraOpple', data '{"338":0}' from endpoint 1 with groupID 0
debug 2022-11-19 10:37:26: lumi.motion.ac02: Processed data into payload {"trigger_indicator":false}
info  2022-11-19 10:37:26: MQTT publish: topic 'zigbee2mqtt/0x54ef44100053de26', payload '{"battery":null,"detection_interval":30,"device_temperature":null,"illuminance":null,"linkquality":185,"motion_sensitivity":"medium","occupancy":null,"trigger_indicator":false,"update":{"state":null},"update_available":null,"voltage":null}'
info  2022-11-19 10:37:26: Successfully configured '0x54ef44100053de26'
Jens-Wymeersch commented 1 year ago

@Koenkk Thank you for all your help. After my migration and after a lot of indescribable errors, I switched from zzh! stick.

Result : not only I was able to pair a few devices that I was struggling with the whole day but also those damn motion sensors.

Thank you again for your constant support on this and many other cases. Z2M is truly a great solution and is the core of my home automation platform for now and in the future !