Send solar power data via curl from inverter to pvoutput.org

As I could not find an easy solution in this forum to send my solar power data to pvoutput.org (free service for sharing and comparing PV output data), I created one.
The current wattage is sent every 15 minutes via parameter and addstatus.jsp to pvoutput.org.
You will need an account to get an api key and also register your solar plant to obtain a System ID.
Date, time and power are the minimum data, please extend if you wish while having a look at the pvoutput help docs:

https://pvoutput.org/help/api_specification.html?highlight=addstatus%20jsp#add-status-service

The example is for a Fronius GEN24 inverter which does not have the push service like the older Symo anymore. It should also work with all other inverter brands.

rule "send solar data to pvoutput every 15 minutes"
when 
    Time cron "0 0/15 * * * ?"
then
    var String todaydate = String::format("%1$tY%1$tm%1$td",new java.util.Date)
    var String actualtime = String::format("%1$tH:%1$tM",new java.util.Date)
    var Number pvpower = (YourSolarPowerItem.state as Number).intValue
    executeCommandLine(Duration.ofSeconds(15), "curl", "-d", "d="+todaydate,"-d", "t="+actualtime,"-d", "v2="+pvpower, "-H", "X-Pvoutput-Apikey:<YourAPIKey>", "-H", "X-Pvoutput-SystemId:<YourSystemID>", "https://pvoutput.org/service/r2/addstatus.jsp")
end
1 Like

There is a bit more to it, as in PVOutput; you can submit consumption, generation, import, export, and in case a battery is in play, its charge, discharge and SoC can be recorded… to then produce a graph like this:

However, I use curl to submit the data once per 24h (usually 02:00), as real-time data is shown by openHAB.

Nevertheless, your approach is a nice one :slight_smile:

1 Like

I know :grinning:, that’s why I wrote

and

For future readers: if you want to adopt @Max_G’s approach, you need to submit your data to addoutput.jsp instead of addstatus.jsp.