Hi,
you can get IR Adapters on eBay. Most of the items I found are from Germany, so I don’t know if they do international shipping. Also most of the instructions I found are in German, but maybe this can still help you.
You can get just the basic board and attach it to some ESP or raspberry, or buy an all-in-one solution that comes with everything but a power supply.
I bought this: https://www.ebay.de/itm/314152997777 The item I bought is not available anymore, here is a link to seller, they have a v2: Artikel zum Verkauf von hicbelm-8 | eBay
It is an ESP01s, the IR-Board, a magnet and a 3D printed case. I just needed an old micro-USB charger as a power supply. The device comes pre-flashed with Tasmota.
There is an article on heise (german) about this device that shows the components: Ausprobiert: Günstiger IR-Lesekopf für Smart Meter mit Tasmota-Firmware | heise online
Note: You can not update Tasmota via the integrated updater, as the provided binaries don’t have all the features you need
If you want to update or flash a new version because you broke it you need to compile Tasmota with these flags:
#ifndef USE_SCRIPT
#define USE_SCRIPT
#endif
#ifndef USE_SML_M
#define USE_SML_M
#endif
#ifndef USE_SML_SCRIPT_CMD
#define USE_SML_SCRIPT_CMD
#endif
#ifdef USE_RULES
#undef USE_RULES
#endif
You then need to configure a script for your smart meter Smart Meter Interface - Tasmota, setup MQTT and add it to HA via the Tasmota integration.
Then customize the sensors to have the correct units:
sensor.elster_t510_current_l1:
icon: mdi:current-ac
device_class: current
unit_of_measurement: 'A'
sensor.elster_t510_current_l2:
icon: mdi:current-ac
device_class: current
unit_of_measurement: 'A'
sensor.elster_t510_current_l3:
icon: mdi:current-ac
device_class: current
unit_of_measurement: 'A'
sensor.elster_t510_power_l1:
icon: mdi:flash
device_class: power
unit_of_measurement: 'W'
sensor.elster_t510_power_l2:
icon: mdi:flash
device_class: power
unit_of_measurement: 'W'
sensor.elster_t510_power_l3:
icon: mdi:flash
device_class: power
unit_of_measurement: 'W'
sensor.elster_t510_power_total:
icon: mdi:flash
device_class: power
unit_of_measurement: 'W'
sensor.elster_t510_total_in:
icon: mdi:flash
device_class: energy
unit_of_measurement: 'kWh'
state_class: total_increasing
last_reset: '1970-01-01T00:00:00+00:00'
If Tasmota is restarted and did not read the values yet it sends 0
, which breaks the statistics in the energy dashboard, so i prevent this via another sensor:
- sensor:
name: "Strom Gesamtverbrauch"
unit_of_measurement: 'kWh'
device_class: energy
state_class: total_increasing
icon: mdi:flash
state: >-
{% if states('sensor.elster_t510_total_in') | float(0) > 0 %}
{{ states('sensor.elster_t510_total_in') }}
{% endif %}
Here is another blog (german) that helped a lot setting this up: Stromzähler mit einem ESP8266 / ESP32 mit Tasmota auslesen und darstellen - ottelos Webseite
I hope this helps
Edit:
Another note: Some meters are locked and you need to get a pin from your operator. Fortunately mine was not, so I don’t know how you would enter the pin.