我的是博云,zigbee2mqtt是addon方式安装的,配置如下
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: ['Windows switch '],
model: 'M415-6C',
vendor: 'BYUN',
description: 'Windows switch',
fromZigbee: [fz.brightness, fz.on_off],
toZigbee: [tz.light_onoff_brightness, tz.on_off],
exposes: [e.light_brightness()],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
};
module.exports = definition;
还有一点点小瑕疵,一直没空搞。 |