Prevent Enphase export with negative prices

Does anyone already have developed a way to prevent an Enphase system to export electricity to the net when prices are negative.

I have dynamic tariff pricing on, but Enphase still exports when prices are negative. I would like to switch off production when prices are negative.

There is an API available and someone in the Enphase forum said you can stop production via this endpoint:

https://{}/ivp/mod/603980032/mode/power

But I am not able to develop it myself. For Home Assistant there is an integration by Vincent Wolsink.

You can use the “http request” card.
Start testing by using a so called GET request (or ask that someone in the Enphase forum if it needs the GET , POST or PUT method).

(Just a thought: I also expect it to use a flag, like .../power?on .../power?off
But maybe .../power just toggles the power output.)

Example:
In case Enphase IP address being 192.168.1.10:

By the way you can test this URL from any browser in your home network
http://192.168.1.10/ivp/mod/603980032/mode/power
https://192.168.1.10/ivp/mod/603980032/mode/power

Also you’d try to use both https or http. Local connections often use http.

Do you have a link to that forum/topic?

Tried with HTTP GET request in Homey but receive error, self-certication. When I go to the URL in the browser I can get passed that by selecting advanced, but then a 401. Would getting an API Token help? Can I add that token to the HTTP GET Request in Homey?

I also found this documentation. May help?

https://enphase.com/download/accessing-iq-gateway-local-apis-or-local-ui-token-based-authentication

401 = unauthorised

Apparently you’re supposed to send credentials along;
But concerning the self-certifcate issue, AFAIK Homey can’t process this atm. Please contact support to discuss this bug, or better: this decision.

I took a look at the documentation, but that’s way to complicated (to me).

Yes you need to get credentials from the enphase entrez server first. And to get around the https certification error you need to define a custom http agent that doesn’t mind the self certification. Neither is possible with just flow cards.

I’ve made a working homey script that can enable/disable power production. It works, and i’m now converting it to working homey app. I already have it running on my homey. It’s basically the same as the already existing enphase apps, but with the addition of power on/off switch and the associated flow-cards.

The device:

And now you can do:

I only need to check some homey requirements and publish it.

To be able to enable/disable power production in your enphase gateway, you need to have an enphase maintainer account which has access to your home-owner account though. Instructions here (in Dutch).

Test version currently available here.

I’ve tried to install a view times, but in doesn’t install at all…

Works fantastically at first glance! I was initially logged in with my user account, then it doesn’t work. You can try to adjust your details in the device in Homey, but that didn’t work either. After removing the device and reinstalling it (logging in with an Enphase Installer account), it works perfectly!

You are truly greatly appreciated for this fantastic work! I’m happy to help with testing where needed. I still have a fixed energy contract without feed-in penalties, so for now I won’t be using it very actively, but I’m more than willing to help with testing.

You mean you can’t install the app? Or do you mean that you can’t add the device after installing the app?

I can’t install the app.
I’ve still got a pro 2019, maybee that could be the issue?

The app should detect whether you’re using a home or installer account, and disable features accordingly. Do you mean you still had the on/off toggle with the home account? What did you see exactly that made you go “that doesn’t work”? It should also state the control access on the device status display. I’ll look into it.

I’ll include some extra notifications regarding the importance of the installer account on the login screen too.

Might very well be. It’s developed on a pro 2023. Haven’t looked into compatibility at all yet :sweat_smile: Will do that soon!

The app should detect whether you’re using a home or installer account, and disable features accordingly. Do you mean you still had the on/off toggle with the home account? What did you see exactly that made you go “that doesn’t work”? It should also state the control access on the device status display. I’ll look into it.

I’ll include some extra notifications regarding the importance of the installer account on the login screen too.

When I entered my installer credentials, it immediately stated that you have full permissions with that account (I don’t remember the exact wording). With the user account, it said something different, so that part works fine.

However, with the user account it didn’t work at all. I got a red exclamation mark on the device and couldn’t see any data. With the installer account, it worked straight away using exactly the same details otherwise.

I do think it would be good to add a warning somewhere when entering credentials that it specifically requires the installer account. I was confused myself because the example email address was something like “eigenaar@gmail.com”, which led me to initially use my user (eigenaar) account.

Right, thanks for the clarification. I’ll look into it.

Yep that’s on the todo-list. However, an installer account isn’t required if you only want read-only access which could still be usefull. I’ll make sure it’s explained better.

although I have a installer account (I can adjust all settings in my Enphase config and use the ITK), the app reports a read-only role and no metrics are visible.

Also, since installing this app, the official Enphase app went red and is not responding anymore…

Are you absolutely sure you logged in with your installer/maintainer account?

This one is under investigation.

Ooh thats… weird. Must be a conflict somewhere, but i’m not immediately sure how/why. Maybe something related to the Envoy access tokens. If there’s a conflict with the tokens on Enphase’s side, I don’t think we can have more than one Enhpase app active at the same time. But I’ll investigate.

Thanks for reporting!

Are you absolutely sure you logged in with your installer/maintainer account?

Afaik yes, as it is the same account I use in the Gateway to access the “Installer login” at the bottom of the screen. I also see a “fleet view” in Enphase Manager.

Maybe you’ve entered your “Site ID” instead of the “Gateway SN”?

The gateway SN can be found in Enlighten → System → Devices → Gateway and has 12 digits.

The Site ID (under is Enlighten → System → Site details) only has 7 digits. We do not want this one.

This would also explain the metrics not showing up.