This script collects and exports key metrics from Solis inverters to Prometheus. It tracks important data points such as Current Generation, Daily Generation, and Total Generation. This allows you to monitor the performance of your inverter with ease.
-
Metrics Collection: Retrieves power output, energy produced today, and total energy produced from Solis inverters.
-
Prometheus Integration: Provides metrics in a format compatible with Prometheus scraping.
-
Simple Configuration: Easy to set up with minimal configuration required.
-
Reliable Data Fetching: Automatically retries in case of network or data fetching errors.
-
Device Configuration:
Update the following variables with your Solis inverter details:
# Device Configuration IP = "INVERTER_IP" USERNAME = "INVERTER_USERNAME" PASSWORD = "INVERTER_PASSWORD"
IP
: IP address of your Solis inverter.USERNAME
: Username for your Solis inverter.PASSWORD
: Password for your Solis inverter.
-
Exporter Port (Optional):
Set the port for the Prometheus exporter:
PORT = 8686
-
Install Dependencies:
Install the required Python packages:
pip install prometheus_client requests beautifulsoup4
- Run the Script:
Launch the script to start the Prometheus exporter:
python solis_exporter.py
-
Access Metrics:
After running the script, you can access the metrics at:
http://localhost:8686/metrics
-
Prometheus Data Fetching: The script continuously fetches data from the inverter and exposes it in Prometheus format. Ensure that your inverter is accessible from the script's host.
-
Configuration: Verify that the IP address, username, and password for your inverter are correctly set. These settings are crucial for data retrieval.
This project is licensed under the MIT License.