Skip to content

Prometheus exporter written in Python to collect metrics from Solis inverters.

License

Notifications You must be signed in to change notification settings

luizbizzio/solis-inverter-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solis Inverter Exporter ☀️📈

Overview 📊

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

Features 🌟

  • 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.

Configuration ⚙️

  1. 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.
  1. Exporter Port (Optional):

    Set the port for the Prometheus exporter:

    PORT = 8686

Usage 🚀

  1. Install Dependencies:

    Install the required Python packages:

    pip install prometheus_client requests beautifulsoup4
    1. Run the Script:

    Launch the script to start the Prometheus exporter:

    python solis_exporter.py
  2. Access Metrics:

    After running the script, you can access the metrics at:

    http://localhost:8686/metrics
    

Notes 📝

  • 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.

License

This project is licensed under the MIT License.