Need testers for updated Enphase Envoy sensor

I’m in the process of updating the current Enphase Envoy sensor and am in need of testers.

The main change is to optimize how the sensor is retrieving the inverter data. With the current sensor some have seen timeouts (inverter data not updating) occurring. Usually on the older Enphase Envoy hardware and/or when there are a fair number of inverters connected to the solar system.

All that is needed is HA 0.110.0+.

Replace the homeassistant/components/enphase_envoy/sensor.py with this version and restart HomeAssistant.

I have also added more debug statements as well, so if you have problems with this version of the sensor enable debug logging using for example:

logger:
  default: info
  logs:
    homeassistant.components.enphase_envoy: debug

in your configuration.yaml

Are there instructions written for a 5 year old anywhere? I’d love to test but seem to be too stupid to follow the directions?

@kysdaddy My instructions are a bit vague if you are starting from scratch or do not know where to look.

I’ll try to give the steps I take in my production environment. Just be aware some file paths may be different due to system differences. I’m running HA 0.113.x in a docker environment.

  • Open an ssh/terminal/command line session to your Home Assistant server
  • Run the command
find / | grep enphase
  • You’ll get some output but look for the one that contains
homeassistant/components/enphase_envoy
  • Change to that directory, in my case I run:
cd /usr/src/homeassistant/homeassistant/components/enphase_envoy
  • Then run the below command to remove the sensor that came with Home Assistant
rm sensor.py
  • Then run the below command to retrieve the updated sensor file:
wget https://raw.githubusercontent.com/gtdiehl/core/http_api_call/homeassistant/components/enphase_envoy/sensor.py
  • Restart Home Assistant. I do that through the web interface. Click on the Configuration icon on the left-hand side, click on Server Controls and click on Restart under Server management
  • Once Home Assistant restarts you will be running with the updated Enphase Envoy sensor.
  • Now if you have problems and need to debug the sensor, that is when you should edit your configuration.yaml file to include
logger:
  default: info
  logs:
    homeassistant.components.enphase_envoy: debug

If you have any questions let me know and I’ll try and help

Thanks!

Thank you, that helped immensely. However this is what I found in the logs

Suggestions?

Chas

@kysdaddy I see this error when the IP address is wrong for the envoy device.

What does your configuration.yaml look like?

Here is an example:

sensor:
  - platform: enphase_envoy
    ip_address: 1.1.1.1
    monitored_conditions:
      - production
      - daily_production
      - seven_days_production
      - lifetime_production
      - inverters

Check that you can open a web browser to the IP address you configured.

That is the same except the actual IP in my config.yaml.
I do not get a response when I try to access the configured IP with a browser. I am connected to my wifi, I use Unifi ap’s I have a WLAN set up specifically for Solar and there is only one client connected to it.
But I continue to get the same error.

image
Chas

The server machine running Home Assistant needs network access to the Enphase Envoy. Not sure what your physical network looks like, but you’ll need to get both your networks to ‘talk’ with each other.

os there anything that needs to be done to the envoy system? The wlan is withing the same ip range, the guest controls are turned off. If I log a laptop or a phone into that wifi, it can reach the rest of my network but still gets "this site cant be reached when trying to access the envoy.

Oh ok that’s good it’s one network. When your laptop is logged into the original WiFi can you ping the envoy device? From the terminal/command line run ping x.x.x.x replace x with the envoy up address

What type of Envoy do you have? Model and Firmware?

No i can not ping the envoy, although when logged into the Solar wlan on my laptop I can ping other machines in my system but the envoy is unreachable no matter which wlan I am connected to.
Here is the information taken from my https://enlighten.enphaseenergy.com/ web portal

image

Thank you again for this help
Chas

How are you getting the IP address of the Envoy device? Is it from Unifi Controller software?

You can try and open a web browser to http://envoy.local rather than the IP address

http://envoy.local doesn’t work either.

I have the IP off my client list in Unifi, when I set this all up, the envoy was/is the only thing that logs into the Solar ssid. My unifi still sees that device as active. Oddly enough the ip scanner that I use does not see the device. But none of the unidentified devices located by the scanner have HTTP access either.

I just got my envoy connected today… I have not uploaded the latest code (yet).
I’m available to help test

Here’s my current config:

