Hi guys, I wanted to report my experiences with an ESP01S IR reader head in interaction with German electricity meters / smart meters (Itron from Netze-BW) and ESPHome.
Since I didn’t have time to tinker and wanted a device that was as compact as possible, I bought the reader head here on Ebay: Tasmota Wifi ESP01S Lesekopf für Stromzähler / Smart Meter | eBay
The nice thing about this reading head is that the esp-01s is located directly in the housing. So you don’t have any unnecessary devices or cables and only have to power the read head itself via micro usb.
The reader head comes with Tasmota pre-installed. This works flawlessly if you enter the appropriate SML script and configure MQTT. This could actually be the end of the story here.
But since I run all my other ESP devices with ESPHome, I also wanted to flash the read head with it to have a system landscape as uniform as possible. Unfortunately, I could not find a really good tutorial anywhere, which is why I now share my approach with you.
First of all the minimal image of Tasmota should be flashed as a manual upgrade on the read head to be able to flash ESPHome afterwards. The Tasmota .bin binary files for flashing can be found here: Tasmota ESP8266 Binaries
After the successful flash process of the minimal image you will be redirected to the main page of the Tasmota device.
After that, the configuration file for the read head should be created in the ESPHome dashboard. In my case, in connection with the Itron electricity meter, it looks like this:
substitutions:
devicename: "esp-01s-stromzaehler"
esphome:
name: ${devicename}
platform: ESP8266
board: esp01_1m
comment: "Stromzähler"
logger:
api:
password: !secret api_password
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: HIGH
ap:
ssid: "${devicename}"
password: !secret fallback_password
web_server:
port: 80
auth:
username: admin
password: !secret web_server_password
time:
- platform: homeassistant
id: homeassistant_time
captive_portal:
external_components:
- source: github://alengwenus/esphome_components@main
refresh: 0s
components: [sml]
uart:
- id: uart0
tx_pin: GPIO1
rx_pin: GPIO3
baud_rate: 9600
data_bits: 8
parity: NONE
stop_bits: 1
sml:
- id: sml0
uart_id: uart0
sensor:
- platform: wifi_signal
name: "${devicename} WiFi Signal"
device_class: signal_strength
update_interval: 60s
- platform: sml
sml_id: sml0
name: "${devicename} Total energy in"
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
sml_id: sml0
name: "${devicename} Total energy out"
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: "${devicename} Active power"
sml_id: sml0
obis_code: "1-0:16.7.0"
unit_of_measurement: W
accuracy_decimals: 2
device_class: power
state_class: measurement
filters:
- multiply: 1
text_sensor:
- platform: wifi_info
ip_address:
name: "${devicename} IP Address"
ssid:
name: "${devicename} SSID"
bssid:
name: "${devicename} BSSID"
mac_address:
name: "${devicename} Mac Address"
scan_results:
name: "${devicename} Latest Scan Results"
- platform: sml
name: "${devicename} ID"
sml_id: sml0
obis_code: "1-0:96.1.0"
format: hex
For more information on how to get the obis_code
s for your electricity meter, click here:
- alengwenus/esphome_components: External components for ESPHome (github.com)
- https://github.com/esphome/feature-requests/issues/1041#issuecomment-1097612835
After creating the ESPHome configuration file you can download the binary file for the installation in the dashboard via Install --> Manual download --> Legacy format
.
The downloaded ESPHome binary can now be manualy flashed via the tasmota webinterface like the Tasmota minimal image before.
That’s it After a short reboot the device should now have been flashed with ESPHome and can be set up as ESPHome devices in Home Assistant.
I’m super happy with it for now. Maybe this description here also help the one or other of you out there.
Many greetings