UNPKG

zigbee-shepherd-converters

Version:

Collection of device converters to be used with zigbee-shepherd

1,328 lines (1,294 loc) 229 kB
'use strict'; const debug = require('debug')('zigbee-shepherd-converters:devices'); const fz = require('./converters/fromZigbee'); const tz = require('./converters/toZigbee'); const repInterval = { MAX: 62000, HOUR: 3600, MINUTE: 60, }; const defaultIgnoreConverters = [ fz.ignore_genGroups_devChange, fz.ignore_genIdentify_change, fz.ignore_genScenes_change, fz.ignore_diagnostic_change, fz.ignore_lightLink_change, fz.ignore_basic_change, ]; const generic = { light_onoff_brightness: { supports: 'on/off, brightness', fromZigbee: [ fz.ignore_light_brightness_change, fz.state_change, fz.state, fz.brightness_report, ].concat(defaultIgnoreConverters), toZigbee: [tz.light_onoff_brightness, tz.ignore_transition, tz.light_alert], }, light_onoff_brightness_colortemp: { supports: 'on/off, brightness, color temperature', fromZigbee: [ fz.ignore_light_brightness_change, fz.color_colortemp, fz.state_change, fz.state, fz.brightness_report, fz.color_colortemp_report, ].concat(defaultIgnoreConverters), toZigbee: [tz.light_onoff_brightness, tz.light_colortemp, tz.ignore_transition, tz.light_alert], }, light_onoff_brightness_colorxy: { supports: 'on/off, brightness, color xy', fromZigbee: [ fz.ignore_light_brightness_change, fz.color_colortemp, fz.state_change, fz.state, fz.brightness_report, fz.color_colortemp_report, ].concat(defaultIgnoreConverters), toZigbee: [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.light_alert], }, light_onoff_brightness_colortemp_colorxy: { supports: 'on/off, brightness, color temperature, color xy', fromZigbee: [ fz.ignore_light_brightness_change, fz.color_colortemp, fz.state_change, fz.state, fz.brightness_report, fz.color_colortemp_report, ].concat(defaultIgnoreConverters), toZigbee: [ tz.light_onoff_brightness, tz.light_color_colortemp, tz.ignore_transition, tz.light_alert, ], }, }; const gledopto = { light_onoff_brightness: { supports: generic.light_onoff_brightness.supports, fromZigbee: generic.light_onoff_brightness.fromZigbee, toZigbee: [tz.gledopto_light_onoff_brightness, tz.ignore_transition, tz.light_alert], }, light_onoff_brightness_colortemp: { supports: generic.light_onoff_brightness_colortemp.supports, fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, toZigbee: [ tz.gledopto_light_onoff_brightness, tz.gledopto_light_colortemp, tz.ignore_transition, tz.light_alert, ], }, light_onoff_brightness_colortemp_colorxy: { supports: generic.light_onoff_brightness_colortemp_colorxy.supports, fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, toZigbee: [ tz.gledopto_light_onoff_brightness, tz.gledopto_light_color_colortemp, tz.ignore_transition, tz.light_alert, ], }, }; const tzHuePowerOnBehavior = [tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature]; const hue = { light_onoff_brightness: { supports: generic.light_onoff_brightness.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness.fromZigbee, toZigbee: generic.light_onoff_brightness.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colortemp: { supports: generic.light_onoff_brightness_colortemp.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee, toZigbee: generic.light_onoff_brightness_colortemp.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colorxy: { supports: generic.light_onoff_brightness_colorxy.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee, toZigbee: generic.light_onoff_brightness_colorxy.toZigbee.concat(tzHuePowerOnBehavior), }, light_onoff_brightness_colortemp_colorxy: { supports: generic.light_onoff_brightness_colortemp_colorxy.supports + ', power-on behavior', fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee, toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee.concat(tzHuePowerOnBehavior), }, }; const foundationCfg = {manufSpec: 0, disDefaultRsp: 0}; const execute = (device, actions, callback, delay) => { if (!device) { callback(false, 'No device'); return; } delay || (delay = 300); const len = actions.length; let nextActionIndex = 0; const next = () => { if (nextActionIndex === len) { callback(true, ''); return; } const nextAction = actions[nextActionIndex++]; setTimeout(nextAction, delay, (error) => { debug(`Configured '${nextAction.toString()}' with result '${error ? error : 'OK'}'`); if (error) { callback(false, error); return; } next(); } ); }; next(); }; const devices = [ // Xiaomi { zigbeeModel: ['lumi.light.aqcn02'], model: 'ZNLDP12LM', vendor: 'Xiaomi', description: 'Aqara smart LED bulb', extend: generic.light_onoff_brightness_colortemp, fromZigbee: [ fz.brightness, fz.color_colortemp, fz.state_report, fz.xiaomi_bulb_interval, fz.ignore_light_brightness_report, fz.ignore_light_color_colortemp_report, fz.ignore_onoff_change, fz.ignore_basic_change, fz.ignore_occupancy_report, fz.ignore_temperature_change, fz.ignore_humidity_change, fz.ignore_pressure_change, fz.ignore_humidity_report, fz.ignore_pressure_report, fz.ignore_temperature_report, ], }, { zigbeeModel: ['lumi.sensor_switch'], model: 'WXKG01LM', vendor: 'Xiaomi', description: 'MiJia wireless switch', supports: 'single, double, triple, quadruple, many, long, long_release click', fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG01LM_click, fz.ignore_onoff_change, fz.ignore_basic_change], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_switch.aq2', 'lumi.remote.b1acn01\u0000\u0000\u0000\u0000\u0000\u0000'], model: 'WXKG11LM', vendor: 'Xiaomi', description: 'Aqara wireless switch', supports: 'single, double click (and triple, quadruple, hold, release depending on model)', fromZigbee: [ fz.xiaomi_battery_3v, fz.WXKG11LM_click, fz.ignore_onoff_change, fz.ignore_basic_change, fz.xiaomi_action_click_multistate, fz.ignore_multistate_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_switch.aq3', 'lumi.sensor_swit'], model: 'WXKG12LM', vendor: 'Xiaomi', description: 'Aqara wireless switch (with gyroscope)', supports: 'single, double, shake, hold, release', fromZigbee: [ fz.xiaomi_battery_3v, fz.WXKG12LM_action_click_multistate, fz.ignore_onoff_change, fz.ignore_basic_change, fz.ignore_multistate_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_86sw1\u0000lu', 'lumi.remote.b186acn01\u0000\u0000\u0000'], model: 'WXKG03LM', vendor: 'Xiaomi', description: 'Aqara single key wireless wall switch', supports: 'single (and double, hold, release and long click depending on model)', fromZigbee: [ fz.xiaomi_battery_3v, fz.WXKG03LM_click, fz.ignore_basic_change, fz.xiaomi_action_click_multistate, fz.ignore_multistate_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_86sw2\u0000Un', 'lumi.sensor_86sw2.es1', 'lumi.remote.b286acn01\u0000\u0000\u0000'], model: 'WXKG02LM', vendor: 'Xiaomi', description: 'Aqara double key wireless wall switch', supports: 'left, right, both click (and double, long click for left, right and both depending on model)', fromZigbee: [ fz.xiaomi_battery_3v, fz.WXKG02LM_click, fz.ignore_basic_change, fz.WXKG02LM_click_multistate, fz.ignore_multistate_change, ], toZigbee: [], ep: (device) => { return {'left': 1, 'right': 2, 'both': 3}; }, }, { zigbeeModel: ['lumi.ctrl_neutral1'], model: 'QBKG04LM', vendor: 'Xiaomi', // eslint-disable-next-line description: 'Aqara single key wired wall switch without neutral wire. Doesn\'t work as a router and doesn\'t support power meter', supports: 'release/hold, on/off', fromZigbee: [ fz.QBKG04LM_QBKG11LM_state, fz.QBKG04LM_buttons, fz.QBKG04LM_QBKG11LM_operation_mode, fz.ignore_basic_report, ], toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode], ep: (device) => { return {'system': 1, 'default': 2}; }, }, { zigbeeModel: ['lumi.ctrl_ln1.aq1', 'lumi.ctrl_ln1'], model: 'QBKG11LM', vendor: 'Xiaomi', description: 'Aqara single key wired wall switch', supports: 'on/off, power measurement', fromZigbee: [ fz.QBKG04LM_QBKG11LM_state, fz.QBKG11LM_power, fz.QBKG04LM_QBKG11LM_operation_mode, fz.ignore_onoff_change, fz.ignore_basic_change, fz.QBKG11LM_click, fz.ignore_multistate_report, fz.ignore_multistate_change, fz.ignore_analog_change, fz.xiaomi_power, ], toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode], }, { zigbeeModel: ['lumi.ctrl_neutral2'], model: 'QBKG03LM', vendor: 'Xiaomi', // eslint-disable-next-line description: 'Aqara double key wired wall switch without neutral wire. Doesn\'t work as a router and doesn\'t support power meter', supports: 'release/hold, on/off, temperature', fromZigbee: [ fz.QBKG03LM_QBKG12LM_LLKZMK11LM_state, fz.QBKG03LM_buttons, fz.QBKG03LM_QBKG12LM_operation_mode, fz.ignore_basic_report, fz.generic_device_temperature, ], toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode], ep: (device) => { return {'system': 1, 'left': 2, 'right': 3}; }, }, { zigbeeModel: ['lumi.ctrl_ln2.aq1'], model: 'QBKG12LM', vendor: 'Xiaomi', description: 'Aqara double key wired wall switch', supports: 'on/off, power measurement', fromZigbee: [ fz.QBKG03LM_QBKG12LM_LLKZMK11LM_state, fz.QBKG12LM_LLKZMK11LM_power, fz.QBKG03LM_QBKG12LM_operation_mode, fz.ignore_analog_change, fz.ignore_basic_change, fz.QBKG12LM_click, fz.ignore_multistate_report, fz.ignore_multistate_change, fz.ignore_onoff_change, fz.xiaomi_power, ], toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode], ep: (device) => { return {'left': 1, 'right': 2}; }, }, { zigbeeModel: ['lumi.sens', 'lumi.sensor_ht'], model: 'WSDCGQ01LM', vendor: 'Xiaomi', description: 'MiJia temperature & humidity sensor', supports: 'temperature and humidity', fromZigbee: [ fz.xiaomi_battery_3v, fz.WSDCGQ01LM_WSDCGQ11LM_interval, fz.xiaomi_temperature, fz.generic_humidity, fz.ignore_basic_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.weather'], model: 'WSDCGQ11LM', vendor: 'Xiaomi', description: 'Aqara temperature, humidity and pressure sensor', supports: 'temperature, humidity and pressure', fromZigbee: [ fz.xiaomi_battery_3v, fz.xiaomi_temperature, fz.generic_humidity, fz.generic_pressure, fz.ignore_basic_change, fz.ignore_temperature_change, fz.ignore_humidity_change, fz.ignore_pressure_change, fz.WSDCGQ01LM_WSDCGQ11LM_interval, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_motion'], model: 'RTCGQ01LM', vendor: 'Xiaomi', description: 'MiJia human body movement sensor', supports: 'occupancy', fromZigbee: [fz.xiaomi_battery_3v, fz.generic_occupancy_no_off_msg, fz.ignore_basic_change], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_motion.aq2'], model: 'RTCGQ11LM', vendor: 'Xiaomi', description: 'Aqara human body movement and illuminance sensor', supports: 'occupancy and illuminance', fromZigbee: [ fz.xiaomi_battery_3v, fz.generic_occupancy_no_off_msg, fz.generic_illuminance, fz.ignore_basic_change, fz.ignore_illuminance_change, fz.ignore_occupancy_change, fz.RTCGQ11LM_interval, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_magnet'], model: 'MCCGQ01LM', vendor: 'Xiaomi', description: 'MiJia door & window contact sensor', supports: 'contact', fromZigbee: [ fz.xiaomi_battery_3v, fz.xiaomi_contact, fz.ignore_onoff_change, fz.ignore_basic_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_magnet.aq2'], model: 'MCCGQ11LM', vendor: 'Xiaomi', description: 'Aqara door & window contact sensor', supports: 'contact', fromZigbee: [ fz.xiaomi_battery_3v, fz.xiaomi_contact, fz.xiaomi_contact_interval, fz.ignore_onoff_change, fz.ignore_basic_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_wleak.aq1'], model: 'SJCGQ11LM', vendor: 'Xiaomi', description: 'Aqara water leak sensor', supports: 'water leak true/false', fromZigbee: [ fz.xiaomi_battery_3v, fz.SJCGQ11LM_water_leak_iaszone, fz.SJCGQ11LM_water_leak_interval, fz.ignore_basic_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_cube', 'lumi.sensor_cube.aqgl01'], model: 'MFKZQ01LM', vendor: 'Xiaomi', description: 'Mi/Aqara smart home cube', supports: 'shake, wakeup, fall, tap, slide, flip180, flip90, rotate_left and rotate_right', fromZigbee: [ fz.xiaomi_battery_3v, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog, fz.ignore_analog_change, fz.ignore_multistate_change, fz.ignore_basic_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.plug'], model: 'ZNCZ02LM', description: 'Mi power plug ZigBee', supports: 'on/off, power measurement', vendor: 'Xiaomi', fromZigbee: [ fz.state, fz.xiaomi_power, fz.xiaomi_plug_state, fz.ignore_onoff_change, fz.ignore_basic_change, fz.ignore_analog_change, fz.ignore_occupancy_report, fz.ignore_illuminance_report, fz.ignore_temperature_change, fz.ignore_humidity_change, fz.ignore_pressure_change, ], toZigbee: [tz.on_off], }, { zigbeeModel: ['lumi.plug.mitw01'], model: 'ZNCZ03LM', description: 'Mi power plug ZigBee TW', supports: 'on/off, power measurement', vendor: 'Xiaomi', fromZigbee: [ fz.state, fz.xiaomi_power, fz.xiaomi_plug_state, fz.ignore_onoff_change, fz.ignore_basic_change, fz.ignore_analog_change, fz.ignore_occupancy_report, fz.ignore_illuminance_report, fz.ignore_temperature_change, fz.ignore_humidity_change, fz.ignore_pressure_change, ], toZigbee: [tz.on_off], }, { zigbeeModel: ['lumi.ctrl_86plug', 'lumi.ctrl_86plug.aq1'], model: 'QBCZ11LM', description: 'Aqara socket Zigbee', supports: 'on/off, power measurement', vendor: 'Xiaomi', fromZigbee: [ fz.state, fz.xiaomi_power, fz.xiaomi_plug_state, fz.ignore_onoff_change, fz.ignore_basic_change, fz.ignore_analog_change, ], toZigbee: [tz.on_off], }, { zigbeeModel: ['lumi.sensor_smoke'], model: 'JTYJ-GD-01LM/BW', description: 'MiJia Honeywell smoke detector', supports: 'smoke', vendor: 'Xiaomi', fromZigbee: [fz.xiaomi_battery_3v, fz.JTYJGD01LMBW_smoke, fz.ignore_basic_change], toZigbee: [], }, { zigbeeModel: ['lumi.sensor_natgas'], model: 'JTQJ-BF-01LM/BW', vendor: 'Xiaomi', description: 'MiJia gas leak detector ', supports: 'gas', fromZigbee: [ fz.JTQJBF01LMBW_gas, fz.JTQJBF01LMBW_sensitivity, fz.JTQJBF01LMBW_gas_density, fz.ignore_basic_change, ], toZigbee: [tz.JTQJBF01LMBW_sensitivity, tz.JTQJBF01LMBW_selfest], }, { zigbeeModel: ['lumi.lock.v1'], model: 'A6121', vendor: 'Xiaomi', description: 'Vima Smart Lock', supports: 'inserted, forgotten, key error', fromZigbee: [fz.xiaomi_lock_report, fz.ignore_basic_change], toZigbee: [], }, { zigbeeModel: ['lumi.vibration.aq1'], model: 'DJT11LM', vendor: 'Xiaomi', description: 'Aqara vibration sensor', supports: 'drop, tilt and touch', fromZigbee: [ fz.xiaomi_battery_3v, fz.DJT11LM_vibration, fz.ignore_basic_change, fz.ignore_doorlock_change, ], toZigbee: [tz.DJT11LM_vibration_sensitivity], }, { zigbeeModel: ['lumi.curtain'], model: 'ZNCLDJ11LM', description: 'Aqara curtain motor', supports: 'open, close, stop, position', vendor: 'Xiaomi', fromZigbee: [ fz.ZNCLDJ11LM_curtain_genAnalogOutput_change, fz.ZNCLDJ11LM_curtain_genAnalogOutput_report, fz.ignore_closuresWindowCovering_change, fz.closuresWindowCovering_report, fz.ignore_basic_change, fz.ignore_basic_report, ], toZigbee: [tz.ZNCLDJ11LM_control], }, { zigbeeModel: ['lumi.relay.c2acn01'], model: 'LLKZMK11LM', vendor: 'Xiaomi', description: 'Aqara wireless relay controller', supports: 'on/off, power measurement', fromZigbee: [ fz.QBKG03LM_QBKG12LM_LLKZMK11LM_state, fz.QBKG12LM_LLKZMK11LM_power, fz.xiaomi_power, fz.ignore_analog_change, fz.ignore_basic_change, fz.ignore_multistate_report, fz.ignore_multistate_change, fz.ignore_onoff_change, ], toZigbee: [tz.on_off], ep: (device) => { return {'l1': 1, 'l2': 2}; }, }, { zigbeeModel: ['lumi.lock.acn02'], model: 'ZNMS12LM', description: 'Aqara S2 Lock', supports: 'report: open, close, operation', vendor: 'Xiaomi', fromZigbee: [ fz.ZNMS12LM_ZNMS13LM_closuresDoorLock_report, fz.ignore_basic_report, fz.ignore_doorlock_change, fz.ignore_basic_change, ], toZigbee: [], }, { zigbeeModel: ['lumi.lock.acn03'], model: 'ZNMS13LM', description: 'Aqara S2 Lock Pro', supports: 'report: open, close, operation', vendor: 'Xiaomi', fromZigbee: [ fz.ZNMS12LM_ZNMS13LM_closuresDoorLock_report, fz.ignore_basic_report, fz.ignore_doorlock_change, fz.ignore_basic_change, ], toZigbee: [], }, // IKEA { zigbeeModel: [ 'TRADFRI bulb E27 WS opal 980lm', 'TRADFRI bulb E26 WS opal 980lm', 'TRADFRI bulb E27 WS\uFFFDopal 980lm', ], model: 'LED1545G12', vendor: 'IKEA', description: 'TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI bulb E27 WS clear 950lm', 'TRADFRI bulb E26 WS clear 950lm'], model: 'LED1546G12', vendor: 'IKEA', description: 'TRADFRI LED bulb E26/E27 950 lumen, dimmable, white spectrum, clear', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI bulb E27 opal 1000lm', 'TRADFRI bulb E27 W opal 1000lm'], model: 'LED1623G12', vendor: 'IKEA', description: 'TRADFRI LED bulb E27 1000 lumen, dimmable, opal white', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI bulb GU10 WS 400lm'], model: 'LED1537R6', vendor: 'IKEA', description: 'TRADFRI LED bulb GU10 400 lumen, dimmable, white spectrum', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI bulb GU10 W 400lm'], model: 'LED1650R5', vendor: 'IKEA', description: 'TRADFRI LED bulb GU10 400 lumen, dimmable', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI bulb E14 WS opal 400lm', 'TRADFRI bulb E12 WS opal 400lm'], model: 'LED1536G5', vendor: 'IKEA', description: 'TRADFRI LED bulb E12/E14 400 lumen, dimmable, white spectrum, opal white', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI bulb GU10 WW 400lm'], model: 'LED1837R5', vendor: 'IKEA', description: 'TRADFRI LED bulb GU10 400 lumen, dimmable', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI bulb E27 WW clear 250lm'], model: 'LED1842G3', vendor: 'IKEA', description: 'TRADFRI LED bulb E27 WW clear 250 lumen, dimmable', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI bulb E14 WS opal 600lm'], model: 'LED1733G7', vendor: 'IKEA', description: 'TRADFRI LED bulb E14 600 lumen, dimmable, white spectrum, opal white', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI bulb E26 opal 1000lm', 'TRADFRI bulb E26 W opal 1000lm'], model: 'LED1622G12', vendor: 'IKEA', description: 'TRADFRI LED bulb E26 1000 lumen, dimmable, opal white', extend: generic.light_onoff_brightness, }, { zigbeeModel: [ 'TRADFRI bulb E27 CWS opal 600lm', 'TRADFRI bulb E26 CWS opal 600lm', 'TRADFRI bulb E14 CWS opal 600lm'], model: 'LED1624G9', vendor: 'IKEA', description: 'TRADFRI LED bulb E14/E26/E27 600 lumen, dimmable, color, opal white', extend: generic.light_onoff_brightness_colorxy, }, { zigbeeModel: [ 'TRADFRI bulb E14 W op/ch 400lm', 'TRADFRI bulb E12 W op/ch 400lm', 'TRADFRI bulb E17 W op/ch 400lm', ], model: 'LED1649C5', vendor: 'IKEA', description: 'TRADFRI LED bulb E12/E14/E17 400 lumen, dimmable warm white, chandelier opal', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI bulb E27 WS opal 1000lm'], model: 'LED1732G11', vendor: 'IKEA', description: 'TRADFRI LED bulb E27 1000 lumen, dimmable, white spectrum, opal white', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI bulb E27 WW 806lm'], model: 'LED1836G9', vendor: 'IKEA', description: 'TRADFRI LED bulb E27 806 lumen, dimmable, warm white', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI bulb E27 WS clear 806lm'], model: 'LED1736G9', vendor: 'IKEA', description: 'TRADFRI LED bulb E27 806 lumen, dimmable, white spectrum, clear', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI wireless dimmer'], model: 'ICTC-G-1', vendor: 'IKEA', description: 'TRADFRI wireless dimmer', supports: 'brightness [0-255] (quick rotate for instant 0/255), action', fromZigbee: [ fz.cmd_move, fz.cmd_move_with_onoff, fz.cmd_stop, fz.cmd_stop_with_onoff, fz.cmd_move_to_level_with_onoff, fz.generic_battery, fz.ignore_power_change, ], toZigbee: [], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 1); const cfg = { direction: 0, attrId: 33, dataType: 32, minRepIntval: 0, maxRepIntval: repInterval.MAX, repChange: 0, }; const actions = [ (cb) => device.bind('genLevelCtrl', coordinator, cb), (cb) => device.bind('genPowerCfg', coordinator, cb), (cb) => device.foundation('genPowerCfg', 'configReport', [cfg], foundationCfg, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['TRADFRI transformer 10W', 'TRADFRI Driver 10W'], model: 'ICPSHC24-10EU-IL-1', vendor: 'IKEA', description: 'TRADFRI driver for wireless control (10 watt)', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['TRADFRI transformer 30W', 'TRADFRI Driver 30W'], model: 'ICPSHC24-30EU-IL-1', vendor: 'IKEA', description: 'TRADFRI driver for wireless control (30 watt)', extend: generic.light_onoff_brightness, }, { zigbeeModel: ['FLOALT panel WS 30x30'], model: 'L1527', vendor: 'IKEA', description: 'FLOALT LED light panel, dimmable, white spectrum (30x30 cm)', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['FLOALT panel WS 60x60'], model: 'L1529', vendor: 'IKEA', description: 'FLOALT LED light panel, dimmable, white spectrum (60x60 cm)', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['FLOALT panel WS 30x90'], model: 'L1528', vendor: 'IKEA', description: 'FLOALT LED light panel, dimmable, white spectrum (30x90 cm)', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['SURTE door WS 38x64'], model: 'L1531', vendor: 'IKEA', description: 'SURTE door light panel, dimmable, white spectrum (38x64 cm)', extend: generic.light_onoff_brightness_colortemp, }, { zigbeeModel: ['TRADFRI control outlet'], model: 'E1603/E1702', description: 'TRADFRI control outlet', supports: 'on/off', vendor: 'IKEA', fromZigbee: [fz.ignore_onoff_change, fz.state, fz.ignore_genLevelCtrl_report], toZigbee: [tz.on_off], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 1); const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0}; const actions = [ (cb) => device.bind('genOnOff', coordinator, cb), (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['TRADFRI remote control'], model: 'E1524/E1810', description: 'TRADFRI remote control', supports: 'toggle, arrow left/right click/hold/release, brightness up/down click/hold/release', vendor: 'IKEA', fromZigbee: [ fz.cmdToggle, fz.E1524_arrow_click, fz.E1524_arrow_hold, fz.E1524_arrow_release, fz.E1524_brightness_up_click, fz.E1524_brightness_down_click, fz.E1524_brightness_up_hold, fz.E1524_brightness_up_release, fz.E1524_brightness_down_hold, fz.E1524_brightness_down_release, fz.generic_battery, fz.ignore_power_change, fz.ignore_basic_change, fz.E1524_hold, ], toZigbee: [], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 1); const cfg = { direction: 0, attrId: 33, dataType: 32, minRepIntval: 0, maxRepIntval: repInterval.MAX, repChange: 0, }; const actions = [ (cb) => device.bind('genPowerCfg', coordinator, cb), (cb) => device.foundation('genPowerCfg', 'configReport', [cfg], foundationCfg, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['TRADFRI on/off switch'], model: 'E1743', vendor: 'IKEA', description: 'TRADFRI ON/OFF switch', supports: 'on, off, brightness up/down/stop', fromZigbee: [ fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.E1743_brightness_up, fz.E1743_brightness_down, fz.E1743_brightness_stop, fz.generic_battery, fz.ignore_power_change, ], toZigbee: [], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 1); const cfg = { direction: 0, attrId: 33, dataType: 32, minRepIntval: 0, maxRepIntval: repInterval.MAX, repChange: 0, }; const actions = [ (cb) => device.bind('genPowerCfg', coordinator, cb), (cb) => device.foundation('genPowerCfg', 'configReport', [cfg], foundationCfg, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['TRADFRI motion sensor'], model: 'E1525', vendor: 'IKEA', description: 'TRADFRI motion sensor', supports: 'occupancy', fromZigbee: [fz.generic_battery, fz.ignore_power_change, fz.E1525_occupancy, fz.ignore_basic_change], toZigbee: [], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 1); const cfg = { direction: 0, attrId: 33, dataType: 32, minRepIntval: 0, maxRepIntval: repInterval.MAX, repChange: 0, }; const actions = [ (cb) => device.bind('genPowerCfg', coordinator, cb), (cb) => device.foundation('genPowerCfg', 'configReport', [cfg], foundationCfg, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['TRADFRI signal repeater'], model: 'E1746', description: 'TRADFRI signal repeater', supports: 'linkquality', vendor: 'IKEA', fromZigbee: [fz.ignore_basic_change, fz.ignore_diagnostic_change, fz.E1746_linkquality], toZigbee: [], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 1); const actions = [ (cb) => device.report('genBasic', 'modelId', 3600, 14400, 0, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['GUNNARP panel 40*40'], model: 'T1829', description: 'GUNNARP panel 40*40', vendor: 'IKEA', extend: generic.light_onoff_brightness_colortemp, }, // Philips { zigbeeModel: ['LTC012'], model: '3306431P7', vendor: 'Philips', description: 'Hue Struana', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LLC012', 'LLC011'], model: '7299760PH', vendor: 'Philips', description: 'Hue Bloom', extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['LLC020'], model: '7146060PH', vendor: 'Philips', description: 'Hue Go', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCC001'], model: '4090531P7', vendor: 'Philips', description: 'Hue Flourish white and color ambiance ceiling light', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCG002'], model: '929001953101', vendor: 'Philips', description: 'Hue White and Color Ambiance GU10', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LWA004'], model: '8718699688820', vendor: 'Philips', description: 'Hue Filament Standard A60/E27 bluetooth', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWB004'], model: '433714', vendor: 'Philips', description: 'Hue Lux A19 bulb E27', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWB006', 'LWB014'], model: '9290011370', vendor: 'Philips', description: 'Hue white A60 bulb E27', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWB010'], model: '8718696449691', vendor: 'Philips', description: 'Hue White Single bulb B22', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWG001'], model: '9290018195', vendor: 'Philips', description: 'Hue white GU10', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWG004'], model: 'LWG004', vendor: 'Philips', description: 'Hue white GU10 bluetooth', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LST001'], model: '7299355PH', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip', extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['LST002'], model: '915005106701', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip plus', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LST003', 'LST004'], model: '9290018187B', vendor: 'Philips', description: 'Hue white and color ambiance LightStrip Outdoor', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCA002'], model: '9290022166', vendor: 'Philips', description: 'Hue white and color ambiance E26', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT001', 'LCT007', 'LCT010', 'LCT012', 'LCT014', 'LCT015', 'LCT016'], model: '9290012573A', vendor: 'Philips', description: 'Hue white and color ambiance E26/E27/E14', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT002'], model: '9290002579A', vendor: 'Philips', description: 'Hue white and color ambiance BR30', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT003'], model: '8718696485880', vendor: 'Philips', description: 'Hue white and color ambiance GU10', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LCT024'], model: '915005733701', vendor: 'Philips', description: 'Hue White and color ambiance Play Lightbar', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LTW011'], model: '464800', vendor: 'Philips', description: 'Hue white ambiance BR30 flood light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW012'], model: '8718696695203', vendor: 'Philips', description: 'Hue white ambiance E14', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LWE002'], model: '9290020399', vendor: 'Philips', description: 'Hue white E14', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LTW013'], model: '8718696598283', vendor: 'Philips', description: 'Hue white ambiance GU10', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW015'], model: '9290011998B', vendor: 'Philips', description: 'Hue white ambiance E26', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTA002'], model: '9290022167', vendor: 'Philips', description: 'Hue white ambiance E26 with Bluetooth', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW010', 'LTW001', 'LTW004'], model: '8718696548738', vendor: 'Philips', description: 'Hue white ambiance E26/E27', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTW017'], model: '915005587401', vendor: 'Philips', description: 'Hue white ambiance Adore light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LCW001'], model: '4090130P7', vendor: 'Philips', description: 'Hue Sana', extend: hue.light_onoff_brightness_colortemp_colorxy, }, { zigbeeModel: ['LTC001'], model: '3261030P7', vendor: 'Philips', description: 'Hue Being', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC003'], model: '3261331P7', vendor: 'Philips', description: 'Hue white ambiance Still', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC011'], model: '4096730U7', vendor: 'Philips', description: 'Hue Cher ceiling light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC013'], model: '3216131P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle square panel light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC015'], model: '3216331P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle rectangle panel light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTC016'], model: '3216431P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle round panel light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LTP003', 'LTP001'], model: '4033930P7', vendor: 'Philips', description: 'Hue white ambiance suspension Fair', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['LWF002'], model: '9290011370B', vendor: 'Philips', description: 'Hue white A60 bulb E27', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LWB015'], model: '046677476816', vendor: 'Philips', description: 'Hue white PAR38 outdoor', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LLC010'], model: '7199960PH', vendor: 'Philips', description: 'Hue Iris', extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['RWL020', 'RWL021'], model: '324131092621', vendor: 'Philips', description: 'Hue dimmer switch', supports: 'on/off, brightness, up/down/hold/release, click count', fromZigbee: [ fz._324131092621_ignore_on, fz._324131092621_ignore_off, fz._324131092621_ignore_step, fz._324131092621_ignore_stop, fz._324131092621_notification, fz.ignore_power_change, fz.generic_battery_remaining, ], toZigbee: [], configure: (ieeeAddr, shepherd, coordinator, callback) => { const ep1 = shepherd.find(ieeeAddr, 1); const actions = [ (cb) => ep1.bind('genOnOff', coordinator, cb), (cb) => ep1.bind('genLevelCtrl', coordinator, cb), ]; execute(ep1, actions, (result) => { if (result) { const ep2 = shepherd.find(ieeeAddr, 2); const actions = [ (cb) => ep2.foundation('genBasic', 'write', [{attrId: 0x0031, dataType: 0x19, attrData: 0x000B}], {manufSpec: 1, disDefaultRsp: 1, manufCode: 0x100B}, cb), (cb) => ep2.bind('manuSpecificPhilips', coordinator, cb), (cb) => ep2.bind('genPowerCfg', coordinator, cb), (cb) => ep2.report('genPowerCfg', 'batteryPercentageRemaining', 0, 1000, 0, cb), ]; execute(ep2, actions, callback); } else { callback(result); } }); }, }, { zigbeeModel: ['SML001'], model: '9290012607', vendor: 'Philips', description: 'Hue motion sensor', supports: 'occupancy, temperature, illuminance', fromZigbee: [ fz.generic_battery_remaining, fz.generic_occupancy, fz.generic_temperature, fz.ignore_occupancy_change, fz.generic_illuminance, fz.ignore_illuminance_change, fz.ignore_temperature_change, fz.ignore_basic_change, fz.ignore_basic_report, ], toZigbee: [tz.occupancy_timeout, tz.hue_motion_sensitivity], ep: (device) => { return { '': 2, // default 'ep1': 1, 'ep2': 2, // e.g. for write to msOccupancySensing }; }, configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 2); const actions = [ (cb) => device.bind('genPowerCfg', coordinator, cb), (cb) => device.bind('msIlluminanceMeasurement', coordinator, cb), (cb) => device.bind('msTemperatureMeasurement', coordinator, cb), (cb) => device.bind('msOccupancySensing', coordinator, cb), (cb) => device.report('genPowerCfg', 'batteryPercentageRemaining', 0, 1000, 0, cb), (cb) => device.report('msOccupancySensing', 'occupancy', 0, 600, null, cb), (cb) => device.report('msTemperatureMeasurement', 'measuredValue', 30, 600, 1, cb), (cb) => device.report('msIlluminanceMeasurement', 'measuredValue', 0, 600, null, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['SML002'], model: '9290019758', vendor: 'Philips', description: 'Hue motion outdoor sensor', supports: 'occupancy, temperature, illuminance', fromZigbee: [ fz.generic_battery_remaining, fz.generic_occupancy, fz.generic_temperature, fz.ignore_occupancy_change, fz.generic_illuminance, fz.ignore_illuminance_change, fz.ignore_temperature_change, ], toZigbee: [tz.occupancy_timeout, tz.hue_motion_sensitivity], ep: (device) => { return { '': 2, // default 'ep1': 1, 'ep2': 2, // e.g. for write to msOccupancySensing }; }, configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 2); const actions = [ (cb) => device.bind('genPowerCfg', coordinator, cb), (cb) => device.bind('msIlluminanceMeasurement', coordinator, cb), (cb) => device.bind('msTemperatureMeasurement', coordinator, cb), (cb) => device.bind('msOccupancySensing', coordinator, cb), (cb) => device.report('genPowerCfg', 'batteryPercentageRemaining', 0, 1000, 0, cb), (cb) => device.report('msOccupancySensing', 'occupancy', 0, 600, null, cb), (cb) => device.report('msTemperatureMeasurement', 'measuredValue', 30, 600, 1, cb), (cb) => device.report('msIlluminanceMeasurement', 'measuredValue', 0, 600, null, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['LOM001'], model: '929002240401', vendor: 'Philips', description: 'Hue smart plug', supports: 'on/off', fromZigbee: [fz.ignore_onoff_change, fz.state], toZigbee: [tz.on_off], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 11); const actions = [ (cb) => device.bind('genOnOff', coordinator, cb), (cb) => device.report('genOnOff', 'onOff', 0, 600, null, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['LLC014'], model: '7099860PH', vendor: 'Philips', description: 'LivingColors Aura', extend: hue.light_onoff_brightness_colorxy, }, { zigbeeModel: ['LTC014'], model: '3216231P5', vendor: 'Philips', description: 'Hue white ambiance Aurelle rectangle panel light', extend: hue.light_onoff_brightness_colortemp, }, { zigbeeModel: ['1744530P7'], model: '8718696170625', vendor: 'Philips', description: 'Hue Fuzo outdoor wall light', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['1743630P7'], model: '17436/30/P7', vendor: 'Philips', description: 'Hue Welcome white flood light', extend: hue.light_onoff_brightness, }, { zigbeeModel: ['LCS001'], model: '1741830P7', vendor: 'Philips', description: 'Hue Lily outdoor spot light', extend: hue.light_onoff_brightness_colortemp_colorxy, }, // Belkin { zigbeeModel: ['MZ100'], model: 'F7C033', vendor: 'Belkin', description: 'WeMo smart LED bulb', fromZigbee: [ fz.brightness, fz.state_change, fz.state_report, fz.brightness_report, fz.ignore_genGroups_devChange, fz.ignore_basic_change, ], supports: generic.light_onoff_brightness.supports, toZigbee: generic.light_onoff_brightness.toZigbee, }, // EDP { zigbeeModel: ['ZB-SmartPlug-1.0.0'], model: 'PLUG EDP RE:DY', vendor: 'EDP', description: 're:dy plug', supports: 'on/off, power measurement', fromZigbee: [fz.state, fz.ignore_onoff_change, fz.generic_power, fz.ignore_metering_change], toZigbee: [tz.on_off], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 85); const actions = [ (cb) => device.report('seMetering', 'instantaneousDemand', 10, 60, 1, cb), (cb) => device.report('genOnOff', 'onOff', 1, 60, 1, cb), ]; execute(device, actions, callback); }, }, { zigbeeModel: ['ZB-RelayControl-1.0.0'], model: 'SWITCH EDP RE:DY', vendor: 'EDP', description: 're:dy switch', supports: 'on/off', fromZigbee: [fz.state, fz.ignore_onoff_change], toZigbee: [tz.on_off], configure: (ieeeAddr, shepherd, coordinator, callback) => { const device = shepherd.find(ieeeAddr, 85); const actions = [ (cb) => device.report('genOnOff', 'onOff', 1, 60, 1, cb), ]; execute(device, actions, callback); }, }, // Custom devices (DiY) { zigbeeModel: ['lumi.router'], model: 'CC2530.ROUTER', vendor: 'Custom devices (DiY)', description: '[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)', supports: 'state, description, type, rssi', fromZigbee: [fz.CC2530ROUTER_state, fz.CC2530ROUTER_meta, fz.ignore_onoff_change], toZigbee: [tz.ptvo_switch_trigger], }, { zigbeeModel: ['ptvo.switch'], model: 'ptvo.switch', vendor: 'Custom devices (DiY)', description: '[Multi-channel relay switch](https://ptvo.info/zigbee-switch-configurable-firmware-router-199/)', supports: 'hold, single, double and triple click, on/off', fromZigbee: [fz.ptvo_switch_state, fz.ptvo_switch_buttons, fz.ignore_basic_change, fz.ignore_onoff_change, fz.ignore_multistate_change, ], toZigbee: [tz.on_off, tz.ptvo_switch_trigger], ep: (device) => { return {'bottom_left': 1, 'bottom_right': 2, 'top_left': 3, 'top_right': 4, 'center': 5}; }, }, { zigbeeModel: ['DNCKAT_S001'], model: 'DNCKATSW001', vendor: 'Custom devices (DiY)', description: '[DNCKAT single key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)', supports: 'on/off', fromZigbee: [fz.state, fz.ignore_onoff_change], toZigbee: [tz.on_off], }, { zigbeeModel: ['DNCKAT_S002'], model: 'DNCKATSW002', vendor: 'Custom devices (DiY)', description: '[DNCKAT double key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)', supports: 'hold/release, on/off', fromZigbee: [fz.DNCKAT_S00X_state, fz.DNCKAT_S00X_buttons], toZigbee: [tz.on_off],