-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathesp32-cc1101-udp-example.yaml
74 lines (62 loc) · 7.12 KB
/
esp32-cc1101-udp-example.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
packages:
esp32-cc1101: !include esp32-cc1101.yaml
esphome:
name: esp32-cc1101-udp
friendly_name: ESP32 cc1101 udp dump example
wifi:
ssid: !secret wifi_name
password: !secret wifi_pass
fast_connect: true
esp32:
board: esp32dev
framework:
# change as necessary - i find esp-idf a little less erratic
type: esp-idf
# type: arduino
logger:
# level: VERBOSE
level: INFO
captive_portal:
web_server:
port: 80
udp_broadcast:
port: 5009
id: udpbc
remote_receiver:
- id: !extend rf_receiver
# UDP broadcast ook pulse data that rtl_433 can decode as input for debugging
#
# on the receive side:
# socat -u UDP4-RECV:5009 STDOUT | rtl_433 -r ook:-
on_raw:
then:
- lambda: |-
int rawcount=x.size();
if (rawcount<10) return; // ignore noise
char buffer[512];
int j=0;
char* bufp=buffer;
while (j<rawcount) {
if (x[j]>0) {
bufp+=sprintf(bufp,"%d %d\n",x[j],(j<rawcount-1) && (x[j+1]<0) ? -x[j+1] : 10000);
++j;
}
++j;
if ((bufp-buffer)>490) {
id(udpbc).send_data(buffer,bufp-buffer);
bufp=buffer;
}
}
bufp+=sprintf(bufp,";end\n");
id(udpbc).send_data(buffer,bufp-buffer);
button:
- platform: template
name: "Govee Leak Detector Test Button Press"
on_press:
- logger.log:
format: "Press govee"
level: INFO
- remote_transmitter.transmit_raw:
transmitter_id: rf_transmitter
# prettier-ignore
code: [1385,-820,805,-2849,290,-8618,283,-817,324,-799,305,-800,857,-276,270,-828,288,-834,842,-272,299,-827,838,-268,304,-824,287,-828,833,-273,293,-818,843,-282,822,-291,847,-252,293,-843,273,-823,839,-292,846,-279,268,-844,270,-821,293,-843,274,-818,293,-845,824,-281,291,-845,827,-262,294,-844,829,-270,284,-823,299,-809,299,-851,268,-824,269,-857,841,-269,842,-275,293,-818,864,-267,286,-801,860,-291,265,-823,296,-834,835,-272,289,-816,297,-840,825,-297,267,-1940,293,-8616,330,-799,291,-813,293,-831,842,-270,296,-816,291,-822,855,-284,274,-810,866,-265,276,-829,292,-825,842,-270,294,-820,843,-283,861,-248,844,-290,279,-818,285,-822,856,-268,853,-268,302,-805,309,-801,301,-832,289,-832,288,-812,842,-290,287,-811,838,-290,287,-811,840,-291,288,-812,290,-858,268,-814,290,-833,301,-818,828,-294,835,-264,286,-854,813,-290,262,-854,839,-262,284,-838,292,-823,862,-261,295,-818,268,-850,826,-274,291,-1949,281,-8611,355,-796,264,-824,318,-820,818,-285,312,-816,281,-848,825,-265,274,-851,847,-241,308,-824,290,-815,842,-296,291,-809,844,-293,844,-243,863,-266,275,-831,293,-824,839,-275,866,-263,276,-842,272,-849,264,-840,268,-851,270,-836,842,-291,273,-814,870,-265,274,-830,867,-265,261,-829,289,-835,291,-815,290,-836,294,-813,858,-269,834,-267,311,-809,841,-266,309,-810,842,-268,307,-814,293,-822,841,-274,293,-848,267,-839,836,-271,303,-4056,293,-8608,325,-805,287,-836,268,-846,846,-261,293,-821,299,-815,858,-244,308,-824,845,-270,293,-826,282,-824,839,-291,273,-840,817,-294,843,-273,842,-293,270,-815,290,-848,840,-251,845,-288,272,-839,268,-846,292,-820,298,-815,293,-821,866,-264,276,-811,866,-267,274,-831,866,-267,277,-827,290,-825,290,-813,291,-833,293,-819,869,-252,834,-284,268,-844,850,-262,319,-795,851,-261,309,-814,283,-823,851,-275,288,-812,317,-799,838,-293,280,-1971,266,-8637,293,-802,288,-848,290,-807,866,-267,281,-815,279,-858,817,-273,292,-846,821,-283,268,-845,272,-823,866,-254,312,-796,866,-281,835,-262,855,-266,311,-790,291,-847,831,-264,856,-268,304,-802,297,-832,293,-827,294,-832,271,-821,866,-252,293,-820,842,-286,292,-820,851,-262,291,-846,278,-829,289,-818,301,-820,269,-843,846,-265,856,-270,274,-822,874,-248,291,-833,860,-250,295,-820,265,-846,832,-291,273,-837,294,-821,866,-262,266,-1949,291,-8631,299,-797,320,-805,299,-806,864,-266,293,-822,287,-828,834,-291,273,-844,837,-269,295,-815,287,-834,843,-280,292,-819,851,-262,861,-247,845,-292,265,-848,278,-823,849,-269,842,-290,265,-848,278,-825,297,-813,299,-823,268,-848,850,-254,293,-849,826,-261,291,-823,854,-264,292,-822,300,-827,289,-821,296,-798,319,-819,825,-283,858,-247,295,-825,857,-269,274,-823,857,-272,299,-850,266,-813,842,-294,271,-830,290,-825,841,-274,293,-1947,293,-8607,290,-847,275,-822,266,-868,813,-290,274,-838,291,-820,865,-260,292,-798,864,-294,265,-818,273,-846,832,-275,317,-823,828,-272,850,-264,851,-243,331,-816,267,-841,842,-292,819,-295,293,-793,292,-840,288,-818,284,-851,265,-831,841,-293,271,-827,840,-293,271,-830,863,-268,274,-827,288,-826,292,-811,292,-849,268,-842,840,-295,818,-270,269,-844,843,-255,293,-844,832,-277,292,-844,277,-823,838,-275,291,-811,290,-847,831,-264,315,-1916,316,-8617,297,-808,277,-841,293,-821,835,-297,292,-792,293,-838,833,-267,306,-828,834,-273,294,-843,271,-819,868,-264,275,-817,869,-268,844,-272,839,-292,271,-812,291,-851,816,-275,867,-264,274,-813,292,-847,293,-818,290,-836,269,-822,867,-262,276,-838,850,-255,288,-838,838,-275,293,-808,312,-810,291,-833,288,-840,265,-831,845,-291,831,-271,306,-801,845,-290,292,-823,811,-300,286,-815,284,-845,825,-270,302,-824,291,-834,846,-271,270,-1981,276,-8618,325,-779,335,-814,288,-801,851,-290,293,-795,315,-817,842,-268,297,-812,842,-268,301,-833,289,-845,823,-265,293,-848,814,-285,841,-274,844,-260,292,-845,277,-823,864,-247,848,-287,265,-848,279,-824,293,-819,300,-821,269,-843,848,-262,291,-845,832,-259,291,-847,829,-264,291,-852,274,-821,267,-844,296,-822,293,-822,822,-285,856,-269,276,-827,863,-269,297,-815,837,-287,293,-791,317,-832,811,-294,293,-814,292,-845,834,-263,276,-1967,267,-8638,300,-825,292,-817,298,-830,813,-275,294,-843,270,-821,867,-264,274,-816,867,-295,245,-831,293,-855,809,-274,293,-844,819,-283,860,-254,839,-288,280,-820,285,-824,858,-268,859,-260,279,-845,261,-822,307,-821,282,-848,274,-844,815,-318,267,-825,845,-289,272,-823,841,-290,263,-833,287,-834,291,-815,290,-833,273,-839,863,-248,843,-268,288,-846,831,-264,292,-847,833,-260,290,-845,280,-822,838,-274,291,-825,289,-821,856,-259,292,-1947,301,-8595,324,-818,261,-833,317,-818,840,-277,286,-817,281,-819,839,-285,293,-793,868,-264,292,-822,846,-292,278,-812,307,-823,265,-830,317,-818,266,-840,844,-265,847,-271,318,-815,821,-308,265,-825,846,-289,278,-812,284,-849,824,-268,304,-823,289,-814,844,-293,272,-1955,291,-8605,325,-801,264,-857,294,-793,866,-283,293,-796,291,-847,824,-284,259,-863,838,-255,283,-845,293,-798,869,-291,255,-834,857,-268,824,-269,877,-269,273,-824,313,-816,838,-250,864,-264,293,-833,289,-812,293,-847,267,-839,270,-847,840,-253,294,-843,823,-284,292,-821,850,-263,292,-820,301,-810,275,-843,319,-794,289,-837,841,-267,872,-252,295,-819,866,-262,268,-819,867,-265,292,-822,269,-848,830,-264,296,-849,278,-813,861,-268,278,-1967,265,-8616,317,-829,292,-810,293,-848,839,-250,294,-843,269,-820,840,-292,296,-820,843,-262,289,-821,294,-846,819,-285,293,-818,848,-262,858,-268,826,-293,291,-824,282,-834,852,-271,833,-269,278,-841,291,-825,270,-851,291,-810,291,-837,839,-264,297,-822,847,-268,298,-811,842,-266,309,-812,290,-809,312,-838,261,-863,287,-808,837,-295,840,-263,275,-838,837,-263,286,-847,830,-274,291,-835,297,-821,840,-294,274,-820,289,-824,844,-268,286]