Custom modbus energy meter not showing in energy tab

Hi everyone,

Im using esphome to communicate via modbus RTU with a Chint DDSU666 energy meter.

The communication part is working fine, but i cant seem to add the values to the energy tab. The sensor doesn’t show up on the drop down menu.

Can some one say what i am doing wrong?

Here is my .yaml file:

uart:
  id: mod_bus
  tx_pin: 17
  rx_pin: 16
  baud_rate: 9600
  stop_bits: 1

modbus:
  flow_control_pin: 5
  id: modbus1

modbus_controller:
    address: 0x001
    modbus_id: modbus1
    update_interval: 1s
    setup_priority: -10


sensor:
 - platform: modbus_controller
   id: chint_voltage
   name: Tensão 
   address: 0x2000
   unit_of_measurement: V ## for any other unit the value is returned in minutes
   device_class: voltage
   register_type: holding
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1

 - platform: modbus_controller
   id: chint_current
   name: Corrente
   address: 0x2002
   unit_of_measurement: A ## for any other unit the value is returned in minutes
   device_class: current
   register_type: read
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1

 - platform: modbus_controller
   id: chint_power
   name: Potência Instantânea 
   address: 0x2004
   device_class: power
   unit_of_measurement: W ## for any other unit the value is returned in minutes
   state_class: measurement
   register_type: read
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1000

 - platform: modbus_controller
   id: chint_frequency
   name: Frequência 
   address: 0x200E
   device_class: frequency
   state_class: measurement
   unit_of_measurement: Hz ## for any other unit the value is returned in minutes
   register_type: read
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1

 - platform: modbus_controller
   id: chint_energy_sold
   name: Energia Vendida
   address: 0x4000
   unit_of_measurement: kWh ## for any other unit the value is returned in minutes
   state_class: total_increasing
   device_class: energy
   register_type: read
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1
 
 - platform: modbus_controller
   id: chint_energy_purchased
   name: Energia Comprada
   address: 0x400A
   unit_of_measurement: kWh ## for any other unit the value is returned in minutes
   state_class: total_increasing
   device_class: energy
   register_type: read
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1   

 - platform: modbus_controller
   id: chint_reactive_power
   name: Potência Reativa
   device_class: reactive_power
   state_class: measurement
   address: 0x2004
   unit_of_measurement: var ## for any other unit the value is returned in minutes
   register_type: read
   value_type: FP32
   accuracy_decimals: 2
   filters:
     - multiply: 1000

Could you read meter values in de log of the esp? I’m currently struggling with the same setup.
Did you managed to get this working?

Sorry for the late response. Yes i did. I had to reset the entities in home assistant. They were bugged.

substitutions:
  device_description: Growatt Inverter
  friendly_name:  Growatt Inverter
  name: Growatt
  
esphome:
  name: growatt

esp8266:
  board: esp07s

# Enable logging
logger:
  baud_rate: 0
  level: very_verbose
# Enable Home Assistant API
api:

web_server:

ota:

wifi:
  ssid:
  password: 



  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${name} Fallback Hotspot"
    password: "Yourpassword"

captive_portal:

time:
  - platform: homeassistant
    id: homeassistant_time

output:
# Blue Led
  - id: light_bl
    platform: gpio
    pin: 16
# Green Led
  - id: light_gr
    platform: gpio
    pin: 0
# Red Led
  - id: light_rd
    platform: gpio
    pin: 2

uart:
  id: mod_bus
  tx_pin: 1
  rx_pin: 3
  baud_rate: 115200
  stop_bits: 1
  
modbus:
  id: modbus1
  send_wait_time: 500ms
  flow_control_pin: GPIO4
  uart_id: mod_bus
  
modbus_controller:
  - id: growatt
# the Modbus device addr
    address: 0x1
    modbus_id: modbus1
    setup_priority: -10
  - id: meter
# the Modbus device addr
    address: 0x004
    update_interval: 1s
    modbus_id: modbus1
    setup_priority: -10

sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} DcPower"
    address: 5
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
        
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} DcVoltage"
    address: 3
    register_type: "read"
    unit_of_measurement: V
    device_class: voltage
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
    
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} DcInputCurrent"
    address: 4
    register_type: "read"
    unit_of_measurement: A
    device_class: current
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
    
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} AcFrequency"
    address: 37
    register_type: "read"
    unit_of_measurement: Hz
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.01
  
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} AcVoltage"
    address: 38
    register_type: "read"
    unit_of_measurement: V
    device_class: voltage
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
  
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} AcOutputCurrent"
    address: 39
    register_type: "read"
    unit_of_measurement: A
    device_class: current
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
    
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} AcPower"
    address: 40
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
    
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} EnergyToday"
    address: 53
    register_type: "read"
    unit_of_measurement: kWh
    device_class: energy
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
    
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} EnergyTotal"
    address: 55
    register_type: "read"
    unit_of_measurement: kWh
    state_class: total_increasing
    device_class: energy
    icon: mdi:flash
    value_type: U_DWORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

    
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} Temperature"
    address: 93
    register_type: "read"
    unit_of_measurement: C
    device_class: temperature
    icon: mdi:thermometer
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1


  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} inside IPM in inverter Temperature"
    address: 94
    register_type: "read"
    unit_of_measurement: C
    device_class: temperature
    icon: mdi:thermometer
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

# seems useless
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} AC Power to user"
    address: 1015
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
# seems useless
  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} Output Power"
    address: 35
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
# seems useless

  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} Grid Output Power1"
    address: 44
    register_type: "read"
    unit_of_measurement: VA
    device_class: apparent_power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1
# seems useless

  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} Grid Output Power2"
    address: 48
    register_type: "read"
    unit_of_measurement: VA
    device_class: apparent_power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1


  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} State of Charge Battery"
    address: 1014
    register_type: "read"
    unit_of_measurement: '%'
    device_class: battery
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} Battery discharge power"
    address: 1009
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} Charge power"
    address: 1011
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    modbus_controller_id: growatt
    name: "${friendly_name} AC power to user total"
    address: 1021
    register_type: "read"
    unit_of_measurement: W
    device_class: power
    icon: mdi:flash
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
    - multiply: 0.1

  - platform: modbus_controller
    modbus_controller_id: meter
    id: chint_current
    name: Corrente
    address: 0x2002
    unit_of_measurement: A ## for any other unit the value is returned in minutes
    device_class: current
    register_type: read
    value_type: FP32
    accuracy_decimals: 2
    filters:
      - multiply: 1

Hi José, I also try to read from a DTSU 666, I’am using the Solar Inverters Stick, a Growatt ShineWifi X, to read from the modbus. I’am receiving the inverters states just fine, but the last sensor is the smartmeter and I never can get it to work. Modbus address of the meter is correct.

Hey,

I fixed the issue by doing this:

Hope that helps!