Iskra MT372 Energy Meter - optical reading over WLAN (read last post)

Dear HA community.
I have setup of Home Assistant Docker 2022.3.3 container.
My meter is Iskra MT372 (very similar to MT382) installed by Sweden company, Vattenfall.
Meter’s terminals are sealed so I cannot access the internals, which leaves optical port to my only option.
Meter technical description: MT372_3-phase_meter

Reading the Energy Meter HA documentation is good, but it leaves important bits off and I struggle to set up my project.

Using a optical port with Raspberry Pi USB-FT232R serial cable → over ser2net to
Ethernet network (HA DSMR Slimme Meter integration), and DSMR 5S protocol (nothing else works).
With these variables the HA integration installs without errors, but the meter values are displayed as “unknown” at lovelace.

Ser2net .conf file:

4001:raw:600:/dev/serial/by-id/serial adapter symlink:300 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS

My cable works with Android OTG and ZRobo app at serial 300 baud, 7E1 settings.

Do I have wrong ser2net configuration or is my meter is incompatible?

How do you setup =]---- USB ↔ RS232 ↔ IRDA serial — ( : ) 7E1 in Linux?
(means that an even parity bit is added to the 7 data bits for a total of 8 bits between the start and stop bits)
All meter values are shown as “unknown” in HA.

Hi,

Did you ever get this to work? I have the same meter. What kind of cable do you use to read the optical?

Hi, sadly no with HA, not yet. There is a bit information still missing.
I used this cable with FTDI-chip Aliexpress

In HASS Core cli log I have seen error of keep-alive, so I guess the DSMR needs an active serial connection.
Payload (in hex) is still a mystery of how the DSMR 5 protocoll works, needs a sniffer that I don’t have.

I’ll investigate further when I have time for it.

Check out this post if you haven’t yet:
Electricity smart-meter optical (IR) port

Success with ESPhome and ESP-01 !

Hardware: Ebay.de ESP-01

Yaml file:

esphome:
  name: "esp-reader"
  friendly_name: "ESP-Reader"

esp8266:
  board: esp01_1m

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: " - your key - "

ota:
  password: " - your password - "

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: " - Your SSID here - "
    password: "random"

captive_portal:

external_components:
    # IEC62056 component
    - source: github://aquaticus/esphome-iec62056

iec62056:
  update_interval: 60s
  baud_rate_max: 9600
  battery_meter: False
  mode_d: False

uart:
    rx_pin: GPIO03
    tx_pin: GPIO01
    baud_rate: 9600
    data_bits: 7
    parity: EVEN
    stop_bits: 1

sensor:
  - platform: iec62056
    obis: 1.6.0
    name: Positive active maximum demand, total
    unit_of_measurement: kW
    accuracy_decimals: 1
    device_class: energy
    state_class: measurement

  - platform: iec62056
    name: Positive active energy, total
    obis: 1.8.0
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing

  - platform: iec62056
    name: Positive active energy in tariff I
    obis: 1.8.1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing

  - platform: iec62056
    name: Positive active energy in tariff II
    obis: 1.8.2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing

  - platform: iec62056
    name: Positive active energy in tariff III
    obis: 1.8.3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing

  - platform: iec62056
    name: Positive active energy in tariff IV
    obis: 1.8.4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing

  - platform: iec62056
    name: Meter address 1
    obis: 0.0.0
    device_class: energy
    state_class: measurement
      
  - platform: iec62056
    name: Meter serial number
    obis: C.1.0
    device_class: energy
    state_class: measurement

  - platform: iec62056
    name: Meter time
    obis: 0.9.1
    state_class: measurement

  - platform: iec62056
    name: Meter date
    obis: 0.9.2
    state_class: measurement

# switch:
#   - platform: gpio
#     pin: GPIO2
#     name: Internal LED
#     id: led_switch
#     internal: True
#   - platform: iec62056
#     name: 'Readout Trigger'

# binary_sensor:
#   - platform: iec62056
#     id: meter_status
#     name: Meter Connection Status
#     on_press:
#       then:
#         - switch.turn_on: led_switch
#     on_release:
#       then:
#         - switch.turn_off: led_switch

All credits and thanks goes to @aquaticus :+1: