-
Notifications
You must be signed in to change notification settings - Fork 20
/
bluetooth_hub.yaml.disabled
509 lines (463 loc) · 13.5 KB
/
bluetooth_hub.yaml.disabled
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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
---
# ESP32 BLE Hub
#
substitutions:
friendly_name: Bluetooth Hub
id: bluetooth_hub
hostname: bluetooth-hub
<<: !include common/substitutions/bluetooth_hub.yaml
<<: !include common/esphome/esp32_wrover.yaml
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
#use_address: bluetooth_hub.local
# Using these as a precaution to ensure solid WiFi connectivity.
#power_save_mode: none # Disable for ESP32
manual_ip:
static_ip: 10.0.20.13
gateway: 10.0.20.1
subnet: 255.255.255.0
<<: !include common/ota.yaml
<<: !include common/logger_info.yaml
#<<: !include common/logger_debug.yaml
<<: !include common/api.yaml
esp32_ble_tracker:
# scan_parameters:
# interval: 160 ms
# window: 160 ms
# text_sensor:
# - platform: ble_scanner
# name: Bluetooth hub scanner
# id: bluetooth_hub_scanner
# on_value:
# then:
# - lambda: |-
# parse_json(id(bluetooth_hub_scanner));
# if (id(bluetooth_hub_scanner)["name"] != "") {
# ESP_LOGI("main", "Value of my sensor: %s", id(bluetooth_hub_scanner)["name"].c_str());
# }
sensor:
# LYWSD03MMC $4 temperature Sensors
# Flashed with custom firmware in Chrome at https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html
# Settings:
# * "F"
# * Advertising Type: "Mi"
# * Click [Show all mi keys] to get MAC Address
# Bedroom
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:23:ED:41"
bindkey: "5119b4890c72bc66121278dca55df431"
temperature:
name: "Bedroom temperature"
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
accuracy_decimals: 1
humidity:
name: "Bedroom humidity"
device_class: humidity
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
battery_level:
name: "Bedroom temperature battery"
entity_category: diagnostic
device_class: battery
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
- platform: ble_rssi
mac_address: "A4:C1:38:23:ED:41"
name: "Bedroom temperature signal"
disabled_by_default: true
entity_category: diagnostic
device_class: signal_strength
state_class: measurement
unit_of_measurement: dBm
accuracy_decimals: 0
# Family Room
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:BF:98:48"
bindkey: "9e58510b59d2f2d386a15c3ae60bf59a"
temperature:
name: "Family room temperature"
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
accuracy_decimals: 1
humidity:
name: "Family room humidity"
device_class: humidity
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
battery_level:
name: "Family room temperature battery"
entity_category: diagnostic
device_class: battery
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
- platform: ble_rssi
mac_address: "A4:C1:38:BF:98:48"
name: "Family room temperature signal"
disabled_by_default: true
entity_category: diagnostic
device_class: signal_strength
state_class: measurement
unit_of_measurement: dBm
accuracy_decimals: 0
# Garage
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:FA:00:36"
bindkey: "98d8225995fdfb2a4d5110b08e2e0fc6"
temperature:
name: "Garage temperature"
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
accuracy_decimals: 1
humidity:
name: "Garage humidity"
device_class: humidity
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
battery_level:
name: "Garage temperature battery"
entity_category: diagnostic
device_class: battery
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
- platform: ble_rssi
mac_address: "A4:C1:38:FA:00:36"
name: "Garage temperature signal"
disabled_by_default: true
entity_category: diagnostic
device_class: signal_strength
state_class: measurement
unit_of_measurement: dBm
accuracy_decimals: 0
# Guest room
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:03:EE:C7"
bindkey: "9e58510b59d2f2d386a15c3ae60bf59a"
temperature:
name: "Guest room temperature"
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
accuracy_decimals: 1
humidity:
name: "Guest room humidity"
device_class: humidity
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
battery_level:
name: "Guest room temperature battery"
entity_category: diagnostic
device_class: battery
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
- platform: ble_rssi
mac_address: "A4:C1:38:03:EE:C7"
name: "Guest room temperature signal"
disabled_by_default: true
entity_category: diagnostic
device_class: signal_strength
state_class: measurement
unit_of_measurement: dBm
accuracy_decimals: 0
# Lucas' Room
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:4C:90:2D"
bindkey: "04d5ad30b0853cadaee54053f0032cee"
temperature:
name: "Lucas room temperature"
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
accuracy_decimals: 1
humidity:
name: "Lucas room humidity"
device_class: humidity
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
battery_level:
name: "Lucas room temperature battery"
entity_category: diagnostic
device_class: battery
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
- platform: ble_rssi
mac_address: "A4:C1:38:4C:90:2D"
name: "Lucas room temperature signal"
disabled_by_default: true
entity_category: diagnostic
device_class: signal_strength
state_class: measurement
unit_of_measurement: dBm
accuracy_decimals: 0
# Upstairs bathroom
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:0E:D8:EA"
bindkey: "a25c346de94877c61f3a948eb76ceab9"
temperature:
name: "Upstairs bathroom temperature"
device_class: temperature
state_class: measurement
unit_of_measurement: "°C"
accuracy_decimals: 1
humidity:
name: "Upstairs bathroom humidity"
device_class: humidity
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
battery_level:
name: "Upstairs bathroom temperature battery"
entity_category: diagnostic
device_class: battery
state_class: measurement
unit_of_measurement: "%"
accuracy_decimals: 0
- platform: ble_rssi
mac_address: "A4:C1:38:0E:D8:EA"
name: "Upstairs bathroom temperature signal"
disabled_by_default: true
entity_category: diagnostic
device_class: signal_strength
state_class: measurement
unit_of_measurement: dBm
accuracy_decimals: 0
# Old round Celsius-only Sensor
# - platform: ble_rssi
# mac_address: $temp1_mac
# id: ${temp1}_rssi
# name: $temp1 signal
# - platform: xiaomi_lywsdcgq
# mac_address: $temp1_mac
# temperature:
# name: $temp1_upper temperature
# id: ${temp1}_temperature
# humidity:
# name: $temp1_upper humidity
# id: ${temp1}_humidity
# battery_level:
# name: ${temp1} battery
# id: ${temp1}_battery
# - platform: ble_rssi
# mac_address: $plant1_mac
# id: $plant1
# name: $plant1_upper
# disabled_by_default: true
# entity_category: diagnostic
# device_class: signal_strength
# state_class: measurement
# unit_of_measurement: dBm
# accuracy_decimals: 0
# - platform: ble_rssi
# mac_address: $plant2_mac
# id: $plant2
# name: $plant2_upper
# disabled_by_default: true
# entity_category: diagnostic
# device_class: signal_strength
# state_class: measurement
# unit_of_measurement: dBm
# accuracy_decimals: 0
# - platform: ble_rssi
# mac_address: $plant3_mac
# id: $plant3
# name: $plant3_upper
# disabled_by_default: true
# entity_category: diagnostic
# device_class: signal_strength
# state_class: measurement
# unit_of_measurement: dBm
# accuracy_decimals: 0
# - platform: ble_rssi
# mac_address: $plant4_mac
# id: $plant4
# name: $plant4_upper
# disabled_by_default: true
# entity_category: diagnostic
# device_class: signal_strength
# state_class: measurement
# unit_of_measurement: dBm
# accuracy_decimals: 0
# - platform: ble_rssi
# mac_address: $plant5_mac
# id: $plant5
# name: $plant5_upper
# disabled_by_default: true
# entity_category: diagnostic
# device_class: signal_strength
# state_class: measurement
# unit_of_measurement: dBm
# accuracy_decimals: 0
# - platform: ble_rssi
# mac_address: $plant6_mac
# id: $plant6
# name: $plant6_upper
# disabled_by_default: true
# entity_category: diagnostic
# device_class: signal_strength
# state_class: measurement
# unit_of_measurement: dBm
# accuracy_decimals: 0
# - platform: xiaomi_hhccjcy01
# mac_address: $plant1_mac
# temperature:
# name: $plant1_upper temperature
# id: ${plant1}_temperature
# filters:
# - filter_out: nan
# - lambda: return x * (9.0/5.0) + 32.0;
# unit_of_measurement: "°C"
# moisture:
# name: $plant1_upper moisture
# icon: mdi:water-percent
# id: ${plant1}_moisture
# filters:
# - filter_out: nan
# illuminance:
# name: $plant1_upper illuminance
# id: ${plant1}_illuminance
# filters:
# - filter_out: nan
# conductivity:
# name: $plant1_upper soil conductivity
# id: ${plant1}_conductivity
# filters:
# - filter_out: nan
# - platform: xiaomi_hhccjcy01
# mac_address: $plant2_mac
# temperature:
# name: $plant2_upper temperature
# id: ${plant2}_temperature
# filters:
# - filter_out: nan
# - lambda: return x * (9.0/5.0) + 32.0;
# unit_of_measurement: "°C"
# moisture:
# name: $plant2_upper moisture
# icon: mdi:water-percent
# id: ${plant2}_moisture
# filters:
# - filter_out: nan
# illuminance:
# name: $plant2_upper illuminance
# id: ${plant2}_illuminance
# filters:
# - filter_out: nan
# conductivity:
# name: $plant2_upper soil conductivity
# id: ${plant2}_conductivity
# filters:
# - filter_out: nan
# - platform: xiaomi_hhccjcy01
# mac_address: $plant3_mac
# temperature:
# name: $plant3_upper temperature
# id: ${plant3}_temperature
# filters:
# - filter_out: nan
# - lambda: return x * (9.0/5.0) + 32.0;
# unit_of_measurement: "°C"
# moisture:
# name: $plant3_upper moisture
# icon: mdi:water-percent
# id: ${plant3}_moisture
# filters:
# - filter_out: nan
# illuminance:
# name: $plant3_upper illuminance
# id: ${plant3}_illuminance
# filters:
# - filter_out: nan
# conductivity:
# name: $plant3_upper soil conductivity
# id: ${plant3}_conductivity
# filters:
# - filter_out: nan
# - platform: xiaomi_hhccjcy01
# mac_address: $plant4_mac
# temperature:
# name: $plant4_upper temperature
# id: ${plant4}_temperature
# filters:
# - filter_out: nan
# - lambda: return x * (9.0/5.0) + 32.0;
# unit_of_measurement: "°C"
# moisture:
# name: $plant4_upper moisture
# icon: mdi:water-percent
# id: ${plant4}_moisture
# filters:
# - filter_out: nan
# illuminance:
# name: $plant4_upper illuminance
# id: ${plant4}_illuminance
# filters:
# - filter_out: nan
# conductivity:
# name: $plant4_upper soil conductivity
# id: ${plant4}_conductivity
# filters:
# - filter_out: nan
# - platform: xiaomi_hhccjcy01
# mac_address: $plant5_mac
# temperature:
# name: $plant5_upper temperature
# id: ${plant5}_temperature
# filters:
# - filter_out: nan
# - lambda: return x * (9.0/5.0) + 32.0;
# unit_of_measurement: "°C"
# moisture:
# name: $plant5_upper moisture
# icon: mdi:water-percent
# id: ${plant5}_moisture
# filters:
# - filter_out: nan
# illuminance:
# name: $plant5_upper illuminance
# id: ${plant5}_illuminance
# filters:
# - filter_out: nan
# conductivity:
# name: $plant5_upper soil conductivity
# id: ${plant5}_conductivity
# filters:
# - filter_out: nan
# - platform: xiaomi_hhccjcy01
# mac_address: $plant6_mac
# temperature:
# name: $plant6_upper temperature
# id: ${plant6}_temperature
# filters:
# - filter_out: nan
# - lambda: return x * (9.0/5.0) + 32.0;
# unit_of_measurement: "°C"
# moisture:
# name: $plant6_upper moisture
# icon: mdi:water-percent
# id: ${plant6}_moisture
# filters:
# - filter_out: nan
# illuminance:
# name: $plant6_upper illuminance
# id: ${plant6}_illuminance
# filters:
# - filter_out: nan
# conductivity:
# name: $plant6_upper soil conductivity
# id: ${plant6}_conductivity
# filters:
# - filter_out: nan