A simple Prometheus exporter for SOLARMAN Smart metrics to Prometheus
1.3K
This project evolved into
rcooler/jinko_exporter (JinkoBridge), which keeps the Solarman OpenAPI as one of its sources and adds the Jinko cloud, a local Solarman V5/Modbus source with failover between them, and Home Assistant MQTT Discovery. New installations should usercooler/jinko_exporter. Its configuration variables and metric names differ from this image, so treat it as a new installation.
The guide below describes the last solarman_exporter image.
solarman_exporter is a simple Prometheus exporter for SOLARMAN Smart (Solarman OpenAPI). It polls Solarman Cloud on a fixed interval, caches the result, and exposes metrics for Prometheus and Grafana; a scrape never hits the Solarman API.
Full history: commits on GitHub. Development continues in JinkoBridge: releases.
appId and appSecret). They are not shown in the Solarman Smart UI; request them from Solarman.services:
solarman_exporter:
image: rcooler/solarman_exporter:latest
container_name: solarman_exporter
restart: unless-stopped
environment:
# --- Solarman OpenAPI ---
SOLARMAN_BASE_URL: "https://globalapi.solarmanpv.com"
SOLARMAN_API_VERSION: "v1.0"
SOLARMAN_LANGUAGE: "en"
SOLARMAN_APP_ID: "${SOLARMAN_APP_ID}"
SOLARMAN_APP_SECRET: "${SOLARMAN_APP_SECRET}"
SOLARMAN_EMAIL: "${SOLARMAN_EMAIL}"
# Use ONE of these:
SOLARMAN_PASSWORD_SHA256: "${SOLARMAN_PASSWORD_SHA256}"
# SOLARMAN_PASSWORD: "${SOLARMAN_PASSWORD}"
# Optional (if auto-discovery doesn't work):
# SOLARMAN_DEVICE_SN: "1234567890,0987654321"
# SOLARMAN_STATION_ID: "0"
# Exporter runtime
SOLARMAN_POLL_INTERVAL: "160s"
SOLARMAN_HTTP_TIMEOUT: "15s"
SOLARMAN_YEARLY_REQUEST_LIMIT: "200000"
SOLARMAN_DISCOVERY_REFRESH_INTERVAL: "24h"
SOLARMAN_ENABLE_GENERIC: "true"
SOLARMAN_EXPORTER_LOG_LEVEL: "info"
SOLARMAN_EXPORTER_METRICS_PATH: "/metrics"
SOLARMAN_EXPORTER_LISTEN: ":9876"
ports:
- "9876:9876"
- job_name: 'solarman'
scrape_interval: 160s
metrics_path: /metrics
static_configs:
- targets: ['solarman_exporter:9876']
Each group exposes solarman_<group>_metric{device_sn,key,name,unit}: solarman_pv_metric, solarman_inverter_metric, solarman_grid_metric, solarman_battery_metric, solarman_bms_metric, solarman_gen_metric, solarman_load_metric (UPS/backup output) and solarman_house_metric (home consumption).
The generic solarman_metric{device_sn,key,name,unit} stream is optional; switch it with SOLARMAN_ENABLE_GENERIC.
MIT licensed. Independent open-source project, not affiliated with, endorsed by, or sponsored by Solarman or any inverter vendor. Product names are trademarks of their respective owners and are used only to describe compatibility and integration.
Content type
Image
Digest
sha256:5e1a58cc9…
Size
12.8 MB
Last updated
8 months ago
docker pull rcooler/solarman_exporter