-
-
Notifications
You must be signed in to change notification settings - Fork 687
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 #17193
base: master
Are you sure you want to change the base?
Conversation
Not sure we can do this. This will return empty measurements on devices not supporting this? |
We cannot simply return „nothing“. |
It is "empty" because the phase 2 and 3 may not exist :-) But if you prefer having "0" and this is not creating issue for systems with only 1 phase.. we can do that. |
We just cannot have this interface for 1p meters |
I've pushed version return 0 when value is not available instead on "empty". |
@premultiply was meinst du? Gute Idee? |
What do you prefer? |
Imho we should not have 3p measurements on 1p devices at all, so 3rd option. Would any of the measurements (I guess current?) be missing if this was a 1p device? |
With 1p, as far as I know "powers", "currents" and "voltages" will not be supported. I'm pushing a new version, with an optional parameter "phases". And you can set "3" to gain 3 phases support and linked capabilities. |
Adding "phases" optional parameter to switch on 3 phases support.
Added "phases" parameter to activate 3 phase support and attached capacities.
I'm worried that this would silently break existing 3p setups. IMHO templates should collect as much info as possible and core engine should be able to cope with the collected data. If the template returns 'value none none' it should be obvious that it's a single phase system. If it returns 'value 0 0', that's a 3p system. I believe that using 0 in this patch is a wrong approach as you just can't know if the 0 is because there is no current or because there's no phase. Who knows what the future brings; evcc might eventually want to know if it's a 3p or 1p setup. |
I've tested it on a 3p system without CTs ;) |
To decide @premultiply:
See evcc-io/docs#650 |
-removed powers -removed voltages -re-added 3 phase measurements for 1 phase devices -removed 1/3 phase option
@pdeliot to work with both single and three phase system, you should really check the length of the array. For example, for phase in production: curl http://${envoy_ip}/production.json?details=1 | jq 'if (( .production[] | select(.measurementType == "production").activeCount >= 1 ) and ( .production[] | select(.measurementType == "production").lines | length >= 1 )) then .production[] | select(.measurementType == "production").lines[0].rmsCurrent else 0 end' but then for the second and third line (change the line 1 to 2): curl http://${envoy_ip}/production.json?details=1 | jq 'if (( .production[] | select(.measurementType == "production").activeCount >= 1 ) and ( .production[] | select(.measurementType == "production").lines | length >= 3 )) then .production[] | select(.measurementType == "production").lines[1].rmsCurrent else 0 end' And then similar for consumption. What do you think? I think this would cover all requirements; it would work only on CT enabled systems and it would work with both 1 and 3 phase systems without any parameters. |
Added support phase currents, and three-phase with Enphase envoy #16744