|
楼主 |
发表于 2023-3-27 00:34:59
|
显示全部楼层
大佬,我根据格式自己写了两个替换的代码
const fz = require('zigbee-herdsman-converters/converters/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 e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['lumi.motion.acn001'],
model: 'Aqara E1',
vendor: 'Xiaomi',
description: 'Aqara E1',
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout, fz.RTCGQ11LM_illuminance],
toZigbee: [],
exposes: [e.battery(), e.occupancy(), e.device_temperature(), e.battery_voltage(), e.illuminance_lux().withProperty('illuminance'),
e.illuminance().withUnit('lx').withDescription('Measured illuminance in lux'), e.power_outage_count(false)],
};
module.exports = definition;
也读取不到,我发现官方的 就是E1的代码就是T1改了一下描述其他都没变 而且我买了两个E1全是这样,脑壳痛,下面是改了之后重新接入的日志
2023-03-27 00:29:16Received Zigbee message from '0x54ef4410007e3a69', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0
Debug 2023-03-27 00:29:16lumi.motion.acn001: unknown key swBuildId with value undefined
Debug 2023-03-27 00:29:16lumi.motion.acn001: Processed data into payload {}
Info 2023-03-27 00:29:16Successfully interviewed '0x54ef4410007e3a69', device has successfully been paired
Info 2023-03-27 00:29:16Device '0x54ef4410007e3a69' is supported, identified as: Xiaomi Aqara E1 (Aqara E1)
Info 2023-03-27 00:29:16MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara E1","exposes":[{"access":1,"description":"Remaining battery in %, can take up to 24 hours before reported.","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":"Temperature of the device","name":"device_temperature","property":"device_temperature","type":"numeric","unit":"°C"},{"access":1,"description":"Voltage of the battery in millivolts","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},{"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":"Number of power outages","name":"power_outage_count","property":"power_outage_count","type":"numeric"},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"Aqara E1","options":[{"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"},{"access":2,"description":"Calibrates the voltage value (percentual offset), takes into effect on next report of device.","name":"voltage_calibration","property":"voltage_calibration","type":"numeric"},{"access":2,"description":"Number of digits after decimal point for voltage, takes into effect on next report of device.","name":"voltage_precision","property":"voltage_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the illuminance_lux value (percentual offset), takes into effect on next report of device.","name":"illuminance_lux_calibration","property":"illuminance_lux_calibration","type":"numeric"},{"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":"Time in seconds after which occupancy is cleared after detecting it (default 90 seconds).","name":"occupancy_timeout","property":"occupancy_timeout","type":"numeric","value_min":0},{"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":{"access":3,"name":"time","type":"numeric"},"name":"no_occupancy_since","property":"no_occupancy_since","type":"list"}],"supports_ota":false,"vendor":"Xiaomi"},"friendly_name":"0x54ef4410007e3a69","ieee_address":"0x54ef4410007e3a69","status":"successful","supported":true},"type":"device_interview"}'
Info 2023-03-27 00:29:16MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara E1","friendly_name":"0x54ef4410007e3a69","model":"Aqara E1","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
Debug 2023-03-27 00:29:25Received Zigbee message from '0x54ef4410007e3a69', type 'attributeReport', cluster 'aqaraOpple', data '{"247":{"data":[1,33,16,12,3,40,25,4,33,0,0,5,33,1,0,8,33,10,0,10,33,47,19,12,32,30,100,16,0,101,33,19,0],"type":"Buffer"}}' from endpoint 1 with groupID 0
Debug 2023-03-27 00:29:25No converter available for 'Aqara E1' with cluster 'aqaraOpple' and type 'attributeReport' and data '{"247":{"data":[1,33,16,12,3,40,25,4,33,0,0,5,33,1,0,8,33,10,0,10,33,47,19,12,32,30,100,16,0,101,33,19,0],"type":"Buffer"}}'
Debug 2023-03-27 00:30:01Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"uz80k-4","value":false}'
Info 2023-03-27 00:30:01Zigbee: disabling joining new devices.
Info 2023-03-27 00:30:02MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":false},"status":"ok","transaction":"uz80k-4"}' |
|