Skip to content

Commit 565ffcf

Browse files
committed
esphome
1 parent 185f157 commit 565ffcf

File tree

4 files changed

+115
-0
lines changed

4 files changed

+115
-0
lines changed

esphome/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
secrets.yaml

esphome/docker-compose.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: '3'
2+
services:
3+
esphome:
4+
container_name: esphome
5+
# https://github.com/esphome/esphome/pkgs/container/esphome/versions?filters%5Bversion_type%5D=tagged
6+
# https://github.com/esphome/esphome/pkgs/container/esphome/133688491?tag=stable
7+
image: ghcr.io/esphome/esphome:2023.9
8+
volumes:
9+
- /home/craig/apps/esphome/config:/config
10+
# - /etc/localtime:/etc/localtime:ro
11+
restart: always
12+
privileged: true
13+
network_mode: host
14+
environment:
15+
- TZ=Pacific/Auckland
16+
- USERNAME=craig
17+
- PASSWORD=rei1EeLapook

esphome/humidity.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# https://esphome.io/guides/configuration-types#substitutions
2+
3+
esphome:
4+
name: humidity
5+
project:
6+
name: ringerc.humidity
7+
version: "1.0.0"
8+
9+
rp2040:
10+
board: rpipicow
11+
framework:
12+
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
13+
14+
i2c:
15+
16+
sensor:
17+
- platform: bme280
18+
temperature:
19+
name: "BME280 Temperature"
20+
oversampling: 16x
21+
pressure:
22+
name: "BME280 Pressure"
23+
humidity:
24+
name: "BME280 Humidity"
25+
# could be 0x76
26+
address: 0x76
27+
update_interval: 60s
28+
29+
# rpi pico GPIO29 reads VSYS/3
30+
- platform: adc
31+
# The voltage is read from GPIO29
32+
# https://esphome.io/api/adc__sensor_8cpp_source.html
33+
# guards conflicts between it and the wifi by looking for PICO_VSYS_PIN (defined as 29)
34+
# https://github.com/raspberrypi/pico-sdk/blob/6a7db34ff63345a7badec79ebea3aaef1712f374/src/boards/include/boards/pico.h#L92
35+
pin: 29
36+
name: "VSYS"
37+
update_interval: 60s
38+
39+
#status_led:
40+
# pin: GPIO25
41+
42+
deep_sleep:
43+
run_duration: 1min
44+
sleep_duration: 1min
45+
46+
binary_sensor:
47+
- platform: status
48+
name: "Humidity status"
49+
50+
# switch to this once home assistant installed
51+
#time:
52+
# - platform: homeassistant
53+
# id: homeassistant_time
54+
55+
time:
56+
- platform: sntp
57+
id: sntp_time
58+
timezone: Pacific/Auckland
59+
60+
# apparently not yet ported to pi pico?
61+
#mqtt:
62+
# broker: raspberrypi.fritz.box
63+
# username: esphome_humidity
64+
# password: !secret mqtt_password
65+
# reboot_timeout: 0s
66+
67+
# rpi pico GPIO24 senses VBUS (high if VBUS present)
68+
# rpi pico GPIO23 OP Controls the on-board SMPS Power Save pin - pull high to disable
69+
# TODO should use "SLEEP" mode
70+
71+
# Enable logging
72+
# https://esphome.io/components/logger#log-levels
73+
logger:
74+
level: DEBUG
75+
76+
# Enable Home Assistant API
77+
api:
78+
encryption:
79+
key: !secret homeassistant_encryption
80+
reboot_timeout: 0s
81+
82+
ota:
83+
password: !secret ota_password
84+
85+
wifi:
86+
ssid: !secret wifi_ssid
87+
password: !secret wifi_password
88+
89+
#captive_portal:
90+
91+
preferences:
92+
flash_write_interval: 5min

esphome/secrets-tmpl.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
wifi_ssid: ssid
2+
wifi_password: pw
3+
ota_password: pw2
4+
mqtt_password: pw3
5+
homeassistant_encryption: pw4

0 commit comments

Comments
 (0)