A Home Assistant custom integration for Sol-Ark inverter systems that connects to the SolArk Cloud API. Monitor your solar system with real-time data and track long-term energy production with full Energy Dashboard support.
- Energy Dashboard Compatible - Native support for Home Assistant's Energy dashboard
- Real-time Monitoring - Live power flow tracking (PV, Battery, Grid, Load)
- Cloud-based - Connects to solarkcloud.com (auto-discovers API host)
- Microinverter-aware PV - Includes portal
minPowerwhen micro/AC-coupled PV is present - 9 Comprehensive Sensors - All critical solar system metrics
- Beautiful Dashboards - Pre-built power flow visualizations
- Long-term Statistics - Automatic energy tracking and historical data
- Easy Setup - Simple configuration through Home Assistant UI
| Entity ID | Description | Unit | Energy Dashboard |
|---|---|---|---|
sensor.solark_pv_power |
Solar PV power (pvPower + minPower when present) |
W | Use with Riemann Sum |
sensor.solark_battery_power |
Battery power (+ discharge, − charge) | W | Use with Riemann Sum |
sensor.solark_battery_soc |
Battery state of charge | % | Battery level |
sensor.solark_grid_power |
Net grid power | W | Use with Riemann Sum |
sensor.solark_load_power |
Home consumption | W | Use with Riemann Sum |
sensor.solark_grid_import_power |
Grid import (meter or flow gridTo) |
W | Use with Riemann Sum |
sensor.solark_grid_export_power |
Grid export (meter or flow toGrid) |
W | Use with Riemann Sum |
sensor.solark_energy_today |
Daily production (plant realtime) | kWh | ✅ Direct use |
sensor.solark_energy_total |
Lifetime production (plant realtime) | kWh | ✅ Solar production |
Notes:
- Battery power: positive = discharging, negative = charging (from SolArk flow
batTo/toBatflags). - PV power includes microinverter / AC-coupled contribution from flow
minPowerwhenexistsMin/microOnis set (common when stringpvPoweralone is 0). - Grid import/export use external meter phases when available; otherwise they follow
gridOrMeterPowerwith direction flags.
- Home Assistant 2023.5.0 or newer
- Sol-Ark inverter (12K, 15K, 8K, 5K models)
- Active Sol-Ark Cloud account
- Your Plant ID from Sol-Ark portal
- Open HACS → Integrations
- Click ⋮ → Custom repositories
- Add:
https://github.com/HammondAutomationHub/HomeAssistant_SolArk - Category: Integration
- Find "SolArk Cloud" and click Download
- Restart Home Assistant
- Download latest release
- Copy
custom_components/solarkto your/config/custom_components/directory - Restart Home Assistant
- Log into solarkcloud.com
- Navigate to your system
- Check the URL:
https://www.solarkcloud.com/plants/overview/12345/... - Your Plant ID is
12345
- Settings → Devices & Services → + ADD INTEGRATION
- Search "SolArk Cloud"
- Enter:
- Username: Your Sol-Ark email
- Password: Your Sol-Ark password
- Plant ID: From step 1
- Auto-discover API URL: enabled by default (reads the live API host from the portal)
- Portal base URL / API URL: optional overrides (defaults:
https://www.solarkcloud.comandhttps://p2.api.solarkcloud.com) - Scan Interval: 30 (seconds)
- Click SUBMIT
After install you can change discovery, URLs, and scan interval under Configure on the integration.
- Go to Developer Tools → States
- Search
solark - Verify 9 sensors with live data
Your integration is fully compatible with Home Assistant's Energy dashboard!
- Settings → Dashboards → Energy
- Solar Production → Add Production
- Select:
sensor.solark_energy_total
- Select:
- Grid Consumption (requires helpers):
- Create Riemann Sum helper from
sensor.solark_grid_import_power - Add to Energy dashboard
- Create Riemann Sum helper from
- Grid Return (if you export):
- Create Riemann Sum helper from
sensor.solark_grid_export_power - Add to Energy dashboard
- Create Riemann Sum helper from
📚 Full Guide: See ENERGY_DASHBOARD_SETUP.md for complete instructions including battery tracking.
Beautiful real-time monitoring with dynamic power flow indicators:
Features:
- Live power values with color coding
- Battery status with dynamic icons
- 24-hour historical charts
- Energy production statistics
Requirements:
- Mushroom Cards (HACS)
- ApexCharts Card (HACS)
Installation:
Option A - UI Method:
- Copy
dashboards/solark_flow.yamlcontent - Settings → Dashboards → + ADD DASHBOARD
- ⋮ → Edit Dashboard → ⋮ → Raw configuration editor
- Paste and save
Option B - YAML File:
- Copy
solark_flow.yamlto/config/dashboards/ - Add to
configuration.yaml:
lovelace:
mode: storage
dashboards:
solark-power:
mode: yaml
title: SolArk Power Flow
icon: mdi:solar-power
show_in_sidebar: true
filename: dashboards/solark_flow.yaml- Restart Home Assistant
automation:
- alias: "Low Battery Warning"
trigger:
platform: numeric_state
entity_id: sensor.solark_battery_soc
below: 20
action:
service: notify.mobile_app
data:
title: "Low Battery"
message: "Battery at {{ states('sensor.solark_battery_soc') }}%"automation:
- alias: "Exporting to Grid"
trigger:
platform: numeric_state
entity_id: sensor.solark_grid_export_power
above: 2000
for: "00:05:00"
action:
service: notify.mobile_app
data:
message: "Exporting {{ states('sensor.solark_grid_export_power') }}W"automation:
- alias: "Battery Fully Charged"
trigger:
platform: numeric_state
entity_id: sensor.solark_battery_soc
above: 95
condition:
condition: numeric_state
entity_id: sensor.solark_battery_power
below: 100
action:
service: notify.mobile_app
data:
message: "Battery full at {{ states('sensor.solark_battery_soc') }}%"template:
- sensor:
- name: "Solar Self-Consumption"
unit_of_measurement: "%"
state: >
{% set pv = states('sensor.solark_pv_power') | float(0) %}
{% set export = states('sensor.solark_grid_export_power') | float(0) %}
{% if pv > 0 %}
{{ ((pv - export) / pv * 100) | round(1) }}
{% else %}
0
{% endif %}template:
- sensor:
- name: "Battery Status"
state: >
{% set power = states('sensor.solark_battery_power') | float(0) %}
{% if power > 100 %}
Discharging
{% elif power < -100 %}
Charging
{% else %}
Idle
{% endif %}- Verify credentials at solarkcloud.com (portal replaced mysolark.com)
- Confirm Plant ID is correct (from
/plants/overview/{id}/...) - Leave Auto-discover API URL enabled, or set API URL to
https://p2.api.solarkcloud.com - Check logs: Settings → System → Logs
- On microinverter / AC-coupled plants, string
pvPowermay be 0 whileminPowercarries production - Version 5.0.2+ adds
minPowerintosensor.solark_pv_power— update and reload if you still see 0
- Plants without an external meter do not populate
meterA/B/C - Version 5.0.2+ derives import/export from flow
gridOrMeterPower+gridTo/toGrid - Update/reload, then recreate Riemann helpers if needed for the Energy dashboard
- Check SolArk Cloud service status
- Increase scan interval to 60 seconds
- Reload integration
- Check Settings → System → Logs (credentials/tokens are redacted in SolArk debug output)
- Verify sensors exist: Developer Tools → States
- Install Mushroom Cards and ApexCharts Card
- Restart Home Assistant
- Clear browser cache (Ctrl+Shift+R)
- Wait 1-2 hours for statistics to build
- Verify
sensor.solark_energy_totalhas data - Check sensor has
state_class: total_increasing - See ENERGY_DASHBOARD_SETUP.md
# configuration.yaml
logger:
logs:
custom_components.solark: debugThen check Settings → System → Logs.
Username, password, and OAuth tokens are redacted from SolArk log messages. The integration no longer writes a separate solark_debug.log file.
- Uses
DataUpdateCoordinatorfor efficient polling - OAuth 2.0 password grant against
{api_url}/oauth/token(client_id: csp-web) - Optional auto-discovery of
VUE_APP_BASE_APIfrom the SolArk portal frontend - Combines data from:
- Energy flow:
/api/v1/plant/energy/{plant_id}/flow(powers, SOC, direction flags,minPower) - Plant realtime:
/api/v1/plant/{plant_id}/realtime(etoday / etotal) - Inverter list +
dy/store/{sn}/read(SN lookup, meters when present)
- Energy flow:
- Portal:
https://www.solarkcloud.com - API:
https://p2.api.solarkcloud.com(fallback if discovery fails) - Obsolete hosts (
mysolark.com,ecsprod-api-new.solarkcloud.com) are migrated automatically on reload
- Power sensors:
state_class: measurement - Energy sensors:
state_class: total_increasing - Long-term statistics automatically recorded
- Compatible with Energy dashboard
Contributions welcome! Please:
- Fork the repository
- Create feature branch
- Make changes with tests
- Submit Pull Request
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Community: Home Assistant Forums
Provided as-is with no warranty. Use at your own risk.
- Home Assistant community
- Sol-Ark for API access
- All contributors
See CHANGELOG.md for version history.
Note: Not officially affiliated with Sol-Ark. Community-developed integration.
Version: 5.0.2 | Supports: Sol-Ark 5K/8K/12K/15K | HA: 2023.5.0+