ArekKubacki / Hoymiles-Plant-DTU-Pro

Hoymiles-Plant-DTU-Pro via Modbus TCP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HACS Custom GitHub Latest Release GitHub All Releases Buy me a coffee PayPal.Me

Hoymiles Plant DTU-Pro Sensor

This integration retrieves data from Hoymiles DTU-Pro using Modbus TCP do Home Assistant. The DTU must be connected via an Ethernet cable.

!!! For 22 Version, if you choose "Export control", it prohibits MODBUS TCP. But "Remote control" still supports it. So you have to go to "Toolkit" in APP and then choose "Remote Control" from RS-485 Port Config under DTU Information. !!!

example

Installation

Using HACS (recommended)

This integration can be added to HACS as a custom repository:

  • URL: https://github.com/ArekKubacki/Hoymiles-Plant-DTU-Pro
  • Category: Integration

After adding a custom repository you can use HACS to install this integration using user interface.

Manual

To install this integration manually you have to download hoymiles_dtu.zip and extract its contents to config/custom_components/hoymiles_dtu directory:

mkdir -p custom_components/hoymiles_dtu
cd custom_components/hoymiles_dtu
wget https://github.com/ArekKubacki/Hoymiles-Plant-DTU-Pro/releases/latest/download/hoymiles_dtu.zip
unzip hoymiles_dtu.zip
rm hoymiles_dtu.zip

Configuration options

Key Type Required Default Description
name string False Hoymiles PV Name of sensor
host string True - Local DTU-Pro host
dtu_type int False 0 0 - Hoymiles DTU, 1 - OpenDTU
monitored_conditions list True - List of conditions to monitor
monitored_conditions_pv list True - List of conditions for pv to monitor
panels float True - Number of PV panels
scan_interval time period False 00:02:00 Interval between sensor updates

Possible monitored conditions

Key Description
pv_power The current power of the photovoltaic power plant
today_production Production of a photovoltaic power plant today
total_production Total production of a photovoltaic power plant - use for Energy Dashboard
alarm_flag Alarm flag of a photovoltaic power plant

Possible PV monitored conditions

Key Description
pv_power The current power of the photovoltaic panel
today_production Production of a photovoltaic panel today
total_production Total production of a photovoltaic panel plant
pv_voltage The current voltage of the photovoltaic panel
pv_current The current current of the photovoltaic panel
grid_voltage The current voltage of the electricity grid
grid_frequency The current frequency of the electricity grid
temperature The temperature of a photovoltaic panel plant
operating_status The operating status of a photovoltaic panel plant
alarm_code The alarm code of a photovoltaic panel plant
alarm_count The alarm count of a photovoltaic panel plant
link_status The link status of a photovoltaic panel plant

Example configuration

sensor:
  - platform: hoymiles_dtu
    host: 192.168.x.xxx
    name: Hoymiles PV
    dtu_type: 0
    monitored_conditions:
      - 'pv_power'
      - 'today_production'
      - 'total_production'
      - 'alarm_flag'
    monitored_conditions_pv:
      - 'pv_power'
      - 'today_production'
      - 'total_production'
      - 'pv_voltage'
      - 'pv_current'
      - 'grid_voltage'
      - 'temperature'
      - 'operating_status'
      - 'alarm_code'
      - 'alarm_count'
      - 'link_status'
    panels: 16

Dashboard example

This example needs custom:bar-card form HACS

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:bar-card
        direction: up
        rounding: 5px
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 6.4
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv_pv_power
      - type: vertical-stack
        cards:
          - type: sensor
            entity: sensor.hoymiles_pv_today_production
            name: Today
            hold_action: more-info
          - type: sensor
            entity: sensor.hoymiles_pv_total_production
            name: Total
            hold_action: more-info
  - type: horizontal-stack
    cards:
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_4_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_1_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_3_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_4_pv_power
  - type: horizontal-stack
    cards:
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_3_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_2_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_1_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_2_pv_power
  - type: horizontal-stack
    cards:
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_4_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_1_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_3_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_4_pv_power
  - type: horizontal-stack
    cards:
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_3_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_2_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_1_pv_power
      - type: custom:bar-card
        direction: up
        rounding: 5px
        height: 100
        positions:
          icon: 'off'
          indicator: 'off'
          name: none
        style:
          top: 0%
          left: 0%
          transform: none
          overflow: hidden
          border-radius: 8px
          width: 100%
          '--paper-card-background-color': rgba(84, 95, 108, 0.7)
        min: 0
        max: 400
        saturation: 50%
        stack: horizontal
        entities:
          - entity: sensor.hoymiles_pv__pv_2_pv_power

Buy Me A Coffee PayPal Logo

About

Hoymiles-Plant-DTU-Pro via Modbus TCP

License:MIT License


Languages

Language:Python 100.0%