forked from esphome/esphome
-
Notifications
You must be signed in to change notification settings - Fork 11
SDM120M
Martin edited this page Nov 3, 2021
·
4 revisions
SDM120-Modbus(mV) Single-Phase Multifunction DIN rail Meter
Ref: https://bg-etech.de/download/manual/SDM120CT-Modbus.pdf
I'm using ESP32 when possible because they have 3 uarts and can use serial logging together with a modbus adapter. On ESP 8266 Software Serial can be used but may loose received data if other components spend a lot of time on loop()
See Configuration for ESP01 for an ESP8266 example
substitutions:
updates: 30s
unique_id: sdm120
esphome:
name: ${unique_id}
platform: ESP32
board: pico32
uart:
id: mod_uart
tx_pin: 19
rx_pin: 18
baud_rate: 9600
stop_bits: 1
parity: none
modbus:
#flow_control_pin: 23
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