From fa5b765c73345ef43292549f5285b57ed496fea5 Mon Sep 17 00:00:00 2001 From: MoskitoHorst Date: Thu, 14 Feb 2019 09:08:35 +0100 Subject: [PATCH 01/12] tint remote, 3 keys activated On-Off and brightness up/down --- converters/fromZigbee.js | 22 ++++++++++++++++++++++ devices.js | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index a5b65a3cd059d..18ee2052bd688 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1560,6 +1560,28 @@ const converters = { return result; }, }, + tint404011_on: { + cid: 'genOnOff', + type: 'cmdOn', + convert: (model, msg, publish, options) => { + return {action: 'toggle'}; + }, + }, + tint404011_off: { + cid: 'genOnOff', + type: 'cmdOff', + convert: (model, msg, publish, options) => { + return {action: 'toggle'}; + }, + }, + tint404011_brightness_updown_click: { + cid: 'genLevelCtrl', + type: 'cmdStep', + convert: (model, msg, publish, options) => { + const direction = msg.data.data.stepmode === 1 ? 'down' : 'up'; + return {action: `brightness_${direction}_click`}; + }, + }, E1524_toggle: { cid: 'genOnOff', type: 'cmdToggle', diff --git a/devices.js b/devices.js index 71cd92458802a..470068a2c0fed 100644 --- a/devices.js +++ b/devices.js @@ -2383,6 +2383,24 @@ const devices = [ description: 'Tint LED bulb GU10/E14/E27 350/470/806 lumen, dimmable, opal white', extend: generic.light_onoff_brightness_colortemp, }, + { + zigbeeModel: ['ZBT-Remote-ALL-RGBW'], + model: 'tint404011', + description: 'Tint remote control', + supports: + 'toggle, arrow left/right click/hold/release, brightness up/down click/hold/release ' + + '(**[requires additional setup!]' + + '(https://koenkk.github.io/zigbee2mqtt/getting_started/pairing_devices.html#ikea-tradfri)**)', + vendor: 'Müller Licht', + fromZigbee: [ + fz.tint404011_on, fz.tint404011_off, + fz.E1524_toggle, fz.tint404011_brightness_updown_click, + // 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, + ], + toZigbee: [], + }, // Salus { From 88d0809242b9f5fa38b1d9fbd76f8594739c3e44 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 14 Feb 2019 18:30:55 +0100 Subject: [PATCH 02/12] Update devices.js --- devices.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/devices.js b/devices.js index 470068a2c0fed..f28960eac3f39 100644 --- a/devices.js +++ b/devices.js @@ -2385,19 +2385,15 @@ const devices = [ }, { zigbeeModel: ['ZBT-Remote-ALL-RGBW'], - model: 'tint404011', + model: 'MLI-404011', description: 'Tint remote control', - supports: - 'toggle, arrow left/right click/hold/release, brightness up/down click/hold/release ' + + supports: 'toggle, brightness, other buttons are not supported yet! ' + '(**[requires additional setup!]' + - '(https://koenkk.github.io/zigbee2mqtt/getting_started/pairing_devices.html#ikea-tradfri)**)', + '(http://www.zigbee2mqtt.io/getting_started/pairing_devices.htmli)**)', vendor: 'Müller Licht', fromZigbee: [ fz.tint404011_on, fz.tint404011_off, fz.E1524_toggle, fz.tint404011_brightness_updown_click, - // 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, ], toZigbee: [], }, From b06faa227bfd5086ffa038a55f7fede5e027d269 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 14 Feb 2019 18:31:42 +0100 Subject: [PATCH 03/12] Update fromZigbee.js --- converters/fromZigbee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 18ee2052bd688..114d1fe1cc032 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1582,7 +1582,7 @@ const converters = { return {action: `brightness_${direction}_click`}; }, }, - E1524_toggle: { + cmdToggle: { cid: 'genOnOff', type: 'cmdToggle', convert: (model, msg, publish, options) => { From 22705d1a9af56db38673c6ab3c72a23e9cea805e Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 14 Feb 2019 18:32:12 +0100 Subject: [PATCH 04/12] Update devices.js --- devices.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/devices.js b/devices.js index f28960eac3f39..2fae9ce7335bf 100644 --- a/devices.js +++ b/devices.js @@ -603,7 +603,7 @@ const devices = [ '(https://koenkk.github.io/zigbee2mqtt/getting_started/pairing_devices.html#ikea-tradfri)**)', vendor: 'IKEA', fromZigbee: [ - fz.E1524_toggle, fz.E1524_arrow_click, fz.E1524_arrow_hold, fz.E1524_arrow_release, + 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, ], @@ -2392,8 +2392,7 @@ const devices = [ '(http://www.zigbee2mqtt.io/getting_started/pairing_devices.htmli)**)', vendor: 'Müller Licht', fromZigbee: [ - fz.tint404011_on, fz.tint404011_off, - fz.E1524_toggle, fz.tint404011_brightness_updown_click, + fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click, ], toZigbee: [], }, From fbfd378c82e7b5da950f852b2f38ab7f1cc2d634 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 14 Feb 2019 18:32:39 +0100 Subject: [PATCH 05/12] Update devices.js --- devices.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices.js b/devices.js index 2fae9ce7335bf..0b176028372c3 100644 --- a/devices.js +++ b/devices.js @@ -600,7 +600,7 @@ const devices = [ supports: 'toggle, arrow left/right click/hold/release, brightness up/down click/hold/release ' + '(**[requires additional setup!]' + - '(https://koenkk.github.io/zigbee2mqtt/getting_started/pairing_devices.html#ikea-tradfri)**)', + '(http://www.zigbee2mqtt.io/getting_started/pairing_devices.html#ikea-tradfri)**)', vendor: 'IKEA', fromZigbee: [ fz.cmdToggle, fz.E1524_arrow_click, fz.E1524_arrow_hold, fz.E1524_arrow_release, @@ -2389,7 +2389,7 @@ const devices = [ description: 'Tint remote control', supports: 'toggle, brightness, other buttons are not supported yet! ' + '(**[requires additional setup!]' + - '(http://www.zigbee2mqtt.io/getting_started/pairing_devices.htmli)**)', + '(http://www.zigbee2mqtt.io/getting_started/pairing_devices.html)**)', vendor: 'Müller Licht', fromZigbee: [ fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click, From a433a35b39e001ee8302bfc86e34b66b2b1bc0eb Mon Sep 17 00:00:00 2001 From: MoskitoHorst Date: Sun, 17 Feb 2019 14:23:22 +0100 Subject: [PATCH 06/12] tint remote (ZBT-Remote) Color keys Implementation of color wheel and color temp, brightness with stesize and transition-time --- converters/fromZigbee.js | 17 ++++++++++++++++- devices.js | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 114d1fe1cc032..671146e647188 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1579,7 +1579,22 @@ const converters = { type: 'cmdStep', convert: (model, msg, publish, options) => { const direction = msg.data.data.stepmode === 1 ? 'down' : 'up'; - return {action: `brightness_${direction}_click`}; + return {action: `brightness_${direction}_click`, stepsize: msg.data.data.stepsize ,transtime: msg.data.data.transtime}; + }, + }, + tint404011_move_to_color_temp: { + cid: 'lightingColorCtrl', + type: 'cmdMoveToColorTemp', + convert: (model, msg, publish, options) => { + return {action: `color_temp_move`, colortemp: msg.data.data.colortemp, transtime: msg.data.data.transtime }; + }, + }, + tint404011_move_to_color: { + cid: 'lightingColorCtrl', + type: 'cmdMoveToColor', + convert: (model, msg, publish, options) => { + const direction = msg.data.data.stepmode === 1 ? 'down' : 'up'; + return {action: `color_move`, colorx: msg.data.data.colorx, colory: msg.data.data.colory, transtime: msg.data.data.transtime }; }, }, cmdToggle: { diff --git a/devices.js b/devices.js index 0b176028372c3..fbf899083e9e7 100644 --- a/devices.js +++ b/devices.js @@ -2393,6 +2393,7 @@ const devices = [ vendor: 'Müller Licht', fromZigbee: [ fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click, + fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, ], toZigbee: [], }, From 59be6869e5f3f89e54e5d984b72ba9ee083d9d0f Mon Sep 17 00:00:00 2001 From: MoskitoHorst Date: Mon, 18 Feb 2019 09:15:34 +0100 Subject: [PATCH 07/12] syntax power-key --- converters/fromZigbee.js | 11 +++++++++-- devices.js | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 07ac56fa7c7a4..8cc2943b98c92 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1564,14 +1564,14 @@ const converters = { cid: 'genOnOff', type: 'cmdOn', convert: (model, msg, publish, options) => { - return {action: 'power', state: on}; + return {action: 'power', state: 'on'}; }, }, tint404011_off: { cid: 'genOnOff', type: 'cmdOff', convert: (model, msg, publish, options) => { - return {action: 'power', state: off}; + return {action: 'power', state: 'off'}; }, }, tint404011_brightness_updown_click: { @@ -1582,6 +1582,13 @@ const converters = { return {action: `brightness_${direction}_click`, stepsize: msg.data.data.stepsize ,transtime: msg.data.data.transtime}; }, }, + tint404011_scene: { + cid: 'genBasic', + type: 'cmdWrite', + convert: (model, msg, publish, options) => { + return {action: `scene${msg.data.data[0].attrData}` }; + }, + }, tint404011_move_to_color_temp: { cid: 'lightingColorCtrl', type: 'cmdMoveToColorTemp', diff --git a/devices.js b/devices.js index 9cabac1a2ae47..1206d4382357f 100644 --- a/devices.js +++ b/devices.js @@ -2401,7 +2401,7 @@ const devices = [ vendor: 'Müller Licht', fromZigbee: [ fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click, - fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, + fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene, ], toZigbee: [], }, From 1ad499b099775cb083f0de6d89dfe7ca1bcea9eb Mon Sep 17 00:00:00 2001 From: MoskitoHorst Date: Mon, 18 Feb 2019 20:30:05 +0100 Subject: [PATCH 08/12] Update fromZigbee.js change on/off-button to action:'on' and 'off' --- converters/fromZigbee.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 8cc2943b98c92..692ae2b0d8e99 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1564,14 +1564,14 @@ const converters = { cid: 'genOnOff', type: 'cmdOn', convert: (model, msg, publish, options) => { - return {action: 'power', state: 'on'}; + return {action: 'on'}; }, }, tint404011_off: { cid: 'genOnOff', type: 'cmdOff', convert: (model, msg, publish, options) => { - return {action: 'power', state: 'off'}; + return {action: 'off'}; }, }, tint404011_brightness_updown_click: { From 8c4f3877942451729b32799b5d9ec4839f5314a3 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 19 Feb 2019 19:25:13 +0100 Subject: [PATCH 09/12] Update fromZigbee.js --- converters/fromZigbee.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 692ae2b0d8e99..71bf825cde57a 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1,4 +1,4 @@ -'use strict'; +'use strict'; const debounce = require('debounce'); const common = require('./common'); @@ -1579,28 +1579,41 @@ const converters = { type: 'cmdStep', convert: (model, msg, publish, options) => { const direction = msg.data.data.stepmode === 1 ? 'down' : 'up'; - return {action: `brightness_${direction}_click`, stepsize: msg.data.data.stepsize ,transtime: msg.data.data.transtime}; + return { + action: `brightness_${direction}_click`, + step_size: msg.data.data.stepsize, + transition_time: msg.data.data.transtime, + }; }, }, tint404011_scene: { cid: 'genBasic', type: 'cmdWrite', convert: (model, msg, publish, options) => { - return {action: `scene${msg.data.data[0].attrData}` }; + return {action: `scene${msg.data.data[0].attrData}`}; }, }, tint404011_move_to_color_temp: { cid: 'lightingColorCtrl', type: 'cmdMoveToColorTemp', convert: (model, msg, publish, options) => { - return {action: `color_temp`, colortemp: msg.data.data.colortemp, transtime: msg.data.data.transtime }; + return { + action: `color_temp`, + color_temperature: msg.data.data.colortemp, + transition_time: msg.data.data.transtime, + }; }, }, tint404011_move_to_color: { cid: 'lightingColorCtrl', type: 'cmdMoveToColor', convert: (model, msg, publish, options) => { - return {action: `color_wheel`, colorx: msg.data.data.colorx, colory: msg.data.data.colory, transtime: msg.data.data.transtime }; + return { + action: `color_wheel`, + color_x: msg.data.data.colorx, + color_y: msg.data.data.colory, + transition_time: msg.data.data.transtime, + }; }, }, cmdToggle: { From 286a0eae947e8d698447b8eacea1090364d37310 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 19 Feb 2019 19:25:46 +0100 Subject: [PATCH 10/12] Update devices.js --- devices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices.js b/devices.js index 1206d4382357f..dc51e22010a51 100644 --- a/devices.js +++ b/devices.js @@ -2401,7 +2401,7 @@ const devices = [ vendor: 'Müller Licht', fromZigbee: [ fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click, - fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene, + fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene, ], toZigbee: [], }, From ef9640b0fb3ddabbbe9e9799570516d8e8f5cbda Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 19 Feb 2019 19:29:06 +0100 Subject: [PATCH 11/12] Update fromZigbee.js --- converters/fromZigbee.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 71bf825cde57a..f478dbecbf489 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -1599,7 +1599,7 @@ const converters = { convert: (model, msg, publish, options) => { return { action: `color_temp`, - color_temperature: msg.data.data.colortemp, + action_color_temperature: msg.data.data.colortemp, transition_time: msg.data.data.transtime, }; }, @@ -1610,8 +1610,8 @@ const converters = { convert: (model, msg, publish, options) => { return { action: `color_wheel`, - color_x: msg.data.data.colorx, - color_y: msg.data.data.colory, + action_color_x: msg.data.data.colorx, + action_color_y: msg.data.data.colory, transition_time: msg.data.data.transtime, }; }, From 6151b57ca220494a1b3e5c0d411273777f2b35e8 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 19 Feb 2019 19:32:37 +0100 Subject: [PATCH 12/12] Update devices.js --- devices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices.js b/devices.js index dc51e22010a51..4e68b9aec53d3 100644 --- a/devices.js +++ b/devices.js @@ -2401,7 +2401,7 @@ const devices = [ vendor: 'Müller Licht', fromZigbee: [ fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click, - fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene, + fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene, ], toZigbee: [], },