@hollapm Yeah if you can run the updated sensor code that would be great. It really only solves the issue where you might see inverter data not being updated sometimes. Even if you don’t have that issue it would be nice to run this code on systems before releasing it.
I looked into how to remove old retired inverters. Given that the envoy device is returning inverters I probably shouldn’t filter out entities based on a time-stamp. What I can do is use Home Assistant’s unique_id property and then you can go into Configuration >> Entities to find the inverter that is retired and you can disable it and remove it from being displayed in HA, that way. How does that sound?
I’ll look into notification of inverters going offline
@DHoefakker That’s interesting I’ve never used the name attribute for the envoy sensor. I’ll look it that. Looking into the code is appears the name is pre-appended to the default sensor name
What type of envoy do you have? When viewing the api info did you use http://ip/api/v1/production? I’m guessing the wattsNow from the browser is different from Home Assistant?
Can you capture some debug output, when the sensors are returning 0 and production is half?
I use a envoy-s
The only line i see in the log is the following warning:
2020-10-29 12:30:13 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.envoy_lifetime_energy_production is taking over 10 seconds
I also added a rest sensor with the same IP and that sensor displays the values from the JSON.
The REST sensor code:
@DHoefakker This might be because of an issue with the envoy_reader api. I have opened a PR for it on and the timeout issue should be included in the next HomeAssistant release I think 0.118.
If you don’t want to wait you can make the change yourself but after every HA update (until the fix is merged into HA) you will have to make the same change until the envoy_reader api is updated.
The file that needs to be changed is .../lib/python/site-packages/envoy_reader/envoy_reader.py. Since this path is system dependent you could find the file by doing a search first for envoy_reader.py. In this Issue in Github it says where you need to add the text timeout=30, (yes don’t forget the comma!)
After you make the change, save it, and restart HA the timeout issue should be resolved.
HI,
I just stumbled upon this thread. too bad I just noticed.
I have been annoyed by the fact envoy is limiting the data polling frequency to once per 5 minutes. This is so not 2020. Anyway.
I am unable to see the folder you mention. Inside config I dont have a /components/ folder. I am running HASSIO / HomeAssistant OS, virtually on proxmox. Where do I put this sensor.py?
My info:
HA v117.0
Envoy Type: 800-00553-r02 (Envoy-S-Standard-EU)
16 converters.
Software Version
D5.0.34 (6e87e2)
I have connected it directly to ethernet, to get rid of connection time-out issues through wifi. (stupid they hooked it up like that in the first place anyway… the thing is next to my modem … duh…)
I have admin password and I have installation password of the envoy.
Currently I read the data once per 60 seconds with REST.
So, How can I help what do you need.
edit:
find / | grep enphase > no reply through putty or addon ssh terminal
I’m not familiar with proxmox but it should act just like most other virtualization software. You might have to ssh into the HomeAssistant VirtualMachine and do run a search for the file. There is probably a better command but I usually run as root 'find / | grep enphase_envoy'
Which pages are you polling on your Envoy for the REST sensor?
I only have an older Envoy device it only updates once every 15mins using the /api/v1/production web page. With newer models a different page is used /production.json which has more info. The inverter production section of that page seems to update anywhere between every 1 to 15mins, I don’t know why. The other section (if you have CT installed) will give you instantaneous information everytime you access the page.
as can be seen in the picture below, mine updates once per 5 minutes. Its te yellow line in the graph. I think it is an older model as well, similar to yours.
I installed the comunity addon, instead of the regular addon. this is now what I see…
THe problem I have is that I find it difficult to get into the folder of HomeAssistant, from the console of Proxmox.
I run Proxmox on a ZFS disk, I have the VM running on there. but getting the mount dir of the local-lvm, I dont seem to get working.
inside proxmos, I find the HA image in /dev/zvol/rpool/data/vm-101-disk-1. But im unable to mount it direclty. fstab error. dont know.
The W and Wh hours are the values coming from the Envoy device. The API doesn’t change the values but you can create a template in Home Assistant converting the measurement to what you want
Here is an example that I use to convert W to kW
sensor:
- platform: template
sensors:
envoy_current_energy_production_kw:
friendly_name_template: 'Envoy Current Energy Production (kW)'
unit_of_measurement: 'kW'
value_template: "{{ (states('sensor.envoy_current_energy_production')| float / 1000| round(2)) }} "
ah, ok.
I have it limited to once / 5 minutes. using REST currently.
I have tried to find that sensor.py, but failed. maybe I will give it an other try if you tell me that the update frequency will be higher using this method instead of rest
The updated sensor.py code was updating the values every 30 seconds. Probably a little over kill. So I updated the sensor.py code to update every 60 seconds. This can be changed to a higher value if you want such as 120 seconds, by using the scan_interval setting in the envoy sensor section.
I recently learnt one can override the inbuilt integration with custom component. I did it with DSMR sensor. Works like a charm. Do you maybe have a github link so I can copy the complete envoy component and all files in the custom_components folder?
NEver mind… found it
I created the folder in custom_components\enphase_envoy
put these files in there: init.py manifest.json and sensor.py
The integration is working.
But with my envoy does not produce more frequent new data than once per 30 minutes.
The REST sensor I use, gives a new value per 5 minutes.