From a526a6dfca3e7662a059ae373f5552e2503a8261 Mon Sep 17 00:00:00 2001 From: 7h0mas-R Date: Mon, 16 May 2022 21:29:40 +0200 Subject: [PATCH 1/5] added duration setting --- devices/schneider_electric.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/devices/schneider_electric.js b/devices/schneider_electric.js index b9829f94c51f0..2f67d4fc11fb0 100644 --- a/devices/schneider_electric.js +++ b/devices/schneider_electric.js @@ -439,13 +439,15 @@ module.exports = [ zigbeeModel: ['1GANG/SHUTTER/1'], model: 'MEG5113-0300/MEG5165-0000', vendor: 'Schneider Electric', - description: 'Merten PlusLink Shutter insert with Merten Wiser System M Push Button', + description: 'Merten MEG5165 PlusLink Shutter insert with Merten Wiser System M Push Button (1fold)', fromZigbee: [fz.cover_position_tilt, fz.command_cover_close, fz.command_cover_open, fz.command_cover_stop], - toZigbee: [tz.cover_position_tilt, tz.cover_state], - exposes: [e.cover_position()], + toZigbee: [tz.cover_position_tilt, tz.cover_state, tzLocal.lift_duration, tzLocal.led_setting], + exposes: [e.cover_position(), + exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds').withValueMin(0).withValueMax(300).withDescription('Duration of lift') + ], meta: {coverInverted: true}, configure: async (device, coordinatorEndpoint, logger) => { - const endpoint = device.getEndpoint(1) || device.getEndpoint(5); + const endpoint = device.getEndpoint(5); await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']); await reporting.currentPositionLiftPercentage(endpoint); }, From f03868c14c391d7e56c5ae691bb84b9658bc9d15 Mon Sep 17 00:00:00 2001 From: 7h0mas-R Date: Mon, 16 May 2022 22:16:03 +0200 Subject: [PATCH 2/5] fixed bug --- devices/schneider_electric.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/schneider_electric.js b/devices/schneider_electric.js index 2f67d4fc11fb0..072e5029f26a9 100644 --- a/devices/schneider_electric.js +++ b/devices/schneider_electric.js @@ -441,9 +441,9 @@ module.exports = [ vendor: 'Schneider Electric', description: 'Merten MEG5165 PlusLink Shutter insert with Merten Wiser System M Push Button (1fold)', fromZigbee: [fz.cover_position_tilt, fz.command_cover_close, fz.command_cover_open, fz.command_cover_stop], - toZigbee: [tz.cover_position_tilt, tz.cover_state, tzLocal.lift_duration, tzLocal.led_setting], + toZigbee: [tz.cover_position_tilt, tz.cover_state, tzLocal.lift_duration], exposes: [e.cover_position(), - exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds').withValueMin(0).withValueMax(300).withDescription('Duration of lift') + exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds').withValueMin(0).withValueMax(300).withDescription('Duration of lift') ], meta: {coverInverted: true}, configure: async (device, coordinatorEndpoint, logger) => { From fce3225510ae439f31c9ede6b71f79c760265447 Mon Sep 17 00:00:00 2001 From: 7h0mas-R Date: Mon, 16 May 2022 22:25:38 +0200 Subject: [PATCH 3/5] fixed lint errors --- devices/schneider_electric.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/devices/schneider_electric.js b/devices/schneider_electric.js index 072e5029f26a9..1dae338704d1c 100644 --- a/devices/schneider_electric.js +++ b/devices/schneider_electric.js @@ -442,9 +442,10 @@ module.exports = [ description: 'Merten MEG5165 PlusLink Shutter insert with Merten Wiser System M Push Button (1fold)', fromZigbee: [fz.cover_position_tilt, fz.command_cover_close, fz.command_cover_open, fz.command_cover_stop], toZigbee: [tz.cover_position_tilt, tz.cover_state, tzLocal.lift_duration], - exposes: [e.cover_position(), - exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds').withValueMin(0).withValueMax(300).withDescription('Duration of lift') - ], + exposes: [e.cover_position(), + exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds').withValueMin(0) + .withValueMax(300).withDescription('Duration of lift') + ], meta: {coverInverted: true}, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(5); From 08ee364c6d4297f59b6efb76052c59efea57811c Mon Sep 17 00:00:00 2001 From: 7h0mas-R Date: Mon, 16 May 2022 22:31:23 +0200 Subject: [PATCH 4/5] fixed format lint --- devices/schneider_electric.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/devices/schneider_electric.js b/devices/schneider_electric.js index 1dae338704d1c..3fe36aaa13ea2 100644 --- a/devices/schneider_electric.js +++ b/devices/schneider_electric.js @@ -442,10 +442,8 @@ module.exports = [ description: 'Merten MEG5165 PlusLink Shutter insert with Merten Wiser System M Push Button (1fold)', fromZigbee: [fz.cover_position_tilt, fz.command_cover_close, fz.command_cover_open, fz.command_cover_stop], toZigbee: [tz.cover_position_tilt, tz.cover_state, tzLocal.lift_duration], - exposes: [e.cover_position(), - exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds').withValueMin(0) - .withValueMax(300).withDescription('Duration of lift') - ], + exposes: [e.cover_position(), exposes.numeric('lift_duration', ea.STATE_SET).withUnit('seconds') + .withValueMin(0).withValueMax(300).withDescription('Duration of lift')], meta: {coverInverted: true}, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(5); From 179917e493ccc3e53e08c5b8442f44f6873fa3f0 Mon Sep 17 00:00:00 2001 From: 7h0mas-R Date: Wed, 18 May 2022 19:25:35 +0200 Subject: [PATCH 5/5] added endpoint(1) again --- devices/schneider_electric.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/schneider_electric.js b/devices/schneider_electric.js index 3fe36aaa13ea2..8bb592ed875ec 100644 --- a/devices/schneider_electric.js +++ b/devices/schneider_electric.js @@ -446,7 +446,7 @@ module.exports = [ .withValueMin(0).withValueMax(300).withDescription('Duration of lift')], meta: {coverInverted: true}, configure: async (device, coordinatorEndpoint, logger) => { - const endpoint = device.getEndpoint(5); + const endpoint = device.getEndpoint(1) || device.getEndpoint(5); await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']); await reporting.currentPositionLiftPercentage(endpoint); },