-
Notifications
You must be signed in to change notification settings - Fork 1
/
rfbridge1.yaml
361 lines (311 loc) · 13.5 KB
/
rfbridge1.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
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
#------------------------------
#-- rfbridge1.yaml
#-- Tests du bridge RF de SonOff
#-- J'essaie d'apprendre un code de la remote de mon store banne et de le rejouer
#-- zf230928.1908
#--
# sources:
# Hardware utilisé pour ce projet (mais attention en version V2 R2.2 !): https://sonoff.tech/product/smart-home-security/rf-bridge/
# Comme plus compatible pour Tasmota depuis fin 2021, il faut utiliser ceci:
# https://community.home-assistant.io/t/new-sonoff-rf-bridge-board-need-flashing-help/344326
# Oscilloscope pour visualiser les trames 433MHz: https://dbuezas.github.io/esphome-remote_receiver-oscilloscope/
# https://esphome.io/components/remote_transmitter.html#remote-setting-up-rf
# https://esphome.io/components/remote_receiver.html
# https://esphome.io/components/remote_transmitter.html
esphome:
name: rfbridge1
esp8266:
board: esp8285
# Configuration WIFI
# On le force sur apzuzu7, plus stable
wifi:
ssid: !secret wifi_ssid_apzuzu6
password: !secret wifi_pass_apzuzu6
# networks:
# - ssid: !secret wifi_ssid_apzuzu7
# - password: !secret wifi_pass_apzuzu7
# - ssid: !secret wifi_ssid_apzuzu6
# - password: !secret wifi_pass_apzuzu6
# - ssid: !secret wifi_ssid_3G_zf
# - password: !secret wifi_pass_3G_zf2
# - ssid: !secret wifi_ssid_3G_zf2
# - password: !secret wifi_pass_3G_zf2
# - ssid: !secret wifi_ssid_3g_s7
# - password: !secret wifi_pass_3g_s7
# - ssid: !secret wifi_ssid_apzuzu6_EXT
# - password: !secret wifi_pass_apzuzu6_EXT
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "rfbridge1 Fallback"
password: !secret ap_wifi_password
captive_portal:
# Enable logging
logger:
# level: VERBOSE
# Enable Home Assistant API
api:
# password: !secret api_password
encryption:
key: !secret api_encryption_key
# Enable OTA
ota:
password: !secret ota_password
# WEB Server
web_server:
port: 80
#status_led:
# pin:
# number: GPIO13
# inverted: yes
# USBRX = GPIO4 ---> receiver
# USBTX = GPIO5 ---> trasmitter
# receiver = pin 5 of the 8-legged chip (the one closer to the wifi antenna)
# transmitter = pin 4 of the 6-legged chip (closest to r12)
# this will log received commands, and can also transmit. Read up here:
# https://esphome.io/components/remote_transmitter.html#remote-setting-up-rf
remote_receiver:
pin:
number: GPIO04
# dump: raw
tolerance: 50%
filter: 10us
idle: 10ms
buffer_size: 2kb
remote_transmitter:
pin: GPIO05
carrier_duty_percent: 100%
# Définitions des texts sensors
text_sensor:
- platform: version
name: "rfbridge1 Version"
- platform: wifi_info
ip_address:
name: rfbridge1 IP Address
id: wifi_ip
ssid:
name: rfbridge1 Connected SSID
id: wifi_ssid
# Définitions des sensors
sensor:
- platform: wifi_signal
name: "rfbridge1 Signal Wi-Fi"
update_interval: 60s
- platform: uptime
name: "rfbridge1 uptime"
update_interval: 60s
# Définition des Switch's
switch:
- platform: gpio
name: "rfbridge1 LED"
inverted: True
id: led
pin: GPIO13
- platform: restart
name: "rfbridge1 Restart"
# Remote pour faire des tests avec le micro récepteur à Yvan
- platform: template
name: RF1 send Test LED ON
turn_on_action:
- remote_transmitter.transmit_raw:
code: [
362, -1013, 362, -1016, 993, -386, 358, -1017, 996, -384, 991, -384, 996, -381,
355, -1020, 360, -1015, 362, -1034, 985, -374, 357, -1018, 994, -385, 358, -1017,
997, -381, 359, -1016, 362, -1013, 359, -1017, 361, -1015, 364, -1013, 362, -1013,
363, -1015, 996, -381, 357, -1013, 357
]
repeat:
times: 4
# Remote pour la bougie LED qui utilise le micro récepteur à Yvan
- platform: template
name: RF1 send Bougie LED ON
turn_on_action:
- remote_transmitter.transmit_raw:
code: [
361, -1020, 362, -1018, 1001, -383, 999, -383, 999, -383, 999, -383, 360, -1020,
996, -388, 997, -384, 997, -387, 996, -386, 996, -386, 996, -386, 998, -384,
999, -383, 996, -386, 357, -1020, 362, -1018, 363, -1017, 362, -1017, 360,
-1020, 362, -1019, 1000, -383, 360, -1014, 361
]
repeat:
times: 4
- platform: template
name: RF1 send Bougie LED OFF
turn_on_action:
- remote_transmitter.transmit_raw:
code: [
364, -1015, 362, -1020, 999, -384, 998, -384, 995, -386, 997, -383, 360, -1017,
1001, -384, 996, -385, 997, -383, 997, -384, 998, -383, 999, -383, 997, -384,
998, -383, 996, -384, 359, -1018, 361, -1019, 378, -1005, 359, -1015, 362,
-1019, 1001, -381, 358, -1019, 361, -1013, 362
]
repeat:
times: 4
# Remote pour le store banne du balcon
# ATTENTION: pour le store banne du balcon, il faut envoyer deux trames séparées par un délais !
- platform: template
name: RF1 send Store Balcon UP
turn_on_action:
- remote_transmitter.transmit_raw:
code: [
-7817, 4830, -1489, 724, -362, 365, -717, 722, -364, 362, -717, 367,
-715, 724, -362, 362, -717, 724, -362, 722, -362, 720, -364,
719, -364, 720, -362, 720, -362, 719, -365, 719, -365, 362,
-717, 724, -364, 720, -363, 721, -362, 360, -719, 367, -717,
722, -364, 720, -362, 719, -362, 362, -720, 364, -717, 367,
-717, 367, -717, 364, -720, 722, -365, 361, -720, 724, -363,
363, -717, 367, -717, 367, -717, 722, -364, 362, -717, 367,
-717, 365, -719, 722,
-7817, 4830,
-1489, 724, -362, 365, -717, 722, -364, 362, -717, 367,
-715, 724, -362, 362, -717, 724, -362, 722, -362, 720, -364,
719, -364, 720, -362, 720, -362, 719, -365, 719, -365, 362,
-717, 724, -364, 720, -363, 721, -362, 360, -719, 367, -717,
722, -364, 720, -362, 719, -362, 362, -720, 364, -717, 367,
-717, 367, -717, 364, -720, 722, -365, 361, -720, 724, -363,
363, -717, 367, -717, 367, -717, 722, -364, 362, -717, 367,
-717, 365, -719, 722,
]
repeat:
times: 4
wait_time: 100ms
- platform: template
name: RF1 send Store Balcon STOP
turn_on_action:
- remote_transmitter.transmit_raw:
code: [
-1483, 723, -359, 360, -714, 720, -361, 361, -714, 366, -713,
720, -359, 251, -827, 721, -362, 717, -362, 717, -360, 717,
-362, 717, -362, 719, -360, 715, -365, 714, -365, 359, -718,
719, -362, 717, -362, 717, -362, 363, -714, 362, -717, 720,
-362, 717, -362, 717, -362, 362, -716, 363, -717, 362, -717,
365, -717, 362, -717, 720, -362, 362, -717, 719, -362, 362,
-715, 722, -362, 360, -717, 719, -362, 362, -717, 720, -362,
360, -719, 719,
-7786, 4812,
-1486, 719, -362, 362, -717, 720,
-362, 360, -717, 364, -716, 721, -362, 362, -717, 719, -365,
717, -364, 717, -362, 720, -362, 719, -360, 717, -365, 717,
-362, 717, -362, 362, -717, 719, -363, 719, -362, 718, -361,
360, -717, 364, -717, 720, -362, 718, -363, 718, -362, 362,
-717, 366, -713, 364, -715, 365, -715, 364, -717, 722, -362,
359, -717, 720, -368, 356, -717, 722, -360, 362, -717, 719,
-362, 360, -718, 721, -362, 366, -713, 722
]
repeat:
times: 4
wait_time: 100ms
- platform: template
name: RF1 send Store Balcon DOWN
turn_on_action:
- remote_transmitter.transmit_raw:
code: [
-1486, 719, -361, 361, -717, 720, -362, 362, -716, 361, -717,
721, -360, 362, -715, 719, -364, 716, -364, 715, -364, 717,
-362, 721, -361, 717, -362, 717, -362, 717, -362, 362, -717,
720, -359, 720, -362, 717, -362, 362, -715, 364, -717, 720,
-365, 716, -364, 718, -363, 361, -719, 363, -719, 362, -717,
365, -717, 362, -719, 720, -362, 359, -722, 717, -365, 359,
-717, 365, -717, 722, -362, 720, -360, 361, -719, 363, -719,
719, -363, 719,
-7793, 4818,
-1485, 721, -362, 360, -718,
721, -362, 362, -714, 365, -717, 719, -362, 360, -717, 722,
-365, 714, -362, 721, -361, 717, -362, 717, -362, 717, -362,
720, -362, 717, -362, 360, -717, 719, -362, 717, -362, 717,
-362, 362, -715, 362, -721, 718, -362, 717, -362, 720, -359,
363, -714, 365, -717, 364, -715, 365, -714, 362, -719, 720,
-361, 363, -715, 719, -365, 359, -717, 365, -717, 722, -362,
723, -357, 363, -715, 365, -717, 723, -358, 717
]
repeat:
times: 4
wait_time: 100ms
# # Définition des Binary Sensor's
# binary_sensor:
# # Détection de l'appui sur une touche de la remote pour faire des tests avec le micro récepteur à Yvan
# - platform: remote_receiver
# name: "RF1 Test LED ON"
# raw:
# code: [
# 362, -1013, 362, -1016, 993, -386, 358, -1017, 996, -384, 991, -384, 996, -381,
# 355, -1020, 360, -1015, 362, -1034, 985, -374, 357, -1018, 994, -385, 358, -1017,
# 997, -381, 359, -1016, 362, -1013, 359, -1017, 361, -1015, 364, -1013, 362, -1013,
# 363, -1015, 996, -381, 357, -1013, 357
# ]
# # Détection de l'appui sur une touche de la remote pour la bougie LED qui utilise le micro récepteur à Yvan
# - platform: remote_receiver
# name: "RF1 Bougie LED ON"
# raw:
# code: [
# 361, -1020, 362, -1018, 1001, -383, 999, -383, 999, -383, 999, -383, 360, -1020,
# 996, -388, 997, -384, 997, -387, 996, -386, 996, -386, 996, -386, 998, -384,
# 999, -383, 996, -386, 357, -1020, 362, -1018, 363, -1017, 362, -1017, 360,
# -1020, 362, -1019, 1000, -383, 360, -1014, 361
# ]
# - platform: remote_receiver
# name: "RF1 Bougie LED OFF"
# raw:
# code: [
# 364, -1015, 362, -1020, 999, -384, 998, -384, 995, -386, 997, -383, 360, -1017,
# 1001, -384, 996, -385, 997, -383, 997, -384, 998, -383, 999, -383, 997, -384,
# 998, -383, 996, -384, 359, -1018, 361, -1019, 378, -1005, 359, -1015, 362,
# -1019, 1001, -381, 358, -1019, 361, -1013, 362
# ]
# La détection de l'appui sur une touche de la remote du balcon ne fonctionne pas.
# Je ne sais pas pour quoi ?
# # Détection de l'appui sur une touche de la remote pour le store banne du balcon
# - platform: remote_receiver
# name: "RF1 Store Balcon UP"
# raw:
# code: [
# -7817, 4830, -1489, 724, -362, 365, -717, 722, -364, 362, -717, 367,
# -715, 724, -362, 362, -717, 724, -362, 722, -362, 720, -364,
# 719, -364, 720, -362, 720, -362, 719, -365, 719, -365, 362,
# -717, 724, -364, 720, -363, 721, -362, 360, -719, 367, -717,
# 722, -364, 720, -362, 719, -362, 362, -720, 364, -717, 367,
# -717, 367, -717, 364, -720, 722, -365, 361, -720, 724, -363,
# 363, -717, 367, -717, 367, -717, 722, -364, 362, -717, 367,
# -717, 365, -719, 722,
# -7817, 4830,
# -1489, 724, -362, 365, -717, 722, -364, 362, -717, 367,
# -715, 724, -362, 362, -717, 724, -362, 722, -362, 720, -364,
# 719, -364, 720, -362, 720, -362, 719, -365, 719, -365, 362,
# -717, 724, -364, 720, -363, 721, -362, 360, -719, 367, -717,
# 722, -364, 720, -362, 719, -362, 362, -720, 364, -717, 367,
# -717, 367, -717, 364, -720, 722, -365, 361, -720, 724, -363,
# 363, -717, 367, -717, 367, -717, 722, -364, 362, -717, 367,
# -717, 365, -719, 722,
# ]
# - platform: remote_receiver
# name: "RF1 Store Balcon STOP"
# raw:
# code: [
# -1483, 723, -359, 360, -714, 720, -361, 361, -714, 366, -713,
# 720, -359, 251, -827, 721, -362, 717, -362, 717, -360, 717,
# -362, 717, -362, 719, -360, 715, -365, 714, -365, 359, -718,
# 719, -362, 717, -362, 717, -362, 363, -714, 362, -717, 720,
# -362, 717, -362, 717, -362, 362, -716, 363, -717, 362, -717,
# 365, -717, 362, -717, 720, -362, 362, -717, 719, -362, 362,
# -715, 722, -362, 360, -717, 719, -362, 362, -717, 720, -362,
# 360, -719, 719,
# -7786, 4812,
# -1486, 719, -362, 362, -717, 720,
# -362, 360, -717, 364, -716, 721, -362, 362, -717, 719, -365,
# 717, -364, 717, -362, 720, -362, 719, -360, 717, -365, 717,
# -362, 717, -362, 362, -717, 719, -363, 719, -362, 718, -361,
# 360, -717, 364, -717, 720, -362, 718, -363, 718, -362, 362,
# -717, 366, -713, 364, -715, 365, -715, 364, -717, 722, -362,
# 359, -717, 720, -368, 356, -717, 722, -360, 362, -717, 719,
# -362, 360, -718, 721, -362, 366, -713, 722
# ]
# - platform: remote_receiver
# name: "RF1 Store Balcon DOWN"
# raw:
# code: [
# 719, -363, 359, -718, 718, -364, 361, -715, 364, -716, 720, -361,
# 361, -716, 718, -365, 712, -364, 715, -362, 717, -362, 715, -360, 717, -363,
# 716, -362, 718, -359, 359, -718, 717, -362, 717, -362, 715, -362, 359, -717,
# 365, -715, 719, -362, 715, -364, 715, -364, 360, -717, 362, -715, 364, -715,
# 364, -715, 362, -717, 720, -363, 359, -717, 719, -362, 362, -715, 364, -715,
# 719, -363, 714, -362, 360, -720, 359, -716, 718, -362, 715
# ]