-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathesp32-compteur-eau.yaml
121 lines (103 loc) · 3.5 KB
/
esp32-compteur-eau.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
# inspiration : https://raw.githubusercontent.com/zibous/ha-watermeter
substitutions:
devicename: esp32-compteur-eau
upper_devicename: ESP32 compteur eau
packages:
device_base: !include common/device_base.yaml
device_esp32: !include common/device_esp32.yaml
esphome:
name_add_mac_suffix: true
esp32:
board: az-delivery-devkit-v4
framework:
type: arduino
logger:
level: INFO
#level: DEBUG
#level: VERBOSE
# level: VERY_VERBOSE
# logs:
# scheduler: INFO
# api.service: INFO
# api.connection: INFO
# sensor: INFO
wifi:
manual_ip:
# pour une connection rapide, et pour que le conteneur docker esphome puisse trouver l'ESP sans mDNS
static_ip: 192.168.1.248
gateway: 192.168.1.1
subnet: 255.255.255.0
## Device-specific
preferences:
flash_write_interval: 10min
external_components:
- source: github://SzczepanLeon/[email protected]
refresh: 0d
components: [ wmbus ]
time:
- platform: sntp
id: time_sntp
timezone: Europe/Paris
servers:
- 0.at.pool.ntp.org
- 0.pool.ntp.org
wmbus:
mosi_pin: GPIO19
miso_pin: GPIO05
clk_pin: GPIO18
cs_pin: GPIO04
gdo0_pin: GPIO16
gdo2_pin: GPIO17
all_drivers: True
log_all: False
sync_mode: False
## -------------------------------------------------
## led blink mode (optional) xx = PIN
## -------------------------------------------------
# led_pin: GPIOxx
# led_blink_time: "100ms"
sensor:
- platform: wmbus
# Meter ID (usually from sticker). Can be specified as decimal or hex.
# only HEX is working for my watermeter !
# see: https://github.com/SzczepanLeon/esphome-components/issues/6
# edit watermeterid in the secrets file
# add_prefix: enable/disable add watermeterid to lqi, rssi, total_water_m3
meter_id: 0x92407109
# meter_id: 0x92407107
# meter_id: 0x92405338
# meter_id: 0x92405335
type: dme07
key: "51728910E66D83F851728910E66D83F8"
# long frames (historical data ?)
# short frame | long frame | long frame decoded
# 1E44A511097140927B077A91001005080C082EF56B838836CDCF35267DE159 | 3E44A511097140927B077A9100300523AE3F358E34AD095D764E9BF4AD299F64CFEAE6AFC77768DBFC7717DB75FC0B2A0A26053CC966DF8353C3E46EFD79EF | 3E44A511097140927B077A910030052F2F_0413AEBE0A000FA5110100010100000000000031A11BFE299350604E8F50B35139493C4BC94CD14B6C49EB498E48
# 1E44A511097140927B077A93001005DA5B83889E3D33864C7D008B83C75DD4 | 3E44A511097140927B077A93003005B25B440765714FB8C2B9A9F23680A5E7449F67C63E602C96898A1193061522DC572E254F424EDCC8AE284C29B47C3036 | 3E44A511097140927B077A930030052F2F_0413AFBE0A000FA5110100010100000000000031A11BFE299450604E8F50B35139493C4BC94CD14B6C49EB498E48
sensors:
- name: "eau potable RF RSSi"
field: "rssi"
accuracy_decimals: 0
unit_of_measurement: "dBm"
device_class: "signal_strength"
state_class: "measurement"
entity_category: "diagnostic"
- name: "eau potable"
field: "total"
accuracy_decimals: 3
force_update: true # pour détecter si l'eau ne coule pas
unit_of_measurement: "m³"
device_class: "water"
state_class: "total_increasing"
icon: "mdi:water"
filters:
# si pas de trame reçue depuis 1h, on considère que le capteur n'est plus représentatif du compteur d'eau
- timeout: 1h
text_sensor:
- platform: wmbus
meter_id: 0x92407109
type: dme07
key: "51728910E66D83F851728910E66D83F8"
sensors:
- name: "eau potable statut compteur"
field: "status"