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

added handling of Total Active Energy data to addEM1 function for shellyproem50 #1116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tclas
Copy link

@tclas tclas commented Jan 16, 2025

This Change adds support for handling total active energy of the shellyproem50. Until this change the Energy Meter Data sent by this device where ignored and no Datapoint where created or updated as described in issue #1070 which should be solved with this code. I was able to prove this in my local installation.

While the addEM1 function was only used by the gen2/shellyproem50.js -device I added the handler just there.

grafik

I would be happy if you would integrate this code to the main-project.

While this is my first pull request I ever sent, I'm not sure, if I did anything what should be done. So, feedback is welcome.

Regards
tclas

common: {
name: 'Total Energy',
type: 'number',
role: 'value.total_energy',
Copy link
Contributor

Choose a reason for hiding this comment

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

That role doesn't exist?!

@@ -115,6 +115,22 @@ function addEM1(deviceObj, switchId) {
unit: 'Hz',
},
};
deviceObj[`EM1:${switchId}.TotalEnergy`] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix identation

@mcm1957
Copy link
Member

mcm1957 commented Jan 18, 2025

Valid state roles are listed here:
https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md

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