Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NHMOTION/UNIDIM/1 (ELKO EKO06984, EKO06985 and EKO06986) #8187

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

FSund
Copy link

@FSund FSund commented Oct 25, 2024

I've combined the converters for Schneider WDE002961 (push button dimmer) and Schneider 545D6306 (PIR with relay) to come up with something that seems to work.

This supports on/off, dimming, ballast config, occupancy, and light level/illuminance.

Some testing still remains before it's ready for review.

Can't decide between ELKO or Elko, the database seems to have both entries.

TODO

  • Support dimming mode (seems to only support 0: RL-LED and 3: Auto)
  • Verify the dimming mode mapping is correct (0: RL-LED and 3: Auto might be reversed)
  • Support on_level

Optional(?)

  • Sensitivity
  • Detection delay
  • Lux threshold

@peroo
Copy link

peroo commented Oct 25, 2024

Just a quick note that I think the vendor should probably be Schneider. The ELKO version is just a white-label of WDE002962.

Also, I have a list of commands sniffed from the gateway during pairing, and when executing commands in the app. Might help with getting all the functionality implemented.

When pairing:
- Set on level 255. Cluster 8, profile 104, endpoint 3, attribute 11, 8bit uint, on level 255.
- Configure reporting, endpoint 3, cluster 0x0b05, attribute 0x011d, 8bit signed int, 127
- Configure reporting, endpoint 3, cluster 0x0b05, attribute 0x011c, 8bit uint, 255
- Configure reporting, endpoint 3, cluster 0x0006, attribute 0x000, boolean, direction reported 0x00 - attribute 0x4001 16bit uint, on time 1.0s, direction reported 0x00
- Configure reporting, endpoint 3, cluster 0x0008, attribute 0x0000, direction reported 0x00, 8bit uint, current level 1
- Configure reporting, endpoint 3, cluster 0x0406, attribute 0x0000, direction reported 0x00, 8bit bitmap
- Configure reporting, endpoint 37, cluster 0x0400, attribute 0x0000, direction reported 0x00, 16bit uint, measured value 441
- Configure reporting, endpoint 37, cluster 0xff19, attribute 0x0000, direction reported 0x00, 16bit uint, 1
- Bind:
    - endpoint 3, cluster 0x0b05
    - endpoint 3, cluster 0x0006
    - endpoint 3, cluster 0x0008
    - endpoint 37, cluster 0x0406
    - endpoint 37, cluster 0x0400
    - endpoint 37, cluster 0xff19

App Commands:
- Dimming mode: endpoint 3, cluster 301, profile 104, attribute 0xe000
    - RL-LED: enum8 0
    - Auto: enum8 3
- Dimming range: endpoint 3, cluster 301:
    - Min: attribute 0x0010, 0-254
    - Max: attribute 0x0011, 0-254
- Toggle mode: endpoint 3, cluster 8:
    - 100%: attribute 0x0011, 8bit uint, on level 254
    - last level: attribute 0x0011, 8bit uint, on level 255
- Sensitivity settings: endpoint 37, cluster 0x0406
    - Medium: attribute 0xe003, uint8 75
    - Low: attribute 0xe003, uint8 50
    - High: attribute 0xe003, uint8 100
- Detection delay: endpoint 37, cluster 406
    - 15s: attribute 0x0010, 16bit uint, 15
    - 300s: attribute 0x0010, 16bit uint, 300
    - 13618: attribute 0x0010, 16bit uint, 300
- Lux threshold, endpoint 37, cluster 0xff19
    - Current lux (21lx): attribute 0x0000, 16bit uint, 13618 (0x3532)
    - 1000lx: attribute 0x0000, 16bit uint, 30001(0x7531)

model: 'EKO06984',
vendor: 'ELKO',
description: 'SmartPir with push dimmer',
fromZigbee: [fz.on_off, fz.brightness, fz.illuminance, fz.level_config, fz.schneider_lighting_ballast_configuration, fz.occupancy],
Copy link
Owner

@Koenkk Koenkk Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try with modern extend? E.g. extend: [light({configureReporting: true})],, then you can remove fromZigbee, toZigbee, exposes and configure.

@FSund
Copy link
Author

FSund commented Oct 26, 2024

Also, I have a list of commands sniffed from the gateway during pairing, and when executing commands in the app. Might help with getting all the functionality implemented.

From your list and some testing it seems like some custom tz an fz might be required to support all features.

For example, setting dimmer_mode

z2m: Publish 'set' 'dimmer_mode' to '0x70ac08fffe4959e0' failed: 
'Error: ZCL command 0x70ac08fffe4959e0/3 lightingBallastCfg.write(
{"57344":{"value":1,"type":48}}, 
{"timeout":10000,
  "disableResponse":false,
  "disableRecovery":false,
  "disableDefaultResponse":true,
  "direction":0,
  "reservedBits":0,
  "manufacturerCode":4190,
  "writeUndiv":false
}) 
failed (Status 'INVALID_VALUE')'

I'll try to have a go this weekend, but all suggestions are welcome :)

