-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Namron 4512761 #6573
Namron 4512761 #6573
Conversation
Add support for namron 4512761
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.
Added some comments regarding configure
which doesn't correctly report energy
consumption
src/devices/namron.ts
Outdated
configure: async (device, coordinatorEndpoint, logger) => { | ||
const endpoint = device.getEndpoint(1); | ||
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genOnOff', 'haElectricalMeasurement', 'seMetering']); | ||
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor']); |
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 would suggest switching to use the convenience method readEletricalMeasurementMultiplierDivisors
instead of reading each of these.
This also doesn't report any power consumption (for me at least), so you should also add readMeteringMultiplierDivisor
, leaving the final configure as
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
await reporting.readMeteringMultiplierDivisor(endpoint);
await reporting.onOff(endpoint);
},
That successfully reports Power
, Voltage
, Current
, and Energy
.
@enrawi will you update your PR, or want me to submit a new one?
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.
Thx. I've had this running for 3 weeks now with no problems. But this is the first time for me :)
Thanks! |
Add support for namron 4512761