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

Idea: better treatment of 1-phase / 3-phase measurements #114

Open
mman opened this issue Jun 4, 2024 · 0 comments
Open

Idea: better treatment of 1-phase / 3-phase measurements #114

mman opened this issue Jun 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mman
Copy link
Collaborator

mman commented Jun 4, 2024

Throwing this here for myself:

In current implementation of Venus Influx Loader we mirror Venus DBus paths / MQTT Topics 1:1 when storing into InfluxDB, which means that for example AC consumption is stored in InfluxDB as the following list of separate measurements:

  • system/Ac/Consumption/L1/Power
  • system/Ac/Consumption/L2/Power
  • system/Ac/Consumption/L3/Power
  • system/Ac/Consumption/L1/Current
  • system/Ac/Consumption/L2/Current
  • system/Ac/Consumption/L3/Current

Each of these measurements has associated tag for portalId and name identifying the installation.

Each of these measurements has only one value field obtained directly from MQTT.

In order to perform various calculations directly in Influx DB, as opposed to performing them in Grafana, it may be useful to think about reorganising these into two measurements:

  • system/Ac/Consumption/Current
  • system/Ac/Consumption/Power

And both of these having associated tags and multiple fields named L1, L2, and L3.

Total power consumption can then be computed via simple Influx select like this:

SELECT L1 + L2 + L3 FROM system/Ac/Consumption/Power ...

https://docs.influxdata.com/influxdb/v1/query_language/math_operators/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant