Continuous monitoring of photovoltaic (PV) systems is essential for optimizing consumption and improving overall energy efficiency. This article outlines the integration of Fronius inverters into Home Assistant, including sensor configuration and solutions to common challenges, such as integrating BYD battery systems.

Step 1: Enable Modbus TCP on Fronius

Fronius inverters that support Solar Net allow real-time data transmission via Modbus TCP. This enables Home Assistant to continuously collect operational data. To enable Modbus TCP, follow the procedure:

  1. Access the Fronius web interface (http://[your-inverter-ip]).
  2. Navigate to Settings > Modbus.
  3. Enable Modbus TCP and set a port (default: 502).
  4. Save and reboot the inverter.

Step 2: Add Fronius Integration to Home Assistant

Integration is achieved through Home Assistant’s native Fronius integration.

  1. Open Settings > Devices & Services in Home Assistant.
  2. Click Add Integration and search for Fronius.
  3. Enter the IP address of your inverter.
  4. Confirm with Submit and wait for Home Assistant to detect the device.

Upon successful integration, multiple sensors are created automatically.

Solar Net Sensors
Fronius Integration Sensors

Step 3: Prepare Sensors for Home Assistant Energy Dashboard

The Home Assistant Energy Dashboard does not accept instantaneous power values (watts, W) directly. Instead, it requires cumulative energy measurements over time, expressed in watt-hours (Wh) or kilowatt-hours (kWh).

Fronius inverters provide instantaneous power readings (e.g., sensor.solarnet_pv_leistung in watts). To convert these readings into cumulative energy, it is necessary to integrate power over time. Home Assistant offers an Integration (Riemann Sum) helper to perform this calculation, which approximates the integral of power with respect to time.

The following sensor types need to be created for proper configuration of Energy Dashboard:
Battery Charge & Discharge: Total energy charged into and discharged from the battery (Wh or kWh).
Grid Consumption (Import from Grid): Total energy imported from the grid (Wh or kWh).
Grid Return (Export to Grid): Total energy exported to the grid (Wh or kWh).
Solar Production: Total energy generated by solar panels (Wh or kWh).

Creating Sensors via UI

  1. Navigate to Settings > Devices & Services > Helpers.
  2. Click Create Helper and select Integration – Riemann sum integral.
  3. Configure the following sensors using
    trapezoidal as the integration method and a
    precision of 3 decimal places:
    • SolarNet PV Energy Total (sensor.pv_total_power)
      • Source: sensor.solarnet_pv_leistung
    • SolarNet Charge Energy Total (solarnet_charge_energy_total)
      • Source: sensor.solarnet_ladeleistung
    • SolarNet Discharge Energy Total (sensor.solarnet_discharge_energy_total)
      • Source: sensor.solarnet_entladeleistung
  4. Click Save and repeat for each sensor.

Note: The Riemann sum integration approximates energy by summing trapezoids over each measurement interval. This method provides accurate cumulative energy readings suitable for the Home Assistant Energy Dashboard.

Step 4: Configure the Energy Dashboard

  1. Navigate to Settings > Dashboards > Energy.
  2. Under Grid Consumption, select sensor.smartmeter_ip_bezogene_wirkenergie.
  3. Under Grid Return, select sensor.smartmeter_ip_eingespeiste_wirkenergie.
  4. Under Carbon Footprint of the Grid, configure as needed.
  5. Under Solar Production, select sensor.pv_total_power created in Step 3.
  6. Under Battery Systems, select sensors created in Step 3:
    • sensor.solarnet_discharge_energy_total
    • sensor.solarnet_charge_energy_total
  7. Click Save and check your dashboard.
Home Assistant Energy Dashboard

Troubleshooting

Even with correct configuration, certain issues may arise. The following checks can help identify and resolve common problems:

  • Data not updating: Verify that Modbus TCP is enabled on the Fronius inverter and that Home Assistant has network connectivity to the device. Network issues, firewalls, or incorrect IP addresses can prevent data acquisition.
  • Incorrect battery values: Inspect the current states of relevant entities under Developer Tools > States in Home Assistant. Ensure that the correct sensors are used as sources for integration, and verify Modbus register mappings if a BYD battery is connected.
  • Missing sensors: After creating or modifying sensors, restart Home Assistant to ensure that the changes are recognized and that all entities are correctly registered.

With this configuration, Home Assistant is capable of monitoring solar production, battery, and grid interaction in real time. These integrated measurements enable optimized energy management, automated control of loads, and enhanced visibility via the Energy Dashboard.

Categories: AutomationGeneral