1717
|
1 # reusable for all ESP32-CAM programmed over ESP32-CAM-MB
|
|
2
|
|
3 # mosquitto_sub -v -t cam0/status
|
|
4
|
|
5 # bang(pts/15):/my/proj/homeauto/espNode% catchsegv ./readcam.py --cam office_back_cam --port 10021
|
|
6
|
|
7 esphome:
|
|
8 name: $name
|
|
9 platform: ESP32
|
|
10 board: esp32cam
|
|
11 build_path: $build_path
|
1718
|
12 includes:
|
|
13 - component/cam.h
|
1717
|
14
|
|
15 wifi:
|
|
16 ssid: !secret wifi_ssid
|
|
17 password: !secret wifi_password
|
|
18 domain: ''
|
|
19 manual_ip:
|
|
20 static_ip: $addr
|
|
21 gateway: 10.2.0.3
|
|
22 subnet: 255.255.0.0
|
|
23
|
|
24 mqtt:
|
|
25 broker: '10.2.0.1'
|
|
26 port: 1883
|
|
27 username: ''
|
|
28 password: ''
|
|
29
|
|
30 logger:
|
|
31 baud_rate: 115200
|
|
32 level: DEBUG
|
|
33
|
|
34 ota:
|
|
35
|
|
36 light:
|
|
37 - platform: monochromatic
|
|
38 name: "flash"
|
|
39 output: flash_out
|
|
40 default_transition_length: 0s
|
|
41
|
|
42 output:
|
|
43 - platform: ledc
|
|
44 id: flash_out
|
|
45 pin: GPIO4
|
|
46 frequency: 19531Hz
|
1718
|
47 channel: 4
|
|
48
|
|
49
|
|
50 custom_component:
|
|
51 - lambda: |-
|
|
52 auto camc = new esphome::CamComponent();
|
|
53 // App.register_component(camc);
|
|
54 return {camc};
|
|
55
|
1740
|
56
|
|
57 # ffplay -i http://10.2.0.22:81/stream -vf hqdn3d=luma_spatial=0:chroma_spatial=50:luma_tmp=10:chroma_tmp=10
|
|
58
|
|
59 # maybe this first:
|
|
60 # vaguedenoiser=threshold=5
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66 # # https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
|
|
67 # esp32_camera:
|
|
68 # external_clock:
|
|
69 # pin: GPIO0
|
|
70 # frequency: 20MHz
|
|
71 # i2c_pins:
|
|
72 # sda: GPIO26
|
|
73 # scl: GPIO27
|
|
74 # data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
|
|
75 # vsync_pin: GPIO25
|
|
76 # href_pin: GPIO23
|
|
77 # pixel_clock_pin: GPIO22
|
|
78 # power_down_pin: GPIO32
|
|
79
|
|
80 # name: camera
|
|
81
|
|
82 # # https://github.com/esphome/esphome/blob/dev/esphome/components/esp32_camera/esp32_camera.cpp#L265 says a 'stream' is 5 sec long
|
|
83
|
|
84 # # setting to 5 causes 'Setup Failed: ERROR'
|
|
85 # # max_framerate: 4 fps
|
|
86 # # https://github.com/raphaelbs/esp32-cam-ai-thinker#capabilities says camera
|
|
87 # # is likely ov2640 with these native resolutions:
|
|
88 # # uxga=1600x1200 svga=800x600 cif=400x296
|
|
89
|
|
90 # # 160x120 (QQVGA) 'Got invalid frame', then no more
|
|
91 # # 128x160 (QQVGA2)
|
|
92 # # 176x144 (QCIF) fps: 25 jpg: 20 img: 2KB burst of frames then stopped.
|
|
93 # # fps: 20 jpg: 20 no frames
|
|
94 # # 240x176 (HQVGA)
|
|
95 # # 320x240 (QVGA) fps: 10 jpg: 20 some frames, 4.5KB
|
|
96 # # 400x296 (CIF)
|
|
97 # # 640x480 (VGA) fps: 4 jpg: 10 works, 20KB
|
|
98 # # 800x600 (SVGA)
|
|
99 # # 1024x768 (XGA)
|
|
100 # # 1280x1024 (SXGA) fps: 1 works
|
|
101 # # 1600x1200 (UXGA)
|
|
102
|
|
103 # resolution: 320x240
|
|
104
|
|
105 # # 10 to 63. default=10. higher is
|
|
106 # # worse. https://github.com/esphome/esphome/blob/6682c43dfaeb1c006943ae546145e5f22262cadb/esphome/components/esp32_camera/__init__.py#L84
|
|
107 # # sets the lower limit to 10, but
|
|
108 # # https://github.com/raphaelbs/esp32-cam-ai-thinker/blob/master/components/ov2640/sensors/ov2640.c#L345
|
|
109 # # suggests that it might be 0 (for an ov2640, anyway).
|
|
110 # # jpeg_quality: 10
|
|
111
|
|
112 # esp32_camera_web_server:
|
|
113 # - {port: 8000, mode: stream}
|
|
114 # - {port: 8001, mode: snapshot}
|