-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgarage_pir_camera.yaml
73 lines (62 loc) · 1.45 KB
/
garage_pir_camera.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
esphome:
name: garage_pir_camera
platform: ESP32
board: esp-wrover-kit
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_psk
use_address: 192.168.5.188
api:
logger:
ota:
binary_sensor:
- platform: gpio
pin: GPIO33
name: Garage Camera Motion
id: pir
device_class: motion
on_state:
then:
- component.update: camera_display
esp32_camera:
name: Garage PIR Camera
external_clock:
pin: GPIO32
frequency: 20MHz
i2c_pins:
sda: GPIO13
scl: GPIO12
data_pins: [GPIO5, GPIO14, GPIO4, GPIO15, GPIO18, GPIO23, GPIO36, GPIO39]
vsync_pin: GPIO27
href_pin: GPIO25
pixel_clock_pin: GPIO19
power_down_pin: GPIO26
resolution: 800x600
jpeg_quality: 10
vertical_flip: false
horizontal_mirror: false
i2c:
sda: GPIO21
scl: GPIO22
font:
- file: "Arial.ttf"
id: arial_font
size: 14
time:
- platform: homeassistant
id: homeassistant_time
text_sensor:
- platform: template
id: ip_address
lambda: 'return {WiFi.localIP().toString().c_str()};'
display:
- platform: ssd1306_i2c
id: camera_display
model: "SSD1306 128x64"
address: 0x3C
lambda: |-
it.printf(64, 0, id(arial_font), TextAlign::TOP_CENTER, "%s", id(ip_address).state.c_str());
if (id(pir).state) {
it.printf(64, 32, id(arial_font), TextAlign::CENTER, "%s", "MOTION");
}
it.strftime(64, 64, id(arial_font), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time).now());