Mercurial > code > home > repos > homeauto
annotate espNode/rf_switch_desk.yaml @ 1705:250f4c27d56f
less logging
author | drewp@bigasterisk.com |
---|---|
date | Sat, 23 Oct 2021 13:21:06 -0700 |
parents | 33747dcf57ea |
children | c480732442ec |
rev | line source |
---|---|
1701 | 1 # facing the receiver board, |
2 # pins: 3v3 | (cs) | D15 | gnd | |
3 | |
4 | |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
5 esphome: |
1701 | 6 name: rf_switch_desk |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
7 platform: esp32 |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
8 board: lolin32 |
1701 | 9 |
10 | |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
11 logger: |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
12 baud_rate: 115200 |
1705 | 13 level: INFO |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
14 |
1701 | 15 |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
16 wifi: |
1701 | 17 networks: |
18 - ssid: !secret wifi_ssid | |
19 password: !secret wifi_password | |
20 | |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
21 |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
22 ota: |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
23 |
1701 | 24 |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
25 mqtt: |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
26 broker: '10.2.0.1' |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
27 port: 1883 |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
28 username: '' |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
29 password: '' |
1701 | 30 |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
31 |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
32 remote_receiver: |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
33 - id: rf_in |
1701 | 34 pin: |
35 number: GPIO15 | |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
36 tolerance: 20% |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
37 filter: 250us |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
38 idle: 8ms |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
39 dump: rc_switch |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
40 on_rc_switch: |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
41 then: |
1701 | 42 # - logger.log: |
43 # level: INFO | |
44 # tag: out | |
45 # format: "RF read; proto %d; code %08llx" | |
46 # args: [x.protocol, x.code] | |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
47 - mqtt.publish_json: |
1701 | 48 topic: rf_switch_desk/rf_received |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
49 payload: !lambda |- |
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
50 root["protocol"] = x.protocol; |
1701 | 51 root["code0"] = static_cast<unsigned long>(x.code >> 32); |
804
771f19d632f6
working receiver for 433mhz wall switches
drewp@bigasterisk.com
parents:
diff
changeset
|
52 root["code1"] = static_cast<unsigned long>(x.code & 0xffff); |