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 Support for Enkin - ZDM150 Dimmer Module #8860

Merged
merged 11 commits into from
Mar 1, 2025
Merged

Conversation

encryptix
Copy link
Contributor

https://enkin.com/products/ss-en-00-zdm150-150w-led-zigbee-dimmer-module

This is an external converter I have for a dimmer module and is working well.

extend: [light({powerOnBehavior: false, effect: false, configureReporting: true}), forcePowerSource({powerSource: 'Mains (single phase)'})],

configure: async (device, coordinatorEndpoint) => {
device.powerSource = 'Mains (single phase)';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know if this line is needed when its also on L10

const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await onOff(endpoint, {min: 0, max: 0xfffe});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The module was not reporting if it was on or off or the adjusted brightness level if this was done via the physical switch.

device.powerSource = 'Mains (single phase)';

const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what this line or the next line does, copied from other device files for lights.

description: '150W Dimmer Module',
extend: [light({powerOnBehavior: false, effect: false, configureReporting: true}), forcePowerSource({powerSource: 'Mains (single phase)'})],

configure: async (device, coordinatorEndpoint) => {
Copy link
Owner

Choose a reason for hiding this comment

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

This shouldn't be needed as you have configureReporting: true

Copy link
Contributor Author

@encryptix encryptix Feb 21, 2025

Choose a reason for hiding this comment

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

I see modernExtend does the following automatically

                await setupAttributes(device, coordinatorEndpoint, 'genOnOff', [{attribute: 'onOff', min: 'MIN', max: 'MAX', change: 1}]);


            configureSetPowerSourceWhenUnknown('Mains (single phase)'),

Is it just these I remove? How do I keep configuration for genLevelCtrl ?

Copy link
Owner

Choose a reason for hiding this comment

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

Reporting is also setup for currentLevel so that also can be removed.

@encryptix encryptix force-pushed the master branch 5 times, most recently from e75b195 to d7173de Compare February 25, 2025 22:33
@Koenkk Koenkk merged commit 94c3458 into Koenkk:master Mar 1, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Mar 1, 2025

Thanks!

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.

2 participants