Anbei die Config:
substitutions:
name: supply-energie-hauptanschluss
friendly_name: Wemos D1
esphome:
name: supply-energie-hauptanschluss
esp8266:
board: d1_mini
# Enable logging
logger:
level: DEBUG
baud_rate: 0 #needs 0, because info & data goes thru one line.
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "Fallback Hotspot"
password: „000000“
api:
ota:
# Enable Web server
web_server:
port: 80
time:
- platform: homeassistant
id: homeassistant_time
uart:
id: mod_bus
rx_pin: RX # need to adjust to your setup
tx_pin: TX # need to adjust to your setup
baud_rate: 9600
stop_bits: 1
modbus:
uart_id: mod_bus
id: modbus1
modbus_controller:
- id: sdm
address: 0x0001 # need to adjust to your setup, standard SDM is 1
modbus_id: modbus1
update_interval: 5s
sensor:
##### SDM Meter via Modbus
- platform: modbus_controller
modbus_controller_id: sdm
name: "Hauptaschluss Import Leistung"
id: "import_power"
register_type: read
address: 0x0500
value_type: FP32
accuracy_decimals: 0
unit_of_measurement: "W"
state_class: measurement
device_class: power
filters:
- multiply: 1.0
- platform: modbus_controller
modbus_controller_id: sdm
name: "Hauptaschluss Export Leistung"
id: "export_power"
register_type: read
address: 0x0502
value_type: FP32
accuracy_decimals: 0
unit_of_measurement: "W"
state_class: measurement
device_class: power
filters:
- multiply: 1.0
###SDM Meter can be used for the rest
- platform: sdm_meter
phase_a:
current:
name: "Hauptaschluss L1 Strom"
accuracy_decimals: 1
voltage:
name: "Hauptaschluss L1 Spannung"
accuracy_decimals: 0
active_power:
name: "Hauptaschluss L1 Leistung"
accuracy_decimals: 0
power_factor:
name: "Hauptaschluss L1 Leistungsfaktor"
accuracy_decimals: 0
apparent_power:
name: "Hauptaschluss L1 Scheinleistung"
accuracy_decimals: 0
reactive_power:
name: "Hauptaschluss L1 Blindleistung"
accuracy_decimals: 0
phase_b:
current:
name: "Hauptaschluss L2 Strom"
accuracy_decimals: 1
voltage:
name: "Hauptaschluss L2 Spannung"
accuracy_decimals: 0
active_power:
name: "Hauptaschluss L2 Leistung"
accuracy_decimals: 0
power_factor:
name: "Hauptaschluss L2 Leistungsfaktor"
accuracy_decimals: 0
apparent_power:
name: "Hauptaschluss L2 Scheinleistung"
accuracy_decimals: 0
reactive_power:
name: "Hauptaschluss L2 Blindleistung"
accuracy_decimals: 0
phase_c:
current:
name: "Hauptaschluss L3 Strom"
accuracy_decimals: 1
voltage:
name: "Hauptaschluss L3 Spannung"
accuracy_decimals: 0
active_power:
name: "Hauptaschluss L3 Leistung"
accuracy_decimals: 0
power_factor:
name: "Hauptaschluss L3 Leistungsfaktor"
accuracy_decimals: 0
apparent_power:
name: "Hauptaschluss L3 Scheinleistung"
accuracy_decimals: 0
reactive_power:
name: "Hauptaschluss L3 Blindleistung"
accuracy_decimals: 0
frequency:
name: "Hauptaschluss Netzfrequenz"
accuracy_decimals: 0
total_power:
name: "Hauptaschluss Summe Leistung"
accuracy_decimals: 0
import_active_energy:
name: "Hauptaschluss Import Energie"
export_active_energy:
name: "Hauptaschluss Export Energie"
import_reactive_energy:
name: "Hauptaschluss Import Blindenergie"
accuracy_decimals: 0
export_reactive_energy:
name: "Hauptaschluss Export Blindenergie"
accuracy_decimals: 0
update_interval: 5s
# Example configuration entry
mqtt:
broker: 192.168.20.253
username: "mqttuser"
password: "XXXX"