A custom Home Assistant integration that connects to Hoymiles DTU (Data Transfer Unit) devices via Modbus TCP to monitor solar panel production and control power output levels.
- Real-time Power Monitoring: View current power production from your solar panels
- Daily Energy Production: Track daily energy generation in kWh
- Power Level Control: Adjust solar panel production between 5% and 100%
- Automatic Device Discovery: Automatically discovers connected microinverters
- Home Assistant Integration: Native sensors and number entities with proper device classes
- Current Power: Real-time power output in watts (kW)
- Daily Energy: Today's total energy production in kWh
- Power Level: Adjustable slider to set production level (5-100%)
- Add
https://github.com/wil-lem/ha-hoymiles-modbus-tcp/as a custom repository to HACS - Install "Hoymiles Modbus TCP" in HACS
- Follow below manual steps, from step 3
- Copy the
hoymiles_modbus_tcpfolder to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Settings > Devices & Services > Add Integration
- Search for "Hoymiles Modbus TCP" and click to add
- Enter your DTU's IP address and Modbus port (default: 502)
The integration requires:
- DTU IP Address: The local IP address of your Hoymiles DTU
- DTU Port: Modbus TCP port (typically 502)
- Hoymiles DTU device with Modbus TCP enabled
- DTU must be connected to your local network
- DTU must have internet connectivity
- Home Assistant with custom component support
pymodbus: For Modbus TCP communicationPyYAML: For configuration handling
This integration communicates with Hoymiles DTU devices that support Modbus TCP protocol.
Once configured, the integration will:
- Automatically discover connected microinverters
- Create sensor entities for power and energy monitoring
- Provide a number entity for adjusting power output levels
- Update data every 2 minutes for optimal performance
The power level control allows you to limit solar panel production:
- Minimum: 5% (safety limit)
- Maximum: 100% (full production)
- Throttling: Changes are limited to once every 30 seconds to prevent excessive requests
- Verify DTU IP address and port
- Ensure DTU has Modbus TCP enabled
- Check that DTU is connected to your network and internet
- Verify firewall settings allow Modbus TCP traffic
This is a community-developed integration. For issues:
- Check the Home Assistant logs for error messages
- Verify your DTU model compatibility
- Ensure all network connectivity requirements are met
Contributions are welcome! Please ensure any changes are tested with actual hardware before submitting.