# Prevent Enphase export with negative prices

**URL:** <https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586>\
**Category:** Apps\
**Created:** [April 9, 2026, 8:19pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586 "2026-04-09T20:19:38Z")\
**Posts on this page:** 19\
**Page:** 3

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [May 30, 2026, 5:07pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/42 "2026-05-30T17:07:51Z")

</div>

I think you have it a bit backwards. The owner is the one with read-only access; it’s the installer and/or maintainer who can control the system.

Did you try the app with that “self-installer owner account”? Did it give you control access?

If not, how exactly are you getting the authentication token from enphase (entrez) to make the api calls to disable/enable the power production?

If my app isn’t giving you control access, but you use _the same credentials_ to do your own api calls to control production, then you might hold the missing piece of puzzle 🥰

---

<div class="post-metadata">

**Author:** ![RSG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rsg/32/79108_2.png) [@RSG](https://community.homey.app/u/RSG)\
**Post date:** [May 30, 2026, 7:30pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/43 "2026-05-30T19:30:40Z")

</div>

I do have 2 accounts. First had my own owner account, but wanted to have access to the control settings as well. So as by the Reddit suggestions, I did do all the Enphase university courses and contacted Enphase to give me the self installer access so I could use enlighten manager. However, they won’t provide you anymore because nowadays you can buy it for €300.

After a lot of back and forth, they came with the solution to let me create a new self installer account. Normally you can’t assign a self installer account as a new installer nor maintainer when a site is installed by a company. But Enphase can. The assigned me to my site but then I had read-only access only. After contacting them again, they told me that they would assign my self-installer account whit owner access to the site, after which I finally had all the control rights. All of this very recently 🙂

I did use my self-installer account to sign in to your app, but it tells me i don’t have controll access. For my own usage I do generate the entrez token on my self installer account, as my original account doesn’t give me the wanted rights. I am more than happy to debug some things for you, just tell me what you need!

---

<div class="post-metadata">

**Author:** ![RSG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rsg/32/79108_2.png) [@RSG](https://community.homey.app/u/RSG)\
**Post date:** [May 30, 2026, 8:32pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/44 "2026-05-30T20:32:54Z")

</div>

Not sure if you already checked it, but the HA integration decodes the entrez JWT token to determines the access level. Just checked my own tokens with cyberchef:

owner account:  
`{`  
`“aud”: “……”,`  
`“iss”: “Entrez”,`  
`“enphaseUser”: “owner”,`  
`“exp”: 1780176465,`  
`“iat”: ……,`  
`“jti”: “………”,`  
`“username”: “…….”`  
`}`

Self installer account:  
`{`  
`“aud”: “…….”,`  
`“iss”: “Entrez”,`  
`“enphaseUser”: “installer”,`  
`“exp”: 1780213074,`  
`“iat”: …..,`  
`“jti”: “……..”,`  
`“username”: “…..”`  
`}`

---

<div class="post-metadata">

**Author:** ![F\_Van](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/f_van/32/28509_2.png) [@F\_Van](https://community.homey.app/u/F_Van)\
**Post date:** [May 31, 2026, 7:23am UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/45 "2026-05-31T07:23:36Z")

</div>

_support for IQ charger would be great_

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [May 31, 2026, 1:45pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/46 "2026-05-31T13:45:04Z")

</div>

> [@RSG](#):
>
> “enphaseUser”: “installer”,

This is literally what i’m looking for when pairing the device (“installer” or “maintainer”). If the app says you don’t have controller access, then this is _not_ what the app got back when getting the token.

How _exactly_ are you getting your token?

This is what I am doing:

```javascript
    const tokenRes = await fetch('https://entrez.enphaseenergy.com/tokens', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        session_id: loginData.session_id,
        serial_num: this.envoySerial,
        username: this.userEmail,
      }),
    });

```

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [May 31, 2026, 1:48pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/47 "2026-05-31T13:48:06Z")

</div>

Yes I’m planning on integrating the charger (and batteries) down the road.

---

<div class="post-metadata">

**Author:** ![RSG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rsg/32/79108_2.png) [@RSG](https://community.homey.app/u/RSG)\
**Post date:** [May 31, 2026, 4:42pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/48 "2026-05-31T16:42:33Z")

</div>

I’m mimicking the original way of getting tokens manually. This is my code:

```python
def get_token(user, password, envoy_serial, site_name):
  session = requests.Session()

  data = {'username': user, 'password': password}
  response = session.post('https://entrez.enphaseenergy.com/login', data=data)

  soup = BeautifulSoup(response.text, "html.parser")
  csrf_input = soup.find("input", {"name": "_csrf"})
  if csrf_input:
    csrf_token = csrf_input.get("value")
  else:
    raise Exception("Login Error")

  data = {'serialNum': envoy_serial, 'Site': site_name, '_csrf': csrf_token}
  response = session.post('https://entrez.enphaseenergy.com/entrez_tokens', data=data)

  soup = BeautifulSoup(response.text, "html.parser")
  token_html = soup.find("textarea", id="JWTToken")
  if token_html:
    token = token_html.text.strip()
  else:
    raise Exception("Token Error")

  return token

```

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [May 31, 2026, 6:32pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/49 "2026-05-31T18:32:25Z")

</div>

Interesting… faking a weblogin, instead of using the api, yields a different JWT… apparently?

I’ll see if i can add this as a parallel method to the existing login flow.

---

<div class="post-metadata">

**Author:** ![RSG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rsg/32/79108_2.png) [@RSG](https://community.homey.app/u/RSG)\
**Post date:** [May 31, 2026, 6:40pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/50 "2026-05-31T18:40:53Z")

</div>

I guess so. Tested your API endpoint, and my token appeared as a owner instead of installer indeed. Not sure, maybe there is an undocumented parameter that can be set for the API endpoint to switch to an installer account, but that’s just guessing.

Thanks for the effort already!

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [May 31, 2026, 6:47pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/51 "2026-05-31T18:47:45Z")

</div>

I implemented the scraping method. The app will now get a JWT through both methods and pick the one with control level access.

I need to wait for the certification process to be completed before I can release a new version though.

---

<div class="post-metadata">

**Author:** ![Timelezz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timelezz/32/121046_2.png) [@Timelezz](https://community.homey.app/u/Timelezz)\
**Post date:** [May 31, 2026, 10:57pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/52 "2026-05-31T22:57:09Z")

</div>

Installed the app and was able to switch of and off. Within about 20 seconds the full capacity was back. 👌🏼

A flow to automatically switch on/off gave me an error. But have to look into it more closely.

Regardless, some questions.

1. The device gives at night often a negative value, while the device of the Enphase inverter app gives 0.

 ![Screenshot_20260601-002405~2](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/6/e641aaaffe717a149ca523506cc9c287c3ebdebf.jpeg)

1. Sometimes the device is unavailable. Any idea what can cause that?

2. When switching off, does it impact Enphase batteries?

3. While I am really grateful and happy with this app, it does not fully address the topic of this thread, since Enphase system can still export energy from the batteries if the prices are negative. My intent to mention this is just to share a thought if you intent to work out this app to support Enphase batteries as well.

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [June 1, 2026, 9:44am UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/53 "2026-06-01T09:44:00Z")

</div>

> [@Timelezz](#):
>
> The device gives at night often a negative value

Thats weird. I’m just showing what the Envoy is reporting. But it might be a good idea to clamp this value to 0 indeed.

> [@Timelezz](#):
>
> Sometimes the device is unavailable. Any idea what can cause that?

Yes, this can have multiple causes. All of them (that i know of) are addressed in the next version. Amongst others, I’m going to drop support for the “envoy.local” hostname, as its not reliable.

> [@Timelezz](#):
>
> When switching off, does it impact Enphase batteries?

We’re not controlling batteries, but the batteries will react to the situation of course, depending on their settings.

> [@Timelezz](#):
>
> if you intent to work out this app to support Enphase batteries as well.

Yes I intent to add support for other Enphase products (batteries & charger), but I’m focusing on the PV system first for now.

---

<div class="post-metadata">

**Author:** ![Amersfoort](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Amersfoort](https://community.homey.app/u/Amersfoort)\
**Post date:** [June 1, 2026, 10:42am UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/54 "2026-06-01T10:42:10Z")

</div>

> [@Timelezz](#):
>
> The device gives at night often a negative value

Without sunlight, the inverters and the IQ gateway are in a sort of standby mode and consume a small amount of energy: approximately 10 watts (the number of inverters affects this value).

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [June 1, 2026, 2:37pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/55 "2026-06-01T14:37:35Z")

</div>

Rrrrrrrrrrrrright… @Timelezz must have the Metered gateway that’s measuring the actual production/usage. With me --having unmetered-- it’s just showing what the gateway itself is reporting: 0 at night.

But like i said, i’ll clamp it a minimum of 0 to prevent unwanted readouts.

---

<div class="post-metadata">

**Author:** ![Steven\_Bareman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steven_bareman/32/31404_2.png) [@Steven\_Bareman](https://community.homey.app/u/Steven_Bareman)\
**Post date:** [June 3, 2026, 5:51pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/56 "2026-06-03T17:51:20Z")

</div>

Hello,

Great app development—everything looks very promising, especially the integrations.

However, I only have an installer account (with access to multiple systems witch i installed), and I am currently unable to control the inverters at my own home. I receive a message stating that I am not an installer.

If I can assist with debugging or testing in any way, please let me know!

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 3, 2026, 6:36pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/57 "2026-06-03T18:36:14Z")

</div>

Maybe you’d add a fake installer account anyhow

> [@Prevent Enphase export with negative prices](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/37):
>
> Yeah, all this is a bit confusing – especially because the terms being used are a bit conflicting. First, there’s a bit more clarification [here](https://gathering.tweakers.net/forum/list_messages/2237450?data%5Bfilter_topicstarter%5D=1#installateur) (Dutch, but should translate fine). But, most importantly to know is that multiple companies can be registered to your system. So you can add yourself without causing any issues with the existing/actual installer. (Only one can be the active ‘maintainer’ though. This will become clear in a second.) Register as a (fake) company with Enphase [here](https://enlighten.enphaseenergy.com/manager/registration). Mak…

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [June 3, 2026, 6:44pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/58 "2026-06-03T18:44:47Z")

</div>

This is fixed for a number of situations in the new version that is now on the [public test branch](https://homey.app/en-nl/app/nl.creitive.enlighten/Enphase-Controller/test/) (1.2.1).  
Please try the test version and let me know if it works for you!

The previous version (1.1.0) has been accepted by Homey is [now officially available](https://homey.app/en-nl/app/nl.creitive.enlighten/Enphase-Controller/)!

---

<div class="post-metadata">

**Author:** ![bramtops](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bramtops/32/166144_2.png) [@bramtops](https://community.homey.app/u/bramtops)\
**Post date:** [June 3, 2026, 7:02pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/59 "2026-06-03T19:02:58Z")

</div>

Dedicated topic: [[APP][Pro] Enphase Controller](https://community.homey.app/t/app-pro-enphase-controller/155720)

Please post feedback, suggestions, requests and testresults there. Thanks!

---

<div class="post-metadata">

**Author:** ![Steven\_Bareman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steven_bareman/32/31404_2.png) [@Steven\_Bareman](https://community.homey.app/u/Steven_Bareman)\
**Post date:** [June 3, 2026, 7:44pm UTC](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586/60 "2026-06-03T19:44:18Z")

</div>

Yes, this one works 👍🏻💪

[Previous page](https://community.homey.app/t/prevent-enphase-export-with-negative-prices/153586.md?page=2)
