jesserizzo / envoy_reader

MIT License
37 stars 26 forks source link

Update envoy_reader.py getData() #63

Closed stuartwishart closed 3 years ago

stuartwishart commented 3 years ago

Update getData() to add optional input parameter to not read inverters. Inverters only update every 5 or 15 mins, depending on Envoy-S configuration, whereas production data updates every minute. Also, requesting inverter data at too short an interval can cause the Envoy to start lagging and eventually timeout. See https://thecomputerperson.wordpress.com/2016/08/03/enphase-envoy-s-data-scraping/#comment-1565 for more details.

gtdiehl commented 3 years ago

@stuartwishart We definitely don't want to kill the inverters.

I'm wondering how the Home Assistant side would handle this? It would have to switch between the Boolean flag depending on time? Or something like that.

The change seems minimal here just adding a flag. Though the code base has changed slightly can you update your code to integrate with the new changes?

stuartwishart commented 3 years ago

@gtdiehl I couldn't work out to how to rebase this PR so I've closed it and created a new PR#68.

I've prototype the change on the HomeAssistant side (https://github.com/stuartwishart/core/blob/dev/homeassistant/components/enphase_envoy/sensor.py) to enable a different update rate for the production data and inverter data.