Enphase Envoy - Current state of things

Sure, this is what I use currently (and is working very well for me):

mqtt:
  sensor:
    - name: "Solar Lifetime Production"
      unique_id: '0a7476cc-d6c1-40ba-8ae1-606518c3497d'
      state_topic: "home/envoy/Envoy-S Metered/Production CT"
      unit_of_measurement: "Wh"
      state_class: total_increasing
      device_class: energy
      value_template: "{{ value_json.production[1].whLifetime }}"
    - name: "Solar Current Production"
      unique_id: '0a7476cc-d6c1-40ba-8ae1-606518c3497c'
      state_topic: "home/envoy/Envoy-S Metered/Production CT"
      unit_of_measurement: "W"
      state_class: measurement
      value_template: "{{ value_json.production[1].wNow if value_json.production[1].wNow > 0 else 0 }}"
2 Likes

Here’s the yaml for my dashboard arrays.

type: vertical-stack
cards:
  - type: markdown
    content: North West Array
  - type: grid
    cards:
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 12
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 11
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 10
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 9
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 8
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 7
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 6
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 5
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 4
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 3
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 2
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 1
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
    columns: 4
  - type: markdown
    content: South East Array 2
  - type: grid
    cards:
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
        name: Panel 14
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 13
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 12
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 11
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 10
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 9
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 8
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 7
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 6
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 5
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 4
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 3
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 2
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 1
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
    columns: 4
    square: false
  - type: markdown
    content: South East Array 1
  - type: grid
    cards:
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 16
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 15
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 14
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 13
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 12
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 11
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 10
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 9
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 8
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 7
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 6
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 5
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 4
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 3
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 2
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
      - type: gauge
        entity: sensor.envoy_inverter_
        min: 0
        max: 340
        name: Panel 1
        needle: true
        severity:
          green: 100
          yellow: 10
          red: 0
    square: false
    columns: 4
1 Like

When Sony removed the capability to install Linux on the PS3 post-launch, there was a successful class action suit, just sayin’.

Is there any way to downgrade the firmware? I made a mistake in my firewall config and mine upgraded over the weekend. The token situation looks like way more effort than I’m willing to expend to set back up.

I got as far as level 2 tech support on the phone yesterday and the guy swore up and down that it wasn’t possible to downgrade it. Instead he told me about some APIv4 that has a free version that doesn’t even come close to doing what I was asking. https://developer-v4.enphase.com/developer-plans

Instead I was able to get one of the envoy integrations on hacs to work last night. Now if only I could get my mariadb database tables repaired so I could have the past two years of energy data. :confused:
https://github.com/briancmpbll/home_assistant_custom_envoy

I got it to work thanks to the comments on the Brian Campbell GitHub issues (#71) page:

It involved using that repo after uninstalling and then restarting HASS. My envoy is on D7.3.120 and I did need to move up to the latest 2023.5.2.

I was hopeless but was surprised when it worked. I used my Enphase login and password and clicked the unlabeled button which in other releases was “use envoy” during configuration. It paused for longer than I expected but went through last night (May 5). Because the device name is based on serial number, all my front end stuff came up without having to edit any of the entities.

1 Like

It’s very simple, you can copy/paste the code right out of my post here: Enphase local API with firmware 7.x - my setup

replace the usermame/password/serial number where it says to, and it prints a token - good for a year

1 Like

For 5.x.x firmware we have net-consumption metric and we can calculate net-production (grid-out) value:
net-production[whLifetime] = production[whLifetime] - consumption[whLifetime] + net-consumption[whLifetime]

After asking enphase very nicely over and over again, I finally got documentation for the local REST API Endpoints. Hopefully this will be helpful for the devs working on updating their enphase integrations!

ENVOY-Envoy REST Interface-150523-095555.pdf

9 Likes

Thanks, very useful!

1 Like

Hi HA_n00b,

Trying to get the enphase working, I created the helper as you suggested and created a sensor:

But for some reason this sensor keeps having status unavailable?

Any help would be appreciated :slight_smile:

Hi all,

I’m new here and I’m going to ask maybe a couple of stupid questions but I have to do it…

The main issue here is we don’t want go outside home to ask for anything and have it all locally, but this integrations (posixx, jrutski,…) all try to get the token programatically accessing to enlighten website… why? If we can generate a token valid for 1 year, why not enable a field in the integration to write the token as option and avoid any external comunication? Can I do that already? Where in the config files I have to set the token?

The other question is I had the core integration working until last wednesday enphase decided to upgrade MY envoy without any advise (i opened a case with them very disapointed but I see how they try to monetize the data and the access to it so they don’t care). I don’t want to lose the historical data so, as i’m not installing the integration since the begining but substituing the integration for the new one (i tried with posixx version), how can i update the configuring data from the form? I cannot find how to do it. Any advise? Let me say that home assistant is powerful, amazing and awesome, but the documentation to change things, or fix values or configs is very obscure, not intuitive and mostly inexistent. It will be perfect to understand where to bypass the tries to get token online, set the token manually (i can do that once per year if needed), or simply where to set the host if the ip changes… I have some programing skills and I could help community, but documentation to understand how things works is not easy to find. Am I right?

My 2c
JA

2 Likes

Does anyone know if it is possible via the API to enable and disable the Power Production?

1 Like

Played around with this over the weekend but used the Enphase portal. When toggling off it took over half an hour to respond, toggling on well over 15 minutes. Could be random?

When using the local access, is the response instantaneous?

Yes, with local access to the Envoy, it responds within minutes with both turning on and off.

I don’t have this option in my local webinterface. Is it behind the “installer login”? [Which would present the next challenge… how to obtain the password].

Am on FW D05, from the sounds of this discussion I should probably limit internet access and prevent a FW upgrade.

Yes its in the installer section. I have a DIY installer account en installed the system myself.
You can create a DIY account and ask your installer or Enphase Support to give access.

Thanks! I found a py script which derives the installer password from the serial number of the envoy… gives me the shivers thinking about the security vulnerability of this product especially considering it’s not possible to change the installer password. Luckily this is a local only interface - will disconnect my envoy from the internet just to be sure…

https://github.com/sarnau/EnphaseEnergy/blob/23b96326bfa904328fb244a0e727bdf4c3ef85b1/passwordCalc.py#L4

Used the script myself and can confirm it does the trick.

Interesting.

So, only need to change the serial number in the python script?

If that’s the case, it’s really bad security.

Only for v5 firmware, for v7 this is not possible anymore…

1 Like

Anyone else having issues with HA being unable to connect to the envoy for about a minute every once in a while? It’s spitting out this error: ‘Timeout fetching envoy Envoy SERIAL# data’

You can see the gaps in the graph because of this. Everytime it lasts almost exactly 1 minute but when it happens appears to be random.

Edit: It also causes it to spit out an error for the template sensors:

* TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ [0, states('sensor.envoy_current_power_consumption') | int - states('sensor.envoy_current_power_production') | int ] | max }}' but no default was specified') while processing template 'Template<template=({{ [0, states('sensor.envoy_current_power_consumption') | int - states('sensor.envoy_current_power_production') | int ] | max }}) renders=182>' for attribute '_attr_native_value' in entity 'sensor.grid_import_power'
* TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ [0, states('sensor.envoy_current_power_production') | int - states('sensor.envoy_current_power_consumption') | int ] | max }}' but no default was specified') while processing template 'Template<template=({{ [0, states('sensor.envoy_current_power_production') | int - states('sensor.envoy_current_power_consumption') | int ] | max }}) renders=180>' for attribute '_attr_native_value' in entity 'sensor.grid_export_power'