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"