Enphase-API icon indicating copy to clipboard operation
Enphase-API copied to clipboard

New CT Reversal endpoint?

Open plsmith451 opened this issue 2 years ago • 1 comments

I get a 404 - Not found when hitting the /ivp/meters/ctreversal/{EID} endpoint. Has this changed / is there an alternate?

plsmith451 avatar Sep 14 '23 14:09 plsmith451

The endpoint is definitely correct.. interestingly it's the {EID} part which I had incorrect (thus the Not Found), it is of the format /ivp/meters/ctreversal/(?:[pc](?:L[1-3])?/?)?$

For instance a HTTP GET to one of the following:

https://envoy.local/ivp/meters/ctreversal/

https://envoy.local/ivp/meters/ctreversal/p https://envoy.local/ivp/meters/ctreversal/pL1 https://envoy.local/ivp/meters/ctreversal/pL2 https://envoy.local/ivp/meters/ctreversal/pL3

https://envoy.local/ivp/meters/ctreversal/c https://envoy.local/ivp/meters/ctreversal/cL1 https://envoy.local/ivp/meters/ctreversal/cL2 https://envoy.local/ivp/meters/ctreversal/cL3

Should all succeed.

This is where the p is Production and the c is Consumption.

..and to change any of these then one has to do a HTTP PUT to one of the above URLs:

{
    "polarityReversal": "reverse",
}

Not specifying a line (aka "phase") number applies it across all lines/phases of that meter type (e.g. c instead of cL1 will apply to all Consumption lines/phases).

I believe an empty PUT (or {} which is what the GET currently returns or maybe "normal" instead of "reverse") should be sent to unset it (haven't tested).

GET requests require any valid token (anybody) but all other HTTP methods (currently just PUT) will require a prov or above token.

Matthew1471 avatar Sep 24 '23 16:09 Matthew1471