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

Namron 4512761 #6573

Merged
merged 4 commits into from
Nov 27, 2023
Merged

Namron 4512761 #6573

merged 4 commits into from
Nov 27, 2023

Conversation

enrawi
Copy link
Contributor

@enrawi enrawi commented Nov 26, 2023

Add support for namron 4512761

Add support for namron 4512761
Copy link

@thordy thordy left a 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

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']);
Copy link

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?

Copy link
Contributor Author

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 :)

@Koenkk Koenkk merged commit 2e73b9b into Koenkk:master Nov 27, 2023
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Nov 27, 2023

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.

None yet

3 participants