Professional AI-powered Home Energy Management System for Home Assistant
🌐 Website • 📖 Documentation • 🐛 Issues • 🛒 Buy License
Created by GregECAT • Smarting HOME 🇵🇱
Smarting HOME is a commercial-grade HACS integration that transforms your Home Assistant into an intelligent energy command center. It autonomously manages solar production, battery storage, grid trading, and home loads — maximizing savings on the Polish energy market.
💡 Built for real-world Polish prosumers — optimized for G13 tariff, RCE dynamic pricing, net-billing, GoodWe inverters, and Lynx batteries.
|
Autonomous decision making with three strategy layers:
|
Integrated AI for intelligent recommendations:
|
|
|
|
|
- Inverter: GoodWe BT series (3-phase hybrid) — UDP / Modbus RS485
- Battery: Lynx Home U 10.2 kWh (LiFePO4) — Via inverter
- Grid: Polish market (Tauron, Enea, PGE, Energa) — G13 / G11 / C-tariff
- Market Data: RCE PSE dynamic pricing — REST API
- Forecast: Solcast / Forecast.Solar — HA integration
- Open HACS in your Home Assistant instance
- Click the ⋮ menu → Custom repositories
- Add URL:
https://github.com/GregECAT/smartinghome-homeassistant - Select category: Integration
- Search for "Smarting HOME" and click Download
- Restart Home Assistant
# Clone the repository
git clone https://github.com/GregECAT/smartinghome-homeassistant.git
# Copy to your HA config directory
cp -r smartinghome-homeassistant/custom_components/smartinghome /config/custom_components/
# Restart Home AssistantAfter installation, add the integration via Settings → Devices & Services → Add Integration → Smarting HOME.
The setup wizard guides you through:
Choose between FREE (no license needed) or PRO (license key required):
| Feature | 🆓 FREE | ⭐ PRO | 🏢 ENTERPRISE |
|---|---|---|---|
| Sensors (33) | ✅ All | ✅ All | ✅ All |
| G13 Tariff + RCE | ✅ | ✅ | ✅ |
| HEMS Auto Mode | ✅ | ✅ | ✅ |
| Night Arbitrage | ❌ | ✅ | ✅ |
| Voltage/PV Cascades | ❌ | ✅ | ✅ |
| AI Advisor | ❌ | ✅ | ✅ |
| Export Limit Control | ❌ | ✅ | ✅ |
| Blueprints | 2 basic | 7 full | 7 full |
| Dashboards | 1 basic | 3 full | 3 full |
| Multi-site | ❌ | ❌ | ✅ |
💡 FREE mode works immediately — no license server, no registration needed.
Enter your GoodWe device ID (found in GoodWe integration). Optionally enable Modbus RS485 for extended diagnostics.
Choose your electricity tariff:
- G13 (recommended) — 3-zone time-of-use with winter/summer schedules
- G11 — Single rate
- C-tariff — Commercial rates
Enable RCE PSE dynamic pricing for real-time market data.
Provide your own API keys for AI energy advisory:
- Google Gemini: Get key at ai.google.dev
- Anthropic Claude: Get key at console.anthropic.com
Already installed as FREE? You can upgrade to PRO without reinstalling:
- Go to Settings → Devices & Services → Smarting HOME
- Click Configure (⚙️ gear icon)
- Enter your PRO license key in the 🔑 License Key field
- Click Submit — license is validated automatically
- Restart Home Assistant to activate all PRO features
💡 Buy PRO license at smartinghome.pl/buy
After upgrade you'll unlock: Night Arbitrage, Voltage/PV Cascades, AI Advisor, Export Limit Control, all 7 Blueprints, 3 full Dashboards.
After setup, Smarting HOME panel appears automatically in the HA sidebar with 5 tabs:
- 📊 Przegląd — Live PV/Grid/Battery/Load, SOC bar, daily stats
- ⚡ Energia — 3-phase voltage, PV forecast, quick actions
- 💰 Taryfy & RCE — G13 zones, RCE prices, trends
- 🔋 Bateria — SOC, energy, runtime, arbitrage calculator
- 🤖 HEMS — Mode control, AI advisor, reports
Click ⊞ Pełny ekran for fullscreen (kiosk) mode — perfect for wall-mounted tablets.
For additional dashboards, add to configuration.yaml:
lovelace:
dashboards:
smartinghome-hems:
mode: yaml
title: "HEMS Control"
icon: mdi:brain
show_in_sidebar: true
filename: custom_components/smartinghome/dashboards/hems_control.yaml
smartinghome-power:
mode: yaml
title: "Power Flow"
icon: mdi:solar-power-variant
show_in_sidebar: true
filename: custom_components/smartinghome/dashboards/power_flow.yaml
smartinghome-economics:
mode: yaml
title: "Economics"
icon: mdi:currency-usd
show_in_sidebar: true
filename: custom_components/smartinghome/dashboards/economics.yamlRestart Home Assistant after adding.
┌─────────────────────────────────────────────────────────────┐
│ SMARTING HOME HEMS │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─── W3 — SAFETY ──────────────────────────────────────┐ │
│ │ SOC Emergency (<20%) │ Voltage Cascade │ SOC Checks │ │
│ │ ↓ overrides W1+W2 │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ ┌─── W2 — RCE DYNAMIC ─────────────────────────────────┐ │
│ │ Real-time market prices │ Cheapest/Expensive windows │ │
│ │ ↓ adjusts W1 decisions │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ ┌─── W1 — G13 SCHEDULE ────────────────────────────────┐ │
│ │ 07:00 Sell │ 13:00 Charge │ 16:00 Peak │ 21:00 Night │ │
│ │ Base layer — time-of-use optimization │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
| Time (Winter) | Zone | Price | Action |
|---|---|---|---|
07:00–13:00 |
☀️ Morning peak | 0.91 PLN/kWh | Block charging, export PV to grid |
13:00–16:00 |
🔋 Off-peak | 0.63 PLN/kWh | Charge battery from PV |
16:00–21:00 |
💰 Afternoon peak | 1.50 PLN/kWh | Battery → Home, minimize import |
21:00–07:00 |
🌙 Off-peak | 0.63 PLN/kWh | Auto-consumption, night arbitrage |
| Weekends | 🌙 Off-peak | 0.63 PLN/kWh | All day off-peak |
ℹ️ Summer schedule: Peak shifts to 19:00–22:00
| RCE Price | Level | Action |
|---|---|---|
< 0 PLN/MWh |
💚 Negative | Charge + enable all loads (free energy!) |
< 150 PLN/MWh |
🟢 Cheap | Prioritize grid charging |
150–300 PLN/MWh |
🟡 Normal | Standard operation |
300–500 PLN/MWh |
🟠 Expensive | Sell energy, minimize import |
> 500 PLN/MWh |
🔴 Very expensive | Maximum export, disable loads |
| Condition | Trigger | Action |
|---|---|---|
| SOC < 20% | Immediate | |
| SOC < 50% at 11:00 | Checkpoint | Enable charging |
| SOC < 70% at 12:00 | Checkpoint | Enable charging |
| Voltage > 252V | Cascade T1 | Boiler ON |
| Voltage > 253V | Cascade T2 | Boiler + AC ON |
| Voltage > 254V | Cascade T3 | All loads + restore charging |
| Voltage < 248V (5 min) | Recovery | Cascade OFF |
The AI Advisor uses your live system data to provide context-aware energy management recommendations.
# Ask AI for real-time optimization advice
service: smartinghome.ask_ai_advisor
data:
question: "Should I export energy to the grid right now?"
provider: auto # auto | gemini | anthropic
# Generate a comprehensive daily report
service: smartinghome.generate_reportCapabilities:
- ⚡ Real-time charge/discharge optimization
- 📊 AI-generated daily energy reports
- 🔍 Anomaly detection in usage patterns
- 🌤️ Forecast-aware scheduling recommendations
- 💰 Arbitrage opportunity identification
🔐 Requires PRO license and your own AI API key (Google or Anthropic)
- ⚙️
smartinghome.set_mode
Zmień tryb HEMS: auto, sell, charge, peak_save, night_arbitrage, emergency, manual (DEMO+) - 🔋
smartinghome.force_charge
Force battery charging at max current (18.5A) (DEMO+) - ⚡
smartinghome.force_discharge
Force battery discharge (block charging) (DEMO+) - 🔌
smartinghome.set_export_limit
Set grid export power limit (0–16000W) (PRO+) - 🤖
smartinghome.ask_ai_advisor
Query AI energy advisor with a question (PRO+) - 📊
smartinghome.generate_report
Generate AI-powered daily energy report (PRO+)
7 ready-to-use automation blueprints included:
- ☀️ Morning Sell Mode
[Layer W1]
Schedule: 07:00 weekdays — Block charging, enable max export. - 🔋 Midday Charge Mode
[Layer W1]
Schedule: 13:00 weekdays — Enable battery charging from PV. - 🌙 Night Arbitrage
[Layer W1]
Schedule: 23:00 daily — Off-peak charge for peak discharge. - 💰 RCE Cheapest Window
[Layer W2]
Schedule: Dynamic — Auto-charge during cheapest prices. - 🔥 RCE Expensive Alert
[Layer W2]
Schedule: Dynamic — Alert during peak prices. - ☀️ PV Surplus Cascade
[Layer W3]
Schedule: Dynamic — Progressive load activation (2/3/4 kW). - ⚡ Voltage Protection
[Layer W3]
Schedule: Dynamic — Cascade protection (252/253/254V). ⚠️ SOC Emergency[Layer W3]
Schedule: Dynamic — Emergency charge when SOC < 20%.
All blueprints are located in custom_components/smartinghome/blueprints/.
Three pre-configured Lovelace dashboard configs:
| Dashboard | Description | Required HACS Cards |
|---|---|---|
| ⚡ Power Flow | Animated 3-phase power flow with 2 MPPT | sunsynk-power-flow-card |
| 🤖 HEMS Control | Full system controls, G13/RCE status, AI buttons | None (core) |
| 💲 Economics | Financial analytics, autarky, arbitrage calculator | None (core) |
Dashboard YAML files: custom_components/smartinghome/dashboards/
| Language | Config Flow | Entities | Errors |
|---|---|---|---|
| 🇬🇧 English | ✅ | ✅ | ✅ |
| 🇵🇱 Polish | ✅ | ✅ | ✅ |
smartinghome-homeassistant/
├── .github/workflows/validate.yml # CI/CD pipeline
├── assets/banner.png # Brand assets
├── hacs.json # HACS manifest
├── LICENSE # Commercial license
├── README.md # This file
├── info.md # HACS store page
└── custom_components/smartinghome/
├── __init__.py # Integration entry point
├── api.py # License API client
├── ai_advisor.py # Gemini + Claude advisor
├── binary_sensor.py # Binary sensor platform
├── config_flow.py # 4-step setup wizard
├── const.py # Constants & definitions
├── coordinator.py # Data coordinator (60+ sensors)
├── energy_manager.py # 3-layer HEMS engine
├── license.py # License management
├── manifest.json # HA integration manifest
├── number.py # Number platform
├── select.py # Select platform
├── sensor.py # Sensor platform (33 sensors)
├── services.py # Service handlers
├── services.yaml # Service definitions
├── strings.json # Default strings
├── switch.py # Switch platform
├── translations/ # i18n
│ ├── en.json
│ └── pl.json
├── blueprints/ # Automation blueprints
│ ├── hems_morning_sell_mode.yaml
│ ├── hems_midday_charge_mode.yaml
│ ├── hems_night_arbitrage.yaml
│ ├── hems_soc_emergency.yaml
│ ├── hems_voltage_protection.yaml
│ ├── hems_rce_cheapest_window.yaml
│ └── hems_pv_surplus.yaml
└── dashboards/ # Lovelace configs
├── power_flow.yaml
├── hems_control.yaml
└── economics.yaml
| Channel | Link |
|---|---|
| 🌐 Website | smartinghome.pl |
| 🛒 Buy License | smartinghome.pl/buy |
| 📖 Documentation | smartinghome.pl/docs |
| 🐛 Bug Reports | GitHub Issues |
| kontakt@smartinghome.pl | |
| 💬 Community | Home Assistant Community |
GregECAT Founder • Developer • Energy Enthusiast Smarting HOME 🇵🇱 |
This software is proprietary and protected under the Smarting HOME Commercial License.
A valid license key is required for PRO and ENTERPRISE features. DEMO mode is available for evaluation with limited functionality.
See the full LICENSE file for details.
© 2026 Smarting HOME by GregECAT
Built with ❤️ for the Polish energy market
smartinghome.pl
