Solis Cloud Control API integration for PV hybrid inverters

A month ago, I installed a PV system on my roof based on a Solis inverter. To read the inverter’s parameters, I used the solis-sensor integration and, accepting all the limitations associated with cloud integration, it works great. Unfortunately, the experimental part controlling the inverter in my case was operating unstably.

Initially, I wanted to improve the existing integration, but since it was my first experience with the Home Assistant API and the integration code is complex, I gave up.

I decided to learn the Home Assistant API by independently writing a new integration. I focused on applying best practices (e.g., using coordinator) and solving issues at the interface with the Solis Cloud API. The result is the solis-cloud-control project, which I have been testing for a few days and it works very stably, allowing me to automate the inverter’s operation based on energy prices and energy production estimates for the next day.

I must admit that the Home Assistant API is a piece of excellent engineering work. And if my integration allows someone to automate their inverter, I will be very happy.

Another improvement could be to poll certain values locally, i.e. without having to wait 5 minutes for each update (I like fine-grained control over when I charge certain devices in function of incoming solar power).

I wrote a first stab at that, to be found here:
GitHub - jverplancke/soliscloud_api: Python implementation for the SolisCloud API (under local_refresh.py). It still relies on some web API interaction, I’m hoping to get around that in future but for now it does the job - I can follow my PV production with arbitrary time resolution.