No description
Find a file
2025-10-20 21:31:19 +02:00
custom_components/solakon_one remote control 2025-10-20 21:31:19 +02:00
.gitignore battery sensors 2025-10-08 22:57:37 +02:00
hacs.json Initial commit 2025-09-06 19:09:19 +02:00
README.md remote control 2025-10-20 21:31:19 +02:00

Solakon ONE Home Assistant Integration

A complete Home Assistant custom integration for Solakon ONE devices using Modbus TCP communication.

⚠️ IMPORTANT: This is a Home Assistant Integration, not an Add-on.

  • Do NOT add this as an Add-on repository
  • Install it through HACS as an Integration (see instructions below)

Changelog

Latest Version

New Features:

  • 🎛️ Device Control: Control your Solakon ONE device directly from Home Assistant
    • EPS Output Mode control (Disable/EPS/UPS)
    • Remote Control Mode with 9 operating modes
    • Battery SoC limits (Minimum/Maximum/OnGrid)
    • Remote Active/Reactive Power control
    • Remote timeout settings
  • 📊 New Sensors: Added control status sensors to monitor current device settings
    • EPS Output Mode status
    • Battery SoC limit settings
    • Remote control status and commands
    • Network status
  • 🔧 Improved Energy Dashboard Integration: Comprehensive documentation for battery integration workaround
  • 📖 Documentation Updates: Accurate Energy Dashboard integration guide with step-by-step battery setup

Bug Fixes:

  • Fixed misleading documentation about Grid Import/Export sensors (not currently supported)
  • Corrected Energy Dashboard integration instructions

Previous Versions

  • Initial release with basic monitoring capabilities

Features

Monitoring

  • Real-time monitoring of all inverter parameters
  • PV string monitoring (voltage, current, power)
  • Battery management (SOC, power, voltage, current)
  • Energy statistics (daily, total)
  • Temperature monitoring
  • Configurable update intervals
  • Full UI configuration support

Device Control

  • EPS Output Mode control (Disable/EPS/UPS)
  • Remote Control with multiple operating modes
  • Battery State of Charge (SoC) limits configuration
  • Remote power control (active/reactive)
  • Force charge/discharge modes
  • Remote control timeout management

Monitored Sensors

Power Sensors

  • PV Power (total from all strings)
  • Active Power
  • Reactive Power
  • Load Power
  • Battery Power

Voltage & Current

  • PV1/PV2/PV3/PV4 Voltage & Current
  • Grid Phase Voltages (R/S/T)
  • Battery Voltage & Current
  • Load Voltage & Current

Energy Statistics

  • Total Energy Generated
  • Daily Energy Generation
  • Monthly/Yearly Generation
  • Battery Charge/Discharge Today
  • Grid Import/Export (Today & Total)

Battery Information

  • Battery Power
  • Battery Voltage
  • Battery Current
  • Battery State of Charge (SOC)

System Information

  • Internal Temperature
  • Power Factor
  • Grid Frequency
  • Network Status

Control Status Sensors

These sensors display the current values of controllable parameters:

  • EPS Output Mode (current mode: Disable/EPS/UPS)
  • Minimum/Maximum/OnGrid SoC settings
  • Remote control mode and status
  • Remote power commands (active/reactive)
  • Remote control timeout settings

Installation

Prerequisites

  • Home Assistant 2024.1.0 or newer
  • HACS (Home Assistant Community Store) installed
  • Your Solakon ONE device connected to your network with Modbus TCP enabled
  1. Open HACS in your Home Assistant instance
  2. Click on "Integrations" (NOT Add-ons!)
  3. Click the three dots menu in the top right → "Custom repositories"
  4. Add this repository URL: https://github.com/solakon-de/solakon-one-homeassistant
  5. Select category: "Integration" (⚠️ NOT "Add-on"!)
  6. Click "Add"
  7. Close the custom repositories dialog
  8. Click "+ Explore & Download Repositories"
  9. Search for "Solakon ONE" and install it
  10. Restart Home Assistant
  11. Go to Settings → Devices & Services
  12. Click "+ Add Integration"
  13. Search for "Solakon ONE" and configure it

Manual Installation

  1. Copy the custom_components/solakon_one folder to your Home Assistant's custom_components directory
  2. Restart Home Assistant
  3. Add the integration via Settings → Devices & Services

Configuration

  1. Go to Settings → Devices & Services
  2. Click "Add Integration"
  3. Search for "Solakon ONE"
  4. Enter configuration:
    • Host: IP address of your Solakon ONE device
    • Port: Modbus TCP port (default: 502)
    • Device Name: Friendly name for your device
    • Modbus Slave ID: Usually 1 (range: 1-247)
    • Update Interval: How often to poll (10-300 seconds)

Network Requirements

  • Ensure your Solakon ONE device is connected to your network
  • Modbus TCP must be enabled on the device
  • Default Modbus TCP port is 502
  • Device must be accessible from Home Assistant

Device Control

The integration provides control entities to manage your Solakon ONE device directly from Home Assistant.

Select Entities

