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

Power Export Limit (PEL) API Behavior

Open jurrid opened this issue 10 months ago • 20 comments

I was recently in contact with my installer regarding the Power Export Limit (PEL) functionality. They initially informed me that it was not possible to toggle the limiter on or off manually. However, they were able to enable it for me.

For context; I only have a HomeOwnerAccount, not an InstallerAccount.

Due to an error by applying the settings, my installer accidentally sent me a technical screenshot with a API call, which led me to investigate further. After experimenting with the API, I successfully turned off the PEL settings myself using the following API call:

curl --request POST \
  --url https://x.x.x.x/ivp/ss/dpel \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer **TOKEN**' \
  --header 'Content-Type: application/json' \
  --data '{
	"dynamic_pel_settings": {
		"enable": false
	}
}'

However, when attempting to re-enable the PEL using the following API request, I encountered an error:

curl --request POST \
  --url https://x.x.x.x/ivp/ss/dpel \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer **TOKEN**' \
  --header 'Content-Type: application/json' \
  --data '{
	"dynamic_pel_settings": {
		"enable": true,
		"export_limit": 100
	}
}'

Additional Findings The installer initially said toggling PEL was impossible, but after confirming with them, they acknowledged that I had successfully turned it off. They escalated my case to Dutch Enphase Customer Support, who mentioned that this behavior is an ”unintended flaw” in Envoy v8 but claimed it is “not normal behavior.” to toggle this with an api.

It might be worth further investigation this undocumented API behavior.

jurrid avatar Mar 20 '25 13:03 jurrid

I use the same commands to toggle PEL, and those work ok.

Specify power after limit_value_W

I use as json:

{ "dynamic_pel_settings": { "enable": true, "export_limit": false, "limit_value_W": 3500.0, "slew_rate": 900.0, "enable_dynamic_limiting": false }, "filename": "site_settings", "version": "00.00.01" }

fobrs avatar Jul 16 '25 10:07 fobrs

I don't get it to work. I recieve a 200 message, but hen checking with: https://x.x.x.x/ivp/ss/dpel, I still get the status false;

I use the following JSON to set the Zero Export active:

{
"dynamic_pel_settings": {
"enable": true,
"export_limit": true,
"limit_value_W": 0,
"slew_rate": 50,
"enable_dynamic_limiting": false
},
"filename": "site_settings",
"version": "00.00.01"
}

This is the same as when I set this through the portal, and I read the value with: https://x.x.x.x/ivp/ss/dpe

UseN1bble avatar Jul 18 '25 13:07 UseN1bble

Did you use your token? What is the firmware version of your envoy (you need 8.x.y.z)

fobrs avatar Jul 18 '25 13:07 fobrs

I use: curl -k -H "Accept: application/json" -H "Authorization: Bearer **TOKEN**" -X POST "https://192.168.1.XXX/ivp/ss/dpel" --data @json.txt

with json.txt:

{
    "dynamic_pel_settings": {
        "enable": true,  
        "export_limit": true,  
        "limit_value_W": 250.0,  
        "slew_rate": 50.0,  
        "enable_dynamic_limiting": false. 
    },  
    "filename": "site_settings",  
    "version": "00.00.01". 
}

fobrs avatar Jul 18 '25 15:07 fobrs

Okay, I made a stupid mistake, and did a GET instead of POST. Unfortunatly I get the same problem as with stopping production.

I get a 401 Authorization Required message. Both with my Home as with my Installer Account.

My installer (who is bankrupt) seems to have done something with my installation, that even Enphase can't solve as it seems.

Really frustrating to not be able to limit production while it should work and has worked!

My current version is: D8.3.5167 (5c3a00)

UseN1bble avatar Jul 18 '25 17:07 UseN1bble

In my case, the installer had to activate a certain "feature", and after that, I was able to toggle it. Maybe that feature is still disabled in your setup, but that’s a wild guess.

jurrid avatar Jul 18 '25 17:07 jurrid

Do you have a Metered envoy with CT's installer?

fobrs avatar Jul 18 '25 18:07 fobrs

Yes, technically there shouldn't be a problem. It's a rights issue.

With my installer account, through the Enlighten portal, I can turn off production and set export limits. Both don't work, but after the update to version 7, I was able to turn off production through the local API. After 4 weeks or so, it didn't work anymore. It's really frustrating and apparently, Enphase can't fix it either. After 6 months, I gave up.

UseN1bble avatar Jul 19 '25 10:07 UseN1bble

I can use the local api /ivp/ss/dpel with a normal user acount token. With GET and with POST.

fobrs avatar Jul 19 '25 14:07 fobrs

The GET request is functioning correctly; however, the POST request is resulting in a 401 Unauthorized error. I may attempt to contact Enphase or an installer again. They might be able to reset the installation. Theoretically, I should be able to perform this action myself with the DIY account, but I am concerned about encountering difficulties. This issue is becoming more and more a matter of principle.

UseN1bble avatar Jul 19 '25 15:07 UseN1bble

Yes, I understand. That's why I recently have got a metered envoy installed. Now I have full control over production and export. Today I have set the export limit to 250 W and slew rate to 100 W/s. Also using a Homewizard Plugin Battery. This works great: The thin blue line is solar forecast from solcast.com

fobrs avatar Jul 19 '25 15:07 fobrs

That looks great! I hope to get my Home Wizard in September.

