Może komuś się przyda sprawdzony config YAML do licznika Gama 150 G15.
dashboard_import:
package_import_url: github://MariuszWoszczynski/WMBUS-reader/WMBUS-reader.yaml@main
import_full_config: true
substitutions:
name: "wmbus-reader"
friendly_name: "wmbus-reader"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
project:
name: esphome.wmbus_reader
version: "1.0"
# only for RPI
# compile_process_limit: 1
esp32:
board: nodemcu-32s
framework:
type: arduino
external_components:
- source: github://SzczepanLeon/esphome-components@main
components: [ wmbus ]
refresh: 0d
# Status LED for connection
status_led:
pin:
# Blue LED
number: GPIO02
mdns:
disabled: false
time:
- platform: sntp
id: time_sntp
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "9p2efbtoh/7izZ93LRVsgSXsL1JAoP07YQeoyATI7IE="
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
output_power: 18dB
# static IP configuration (instead of data from the secret file)
# manual_ip:
# static_ip: 192.168.10.200
# gateway: 192.168.10.1
# subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "WMBUS Reader - Fallback Hotspot"
# password: "password_12345678"
captive_portal:
web_server:
port: 80
version: 3
wmbus:
mosi_pin: GPIO32
miso_pin: GPIO19
clk_pin: GPIO33
cs_pin: GPIO23
gdo0_pin: GPIO22
gdo2_pin: GPIO21
frequency: 868.950
all_drivers: False
sync_mode: True
log_all: True
# add more sensors, one without field (name will be used)
sensor:
- platform: wmbus
meter_id: 0x00000000
type: amiplus
key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
sensors:
- name: "GAMA 150 G15 RSSI"
field: "rssi"
accuracy_decimals: 0
unit_of_measurement: "dBm"
device_class: "signal_strength"
state_class: "measurement"
entity_category: "diagnostic"
- name: "Aktualne zużycie w kw"
field: "current_power_consumption"
accuracy_decimals: 1
unit_of_measurement: "kw"
device_class: "power"
state_class: "measurement"
icon: "mdi:transmission-tower-import"
- name: "Całkowite zużycie "
field: "total_energy_consumption"
accuracy_decimals: 3
unit_of_measurement: "kwh"
device_class: "energy"
state_class: "total_increasing"
icon: "mdi:transmission-tower-import"
- name: "Całkowite zużycie T1"
field: "total_energy_consumption_tariff_1"
accuracy_decimals: 3
unit_of_measurement: "kwh"
device_class: "energy"
state_class: "total_increasing"
icon: "mdi:transmission-tower-import"
- name: "Całkowite zużycie T2"
field: "total_energy_consumption_tariff_2"
accuracy_decimals: 3
unit_of_measurement: "kwh"
device_class: "energy"
state_class: "total_increasing"
icon: "mdi:transmission-tower-import"
- name: "Napięcie w sieci"
field: "voltage_at_phase_1"
accuracy_decimals: 0
unit_of_measurement: "v"
device_class: "voltage"
state_class: "measurement"
icon: "mdi:sine-wave"
- platform: uptime
name: Uptime Sensor
- platform: wifi_signal
name: "WiFi signal"
id: wifi_signal_db
update_interval: 60s
entity_category: "diagnostic"
- platform: copy
source_id: wifi_signal_db
name: "WiFi signal %"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "%"
entity_category: "diagnostic"
text_sensor:
- platform: wifi_info
ip_address:
name: "IP"
ssid:
name: "SSID"
mac_address:
name: "MAC"