EPS Output Control

  • Switch between operating modes:
    • Disable: EPS output disabled
    • EPS Mode: Emergency Power Supply mode
    • UPS Mode: Uninterruptible Power Supply mode

Remote Control Mode

  • Control device operation with 9 modes:
    • Disabled: Remote control off
    • INV Discharge (PV Priority): Inverter discharge with PV priority
    • INV Charge (PV Priority): Inverter charge with PV priority
    • Battery Discharge: Direct battery discharge
    • Battery Charge: Direct battery charge
    • Grid Discharge: Grid-powered discharge
    • Grid Charge: Grid-powered charge
    • INV Discharge (AC First): Inverter discharge with AC priority
    • INV Charge (AC First): Inverter charge with AC priority

Number Entities

Battery SoC Management

  • Minimum SoC Control: Set minimum battery state of charge (0-100%)
  • Maximum SoC Control: Set maximum battery state of charge (0-100%)
  • Minimum SoC OnGrid Control: Set minimum SoC when grid-connected (0-100%)

Remote Power Control

  • Remote Active Power Control: Set active power command (-100kW to +100kW)
    • Negative values = charging/import
    • Positive values = discharging/export
  • Remote Reactive Power Control: Set reactive power command (-100kVAR to +100kVAR)
  • Remote Timeout Control: Set timeout for remote control commands (0-3600 seconds)

⚠️ Warning: Modifying these settings can affect your system's operation. Make sure you understand what each setting does before changing it. Some settings may require the device to be in specific modes to take effect.

Troubleshooting

Connection Issues

  1. Verify network connectivity:

    ping <device-ip>
    
  2. Test Modbus connection:

    telnet <device-ip> 502
    
  3. Check Home Assistant logs:

    Settings → System → Logs → Search for "solakon"
    

Common Issues

  • Cannot connect: Verify IP address and port are correct
  • No data: Check Modbus slave ID (usually 1)
  • Intermittent data: Increase update interval if network is slow
  • Missing sensors: Some sensors only appear if hardware is present (e.g., battery sensors)

Energy Dashboard Integration

To add Solakon ONE data to your Energy Dashboard:

  1. Go to Settings → Dashboards → Energy
  2. Configure:
    • Solar production: Select "Solakon ONE Daily Energy"
    • Battery: Unfortunately, Home Assistant currently requires separate sensors for battery charge and discharge. As a workaround:
      • For battery charge: Create a template sensor that only shows positive values
      • For battery discharge: Create a template sensor that only shows negative values (as positive)

Battery Energy Workaround

Add these template sensors to your configuration.yaml:

template:
  - sensor:
      - name: 'Solakon ONE Battery Charge Energy'
        unique_id: solakon_one_battery_charge_energy
        unit_of_measurement: 'kWh'
        device_class: energy
        state_class: total_increasing
        state: >
          {{ states('sensor.solakon_one_daily_battery_charge') | float(0) }}

      - name: 'Solakon ONE Battery Discharge Energy'
        unique_id: solakon_one_battery_discharge_energy
        unit_of_measurement: 'kWh'
        device_class: energy
        state_class: total_increasing
        state: >
          {{ states('sensor.solakon_one_daily_battery_discharge') | float(0) }}

Then in the Energy Dashboard:

  • Battery charge: Select "Solakon ONE Battery Charge Energy"
  • Battery discharge: Select "Solakon ONE Battery Discharge Energy"

Note

: Grid Import/Export sensors are not currently available in this integration. These require additional hardware sensors on the grid connection point.

Automation Examples

Battery Power Monitoring

automation:
  - alias: 'Battery Discharging Alert'
    trigger:
      - platform: numeric_state
        entity_id: sensor.solakon_one_battery_power
        below: -5000 # Alert when discharging more than 5kW
    action:
      - service: notify.mobile_app
        data:
          message: 'Battery is discharging at high rate!'

Control Battery SoC Based on Time

automation:
  - alias: 'Set Battery Limits for Night'
    trigger:
      - platform: time
        at: '22:00:00'
    action:
      - service: number.set_value
        target:
          entity_id: number.solakon_one_minimum_soc_control
        data:
          value: 30 # Keep at least 30% for backup

Device Control via Entities

Device control is implemented using Home Assistant entities (Select and Number entities). Use these entities in your dashboards and automations:

Available Control Entities:

  • select.solakon_one_eps_output_control: EPS/UPS mode selection
  • select.solakon_one_remote_control_mode: Remote control mode selection
  • number.solakon_one_minimum_soc_control: Minimum battery SoC
  • number.solakon_one_maximum_soc_control: Maximum battery SoC
  • number.solakon_one_minimum_soc_ongrid_control: Minimum SoC when grid-connected
  • number.solakon_one_remote_active_power_control: Active power command
  • number.solakon_one_remote_reactive_power_control: Reactive power command
  • number.solakon_one_remote_timeout_control: Remote control timeout

Future Services (Planned):

  • solakon_one.refresh_data: Manually refresh all sensor data
  • solakon_one.set_time_of_use: Configure TOU schedules

Support

For issues or questions:

License

This integration is provided as-is under the MIT License.