Skip to content
Signetics edited this page Nov 26, 2021 · 2 revisions

DDS238-2 ZN/S Single-Phase Multifunction DIN rail Meter

http://www.chinaenergymeter.com/products/DDS238-2-ZN-S-RS485-D1205.pdf

Esp8266 + MAX485 module (with DE,RE pins), DE and RE pins, connected together, to flow_control_pin: 5. RX, TX to DI DO

Modbus registers: Total kWh, Export kWh, Import kWh, Voltage, Current, Active Power, Reactive Power, PF (Power Factor).

I just started working with ESPHome, sorry in advance for any errors. Pozdroo ;)

esphome:
  name: e220
  platform: ESP8266
  board: esp01_1m

# Enable logging
logger:

wifi:
  ssid: !secret wifi1
  password: !secret wifi1_pass
  manual_ip:
    static_ip: 192.168.0.220
    gateway: 192.168.0.1
    subnet: 255.255.255.0

uart:
  id: mod_bus
  rx_pin: 14
  tx_pin: 12
  baud_rate: 9600
  

modbus:
  flow_control_pin: 5
  id: modbus1

modbus_controller:
  - id: dds238
    ## the Modbus device addr
    address: 1
    setup_priority: -10
    command_throttle: 100ms
    update_interval: 10s

sensor:
  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_voltage
    name: "dds1_voltage"
    register_type: holding
    address: 0x000c
    unit_of_measurement: "V"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_current
    name: "dds1_current"
    register_type: holding
    address: 0x000d
    unit_of_measurement: "A"
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_active_power
    name: "dds1_active_power"
    register_type: holding
    address: 0x000e
    unit_of_measurement: "W"
    accuracy_decimals: 1


  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_reactive_power
    name: "dds1_reactive_power"
    register_type: holding
    address: 0x000f
    unit_of_measurement: "kvar"
    accuracy_decimals: 1

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_power_factor
    name: "dds1_power_factor"
    register_type: holding
    address: 0x0010
    accuracy_decimals: 2
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_frequency
    name: "dds1_frequency"
    register_type: holding
    address: 0x00011
    accuracy_decimals: 2
    unit_of_measurement: "Hz"
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_total
    name: "dds1_total"
    register_type: holding
    address: 0x0001
    accuracy_decimals: 2
    unit_of_measurement: "kWh"
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_import_total
    name: "dds1_import_total"
    register_type: holding
    address: 0x000B
    accuracy_decimals: 2
    unit_of_measurement: "kWh"
    filters:
     - multiply: 0.01

  - platform: modbus_controller
    modbus_controller_id: dds238
    id: dds1_export_total
    name: "dds1_export_total"
    register_type: holding
    address: 0x0009
    accuracy_decimals: 2
    unit_of_measurement: "kWh"
    filters:
      - multiply: 0.01


web_server:
  port: 80
Clone this wiki locally