## ENPHASE ENVOY (SOLAR) SENSOR
  - platform: enphase_envoy
    name: envoy
    ip_address: !secret envoy_ip
    monitored_conditions:
      - consumption
      - production
      - daily_consumption
      - daily_production
      - seven_days_consumption
      - seven_days_production
      - lifetime_consumption
      - lifetime_production
      - inverters

I can see 8 of the 9 entities (missing the inverters for unknown reason)
Any change your latest code corrects this? There is a slight possibility they are not showing up due to the initialization taking place… so I can check back on this in a few hours.

quick update…
Went ahead and updated the sensor.py to your version, here’s relevant info from home-assistant.log
Going to go with notion that since my system is still initalizing, this is why I do not see my inverter entities yet… so will let this stew for a bit (and temp remove the debug flag, this is quiet chatty in the logs).

bash-5.0# grep enphase_envoy home-assistant.log
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Retrieved data from API: {'production': 0, 'consumption': 0, 'daily_production': 0, 'daily_consumption': 0, 'seven_days_production': 0, 'seven_days_consumption': 0, 'lifetime_production': 0, 'lifetime_consumption': 0, 'inverters_production': {}}
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Returning API data.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Finished fetching sensor data in 8.079 seconds
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Current Energy Consumption) - Type: consumption.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Current Energy Production) - Type: production.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Today's Energy Consumption) - Type: daily_consumption.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Today's Energy Production) - Type: daily_production.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Last Seven Days Energy Consumption) - Type: seven_days_consumption.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Last Seven Days Energy Production) - Type: seven_days_production.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Lifetime Energy Consumption) - Type: lifetime_consumption.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Adding sensor: envoyEnvoy Lifetime Energy Production) - Type: lifetime_production.
2020-10-15 15:58:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Inverter data: {}
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: consumption - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: production - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: daily_consumption - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: daily_production - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: seven_days_consumption - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: seven_days_production - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: lifetime_consumption - 0
2020-10-15 15:58:47 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: lifetime_production - 0
2020-10-15 15:58:52 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Retrieved data from API: {'production': 0, 'consumption': 0, 'daily_production': 0, 'daily_consumption': 0, 'seven_days_production': 0, 'seven_days_consumption': 0, 'lifetime_production': 0, 'lifetime_consumption': 0, 'inverters_production': {}}
2020-10-15 15:58:52 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Returning API data.
2020-10-15 15:58:52 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Finished fetching sensor data in 5.439 seconds
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: consumption - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: production - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: daily_consumption - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: daily_production - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: seven_days_consumption - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: seven_days_production - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: lifetime_consumption - 0
2020-10-15 15:59:17 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Updating: lifetime_production - 0
2020-10-15 15:59:26 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Retrieved data from API: {'production': 0, 'consumption': 0, 'daily_production': 0, 'daily_consumption': 0, 'seven_days_production': 0, 'seven_days_consumption': 0, 'lifetime_production': 0, 'lifetime_consumption': 0, 'inverters_production': {}}
2020-10-15 15:59:26 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Returning API data.
2020-10-15 15:59:26 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Finished fetching sensor data in 4.321 seconds

@fireheadman You should have some data coming through. What kind of envoy do you have? What version of HA are you running?

I have the latest Combiner3 w/envoy


…and per the enlighten page, I am still initializing

Ok, let’s see what the data looks like when the system is done initializing.

I have an envoy - but its an older version… Envoy-S-Standard-NA
Software Version 5.0.48

Are you still looking for testers in this area, as I do not believe it has the consumption portion. I am also running HASS OS 4.14 - Home Assistant 0.116.4.

I am using the integration of Envoy and am able to see the microinverters. I do wish there was a way to report when an inverter goes offline/down. I have 2 that are not reporting now, as well as a couple of retired microinverters, but when I look at the data collected, they are all showing energy production which is weird.

Hi

I’m running HA 116.4, and have configured the envoy component as shown in the example:

sensor:
  - platform: enphase_envoy
    name: Optional_name
    ip_address: LOCAL_IP_FOR_ENVOY
    monitored_conditions:
      - production
      - daily_production
      - seven_days_production
      - lifetime_production

With the correct IP ;-), when i browse to the IP i get the envoy webpage and when i append /api/production i see values.

But in HA all most sensors give back 0, and current production 1 / 2.
Another “strange” thing when i define a name, the whole init of the component fails.

I’m still initializing, so will be back once I contact enphase support to see what is going on with my system.