annotate espNode/bed.yaml @ 1737:c480732442ec

reformat
author drewp@bigasterisk.com
date Fri, 01 Sep 2023 17:10:47 -0700
parents 5eac87c0f5b6
children 28a3e35bc23f
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
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
8 wifi:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
9 ssid: !secret wifi_ssid
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
10 password: !secret wifi_password
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
11 domain: ''
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
12
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
13 mqtt:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
14 broker: '10.2.0.1'
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
15 port: 1883
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
16 username: ''
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
17 password: ''
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
18
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
19 logger:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
20 baud_rate: 115200
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
21 level: DEBUG
1737
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
22
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
23 ota:
1737
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
24
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
25 #dallas:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
26 # - pin: GPIO16
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
27 #sensor:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
28 # - platform: dallas
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
29 # index: 0
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
30 # name: temperature
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
31
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
32 switch:
1737
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
33 - { platform: gpio, pin: { mode: INPUT_PULLUP, number: 2, inverted: yes }, name: red_button }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
34 - { platform: gpio, pin: { mode: INPUT_PULLUP, number: 15, inverted: yes }, name: green_button }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
35 - { platform: gpio, pin: GPIO16, name: pir }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
36
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
37 output:
1737
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
38 - { platform: ledc, pin: GPIO19, id: headboard_w }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
39 - { platform: ledc, pin: GPIO23, id: headboard_r }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
40 - { platform: ledc, pin: GPIO18, id: headboard_g }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
41 - { platform: ledc, pin: GPIO17, id: headboard_b }
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
42
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
43 light:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
44 - platform: rgbw
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
45 name: headboard
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
46 red: headboard_r
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
47 green: headboard_g
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
48 blue: headboard_b
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
49 white: headboard_w
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
50
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
51 i2c:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
52 sda: 4
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
53 scl: 15
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
54
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
55 font:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
56 - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
57 id: font_vera
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
58 size: 12
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
59 glyphs: "+-_.:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
60
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
61 text_sensor:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
62 - platform: wifi_info
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
63 ip_address:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
64 name: wifi_ip
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
65 id: wifi_ip
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
66 ssid:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
67 name: wifi_ssid
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
68 bssid:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
69 name: wifi_bssid
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
70
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
71 sensor:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
72 - platform: wifi_signal
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
73 id: my_wifi_signal
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
74 name: wifi_signal
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
75 update_interval: 4s
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
76 internal: true # no mqtt
1737
c480732442ec reformat
drewp@bigasterisk.com
parents: 1735
diff changeset
77
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
78 display:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
79 - platform: ssd1306_i2c
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
80 model: "SSD1306 128x64"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
81 reset_pin: 16
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
82 address: 0x3C
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
83 lambda: |-
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
84 it.print(0, 0, id(font_vera), "bed 2: running");
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents:
diff changeset
85 it.printf(0, 20, id(font_vera), "wifi %s %.2f", id(wifi_ip).state.c_str(), id(my_wifi_signal).state);