forked from Brunas/esp32_p1meter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mqtt.yaml
270 lines (255 loc) · 11.8 KB
/
mqtt.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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Sensors for esp32_p1meter to be used in Home Assistant
# In configuration.yaml file add following line to make sensors appear in HA:
# mqtt: !include mqtt.yaml
# Sensors for esp32_p1meter to be used in Home Assistant
# In configuration.yaml file add following line to make sensors appear in HA:
# mqtt: !include mqtt.yaml
sensor:
- name: P1 Meter Clock Raw
unique_id: p1_meter_clock_raw
state_topic: "p1_meter/sensor/clock"
icon: "mdi:clock"
- name: P1 Meter Clock Timestamp
unique_id: p1_meter_clock_timestamp
state_topic: "p1_meter/sensor/clock"
value_template: >
{{strptime(value | regex_findall_index("\d*"), '%y%m%d%H%M%S') | as_timestamp}}
- name: P1 Meter Clock Date and Time
unique_id: p1_meter_clock_datetime
state_topic: "p1_meter/sensor/clock"
value_template: >
{{strptime(value | regex_findall_index("\d*"), '%y%m%d%H%M%S')}}
- name: P1 Meter Active energy import (+A)
unique_id: p1_meter_active_energy_import
state_topic: "p1_meter/sensor/active_energy_import"
device_class: "energy"
state_class: "total_increasing"
unit_of_measurement: "kWh"
suggested_display_precision: 3
- name: P1 Meter Active energy import (+A) rate 1
unique_id: p1_meter_active_energy_import_rate_1
state_topic: "p1_meter/sensor/active_energy_import_rate_1"
device_class: "energy"
state_class: "total_increasing"
unit_of_measurement: "kWh"
suggested_display_precision: 3
- name: P1 Meter Active energy import (+A) rate 2
unique_id: p1_meter_active_energy_import_rate_2
state_topic: "p1_meter/sensor/active_energy_import_rate_2"
device_class: "energy"
state_class: "total_increasing"
unit_of_measurement: "kWh"
suggested_display_precision: 3
- name: P1 Meter Active energy export (-A)
unique_id: p1_meter_active_energy_export
state_topic: "p1_meter/sensor/active_energy_export"
device_class: "energy"
state_class: "total_increasing"
unit_of_measurement: "kWh"
suggested_display_precision: 3
- name: P1 Meter Reactive energy import (+R)
unique_id: p1_meter_reactive_energy_import
state_topic: "p1_meter/sensor/reactive_energy_import"
device_class: "reactive_power"
state_class: "total_increasing"
unit_of_measurement: "var"
suggested_display_precision: 3
- name: P1 Meter Reactive energy export (-R)
unique_id: p1_meter_reactive_energy_export
state_topic: "p1_meter/sensor/reactive_energy_export"
device_class: "reactive_power"
state_class: "total_increasing"
unit_of_measurement: "var"
suggested_display_precision: 3
- name: P1 Meter Instantaneous voltage L1
unique_id: p1_meter_instantaneous_voltage_l1
state_topic: "p1_meter/sensor/instantaneous_voltage_l1"
device_class: "voltage"
state_class: "measurement"
unit_of_measurement: "V"
- name: P1 Meter Instantaneous current L1
unique_id: p1_meter_instantaneous_current_l1
state_topic: "p1_meter/sensor/instantaneous_current_l1"
device_class: "current"
state_class: "measurement"
unit_of_measurement: "A"
- name: P1 Meter Instantaneous voltage L2
unique_id: p1_meter_instantaneous_voltage_l2
state_topic: "p1_meter/sensor/instantaneous_voltage_l2"
device_class: "voltage"
state_class: "measurement"
unit_of_measurement: "V"
- name: P1 Meter Instantaneous current L2
unique_id: p1_meter_instantaneous_current_l2
state_topic: "p1_meter/sensor/instantaneous_current_l2"
device_class: "current"
state_class: "measurement"
unit_of_measurement: "A"
- name: P1 Meter Instantaneous voltage L3
unique_id: p1_meter_instantaneous_voltage_l3
state_topic: "p1_meter/sensor/instantaneous_voltage_l3"
device_class: "voltage"
state_class: "measurement"
unit_of_measurement: "V"
- name: P1 Meter Instantaneous current L3
unique_id: p1_meter_instantaneous_current_l3
state_topic: "p1_meter/sensor/instantaneous_current_l3"
device_class: "current"
state_class: "measurement"
unit_of_measurement: "A"
- name: P1 Meter Instantaneous net frequency; any phase
unique_id: p1_meter_instantaneous_net_frequency_any_phase
state_topic: "p1_meter/sensor/instantaneous_net_frequency_any_phase"
device_class: "frequency"
state_class: "measurement"
unit_of_measurement: "Hz"
- name: P1 Meter Instantaneous active import power (+A)
unique_id: p1_meter_instantaneous_active_import_power
state_topic: "p1_meter/sensor/instantaneous_active_import_power"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active import power (+A) in phase L1
unique_id: p1_meter_instantaneous_active_import_power_in_phase_l1
state_topic: "p1_meter/sensor/instantaneous_active_import_power_in_phase_l1"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active import power (+A) in phase L2
unique_id: p1_meter_instantaneous_active_import_power_in_phase_l2
state_topic: "p1_meter/sensor/instantaneous_active_import_power_in_phase_l2"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active import power (+A) in phase L3
unique_id: p1_meter_instantaneous_active_import_power_in_phase_l3
state_topic: "p1_meter/sensor/instantaneous_active_import_power_in_phase_l3"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active export power (+A)
unique_id: p1_meter_instantaneous_active_export_power
state_topic: "p1_meter/sensor/instantaneous_active_export_power"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active export power (-A) in phase L1
unique_id: p1_meter_instantaneous_active_export_power_in_phase_l1
state_topic: "p1_meter/sensor/instantaneous_active_export_power_in_phase_l1"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active export power (-A) in phase L2
unique_id: p1_meter_instantaneous_active_export_power_in_phase_l2
state_topic: "p1_meter/sensor/instantaneous_active_export_power_in_phase_l2"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous active export power (-A) in phase L3
unique_id: p1_meter_instantaneous_active_export_power_in_phase_l3
state_topic: "p1_meter/sensor/instantaneous_active_export_power_in_phase_l3"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "kW"
- name: P1 Meter Instantaneous reactive import power (+R)
unique_id: p1_meter_instantaneous_reactive_import_power
state_topic: "p1_meter/sensor/instantaneous_reactive_import_power"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive import power (+R) in phase L1
unique_id: p1_meter_instantaneous_reactive_import_power_in_phase_l1
state_topic: "p1_meter/sensor/instantaneous_reactive_import_power_in_phase_l1"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive import power (+R) in phase L2
unique_id: p1_meter_instantaneous_reactive_import_power_in_phase_l2
state_topic: "p1_meter/sensor/instantaneous_reactive_import_power_in_phase_l2"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive import power (+R) in phase L3
unique_id: p1_meter_instantaneous_reactive_import_power_in_phase_l3
state_topic: "p1_meter/sensor/instantaneous_reactive_import_power_in_phase_l3"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive export power (-R)
unique_id: p1_meter_instantaneous_reactive_export_power
state_topic: "p1_meter/sensor/instantaneous_reactive_export_power"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive export power (-R) in phase L1
unique_id: p1_meter_instantaneous_reactive_export_power_in_phase_l1
state_topic: "p1_meter/sensor/instantaneous_reactive_export_power_in_phase_l1"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive export power (-R) in phase L2
unique_id: p1_meter_instantaneous_reactive_export_power_in_phase_l2
state_topic: "p1_meter/sensor/instantaneous_reactive_export_power_in_phase_l2"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous reactive export power (-R) in phase L3
unique_id: p1_meter_instantaneous_reactive_export_power_in_phase_l3
state_topic: "p1_meter/sensor/instantaneous_reactive_export_power_in_phase_l3"
device_class: "reactive_power"
state_class: "measurement"
unit_of_measurement: "var"
- name: P1 Meter Instantaneous Power factor (+A/+VA)
unique_id: p1_meter_instantaneous_power_factor
state_topic: "p1_meter/sensor/instantaneous_power_factor"
device_class: "power_factor"
state_class: "measurement"
- name: P1 Meter Instantaneous power factor in phase L1
unique_id: p1_meter_instantaneous_power_factor_in_phase_l1
state_topic: "p1_meter/sensor/instantaneous_power_factor_in_phase_l1"
device_class: "power_factor"
state_class: "measurement"
- name: P1 Meter Instantaneous power factor in phase L2
unique_id: p1_meter_instantaneous_power_factor_in_phase_l2
state_topic: "p1_meter/sensor/instantaneous_power_factor_in_phase_l2"
device_class: "power_factor"
state_class: "measurement"
- name: P1 Meter Instantaneous power factor in phase L3
unique_id: p1_meter_instantaneous_power_factor_in_phase_l3
state_topic: "p1_meter/sensor/instantaneous_power_factor_in_phase_l3"
device_class: "power_factor"
state_class: "measurement"
- name: P1 Meter Number of power failures in any phase
unique_id: p1_meter_number_of_power_failures_in_any_phase
state_topic: "p1_meter/sensor/number_of_power_failures_in_any_phase"
state_class: "total_increasing"
- name: P1 Meter Number of voltage sags in phase L1
unique_id: p1_meter_number_of_voltage_sags_in_phase_l1
state_topic: "p1_meter/sensor/number_of_voltage_sags_in_phase_l1"
state_class: "total_increasing"
- name: P1 Meter Number of voltage sags in phase L2
unique_id: p1_meter_number_of_voltage_sags_in_phase_l2
state_topic: "p1_meter/sensor/number_of_voltage_sags_in_phase_l2"
state_class: "total_increasing"
- name: P1 Meter Number of voltage sags in phase L3
unique_id: p1_meter_number_of_voltage_sags_in_phase_l3
state_topic: "p1_meter/sensor/number_of_voltage_sags_in_phase_l3"
state_class: "total_increasing"
- name: P1 Meter Number of voltage swells in phase L1
unique_id: p1_meter_number_of_voltage_swells_in_phase_l1
state_topic: "p1_meter/sensor/number_of_voltage_swells_in_phase_l1"
state_class: "total_increasing"
- name: P1 Meter Number of voltage swells in phase L2
unique_id: p1_meter_number_of_voltage_swells_in_phase_l2
state_topic: "p1_meter/sensor/number_of_voltage_swells_in_phase_l2"
state_class: "total_increasing"
- name: P1 Meter Number of voltage swells in phase L3
unique_id: p1_meter_number_of_voltage_swells_in_phase_l3
state_topic: "p1_meter/sensor/number_of_voltage_swells_in_phase_l3"
state_class: "total_increasing"
- name: P1 Meter Consumer Message text
unique_id: p1_meter_consumer_message_text
state_topic: "p1_meter/sensor/consumer_message_text"
- name: P1 Meter Debug
unique_id: p1_meter_debug
state_topic: "p1_meter/debug"