Skip to content
Martin edited this page Nov 3, 2021 · 2 revisions

SDM120-Modbus(mV) Single-Phase Multifunction DIN rail Meter

Ref: https://bg-etech.de/download/manual/SDM120CT-Modbus.pdf

Because the ESP-01 has no available GPIO's the RS485 adapter is connected to U0TXD (GPIO1) and U0RXD (GPIO3). Therefore serial logging can't be used and is disabled.

substitutions:
  updates: 30s
  unique_id: sdm-120

esphome:
  name: ${unique_id}
  platform: ESP8266
  board: esp01_1m


logger:
  level: INFO
  baud_rate: 0

uart:
  id: mod_uart
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600
  stop_bits: 1
  parity: none

modbus:
  send_wait_time: 200ms
  uart_id: mod_uart
  id: mod_bus

modbus_controller:
  - id: sdm
    ## the Modbus device addr
    address: 0x1
    modbus_id: mod_bus
    command_throttle: 500ms
    setup_priority: -10
    update_interval: 30s

sensor:
  - platform: modbus_controller
    modbus_controller_id: sdm
    id: voltage
    name: "Voltage"
    address: 0
    unit_of_measurement: "V"
    register_type: "read"
    value_type: FP32
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: current
    name: "Current"
    address: 6
    unit_of_measurement: "A"
    register_type: "read"
    value_type: FP32
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: active_power
    name: "Active power"
    address: 12
    unit_of_measurement: "W"
    register_type: "read"
    value_type: FP32
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: apparent_power
    name: "Apparent power"
    address: 18
    unit_of_measurement: "VA"
    register_type: "read"
    value_type: FP32
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: reactive_power
    name: "Reactive power"
    address: 24
    unit_of_measurement: "VAr"
    register_type: "read"
    value_type: FP32
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: power_factor
    name: "Power factor"
    address: 30
    register_type: "read"
    value_type: FP32
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: phase_angle
    name: "Phase angle"
    address: 36
    register_type: "read"
    value_type: FP32
    unit_of_measurement: "°"
    accuracy_decimals: 1 

  - platform: modbus_controller
    modbus_controller_id: sdm
    id: frequency
    name: "Frequency"
    address: 70
    register_type: "read"
    value_type: FP32
    unit_of_measurement: Hz
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Import active energy"
    address: 72
    register_type: "read"
    value_type: FP32
    unit_of_measurement: kWh
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Export active energy "
    address: 74
    register_type: "read"
    value_type: FP32
    unit_of_measurement: kWh
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Import reactive energy"
    address: 76
    register_type: "read"
    value_type: FP32
    unit_of_measurement: kVArh
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Export reactive energy"
    address: 78
    register_type: "read"
    value_type: FP32
    unit_of_measurement: kVArh
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Total system power demand"
    address: 84
    register_type: "read"
    value_type: FP32
    unit_of_measurement: W
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Maximum total system power demand"
    address: 86
    register_type: "read"
    value_type: FP32
    unit_of_measurement: W
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Import system power demand"
    address: 88
    register_type: "read"
    value_type: FP32
    unit_of_measurement: W
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Maximum import system power demand"
    address: 90
    register_type: "read"
    value_type: FP32
    unit_of_measurement: W
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Export system power demand"
    address: 92
    register_type: "read"
    value_type: FP32
    unit_of_measurement: W
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Maximum export system power demand"
    address: 94
    register_type: "read"
    value_type: FP32
    unit_of_measurement: W
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Current demand"
    address: 258
    register_type: "read"
    value_type: FP32
    unit_of_measurement: A
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Maximum current demand"
    address: 264
    register_type: "read"
    value_type: FP32
    unit_of_measurement: A
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Total active energy"
    address: 342
    register_type: "read"
    value_type: FP32
    unit_of_measurement: kWh
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: sdm
    name: "Total reactive energy"
    address: 344
    register_type: "read"
    value_type: FP32
    unit_of_measurement: kVArh
    accuracy_decimals: 1

web_server:
  port: 80
Clone this wiki locally