annotate espNode/bed.yaml @ 1739:28a3e35bc23f

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