UseN1bble avatar Jul 19 '25 15:07 UseN1bble

I have an Envoy-S-Metered, with production and consumption CT clamps, and firmware 8.2.4398. I have an installer account, and I tried using /ivp/ss/dpel, but while the data appears to be accepted and set, power production does not change.

If I am not logged in, even the GET returns a 401. Once logged in, I do a GET on /ivp/ss/dpel, it shows dpel as disabled.

Then I try to set dpel:

curl --insecure --request POST --header 'Authorization: Bearer $TOKEN' --url 'https://x.x.x.x/ivp/ss/dpel' --header 'Accept: application/json' --header 'Content-Type: application/json' --data @dpel.json

where dpel.json is

{
    "dynamic_pel_settings": {
        "enable": true,
        "export_limit": false,
        "limit_value_W": 3500.0,
        "slew_rate": 100.0,
        "enable_dynamic_limiting": false
    },
    "filename": "site_settings",
    "version": "00.00.01"
}

The return of this is the same as the data that was uploaded.

When I now do a GET on /ivp/ss/dpel, it shows the data I uploaded. I expect this would now limit production, but my PV kept producing at a rate higher than 3.5kW.

In Enlighten, I can see the 'Power Production Limiting by Gateway', but I can't make this work reliably. Someone above mentioned a feature that may need to be enabled for /ivp/ss/dpel to work. Any further clues on what this might be?

lawther avatar Oct 12 '25 12:10 lawther

I noticed a similar situation and came across a forum post where someone managed to achieve production limiting using the following payload. According to their report, this successfully capped production at 100 W:

{
  "dynamic_pel_settings": {
    "enable": true,
    "export_limit": true,
    "limit_value_W": 100.0,
    "slew_rate": 50.0,
    "enable_dynamic_limiting": false
  },
  "filename": "site_settings",
  "version": "00.00.01"
}

It might be worth testing whether setting "export_limit": true (instead of false) makes a difference. In their case, it seemed to be the key to activating the power export limitation, even though /ivp/ss/dpel otherwise accepted the same structure without enforcing the cap.

jurrid avatar Oct 16 '25 17:10 jurrid

Thanks - I've tried both true and false, but neither work reliably. I figured the one to limit production should be more straightforward. In practice, it simply sets a global production limit per micro of limit_rate_W / number of micros.

I've noticed when using Enlighten UI with the 'Power Export Limiting by Gateway' function that it sets this data structure observable through ivp/ss/dpel. It seems that 'export_limit' is related to the 'Production' or 'Export' radio buttons. One is supposed to set a limit on production ('export_limit':false) and one is supposed to set a limit on export ('export_limit':true) - that is, dynamically modify production based on the load.

I've also been using a non-zero value for limit_value_W, as that way I can recognise if that limit is being used.

The export limiting option I've never been able to make work - it's demonstrated here https://www.youtube.com/watch?v=VWwGFRtGkpg&t=80s

lawther avatar Oct 16 '25 23:10 lawther

~~I think Enphase might have broken something recently, even when i use Enlighten Manager to set a production limit nothing seems to happen, they dont even appear in Enlighten Manager. Export limits work fine.~~

~~My envoy event log doesn't go back far enough but I'm fairly sure i had this working in the past by just setting export_limit: false.~~

Tried again this morning and it looks like its all working now, from both enlighten manager and set directly on the envoy.

My Envoy is running version D8.2.4398 (75736b)

{
    "date": "2025-10-20 22:49:33",
    "dynamic_pel_settings": {
        "enable": true,
        "export_limit": false,
        "limit_value_W": 400.0,
        "slew_rate": 1000.0,
        "enable_dynamic_limiting": false
    },
    "filename": "site_settings",
    "version": "00.00.01"
}
Image Image

deanillfeld avatar Oct 20 '25 07:10 deanillfeld

Good to hear it's started working again as I have the same firmware. Can you tell me where you go to see the 'Production Limit Active' logs in your screenshot? Thanks!

lawther avatar Nov 11 '25 22:11 lawther

You can see them on this page.

https://envoy/installer/setup/home#more/events

deanillfeld avatar Nov 11 '25 23:11 deanillfeld

Thanks! I hadn't seen these events before, I can't seem to find them in Enlighten. I also found another local endpoint https://envoy/event, that looks like the same info.

My Envoy is being super weird with this API. I can see the event "Power export limiting active: Set Wed Nov 12, 2025 01:02 PM EST" - this was set remotely by my power company (Amber) to curtail production. However, power production was not affected. Then Amber went to turn production back on: "Power export limiting active: Clear Wed Nov 12, 2025 04:00 PM EST", and immediately the system stopped producing power (at 4:00:05 according to Home Assistant). I checked /ivp/ss/dpel at about 4:09PM, and it was correctly "{ "date": "2025-11-12 04:59:59", "dynamic_pel_settings": { "enable": false }, "filename": "site_settings", "version": "00.00.01" }"

So I manually sent a POST using curl to /ivp/ss/dpel with the same JSON to disable power limiting, and production started back up again.

So my Envoy almost seems to do the previous thing it was told?

lawther avatar Nov 12 '25 05:11 lawther

Does anyone know about the meaning of the 'date' field? I assume it is supposed to be the date the PEL command was issued, but does the Envoy pay any attention to it? Like might it be used to decide the 'latest' PEL command?

lawther avatar Nov 16 '25 02:11 lawther