-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Comments
I can try to work on it if you can point me a sample template for tree-phase and/or phases currents... |
here you can see an example, how to add it should be the same syntax as for
the where |
Thanks, I've started a first implementation that looks to work.
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 ? |
But |
Yes! Fixed. |
Now I have severall questions
|
How does the JSON für single-phase looks like?
Not sure, but I don´t think so.
create a PR. |
I'm working on a solution with optional 'phases" parameter default 1 for implemetation. But maybe other ways exists... On phase can be retrieved this fashion (simplified):
And Three-pahse this way (simplified):
|
in that case it is breaking change for all 3p configuration Don´t know, what would be the best way for that. |
It should not break existing 3p configuration, because the template today is treating 3p as 1p. It is possible to detect, but I must work to understand how to use calculations in yaml ;-) I'm fighting a little bit with 'currents'... I do not see how to define 'currents' (or maybe 'current' ?) for only one phase. |
it must be I tried the following with a one phase shelly and it works:
|
I've followed this implementation and it looks working.. test in progress. Doe exists a documentation on "how to contribute" .. how to create/select a branch and create a PR ? |
Does 'powers' and 'currents' can be negative (in case of injection) ? |
There's a twist here... They could be negative, positive, 0 and even totally wrong. Currents are available only when CTs are used. If no CTs are installed, Envoy uses data coming from inverters, and that means that currents are just false, as they are not collected from the inverters. I have an enphase that doesn't have CTs and reads power and energy correctly, but currents are wrong. If you have a patch, I'd be glad to test it in my environment. |
I've written a new template with 'currents', but only tested on my installation with CTs. |
Feel free to attach it and I can test it in my setup. |
enphase.yaml.gz |
Thank you! I've ran the test and I'm quite sure that the PV part is not correct. By looking at the consumption, you are getting info about consumption and not production. PV should tell you what the production of the PV is. If you turn this into '.production[] | select(.measurementType == "production")', then for all three phases on my system it would look like this: And these are all wrong. Maybe this would be a better approach: $ curl http://172.16.12.43/production.json?details=1 2>/dev/null | jq 'if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].wNow else empty end' First if statement checks number of active CTs/phases. Those without CTs should have 0 activeCount (as I do). And then, instead of returning 0 (which is not really correct), it would probably be better to return empty value, so that evcc knows that the data is not valid. And then you can apply the same approach for currents: $ curl http://172.16.12.43/production.json?details=1 2>/dev/null | jq 'if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsCurrent else empty end' and voltages: $ curl http://172.16.12.43/production.json?details=1 2>/dev/null | jq 'if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").lines[0].rmsVoltage else empty end' Can you check if these give you correct values in your environment? [EDIT: fixed activeCount check. I thought the number represents number of active phases, but in case of CTs it seems it basically a bool for 'enabled/disabled', while for inverters it provides the number of active inverters.] |
Hi Ante, I have few time to work on this during this week-end . But your suggestion looks better than my implementation. It may also apply to grid. |
I'm currently testing a version based on your suggestions Ante. |
could you give a hint where to put the enphase.yaml on a linux distribution? thx |
It's looking good. However, it's nighttime right now, so I'll be able to confirm tomorrow when some sunlight hits the panels. |
Ok.. looks fine at my side... |
How to contribute? |
@pdeliot as the link bellow the comment text area suggest, you should read contributing guidlines. As for forking, branching, and merging, it really depends on your level of expertise with git. If you have never done such a thing, it would be wise to read github docs and use github for this effort. Good reads would be: Evcc project is at https://github.com/evcc-io/evcc. |
No problem with git I'm fighting with it every day at work :-) . |
If you cloned from http, you can't push. You need to push to git (over ssh). It's easier to do it inside github web interface, if you don't have your local git (and github integration) fully configured. |
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, } ] } ] }
The text was updated successfully, but these errors were encountered: