I have solar panels at home. It would be nice to see the actual status of these panels in the HASS overview screen.
This is information like:
actual output (watts)
generated today (kWh)
generated this week (kWh)
generated this month (kWh)
generated this year (kWh)
total generated (kWh)
max power output today (watts)
panel temperature
I upload this information from my solar system to pvoutput.org. It would be usefull to have a plugin which connects to pvoutput.org. The pvoutput site offers the possibility to connect by an api to get the desired information. With the collected information it is possible to create nice charts in the HASS overview screen. You can connect to pvoutput with api key and account number.
My wishes ;-):
I have multiple pv setups Iād like to monitor, so I should be able to make multiple simultanious connections to pvoutput.org
the above points with an asterisk are the minimal functions you should be able to see, the others are nice to have
The issue here is that with this approach your 60 requests per hour will gone quickly if you use multiple sensors. Indeed would the right way be to create a pvoutput sensor platform.
Can you make a request with curl and post the response?
value_template: '{% set list = value.split( "," ) %} {{ "%0.3f"|format(list[3]|float/1000) }}'
I found that with 3 sensors I exceeded the allowable api calls - 1 was OK - testing with 2 now.
It would be good if the frequency of API calls by the REST sensor was customisable.
fabaffās new PVOutput Sensor should solve this.
You can easily test this by enabling the sensor as a custom-component. Iām using it right now this way. There are a few details to sort out, but overall it works nice.
Realy great to see PVoutput as a component! I also pv output with the rest platform and hat the issue with too much requests. I tried to used scan_interval:300 but did not work.
Iām just starting with HASS - so how can I enable this sensor as a custom-component?
Is it enough just to add the pvoutput.py to ~/.homeassistant/custon_components/sensor and add
- platform: pvoutput
system_id: 1234
api_key: xyz
scan_interval: 120
Doing this I get:
16-11-07 00:28:07 homeassistant.util.yaml: mapping values are not allowed here
in ā/home/pi/.homeassistant/sensor.yamlā, line 161, column 14
Thx,
Daniel
There is one thing that I canāt get to work. The sensor widget shows 'energy_generation) but in my tile it shows unknown. Do I use the wrong name? (using states.sensor.pvoutput.attributes.energy_generation)
Output should have been: 0.31
This is the answer from the PVoutput service: 20161107,23:15,310,NaN,14081,288,NaN,NaN,NaN
Last weekend I followed some tips from @fabaff to use template sensors for splitting up the collected information into readable information. In the end Iād a solution like @Marcel030nl posted above.
For now Iāve two things to sort out:
I canāt get the āEnergy Generatedā data in my template sensor (same problem as @Marcel030nl)
Iād like to add multiple solar installations to monitor. One possibility is to duplicate the script and use other variables, but thats not the most ārobustā solution
I added this line to the custom_sensor pvoutput.py of @fabaff, line 106 ATTR_ENERGY_GENERATION: self.pvcoutput.energy_generation,
(hope this gets merged into the final sensor code)
Based on what I know of the PVoutput API and HASS I would recommend using 2 sensors as well.
I created an app called PVdashboard (pvdashboard.org) based on the PVoutput API. If you want to gather information from an other SID you have to do a new query on the API.