Homey application for Fronius solar inverters integration. This app enables connection and monitoring of Fronius equipment (inverters, smartmeters, batteries, etc.) through the Homey home automation platform.
The app communicates locally with Fronius equipment through their REST APIs - no cloud dependency required.
- Platform: Homey SDK v3 (minimum compatibility: >=12.3.0)
- Runtime: Node.js with ES modules
- Package Type: ESM (type: "module" in package.json)
- Main Dependencies:
node-fetch: HTTP communication with Fronius APIsnode-cron: Task scheduling for data retrieval (every 5 minutes by default)he: HTML encoding/decoding for API responses
/
├── app.js # Main application entry point (Homey.App class)
├── app.json # Generated from .homeycompose/app.json
├── .homeycompose/ # Source files for app configuration
│ ├── app.json # Main app metadata and configuration
│ └── ...
├── lib/
│ └── device.js # Base FroniusDevice class with common polling logic
└── drivers/ # Device drivers (one per equipment type)
├── inverter/ # Solar inverter driver
├── smartmeter/ # Smart meter driver
├── ohmpilot/ # Ohmpilot consumption regulator driver
├── storage/ # Battery storage driver
├── fronius-powerflow/ # Site energy flow driver
├── reporting/ # DataManager reporting driver
└── GEN24-storage/ # (Deprecated) GEN24 specific storage
Monitors Fronius solar inverters (classic and GEN24/Tauro models).
Capabilities:
measure_power: Current PV power generationmeter_power: Daily energy production (kWh)meter_power.YEAR: Yearly energy production (kWh)meter_power.TOTAL: Total lifetime energy production (kWh)measure_current.AC: AC currentmeasure_voltage.AC: AC voltagemeasure_current.DC: DC current (classic models)measure_voltage.DC: DC voltage (classic models)measure_current.DC1-4: DC current per MPPT (GEN24/Tauro)measure_voltage.DC1-4: DC voltage per MPPT (GEN24/Tauro)measure_frequency: Grid frequency
API Endpoint: /solar_api/v1/GetInverterRealtimeData.cgi?DataCollection=CommonInverterData
Settings:
DT: Device Type (0=Classic, 1=GEN24/Tauro)MPPTnumber: Number of MPPT trackers (1-4, only for GEN24/Tauro)
Special Behavior:
- Dynamically adds/removes DC capabilities based on MPPT count
- GEN24/Tauro models use
IDC_xandUDC_xfields instead of single DC values - Automatically migrates capabilities when device type changes
Monitors Fronius Smart Meter for grid connection data.
Capabilities:
- Single-phase: voltage, current, power, frequency, energy
- 3-phase: separate L1/L2/L3 measurements for current and voltage
- Energy metrics: production, consumption, import, export
API Endpoint: /solar_api/v1/GetMeterRealtimeData.cgi
Known Issues:
- 3-phase support requires dynamic capability addition (v0.1.11+)
- GEN24 smartmeter compatibility issues (workaround in v0.0.10)
Monitors Fronius Ohmpilot hot water heater controller.
Capabilities:
measure_power: Current consumptionmeasure_temperature: Temperature reading
Monitors battery storage systems.
Capabilities:
- Battery capacity and charge level
- Current and voltage measurements
- Charge/discharge power
Provides site-wide energy flow overview.
Capabilities:
- PV production
- Grid import/export
- Load consumption
- Battery charge/discharge
- Self-consumption metrics
API Endpoint: /solar_api/v1/GetPowerFlowRealtimeData.fcgi
Historical data and statistics via DataManager archive.
Metrics:
- Costs and savings
- Self-consumption rate
- Monthly/yearly comparisons
API Endpoint: DataManager archive endpoints
All drivers extend FroniusDevice from /lib/device.js:
class FroniusDevice extends Homey.Device {
// Common polling mechanism (every 5 minutes)
// Error handling and logging
// API communication helpers
}- Uses event-driven polling with
addListener('poll', this.pollDevice) - Default interval: 5 minutes (configured via
node-cron) - Each device manages its own polling lifecycle
Drivers dynamically add/remove capabilities based on:
- Hardware configuration (MPPT count, phases)
- Device type (Classic vs GEN24/Tauro)
- Firmware version compatibility
Example from Inverter:
// Add frequency capability if missing (migration from v0.1.5)
if (!this.hasCapability('measure_frequency')) {
this.addCapability('measure_frequency');
}
// Add/remove MPPT capabilities based on settings
for (let i = 2; i <= mppt; i++) {
if (!this.hasCapability(`measure_voltage.DC${i}`))
this.addCapability(`measure_voltage.DC${i}`);
}http://{device_ip}/solar_api/v1/{endpoint}
- Inverter Data:
/GetInverterRealtimeData.cgi?Scope=Device&DeviceId={id}&DataCollection=CommonInverterData - Meter Data:
/GetMeterRealtimeData.cgi?Scope=Device&DeviceId={id} - PowerFlow:
/GetPowerFlowRealtimeData.fcgi - Archive:
/GetArchiveData.cgi(for Reporting)
- Local network access only (no authentication required)
- Requires Fronius device to be on same network as Homey
Responses are JSON with structure:
{
"Head": {
"RequestArguments": {},
"Status": { "Code": 0, "Reason": "", "UserMessage": "" }
},
"Body": {
"Data": {
// Device-specific data fields
"PAC": { "Value": 2500, "Unit": "W" },
"DAY_ENERGY": { "Value": 15000, "Unit": "Wh" }
}
}
}- Single MPPT tracker
- Uses
IDCandUDCfields - Full support for all capabilities
- Multiple MPPT trackers (1-4)
- Uses
IDC_1,IDC_2,UDC_1,UDC_2etc. - Setting
DT=1enables GEN24 mode - Some capabilities not available (removed on init)
- Single-phase and 3-phase support
- Automatic phase detection
- GEN24 compatibility workarounds
Symptom: Only single-phase data visible
Cause: 3-phase capabilities not added automatically
Solution: App automatically detects and adds L1/L2/L3 capabilities (v0.1.11+)
Code: Check smartmeter/device.js for phase detection logic
Symptom: Smartmeter not working on GEN24 inverters
Workaround: Implemented in v0.0.10
Code: See smartmeter/device.js for GEN24-specific handling
Symptom: DC values not showing
Cause: GEN24 uses different field names (IDC_x vs IDC)
Solution: Set DT=1 and configure MPPTnumber in settings
Code: See inverter/device.js lines 19-51
Symptom: Device shows no data Fix: Implemented in v0.1.9 Code: Check UUID handling in device initialization
Symptom: No data shown at beginning of month
Fix: Implemented in v0.0.12
Code: Check date handling in reporting/device.js
Linter: Biome (replaces ESLint)
npx biome lint . # Check for issues
npx biome format . # Check formatting
npx biome check --write . # Fix issues automaticallyTesting:
- Test with both Classic and GEN24 inverters
- Verify 3-phase smartmeter functionality
- Check capability migration on app updates
- Create directory in
/drivers/{driver-name}/ - Extend
FroniusDevicebase class - Implement required methods:
getUpdatePath(): API endpointupdateValues(data): Parse and set capabilities
- Add driver configuration to
.homeycompose/ - Test polling and capability management
- ES Modules: Use
import/exportsyntax - Async/Await: Prefer over promises/callbacks
- Error Handling: Always catch and log errors
- Logging: Use
this.log()andthis.error() - Capabilities: Use
this.setCapabilityValue() - Settings: Access via
this.getSetting()
- Main Branch:
main - Feature Branches: Use descriptive names
- Commits: Clear messages explaining changes
- PRs: Include version history update in README.md
Current version: 0.1.17 (from app.json)
- Update
README.mdwith version notes - Increment version in
.homeycompose/app.json - Run
homey app buildto regenerateapp.json
- Test capability migrations
- Verify backward compatibility
- Update CLAUDE.md if API changes
- Test with Classic inverter
- Test with GEN24/Tauro inverter
- Verify 3-phase smartmeter
- Check capability migrations
- Run Biome linting
- Test on Homey firmware >=12.3.0
- Fresh installation
- Update from previous version
- Settings changes (MPPT count, device type)
- Network connectivity loss/recovery
- API endpoint failures
When new issues are created, Claude will:
- Analyze the issue description and title
- Check if it matches known issues (see Common Issues section)
- Determine if it's:
- User Support: Configuration or usage question
- Bug Report: Actual code issue
- Feature Request: Enhancement suggestion
- Not Relevant: Spam or off-topic
- Respond accordingly:
- Provide solution if known issue
- Ask clarifying questions if ambiguous
- Acknowledge and triage if valid bug/feature
- Close if not relevant
When analyzing issues, check for:
- Fronius equipment model mentioned
- Homey firmware version
- Error messages or logs
- Steps to reproduce
- Expected vs actual behavior
Common keywords indicating known issues:
- "3-phase" / "L1 L2 L3" → Issue #1
- "GEN24" + "smartmeter" → Issue #2
- "DC voltage" + "GEN24" → Issue #3
- "no data" / "empty" → Issue #4
- "beginning of month" + "reporting" → Issue #5
Response templates:
- Known issue: Link to solution, reference version where fixed
- Need info: Ask for Fronius model, Homey version, logs
- Bug confirmation: Thank user, create TODO for investigation
- Feature request: Acknowledge, ask for use case details
Automated PR reviews check for:
- Biome linting compliance
- Capability management patterns
- Error handling
- API endpoint usage
- Backward compatibility
- Homey SDK Docs: https://apps.developer.homey.app/
- Fronius API Docs: Available from Fronius device web interface
- App Store: https://homey.app/a/com.thomashoussin.fronius/
- Issues: https://github.com/ThomasHoussin/com.thomashoussin.fronius/issues
- Donations: PayPal (thomashoussin958) or GitHub Sponsors (@ThomasHoussin)