@FSund FSund changed the title Add ELKO EKO06984, EKO06985 and EKO06986 Add NHMOTION/UNIDIM/1 (Schneider Electric WDE002962 ELKO EKO06984, EKO06985 and EKO06986) Oct 26, 2024
@peroo
Copy link

peroo commented Oct 26, 2024

Apologies, on closer inspection I've realized my switch is a slightly different version from yours. I have the NHMOTION/DIMMER/1 - EKO07252, which is the multiwire version. That means that WDE002962 is wrong for this device. I expect the commands to be the same, the difference from my understanding is just electrical, but it's hard to say.

For what it's worth I'm seeing the same errors when setting dimmer_mode 1 or 2. In the past I've used the tz.wiser_dimmer_mode converter which is another version of the schneider dimmer mode, but confusingly auto/led values are opposite from what I've sniffed, which either indicates a difference or my notes are wrong. I can't think of a way to really test.

@FSund
Copy link
Author

FSund commented Oct 26, 2024

Apologies, on closer inspection I've realized my switch is a slightly different version from yours. I have the NHMOTION/DIMMER/1 - EKO07252, which is the multiwire version. That means that WDE002962 is wrong for this device. I expect the commands to be the same, the difference from my understanding is just electrical, but it's hard to say.

For what it's worth I'm seeing the same errors when setting dimmer_mode 1 or 2. In the past I've used the tz.wiser_dimmer_mode converter which is another version of the schneider dimmer mode, but confusingly auto/led values are opposite from what I've sniffed, which either indicates a difference or my notes are wrong. I can't think of a way to really test.

I see. I think EKO07252 is the replacement for EKO06984/85/86, as those are not sold anymore.

I'll change the vendor back to Elko then I think, since I haven't been able to find any alternative producers for this older dimmer.

I'll try to do some experimentation regarding dimmer mode.

@FSund FSund changed the title Add NHMOTION/UNIDIM/1 (Schneider Electric WDE002962 ELKO EKO06984, EKO06985 and EKO06986) Add NHMOTION/UNIDIM/1 (ELKO EKO06984, EKO06985 and EKO06986) Oct 28, 2024
@FSund
Copy link
Author

FSund commented Oct 28, 2024

Some updates:

  • The device reports manufacturerName "Schneider Electric" during interview, so I've left it as that for now. But I'm not certain if this name comes from the device itself, or from my converter?

  • I'm having some issues with setting up levelConfig, or specifically on_level. The device has the genLevelCtrl as an input cluster on endpoint 3, and a output cluster on endpoint 37. I'm not sure how to implement this in practice.

Here's the endpoints and clusters

endpoints:
  - id: 3
    output_clusters:
      - genOta
    input_clusters:
      - genBasic
      - genIdentify
      - genGroups
      - genScenes
      - genOnOff
      - genLevelCtrl
      - lightingBallastCfg
      - haDiagnostic
  - id: 37
    output_clusters:
      - genIdentify
      - genOnOff
      - genLevelCtrl
      - msOccupancySensing
    input_clusters:
      - genBasic
      - genIdentify
      - msIlluminanceMeasurement
      - msOccupancySensing
      - haDiagnostic
      - elkoOccupancySettingClusterServer
  - id: 242
    output_clusters:
      - greenPower

@peroo
Copy link

peroo commented Oct 28, 2024

  • The device reports manufacturerName "Schneider Electric" during interview, so I've left it as that for now. But I'm not certain if this name comes from the device itself, or from my converter?

That'll be from the device. You can query it in the dev console by reading manufacturerName from the genBasic cluster on endpoint 3.

Some updates on my end.

  • I've verified that my notes had dimming mode backwards, so the existing wiserDimmerControlMode is correct.
  • I've managed to cobble together occupancy sensitivity control, the only thing to note is that since it's manufacturer specific the manufacturerCode needs to be set to Schenider when configuring reporting and setting. zigbee-herdsman has cluster definitions for all these manufacturer specific clusters and attributes, but they were added as Elko specific, and have the wrong manufacturer code, which makes them unusable. I don't think any of these have ever been used anywhere, they were probably just added from documentation, so they should be renamed and updated to apply to Schneider, IMO.
  • I spent hours debugging why the PIR lights green when attached to z2m. Turns out it lights green when the network is open for adoption. 🤦

I'm planning to submit a PR for my device since it's slightly different. We should be able to share most of the implementation.

BTW, there's some Schneider documentation floating around for dimmer switches. It doesn't include PIR functionality, but it's hugely useful for getting accurate documentation of dimmer functionality.
Connected_Universal_Push-button_Dimmer_04-2022_368225_1653575314693_en-US.pdf

@FSund
Copy link
Author

FSund commented Oct 30, 2024

Anyone know of a way to avoid the _<endpoint name> postfix for the light entity?

With the current setup

deviceEndpoints({endpoints: {light: 3, sensor: 37}}),
light({
effect: false,
powerOnBehavior: false,
color: false,
configureReporting: true,
endpointNames: ['light'],
levelConfig: {},
}),

The light entity in HA is named light.<device name>_light, which is a bit clumsy. I tried endpoint name default, but then it got the postfix _default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants