Skip to content

Instantly share code, notes, and snippets.

@b2un0
Created August 27, 2024 16:53
Show Gist options
  • Save b2un0/940a7ae29391840830cf0db3719c67b8 to your computer and use it in GitHub Desktop.
Save b2un0/940a7ae29391840830cf0db3719c67b8 to your computer and use it in GitHub Desktop.
esphome ESP01 SML Logger Norax 3D Smartmeter
substitutions:
name: energymeter
friendly_name: energymeter
comment: "ESP01 SML Reader Norax 3D Smartmeter"
esphome:
name: $name
comment: $comment
esp8266:
board: esp01_1m
api:
encryption:
key: !secret api_encryption
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
level: INFO
baud_rate: 0
logs:
component: ERROR
sml: ERROR
uart:
id: uart_bus
rx_pin: GPIO3
baud_rate: 9600
data_bits: 8
parity: NONE
stop_bits: 1
web_server:
port: 80
ota: false
version: 3
include_internal: True
sml:
id: mysml
uart_id: uart_bus
sensor:
- platform: wifi_signal
name: "$friendly_name WiFi Signal"
update_interval: 60s
entity_category: diagnostic
- platform: sml
name: "$name sml total in"
sml_id: mysml
obis_code: "1-0:1.8.0"
unit_of_measurement: kWh
accuracy_decimals: 4
device_class: energy
state_class: total_increasing
filters:
- multiply: 0.0001
- platform: sml
name: "$name sml total out"
sml_id: mysml
obis_code: "1-0:2.8.0"
unit_of_measurement: kWh
accuracy_decimals: 4
device_class: energy
state_class: total_increasing
filters:
- multiply: 0.0001
- platform: sml
name: "$name sml power curr"
sml_id: mysml
obis_code: "1-0:16.7.0"
unit_of_measurement: W
accuracy_decimals: 0
device_class: power
state_class: measurement
- platform: sml
name: "$name sml frequency"
sml_id: mysml
obis_code: "1-0:14.7.0"
unit_of_measurement: Hz
accuracy_decimals: 0
device_class: frequency
state_class: measurement
filters:
- multiply: 0.1
- platform: sml
name: "$name sml volt p1"
sml_id: mysml
obis_code: "1-0:32.7.0"
unit_of_measurement: V
accuracy_decimals: 1
device_class: voltage
state_class: measurement
filters:
- multiply: 0.1
- platform: sml
name: "$name sml volt p2"
sml_id: mysml
obis_code: "1-0:52.7.0"
unit_of_measurement: V
accuracy_decimals: 1
device_class: voltage
state_class: measurement
filters:
- multiply: 0.1
- platform: sml
name: "$name sml volt p3"
sml_id: mysml
obis_code: "1-0:72.7.0"
unit_of_measurement: V
accuracy_decimals: 1
device_class: voltage
state_class: measurement
filters:
- multiply: 0.1
- platform: sml
name: "$name sml amperage p1"
sml_id: mysml
obis_code: "1-0:31.7.0"
unit_of_measurement: A
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
- platform: sml
name: "$name sml amperage p2"
sml_id: mysml
obis_code: "1-0:51.7.0"
unit_of_measurement: A
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
- platform: sml
name: "$name sml amperage p3"
sml_id: mysml
obis_code: "1-0:71.7.0"
unit_of_measurement: A
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
# Winkelwert zwischen Spannung und Strom Phase L1
- platform: sml
name: "$name sml phase angle p1"
sml_id: mysml
obis_code: "1-0:81.7.4"
#unit_of_measurement: A
accuracy_decimals: 0
#device_class: current
#state_class: measurement
# Winkelwert zwischen Spannung und Strom Phase L2
- platform: sml
name: "$name sml phase angle p2"
sml_id: mysml
obis_code: "1-0:81.7.15"
#unit_of_measurement: A
accuracy_decimals: 0
#device_class: current
#state_class: measurement
# Winkelwert zwischen Spannung und Strom Phase L3
- platform: sml
name: "$name sml phase angle p3"
sml_id: mysml
obis_code: "1-0:81.7.26"
#unit_of_measurement: A
accuracy_decimals: 0
#device_class: current
#state_class: measurement
button:
- platform: restart
name: "$name restart"
entity_category: diagnostic
switch:
- platform: safe_mode
name: "$name restart (Safe Mode)"
entity_category: diagnostic
text_sensor:
- platform: wifi_info
ip_address:
id: wifi_ip
name: "$friendly_name IP Address"
entity_category: diagnostic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment