Slimmelezer dead?

I have had a slimmelezer (https://www.zuidwijk.com) since August 2021 which has been working flawlessly, until 3rd May when it stopped communication.

I can update the ESP but only over the USB, and it connects to the WiFi when connected to the P1 port - this I have tested by setting a new local IP address in the yaml-config.

Log times out. OTA times out.

All sensors are Unavailable.

No updates to HA or ESPHome itself had been done.

This is my config file:

---
substitutions:
  device_name: slimmelezer
  device_description: "DIY P1 module to read your smart meter"

esphome:
  name: ${device_name}
  comment: "${device_description}"
  platform: ESP8266
  esp8266_restore_from_flash: true
  board: d1_mini
  name_add_mac_suffix: false
  project:
    name: zuidwijk.slimmelezer
    version: "1.0"
  on_boot:
    then:
      - if:
          condition:
            lambda: return id(has_key);
          then:
            - lambda: |-
                std::string key(id(stored_decryption_key), 32);
                id(dsmr_instance).set_decryption_key(key);
          else:
            - logger.log:
                level: info
                format: "Not using decryption key. If you need to set a key use Home Assistant service 'ESPHome:  ${device_name}_set_dsmr_key'"

# external_components:
#   - source:
#       type: git
#       url: https://github.com/mmakaay/esphome
#       ref: fix-dsmr-read-chunk-size
#     components: [ "dsmr" ]
#     refresh: 60s
    
# wifi:
#   networks:
#     - ssid: !secret wifi2_ssid
#       password: !secret wifi2_password
wifi:
#  ssid: !secret wifi_not_ssid
#  password: !secret wifi_not_password
  ssid: !secret wifi2_ssid
  password: !secret wifi2_password
  manual_ip:
    static_ip: 192.168.18.50
    gateway: 192.168.18.254
#    static_ip: 192.168.30.61
#    gateway: 192.168.30.1
    subnet: 255.255.255.0
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ${device_name}

captive_portal:

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  services:
    service: set_dsmr_key
    variables:
      private_key: string
    then:
      - logger.log:
          format: Setting private key %s. Set to empty string to disable
          args: [private_key.c_str()]
      - globals.set:
          id: has_key
          value: !lambda "return private_key.length() == 32;"
      - lambda: |-
          if (private_key.length() == 32)
            private_key.copy(id(stored_decryption_key), 32);
          id(dsmr_instance).set_decryption_key(private_key);
ota:
  password: !secret slimmelezer

web_server:
  port: 80

uart:
  baud_rate: 115200
  rx_pin: D7
  rx_buffer_size: 1500

globals:
  - id: has_key
    type: bool
    restore_value: yes
    initial_value: "false"
  - id: stored_decryption_key
    type: char[32]
    restore_value: yes

dsmr:
  id: dsmr_instance
  # For Luxembourg users set here your decryption key
  #decryption_key: !secret decryption_key // enable this when using decryption for Luxembourg; key like '00112233445566778899AABBCCDDEEFF'

sensor:
  - platform: dsmr
    energy_delivered_lux:
      name: "Energy Consumed"
      state_class: "total_increasing"
      filters:
        - throttle: 60s
#    energy_delivered_tariff1:
#      name: "Energy Consumed Tariff 1"
#      state_class: "total_increasing"
#      filters:
#        - throttle: 60s
#    energy_delivered_tariff2:
#      name: "Energy Consumed Tariff 2"
#      state_class: "total_increasing"
#      filters:
#        - throttle: 60s
    energy_returned_lux:
      name: "Energy Produced"
      state_class: "total_increasing"
      filters:
        - throttle: 60s
#    energy_returned_tariff1:
#      name: "Energy Produced Tariff 1"
#      state_class: "total_increasing"
#    energy_returned_tariff2:
#      name: "Energy Produced Tariff 2"
#      state_class: "total_increasing"
    power_delivered:
      name: "Power Consumed"
#      accuracy_decimals: 0
      filters:
#        - multiply: 1000
        - throttle: 60s
    power_returned:
      name: "Power Produced"
#      accuracy_decimals: 0
      filters:
        - throttle: 60s
#        - multiply: 1000
#    electricity_failures:
#      name: "Electricity Failures"
#      icon: mdi:alert
#    electricity_long_failures:
#      name: "Long Electricity Failures"
#      icon: mdi:alert
    voltage_l1:
      name: "Voltage Phase 1"
      filters:
        - throttle: 60s      
    voltage_l2:
      name: "Voltage Phase 2"
      filters:
        - throttle: 60s      
    voltage_l3:
      name: "Voltage Phase 3"
      filters:
        - throttle: 60s      
    current_l1:
      name: "Current Phase 1"
      filters:
        - throttle: 60s      
    current_l2:
      name: "Current Phase 2"
      filters:
        - throttle: 60s      
    current_l3:
      name: "Current Phase 3"
      filters:
        - throttle: 60s      
    power_delivered_l1:
      name: "Power Consumed Phase 1"
#      accuracy_decimals: 0
      filters:
#        - multiply: 1000
        - throttle: 60s
    power_delivered_l2:
      name: "Power Consumed Phase 2"
#      accuracy_decimals: 0
      filters:
#        - multiply: 1000
        - throttle: 60s
    power_delivered_l3:
      name: "Power Consumed Phase 3"
      filters:
#        - multiply: 1000
        - throttle: 60s
#    power_returned_l1:
#      name: "Power Produced Phase 1"
#      accuracy_decimals: 0
#      filters:
#        - multiply: 1000
#    power_returned_l2:
#      name: "Power Produced Phase 2"
#      accuracy_decimals: 0
#      filters:
#        - multiply: 1000
#    power_returned_l3:
#      name: "Power Produced Phase 3"
#      accuracy_decimals: 0
#      filters:
#        - multiply: 1000

#    gas_delivered:
#      name: "Gas Consumed"
#      state_class: "total_increasing"
#    gas_delivered_be:
#      name: "Gas Consumed Belgium"
#      state_class: "total_increasing"
  - platform: uptime
    name: "Uptime"
    update_interval: 10min
  - platform: wifi_signal
    name: "Wi-Fi Signal"
    update_interval: 10min

text_sensor:
  - platform: dsmr
#    identification:
#      name: "DSMR Identification"
#    p1_version:
#      name: "DSMR Version"
#    p1_version_be:
#      name: "DSMR Version Belgium"
  - platform: wifi_info
    ip_address:
      name: "IP Address"
    ssid:
      name: "Wi-Fi SSID"
    bssid:
      name: "Wi-Fi BSSID"

Heb je al contact opgenomen met de leveracier (in english … did you contact the supplier) ?

he might have a solution.

Maybe related to your Wi-Fi network?
See Slimme lezer error resolving IP address

It was a close call, but my device is online according to ESPHome - it just don’t communicate.

INFO Reading configuration /config/esphome/slimmelezer.yaml...
INFO Starting log output from 192.168.18.50 using esphome API
WARNING Can't connect to ESPHome API for 192.168.18.50: Timeout while connecting to ('192.168.18.50', 6053)
INFO Trying to reconnect to 192.168.18.50 in the background

Can you “ping -t 192.168.18.50” the device?

Has there anything changed in your network?

Otherwise mayby as mentioned by @vso1 (In dutch :stuck_out_tongue:) you could contact the supplier for more specific device support to troubleshoot because I don’t have a ESP device.

There seems to be something weird with ESPHome and/or the ESP-boards versus Unify Dream Machine. When I tested the Slimmelezer with USB power only at my workstation, and thus connected to another AP it responded as expected. Playing around based on this shows that I have a number of units that refuses to communicate when forced to connect to the UDM, but works flawlessly when connected to any of the other APs.
My WiFi is a wired mesh-net, all APs are Ubiquiti (including the UDM) and are managed centrally by Unifi OS/Network so there should not be any differences wrt channels, bandwidth, TX power etc.

The only commonality I can find is that those that fail are d1_mini or nodemcu-32s boards, while those that seems to overcome whatever goes on are flashed Sonoff 4-ch Pro.

So, the problem probably stems from the UDM, but why it should generate such a problem is beyond me