zigbee-herdsman-converters
Version:
Collection of device converters to be used with zigbee-herdsman
133 lines (131 loc) • 6.13 kB
JavaScript
const exposes = require('../lib/exposes');
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
const tz = require('../converters/toZigbee');
const reporting = require('../lib/reporting');
const extend = require('../lib/extend');
const e = exposes.presets;
module.exports = [
{
zigbeeModel: ['ROB_200-006-0'],
model: 'ROB_200-006-0',
vendor: 'ROBB',
description: 'ZigBee LED dimmer',
extend: extend.light_onoff_brightness(),
},
{
zigbeeModel: ['ROB_200-004-0'],
model: 'ROB_200-004-0',
vendor: 'ROBB',
description: 'ZigBee AC phase-cut dimmer',
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['ROB_200-011-0'],
model: 'ROB_200-011-0',
vendor: 'ROBB',
description: 'ZigBee AC phase-cut dimmer',
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['ROB_200-003-0'],
model: 'ROB_200-003-0',
vendor: 'ROBB',
description: 'Zigbee AC in wall switch',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1) || device.getEndpoint(3);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['ROB_200-014-0'],
model: 'ROB_200-014-0',
vendor: 'ROBB',
description: 'ZigBee AC phase-cut rotary dimmer',
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['ZG2833K8_EU05', 'ROB_200-007-0'],
model: 'ROB_200-007-0',
vendor: 'ROBB',
description: 'Zigbee 8 button wall switch',
fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery, fz.ignore_genOta],
exposes: [e.battery(), e.action([
'on_1', 'off_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1',
'on_2', 'off_2', 'brightness_move_up_2', 'brightness_move_down_2', 'brightness_stop_2',
'on_3', 'off_3', 'brightness_move_up_3', 'brightness_move_down_3', 'brightness_stop_3',
'on_4', 'off_4', 'brightness_move_up_4', 'brightness_move_down_4', 'brightness_stop_4'])],
toZigbee: [],
meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K8-DIM'}],
},
{
zigbeeModel: ['ZG2833K4_EU06', 'ROB_200-008', 'ROB_200-008-0'],
model: 'ROB_200-008-0',
vendor: 'ROBB',
description: 'Zigbee 4 button wall switch',
fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
exposes: [e.battery(), e.action([
'on_1', 'off_1', 'stop_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1',
'on_2', 'off_2', 'stop_2', 'brightness_move_up_2', 'brightness_move_down_2', 'brightness_stop_2'])],
toZigbee: [],
meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K4-DIM2'}],
},
{
zigbeeModel: ['ROB_200-009-0'],
model: 'ROB_200-009-0',
vendor: 'ROBB',
description: 'Zigbee 2 button wall switch',
fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
exposes: [e.battery(), e.action([
'on_1', 'off_1', 'stop_1', 'brightness_move_up_1', 'brightness_move_down_1', 'brightness_stop_1'])],
toZigbee: [],
meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K2-DIM'}],
},
{
zigbeeModel: ['Motor Controller', 'ROB_200-010-0'],
model: 'ROB_200-010-0',
vendor: 'ROBB',
description: 'Zigbee curtain motor controller',
meta: {coverInverted: true},
fromZigbee: [fz.cover_position_tilt],
toZigbee: [tz.cover_state, tz.cover_position_tilt],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
await reporting.currentPositionLiftPercentage(endpoint);
},
exposes: [e.cover_position()],
},
{
zigbeeModel: ['ROB_200-018-0'],
model: 'ROB_200-018-0',
vendor: 'ROBB',
description: 'ZigBee knob smart dimmer',
fromZigbee: [fz.command_on, fz.command_off, fz.command_move_to_level, fz.command_move_to_color_temp],
exposes: [e.action(['on', 'off', 'brightness_move_to_level', 'color_temperature_move'])],
toZigbee: [],
whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG2835'}],
},
];