Hi Steve,
the configuration looks like this:
data_path: /config/zigbee2mqtt
external_converters:
- ROB_200-008.js
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: mqtt://core-mosquitto
user: mosquitto
password: XXXXXXX
serial:
adapter: deconz
port: >-
/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2438187-if00
advanced:
log_level: warn
pan_id: 6754
channel: 11
network_key:
- 1
- 3
- 5
- 7
- 9
- 11
- 13
- 15
- 0
- 2
- 4
- 6
- 8
- 10
- 12
- 13
availability_blocklist: []
availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
port: 8099
experimental: {}
socat:
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: '-d -d'
log: false
and the ROB_200-008.js looks like this:
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;
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'}],
},
{
zigbeeModel: ['ROB_200-017-0'],
model: 'ROB_200-017-0',
vendor: 'ROBB',
description: 'Zigbee smart plug',
fromZigbee: [fz.electrical_measurement, fz.on_off, fz.ignore_genLevelCtrl_report, fz.metering],
toZigbee: [tz.on_off],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
await reporting.onOff(endpoint);
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
await reporting.rmsVoltage(endpoint);
await reporting.rmsCurrent(endpoint);
await reporting.activePower(endpoint);
},
exposes: [e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.switch(), e.energy()],
},
];