My Aurora inverter packed up and I replaced it with a Sunsynk Hybrid. I’m having a problem finding a method / software to automatically upload my solar data to PVoutput using a Raspberry Pi. If anyone has achieved this, could you please share how you managed it?
Did you find a solution ? I am planning for Deye (similar to sunsynk i think)
I’m afraid not, I’ve not been able to find anything. I believe that Solar Assistant gathers the data needed for PVOutput. When I contacted Solar Assistant I was told it has no auto export to PVOutput and would need to manually send the data. How to automate the upload the data to PVOutput is beyond my capabilities unfortunately. A pity.
You can automate it by using Home Assistant. Inverter > Solar Assistant > Home Assistant > PVOutput.
Setup Solar Assistant in Home Assistant
Create PVOutput update schedule (scheduled to run every 5 minutes)
This is exactly what I’m doing.
Once you have the MQTT integration set up with Solar Assistant and Home Assistant (and OpenWeatherMap if you want to report temperatures) then all you need is something like this in the configuration.yaml
rest_command:
update_pvoutput:
url: https://pvoutput.org/service/r2/addstatus.jsp
method: post
content_type: "application/x-www-form-urlencoded"
headers:
X-Pvoutput-Apikey: !secret pvoutout-api
X-Pvoutput-SystemId: !secret pvoutput-site
payload: "d={{now().strftime('%Y%m%d')}}&t={{now().strftime('%H:%M')}}&v1={{(states('sensor.pv_total_kwh_lifetime')|float*1000)|round(0)}}&v2={{(states('sensor.pv_power'))|round(0)}}&v3={{(states('sensor.inverter_load_total_kwh_lifetime')|float*1000)|round(0)}}&v4={{(states('sensor.load_power'))|round(0)}}&v5={{(states('sensor.openweathermap_temperature'))}}&v6={{(states('sensor.grid_voltage'))}}&c1=1"
Note that I have created custom templates for lifetime energy usage in Home Assistant as the ones Solar Assistant provides will reset periodically I believe but you don’t need to send v1
and v3
, though you would have more accurate data if you do.
Confirm your payload string is correct by pasting it into Developer Tools → Templates, then restart Home Assistant (full restart).
Then add an automation in automations.yaml (I created mine through the UI though):
- id: '1692546021659'
alias: PVOutput Upload
description: ''
trigger:
- platform: time_pattern
minutes: /5
action:
- service: rest_command.update_pvoutput
data: {}
mode: single
Hi drzoidberg33
At last, I’ve got Home Assistant up and running and it appears to be receiving data from my Sunsynk Inverter. Unfortunately sending the data to PVOutput, following the steps in your post, nothing appears in PVOutput. As a total Home Assistant novice, a couple of questions please.
- In the following two lines of configuration.yaml, I replaced the “!secret pvoutout-api” and “!secret pvoutput-site” with my PVOutput API key and registed system id (without any quotes)
X-Pvoutput-Apikey: !secret pvoutout-api
X-Pvoutput-SystemId: !secret pvoutput-site - What, if anything, do I substitute in the the following line of automations.yaml ?
- id: ‘1692546021659’
Thanks!
Old chain, but there is a bit more, if some one, like me recently, try to found some answer.
Here is what I need to change at original advice to get it work:
With file editor at configuration.yaml
rest_command:
update_pvoutput:
url: https://pvoutput.org/service/r2/addstatus.jsp
method: post
content_type: "application/x-www-form-urlencoded"
headers:
X-Pvoutput-Apikey: lotsofnumbersandletters,myapikeyfrompvoutputorg
X-Pvoutput-SystemId: fewnumbers,mysystemid
payload: "d={{now().strftime('%Y%m%d')}}&t={{now().strftime('%H:%M')}}
&v1={{(states('sensor.axpert_king_35_x_3_pv_energy')|float*1000)|round(0)}}
&v2={{(states('sensor.axpert_king_35_x_3_pv_power'))|round(0)}}
&v3={{(states('sensor.axpert_king_35_x_3_load_energy')|float*1000)|round(0)}}
&v4={{(states('sensor.axpert_king_35_x_3_load_power'))|round(0)}}
&v5={{(state_attr('weather.forecast_koti', 'temperature'))}}
&v6={{(states('sensor.axpert_king_35_x_3_grid_voltage'))}}&c1=1"
I test all sensor data with Developer tools → Template.
I clear demo away and put all text starting at payload to last " to the Template editor box.
Then I check what was my MQTT sensors what, Solar Assistant was create.
Result type box show what script collect.
When all info was what I want, I copy all to the configuration.yaml (whole payload: “…” to one line, like original advice), save and restart HA.
Then I add automation with Home Assistant tool:
Settings → Automation & scenes + [Create automatio} -button.
Then I modify that automation with File editor to looks like original advice.
automations.yaml
- id: '1725128440615'
alias: PV OUTPUT ORG
description: ''
trigger:
- platform: time_pattern
minutes: /5
action:
- action: rest_command.update_pvoutput
data: {}
mode: single
That way I get that id number “right”.
Well, I realize that Solar Assistant reset energy values sometimes. I guess it happened once a week.
Anyway, I make helper template to collect total_increase sensor, both PV and LOAD lifetime energy values.
At least I hope those works as total_increase sensor state is described.
Just now they seems to work, but real test is when value start of the zero again.