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

Use DataPoints for all PowerMeter Providers #1651

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

AndreasBoehm
Copy link
Member

@AndreasBoehm AndreasBoehm commented Feb 18, 2025

With this PR we switch all PowerMeter Providers to use DataPoints. This will allow us to easily build a HASS integration, show individual phase values in the LiveView and also to group inverters by phase within the DPL.

Additonaly i added reading the total power directly for 3-phase SDM powermeters as requested in issue #765

Tested Providers

  • HTTP
  • MQTT
  • SDM 1-Phase
  • SDM 3-Phase
  • SML via Serial
  • SML via HTTP
  • SMA HomeManager2

Test version

https://github.com/hoylabs/OpenDTU-OnBattery/actions/runs/13398033363

@AndreasBoehm AndreasBoehm force-pushed the andreasboehm/chore/powermeter-datapoints branch 2 times, most recently from 1893692 to ce1e855 Compare February 18, 2025 18:46
@schlimmchen
Copy link
Member

Man, this is awesome ❤️ As the power meters basically all provide the same stuff, we finally have a common baseline for all of them. There is one catch: If one providers delivers values that are unique to it, there has to be a data label for it even though only it uses the value. I think that should be fine.

I also renamed 'Values' to 'Phases' int the web ui to make this change kind of visible.

That I actually don't like... For one that we are mixing concerns/features/changes. More importantly, I changed the name from "phases" to "values" for a reason: They are only values, the readings are not always associated with phases. Example: We had the guy who has a power meter which delivers a power value in one JSON path when importing energy, and in another path when exporting energy. We told him to configure two values, one for each JSON path/value, with the one inverted.

Why do you think the usability improves when the wording is "phases"?

@AndreasBoehm
Copy link
Member Author

It felt better for me to setup phases instead of values. Thinking about it, the only real usecase is that if we want to show L1, L2, L3 power in the liveview with exactly those labels it will match with the configuration view, but besides that there is actually no need to call it phases.

Let me take back that change.

Use datapoints in the powermeter to be able to implement hass auto-discovery, showing all three phases in the liveview and DPL inverter grouping by phase.
@AndreasBoehm AndreasBoehm force-pushed the andreasboehm/chore/powermeter-datapoints branch from ce1e855 to 74a0fda Compare February 18, 2025 18:56
@AndreasBoehm
Copy link
Member Author

Values are back 🔙

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.

2 participants