-
Notifications
You must be signed in to change notification settings - Fork 3
/
waterp1meterkit-ethernet.yaml
247 lines (229 loc) · 5.8 KB
/
waterp1meterkit-ethernet.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
---
#Name of device
substitutions:
device_name: waterp1meterkit
friendly_name: WaterP1MeterKit
waterp1meterkit_software_version: "1.1"
#Esphome start
esphome:
name: ${device_name}
friendly_name: ${friendly_name}
project:
name: "smarthomeshop.waterp1meterkit"
version: ${waterp1meterkit_software_version}
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
baud_rate: 115200
#Enable Over the Air updates
ota:
- platform: esphome
dashboard_import:
package_import_url: github://smarthomeshop/waterp1meterkit/waterp1meterkit-ethernet.yaml@main
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 1
power_pin: GPIO16
web_server:
port: 80
# Switch to restart the waterp1meter
switch:
- platform: restart
id: switch_restart
name: "${friendly_name} Restart"
# I²C Bus
#
# This component sets up the I²C bus for the ESP8266.
#
# https://esphome.io/components/i2c.html
#
i2c:
sda: GPIO15
scl: GPIO4
scan: true
frequency: 400kHz
#LED for measure status
output:
- platform: ledc
pin: GPIO13
id: output_led_green
- platform: ledc
pin: GPIO05
id: output_led_red
- platform: ledc
pin: GPIO14
id: output_led_blue
light:
- platform: monochromatic
id: light_led_green
output: output_led_green
- platform: status_led
id: light_led_red
output: output_led_red
- platform: monochromatic
id: light_led_blue
output: output_led_blue
#DSMR part
uart:
id: uart_dsmr
rx_pin: GPIO33
baud_rate: 115200
rx_buffer_size: 1700
dsmr:
uart_id: uart_dsmr
id: dsmr_instance
max_telegram_length: 1700
request_pin: GPIO12
#request_interval: 10s
#DSMR part end
sensor:
#DSMR part
- platform: dsmr
energy_delivered_tariff1:
id: dsmr_electricity_delivered_1
name: "Energy Consumed Tariff 1"
state_class: total_increasing
energy_returned_tariff1:
id: dsmr_electricity_returned_1
name: "Energy Produced Tariff 1"
state_class: total_increasing
energy_delivered_tariff2:
id: dsmr_electricity_delivered_2
name: "Energy Consumed Tariff 2"
state_class: total_increasing
energy_returned_tariff2:
id: dsmr_electricity_returned_2
name: "Energy Produced Tariff 2"
state_class: total_increasing
power_delivered:
accuracy_decimals: 3
id: dsmr_electricity_currently_delivered
name: "Power Consumed"
power_returned:
accuracy_decimals: 3
id: dsmr_electricity_currently_returned
name: "Power Produced"
voltage_l1:
id: dsmr_phase_voltage_l1
name: "Voltage Phase 1"
voltage_l2:
id: dsmr_phase_voltage_l2
name: "Voltage Phase 2"
voltage_l3:
id: dsmr_phase_voltage_l3
name: "Voltage Phase 3"
current_l1:
id: dsmr_phase_power_current_l1
name: "Current Phase 1"
current_l2:
id: dsmr_phase_power_current_l2
name: "Current Phase 2"
current_l3:
id: dsmr_phase_power_current_l3
name: "Current Phase 3"
power_delivered_l1:
accuracy_decimals: 3
id: dsmr_phase_currently_delivered_l1
name: "Power Consumed Phase 1"
power_delivered_l2:
accuracy_decimals: 3
id: dsmr_phase_currently_delivered_l2
name: "Power Consumed Phase 2"
power_delivered_l3:
accuracy_decimals: 3
id: dsmr_phase_currently_delivered_l3
name: "Power Consumed Phase 3"
power_returned_l1:
accuracy_decimals: 3
id: dsmr_phase_currently_returned_l1
name: "Power Produced Phase 1"
power_returned_l2:
accuracy_decimals: 3
id: dsmr_phase_currently_returned_l2
name: "Power Produced Phase 2"
power_returned_l3:
accuracy_decimals: 3
id: dsmr_phase_currently_returned_l3
name: "Power Produced Phase 3"
gas_delivered:
id: dsmr_extra_device_delivered
name: "Gas Consumed"
state_class: total_increasing
# Belgium
# gas_delivered_be:
# name: ${friendly_name} Gas Delivered BE
# Luxembourg
# energy_delivered_lux:
# name: ${friendly_name} Energy Delivered Lux
# energy_returned_lux:
# name: ${friendly_name} Energy Returned Lux
#WaterMeter sensor part
- platform: pulse_meter
id: sensor_pulse_meter
name: "${friendly_name} Current Usage"
icon: "mdi:water-pump"
unit_of_measurement: "L/min"
internal_filter_mode: PULSE
internal_filter: 200ms
timeout: 2min
accuracy_decimals: 1
total:
id: sensor_pulse_meter_total
name: "${friendly_name} Total Consumption"
icon: "mdi:cube-outline"
unit_of_measurement: "m³"
state_class: total_increasing
device_class: water
accuracy_decimals: 3
filters:
- multiply: 0.001
pin: GPIO32
on_value:
then:
- light.turn_on:
id: light_led_green
flash_length: 1s
#HDC1080 temp & hum sensor
- platform: hdc1080
temperature:
id: sensor_temperature
name: "Temperature"
filters:
offset: -4.5
humidity:
id: sensor_humidity
name: "Humidity"
filters:
offset: 12
update_interval: 60s
text_sensor:
- platform: ethernet_info
ip_address:
name: "${friendly_name} IP address"
icon: "mdi:network-outline"
- platform: version
id: text_sensor_version
name: "${friendly_name} ESPHome Version"
- platform: template
id: text_sensor_waterp1meterkit_version
name: "${friendly_name} Software Version"
update_interval: 5h
lambda: |-
return {"${waterp1meterkit_software_version}"};
- platform: dsmr
identification:
name: ${friendly_name} Identification
p1_version:
name: ${friendly_name} Version
timestamp:
id: dsmr_timestamp
internal: true
# Belgium
# p1_version_be:
# name: ${friendly_name} Version BE