Skip to content

Expose activePower in Vimar 14593 #5149

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

Merged
merged 4 commits into from
Dec 25, 2022

Conversation

mattiazeni
Copy link
Contributor

Added haElectricalMeasurement to Vimar 14593 to monitor instant power (activePower)

devices/vimar.js Outdated
@@ -42,10 +56,12 @@ module.exports = [
model: '14593',
vendor: 'Vimar',
description: '16A outlet IoT connected',
extend: extend.switch(),
fromZigbee: [fz.on_off, fz.ignore_basic_report, fzLocal.vimar_active_power],
Copy link
Owner

Choose a reason for hiding this comment

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

Why not use fz.electrical_measurement instead of fzLocal.vimar_active_power?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the value reported is wrong, it seems is 10x the real one. We discussed here.

Copy link
Owner

Choose a reason for hiding this comment

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

You can manually set the divisor by adding the following code to configure:

            endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {
                acPowerMultiplier: 1, acPowerDivisor: 10,
            });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah nice. Let me give it a try. Let you know later.

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 installed a brand new version of HA and the standard config works correctly, without setting acPowerMultiplier and acPowerDivisor. I added a commit to change this.

Replaced fzLocal.vimar_active_power with fz.electrical_measurement.
@Koenkk Koenkk merged commit d27813e into Koenkk:master Dec 25, 2022
@Koenkk
Copy link
Owner

Koenkk commented Dec 25, 2022

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.

3 participants