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

support phase currents, and three-phase with enphase envoy #16744

Open
pdeliot opened this issue Oct 20, 2024 · 7 comments
Open

support phase currents, and three-phase with enphase envoy #16744

pdeliot opened this issue Oct 20, 2024 · 7 comments
Labels
devices Specific device support

Comments

@pdeliot
Copy link

pdeliot commented Oct 20, 2024

To use enphase template for circuit, phase current is required.

This information information is available for single and tree-phase.

Three-phase support is also required (for me ;-) )...

Attached sample file with Tree-phase.

envoy.json
Below a little sample extract of available data:
{ "consumption": [ { "type": "eim", "activeCount": 1, "measurementType": "net-consumption", "readingTime": 1729414585, "wNow": 5364.339, "whLifetime": 48631628.574, "lines": [ { "wNow": 452.054, "whLifetime": 20136453.749, "varhLeadLifetime": 5727861.458, }, { "wNow": -98.144, "whLifetime": 1634255.145, "varhLeadLifetime": 4811478.811, }, { "wNow": 5010.429, "whLifetime": 26860919.68, "varhLeadLifetime": 1345115.396, } ] } ] }

@pdeliot
Copy link
Author

pdeliot commented Oct 20, 2024

I can try to work on it if you can point me a sample template for tree-phase and/or phases currents...

@andig andig added the devices Specific device support label Oct 20, 2024
@VolkerK62
Copy link
Contributor

here you can see an example, how to add currents to a template https://github.com/evcc-io/evcc/blob/master/templates/definition/meter/shelly-3em.yaml

it should be the same syntax as for power

the jq should be
jq: .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent

where
lines[0] = phase 1
lines[1] = phase 2
lines[2] = phase 3

@pdeliot
Copy link
Author

pdeliot commented Oct 20, 2024

Thanks,

I've started a first implementation that looks to work.

powers: - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsCurrent - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent currents: - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsCurrent - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsCurrent - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsCurrent voltages: - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[0].rmsVoltage - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[1].rmsVoltage - source: http uri: http://{{ .host }}/production.json?details=1 {{- if .token }} auth: type: bearer password: {{ .token }} insecure: true {{- end }} jq: .consumption[] | select(.measurementType == "net-consumption").lines[2].rmsVoltage
Now I need to check this is working on single-phase systems.

Is it expected/better to have 2 version of the template? Or a parameter to define 1 or 3 phases? Or it will deal automatically with error on phase 1 and 2 ?

@VolkerK62
Copy link
Contributor

But powers is wNow and not rmsCurrent.

@pdeliot
Copy link
Author

pdeliot commented Oct 21, 2024

But powers is wNow and not rmsCurrent.

Yes! Fixed.

@pdeliot
Copy link
Author

pdeliot commented Oct 21, 2024

Now I have severall questions

  • Understand how to deal with single and three phase definision
  • Is it possible to use ONE query for several indicators (to avoid querying once per value. All the values are in the returned json)?
  • How can I push the contribution?

@VolkerK62
Copy link
Contributor

Understand how to deal with single and three phase definision

How does the JSON für single-phase looks like?

Is it possible to use ONE query for several indicators (to avoid querying once per value. All the values are in the returned json)?

Not sure, but I don´t think so.

How can I push the contribution?

create a PR.
Best way would be, to modify the actual template, if it is working under all circumstances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devices Specific device support
Projects
None yet
Development

No branches or pull requests

3 participants