Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.07k stars 1.67k forks source link

[New device support]: WDE002388 Schneider Electric #16364

Closed mstjerna closed 1 year ago

mstjerna commented 1 year ago

Link

https://www.se.com/se/sv/download/document/WDE002388_ROHS_CHINA_DECLARATION/

Database entry

{"id":31,"type":"Router","ieeeAddr":"0x50325ffffe4d2c4b","nwkAddr":51431,"manufId":4190,"manufName":"Schneider Electric","powerSource":"Mains (single phase)","modelId":"NHROTARY/DIMMER/1","epList":[21,242,3],"endpoints":{"3":{"profId":260,"epId":3,"devId":257,"inClusterList":[0,3,4,5,6,8,769,2821],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"21":{"profId":260,"epId":21,"devId":260,"inClusterList":[0,3,2821,65303],"outClusterList":[3,4,5,6,8,258],"clusters":{"genBasic":{"attributes":{"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":6,"hwVersion":1,"dateCode":"","swBuildId":"002.004.015 R","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1674721731538,"defaultSendRequestWhen":"immediate"}

Comments

It's connecting fine and reports back the status and current dim-value but I can't trigger on/off event from Zigbee2Mqtt or change anything on the device. It's identifying itself as a WDE002334 instead of a WDE002388. I hope this would be an easy fix to add the triggering event towards the device.

Nothing is as said happening to the device but the logfiles are putting out this:

Info 2023-01-26 10:23:43MQTT publish: topic 'zigbee2mqtt/0x50325ffffe4d2c4b', payload '{"ballast_maximum_level":null,"ballast_minimum_level":null,"brightness":220,"dimmer_mode":null,"last_seen":"2023-01-26T09:23:44.349Z","linkquality":40,"state":"ON"}'

Info 2023-01-26 10:24:19MQTT publish: topic 'zigbee2mqtt/0x50325ffffe4d2c4b', payload '{"ballast_maximum_level":null,"ballast_minimum_level":null,"brightness":220,"dimmer_mode":null,"last_seen":"2023-01-26T09:24:20.483Z","linkquality":36,"state":"OFF"}'

Error 2023-01-26 10:26:21Publish 'get' 'brightness' to '0x50325ffffe4d2c4b' failed: 'Error: Read 0x50325ffffe4d2c4b/21 genLevelCtrl(["currentLevel"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE')'

External converter

No response

Supported color modes

Dimmer value 0-254

Color temperature range

No response

bozman2021 commented 1 year ago

Got the same problem, would like to have this added.

mstjerna commented 1 year ago

Got the same problem, would like to have this added.

I updated to the latest version 1.30.0 and it's now supported. :-)

joggs commented 1 year ago

Hi, I got the same problem as you, that it identifies as 2344, even though i have z2m 1.30.1.1 Did it automatically idetify correctly for you? Is it possible to manually change to 2388?

joggs commented 1 year ago

WDE002388 is not in the list over compatible devices so please add support for it. Feel free to ping me if you need more information

joggs commented 1 year ago

I created an external converter skeleton with the right model and vendor and restarted and I can now control the WDE002388. Not sure if it is my skeleton or just the restart that made the difference. The only thing that does not work is current_level_startup , as the dimmer always starts on max brightness, which is annoying.

I just added this as a js-file:

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;

const definition = {
    zigbeeModel: ['lumi.sens'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'WDE002388', // Vendor model number, look on the device for a model number
    vendor: 'Schneider Electric', // Vendor of the device (only used for documentation and startup logging)
    description: 'Rotary dimmer', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [], // We will add this later
    toZigbee: [], // Should be empty, unless device can be controlled (e.g. lights, switches).
    exposes: [e.battery(), e.temperature(), e.humidity()], // Defines what this device exposes, used for e.g. Home Assistant discovery and in the frontend
};

module.exports = definition;

("current_level_startup":"previous" does not work . the light always starts with max brightness. I can see in the log that z2m always sends "on_level":254 ) . Great if you could fix that as I am not sure how to do that, plus add native support for WDE002388 of course.

One example from the log:

_Info 2023-02-24 20:23:00MQTT publish: topic 'zigbee2mqtt/Schneider2388', payload '{"ballast_lamp_alarm_lamp_burn_hours":false,"ballast_maximum_level":237,"ballast_minimum_level":6,"ballast_status_lamp_failure":false,"ballast_status_non_operational":false,"brightness":24,"dimmer_mode":"auto","last_seen":"2023-02-24T20:23:00+01:00","level_config":{"current_level_startup":"previous","execute_if_off":false,"onlevel":254},"linkquality":240,"state":"ON"}'

bozman2021 commented 1 year ago

It works fine for me with the 1.30.1-1 version, it's stills recognise the unit as [WDE002334] but after doing a couple reconfiguring it works fine. But the behavior is the same, turn on and then it's max brightness.

joggs commented 1 year ago

Still relevant. To summarize: It should be working without reconfiguring and the max brightness is still anissue.

Xaqumuti commented 1 year ago

Hi, In case it helps, you can download the Zigbee attributes specification for Schneider Electric / Merten devices from here: https://shop.exchange.se.com/en-US/apps/103010/zigbee-interface-and-behaviour-documentation-for-schneider-electric-connected-devices Only e-mail registration needed.

There's an attribute to set the Max and Min brightness levels. See page 19 in the document attached Cheers ZB Spec - Rotary Dimmer - 110422.pdf

Caine72 commented 1 year ago

I have this dimmer as well. And I was actually fooled that it was identified correctly as most things seemed to work.

But as I started to configure it properly, I noticed the min/max ballast was not working/ beeing respected. So I started digging around and it lead me here.

When I set the max value. Light lowers to that value. When I set the min value, the lights turn off. When I rotate the dial I can go above and below the max values.

Anyone else having that same issue?

joggs commented 1 year ago

I suppose everyone has this problem as it is not implemented. Schneider is the number one brand and the brand of choice for professionals in big parts of Europe so I think it is important that this device works as expected.

sön 23 apr. 2023 kl. 17:19 skrev Caine72 @.***>:

I have this dimmer as well. And I was actually fooled that it was identified correctly as most things seemed to work.

But as I noticed the min/max ballast i started digging around.

Anyone else having that same issue?

— Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/16364#issuecomment-1519091363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLJXPP5YIFVCC3CI3RP5DXCVB7FANCNFSM6AAAAAAUHIZ56U . You are receiving this because you commented.Message ID: @.***>

--

/Jörgen Bergström

Caine72 commented 1 year ago

Starting to play around with this a bit. Here is the converter for WDE002334 rebranded as WDE002388 I'll see if I can figure out more. ( 100% beginner when it comes to this) But between kids and work will not promise anything.

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;

const definition = {
    zigbeeModel: ['NHROTARY/DIMMER/1'],
    model: 'WDE002388',
    vendor: 'Schneider Electric',
    description: 'Rotary dimmer',
    fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
    toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
    exposes: [e.light_brightness().withLevelConfig(),
        exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
            .withDescription('Specifies the minimum light output of the ballast'),
        exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
            .withDescription('Specifies the maximum light output of the ballast'),
        exposes.enum('dimmer_mode', ea.ALL, ['auto', 'rc', 'rl', 'rl_led'])
            .withDescription('Sets dimming mode to autodetect or fixed RC/RL/RL_LED mode (max load is reduced in RL_LED)')],
    configure: async (device, coordinatorEndpoint, logger) => {
                const endpoint = device.getEndpoint(3);
                await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
                await reporting.onOff(endpoint);
                await reporting.brightness(endpoint);
            }
};

module.exports = definition;
Caine72 commented 1 year ago

Found the addition of the 2334 where the implementor (rindlerblabla)wrote this:

(The product will soon be replaced with WDE002388. The only difference is that WDE002388 comes in zigbee mode as default and WDE002334 comes in bluetooth mode as default, however it's possible to just switch mode by pressing the setup button.)

https://github.com/Koenkk/zigbee2mqtt/issues/7177#issuecomment-825694097

But as many of the things added back then does not seem to work on the 2388 it does not seem to entirely be the case. =(

Caine72 commented 1 year ago

Some end of the day observations, via the dev console.

genLevelCtrl, onLevel

genLevelCtrl, startUpCurrentLevel

The transition values all return unsupported_attribute.

lightingBallastCfg, min/max-Level

Caine72 commented 1 year ago

Hi, In case it helps, you can download the Zigbee attributes specification for Schneider Electric / Merten devices from here: https://shop.exchange.se.com/en-US/apps/103010/zigbee-interface-and-behaviour-documentation-for-schneider-electric-connected-devices Only e-mail registration needed.

There's an attribute to set the Max and Min brightness levels. See page 19 in the document attached Cheers ZB Spec - Rotary Dimmer - 110422.pdf

Seems to be an issue with the pdf. It cannot be opened.

EDIT Found it via Schneiders homepage. Their UX design could need some work.....

Caine72 commented 1 year ago

Learning stuff.

StartUpCurrentLevel

Specifies the initial level to be applied after reboot. When this attribute is set to the invalid value (0xFF), the light will return to the previously active level (before power was cut), when it is turned on again. Otherwise the current level will be set to the value specified here subject to range limitations imposed by the ballast configuration cluster on this endpoint.

Did not know this only applied to reboot of the device. OK!

OnLevel Specifies the level that shall be applied, when an on/toggle command causes the light to turn on. When this attribute is set to the invalid value (0xFF), the light will return to the previously active level (before it was turned off), when it is turned on again.

So we need that one visible.. at least. Will publish the new extension when i figured out how to do that.... and manage to resync it to z2m again ..

Caine72 commented 1 year ago
        exposes.numeric('on_level',ea.ALL).withValueMin(1).withValueMax(254)
            .withDescription('Specifies the Start Up level of the light'),

Tried adding this to the expose list. But .. it only says that it's missing the converter when trying to set it. Though I can see that it is on_level is part of the tz and fz files. Scratching my head. Probably me doing something wrong. I can see that the value is read as well at some points.. so i thought i could expose it ..but ..

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Cityloue15 commented 10 months ago

Hello, can anyone confirm that the problem has been closed and not resolved? My switch, when I press it, starts at max level without any possible configuration. Best regards Alexandre