I'm hooking my solar panels up to Twitter!
Fronius provide a comprehensive API guide - I wish more companies did this. There are lots of unofficial libraries in a variety of different languages. I've written this code in Python3.
This is a general tidy-up of the code I wrote several years ago.
Here's how it works....
- Every minute, the script runs from
- If it is after sunrise and before sunset, it takes a reading and writes it to today's CSV file.
- If it is after sunset, draw a graph, save it, Tweet it.
- Only do this once.
This is in Python3 so should run on a Raspberry Pi - or any other computer.
If you are running this code on the same network as your Fronius, there is no security. The API lets you read data without a password.
You can get the latest code on GitHub.
Today I generated 16.19kWh of solar electricity. pic.twitter.com/puH8Pwfbev
— Edent's Solar Panels (@Edent_Solar) March 26, 2020