-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add Support for Enkin - ZDM150 Dimmer Module #8860
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
Conversation
src/devices/enkin.js
Outdated
| extend: [light({powerOnBehavior: false, effect: false, configureReporting: true}), forcePowerSource({powerSource: 'Mains (single phase)'})], | ||
|
|
||
| configure: async (device, coordinatorEndpoint) => { | ||
| device.powerSource = 'Mains (single phase)'; |
There was a problem hiding this comment.
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
src/devices/enkin.js
Outdated
| const endpoint = device.getEndpoint(1); | ||
| await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); | ||
| await onOff(endpoint, {min: 0, max: 0xfffe}); | ||
|
|
There was a problem hiding this comment.
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.
src/devices/enkin.js
Outdated
| device.powerSource = 'Mains (single phase)'; | ||
|
|
||
| const endpoint = device.getEndpoint(1); | ||
| await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); |
There was a problem hiding this comment.
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.
src/devices/enkin.js
Outdated
| description: '150W Dimmer Module', | ||
| extend: [light({powerOnBehavior: false, effect: false, configureReporting: true}), forcePowerSource({powerSource: 'Mains (single phase)'})], | ||
|
|
||
| configure: async (device, coordinatorEndpoint) => { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
e75b195 to
d7173de
Compare
|
Thanks! |
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.