meltaxa / solariot

Leverage your IoT enabled Solar PV Inverter to stream your solar energy usage data to a real time dashboard.
https://solariot.live
MIT License
211 stars 72 forks source link

PVOutput support #22

Closed meltaxa closed 3 years ago

meltaxa commented 3 years ago

Enhancement to upload Solariot metrics to pvoutput.org.

API specs: https://pvoutput.org/help.html#api-spec

michael-robbins commented 3 years ago

PR's up, just needs testing once my solar inverter is online again... why can't the sun just stay up all the time...

michael-robbins commented 3 years ago

Tested it out in my PR and it all seems to be working and publishing nicely!

Looking at modbus-sungrow-sh5k.py I can't see any of the v1 through v4 attributes though, are they different names?

Currently I've got:

            if "daily_power_yield" in metrics:
                parameters["v1"] = metrics["daily_power_yield"]

            if "total_active_power" in metrics:
                parameters["v2"] = metrics["total_active_power"]

            if "daily_energy_consumption" in metrics:
                parameters["v3"] = metrics["daily_energy_consumption"]

            if "power_meter" in metrics:
                parameters["v4"] = metrics["power_meter"]
meltaxa commented 3 years ago

As per comments in your PR, I've made some updates to handle different modbus maps and also stay within the API rate limits.