annotate espNode/bed.yaml @ 1702:ac1ae0c21bb0

formatting
author drewp@bigasterisk.com
date Sat, 23 Oct 2021 13:14:07 -0700
parents bc3516d02762
children 5eac87c0f5b6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
1 # https://cdn.hackaday.io/files/269911154782944/Heltec_WIFI-LoRa-32_DiagramPinout.jpg
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
2
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
3 esphome:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
4 name: bed
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
5 platform: ESP32
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
6 board: lolin32
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
7 build_path: build
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
8
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
9 wifi:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
10 ssid: !secret wifi_ssid
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
11 password: !secret wifi_password
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
12 domain: ''
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
13 use_address: 10.2.0.90 # not stable!
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
14
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
15 mqtt:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
16 broker: '10.2.0.1'
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
17 port: 1883
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
18 username: ''
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
19 password: ''
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
20
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
21 logger:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
22 baud_rate: 115200
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
23 level: DEBUG
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
24
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
25 ota:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
26
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
27 #dallas:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
28 # - pin: GPIO16
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
29 #sensor:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
30 # - platform: dallas
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
31 # index: 0
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
32 # name: temperature
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
33
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
34 switch:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
35 - {platform: gpio, pin: {mode: INPUT_PULLUP, number: 2, inverted: yes}, name: red_button}
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
36 - {platform: gpio, pin: {mode: INPUT_PULLUP, number: 15, inverted: yes}, name: green_button}
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
37 - {platform: gpio, pin: GPIO16, name: pir}
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
38
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
39 output:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
40 - {platform: ledc, pin: GPIO19, id: headboard_w }
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
41 - {platform: ledc, pin: GPIO23, id: headboard_r }
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
42 - {platform: ledc, pin: GPIO18, id: headboard_g }
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
43 - {platform: ledc, pin: GPIO17, id: headboard_b }
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
44
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
45 light:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
46 - platform: rgbw
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
47 name: headboard
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
48 red: headboard_r
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
49 green: headboard_g
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
50 blue: headboard_b
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
51 white: headboard_w
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
52
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
53
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
54 i2c:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
55 sda: 4
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
56 scl: 15
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
57
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
58 font:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
59 - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
60 id: font_vera
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
61 size: 12
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
62 glyphs: "+-_.:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
63
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
64 text_sensor:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
65 - platform: wifi_info
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
66 ip_address:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
67 name: wifi_ip
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
68 id: wifi_ip
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
69 ssid:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
70 name: wifi_ssid
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
71 bssid:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
72 name: wifi_bssid
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
73
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
74 sensor:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
75 - platform: wifi_signal
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
76 id: my_wifi_signal
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
77 name: wifi_signal
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
78 update_interval: 4s
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
79 internal: true # no mqtt
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
80
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
81 display:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
82 - platform: ssd1306_i2c
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
83 model: "SSD1306 128x64"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
84 reset_pin: 16
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
85 address: 0x3C
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
86 lambda: |-
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
87 it.print(0, 0, id(font_vera), "bed 2: running");
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
88 it.printf(0, 20, id(font_vera), "wifi %s %.2f", id(wifi_ip).state.c_str(), id(my_wifi_signal).state);
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
89