annotate espNode/component/cam.h @ 1718:82213d91471c

new cam component with http server
author drewp@bigasterisk.com
date Sun, 07 Aug 2022 04:43:47 -0700
parents
children c77b5ab7b99d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1718
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
1 #pragma once
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
2
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
3 #include <Arduino.h>
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
4 #include <WiFi.h>
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
5
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
6 #include "esp_camera.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
7 #include "esp_http_server.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
8 #include "esp_timer.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
9 #include "esphome.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
10 #include "esphome/core/component.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
11 #include "esphome/core/log.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
12 #include "img_converters.h"
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
13
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
14 namespace esphome {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
15 // #elif defined(CAMERA_MODEL_AI_THINKER)
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
16 #define PWDN_GPIO_NUM 32
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
17 #define RESET_GPIO_NUM -1
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
18 #define XCLK_GPIO_NUM 0
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
19 #define SIOD_GPIO_NUM 26
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
20 #define SIOC_GPIO_NUM 27
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
21
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
22 #define Y9_GPIO_NUM 35
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
23 #define Y8_GPIO_NUM 34
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
24 #define Y7_GPIO_NUM 39
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
25 #define Y6_GPIO_NUM 36
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
26 #define Y5_GPIO_NUM 21
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
27 #define Y4_GPIO_NUM 19
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
28 #define Y3_GPIO_NUM 18
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
29 #define Y2_GPIO_NUM 5
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
30 #define VSYNC_GPIO_NUM 25
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
31 #define HREF_GPIO_NUM 23
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
32 #define PCLK_GPIO_NUM 22
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
33
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
34 static const char *TAG = "cam";
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
35
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
36 typedef struct {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
37 httpd_req_t *req;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
38 size_t len;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
39 } jpg_chunking_t;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
40
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
41 class CamComponent : public Component {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
42 public:
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
43 float get_setup_priority() const override {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
44 return esphome::setup_priority::AFTER_CONNECTION;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
45 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
46
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
47 void setup() override {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
48 ESP_LOGD(TAG, "setup");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
49 camera_config_t config;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
50 config.ledc_channel = LEDC_CHANNEL_0;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
51 config.ledc_timer = LEDC_TIMER_0;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
52 config.pin_d0 = Y2_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
53 config.pin_d1 = Y3_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
54 config.pin_d2 = Y4_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
55 config.pin_d3 = Y5_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
56 config.pin_d4 = Y6_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
57 config.pin_d5 = Y7_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
58 config.pin_d6 = Y8_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
59 config.pin_d7 = Y9_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
60 config.pin_xclk = XCLK_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
61 config.pin_pclk = PCLK_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
62 config.pin_vsync = VSYNC_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
63 config.pin_href = HREF_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
64 config.pin_sscb_sda = SIOD_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
65 config.pin_sscb_scl = SIOC_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
66 config.pin_pwdn = PWDN_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
67 config.pin_reset = RESET_GPIO_NUM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
68 config.xclk_freq_hz = 20000000;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
69 config.frame_size = FRAMESIZE_QVGA;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
70 config.pixel_format = PIXFORMAT_JPEG; // for streaming
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
71 // config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
72 // config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
73 // config.fb_location = CAMERA_FB_IN_PSRAM;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
74 config.jpeg_quality = 12;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
75 config.fb_count = 1;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
76
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
77 if (psramFound()) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
78 config.jpeg_quality = 10;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
79 config.fb_count = 2;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
80 // config.grab_mode = CAMERA_GRAB_LATEST;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
81 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
82
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
83 ESP_LOGD(TAG, "camera init");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
84 esp_err_t err = esp_camera_init(&config);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
85 if (err != ESP_OK) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
86 Serial.printf("Camera init failed with error 0x%x", err);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
87 return;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
88 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
89
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
90 startCameraServer();
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
91 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
92
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
93 static size_t jpg_encode_stream(void *arg, size_t index, const void *data,
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
94 size_t len) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
95 jpg_chunking_t *j = (jpg_chunking_t *)arg;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
96 if (!index) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
97 j->len = 0;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
98 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
99 if (httpd_resp_send_chunk(j->req, (const char *)data, len) != ESP_OK) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
100 return 0;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
101 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
102 j->len += len;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
103 return len;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
104 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
105
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
106 static esp_err_t capture_handler(httpd_req_t *req) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
107 camera_fb_t *fb = NULL;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
108 esp_err_t res = ESP_OK;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
109 int64_t fr_start = esp_timer_get_time();
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
110
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
111 fb = esp_camera_fb_get();
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
112
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
113 if (!fb) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
114 ESP_LOGE(TAG, "Camera capture failed");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
115 httpd_resp_send_500(req);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
116 return ESP_FAIL;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
117 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
118
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
119 httpd_resp_set_type(req, "image/jpeg");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
120 httpd_resp_set_hdr(req, "Content-Disposition",
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
121 "inline; filename=capture.jpg");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
122 httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
123
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
124 char ts[32];
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
125 snprintf(ts, 32, "%ld.%06ld", fb->timestamp.tv_sec, fb->timestamp.tv_usec);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
126 httpd_resp_set_hdr(req, "X-Timestamp", (const char *)ts);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
127
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
128 size_t fb_len = 0;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
129 if (fb->format == PIXFORMAT_JPEG) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
130 fb_len = fb->len;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
131 res = httpd_resp_send(req, (const char *)fb->buf, fb->len);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
132 } else {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
133 jpg_chunking_t jchunk = {req, 0};
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
134 res =
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
135 frame2jpg_cb(fb, 80, jpg_encode_stream, &jchunk) ? ESP_OK : ESP_FAIL;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
136 httpd_resp_send_chunk(req, NULL, 0);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
137 fb_len = jchunk.len;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
138 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
139 esp_camera_fb_return(fb);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
140 int64_t fr_end = esp_timer_get_time();
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
141 ESP_LOGI(TAG, "JPG: %uB %ums", (uint32_t)(fb_len),
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
142 (uint32_t)((fr_end - fr_start) / 1000));
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
143 return res;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
144 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
145
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
146 void startCameraServer() {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
147 ESP_LOGD(TAG, "startCameraServer");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
148 httpd_config_t config = HTTPD_DEFAULT_CONFIG();
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
149 config.server_port = 8000;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
150 config.max_uri_handlers = 16;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
151
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
152 httpd_uri_t capture_uri = {.uri = "/capture",
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
153 .method = HTTP_GET,
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
154 .handler = capture_handler,
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
155 .user_ctx = NULL};
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
156
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
157 // httpd_uri_t stream_uri = {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
158 // .uri = "/stream",
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
159 // .method = HTTP_GET,
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
160 // .handler = stream_handler,
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
161 // .user_ctx = NULL
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
162 // };
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
163
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
164 // ra_filter_init(&ra_filter, 20);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
165 ESP_LOGCONFIG(TAG, "startCameraServer2");
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
166
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
167 ESP_LOGI(TAG, "Starting web server on port: '%d'", config.server_port);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
168 httpd_handle_t camera_httpd = NULL;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
169 if (httpd_start(&camera_httpd, &config) == ESP_OK) {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
170 // httpd_register_uri_handler(camera_httpd, &index_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
171 // httpd_register_uri_handler(camera_httpd, &cmd_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
172 // httpd_register_uri_handler(camera_httpd, &status_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
173 httpd_register_uri_handler(camera_httpd, &capture_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
174 // httpd_register_uri_handler(camera_httpd, &bmp_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
175
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
176 // httpd_register_uri_handler(camera_httpd, &xclk_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
177 // httpd_register_uri_handler(camera_httpd, &reg_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
178 // httpd_register_uri_handler(camera_httpd, &greg_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
179 // httpd_register_uri_handler(camera_httpd, &pll_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
180 // httpd_register_uri_handler(camera_httpd, &win_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
181 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
182
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
183 // config.server_port += 1;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
184 // config.ctrl_port += 1;
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
185 // ESP_LOGI(TAG, "Starting stream server on port: '%d'",
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
186 // config.server_port); if (httpd_start(&stream_httpd, &config) == ESP_OK)
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
187 // {
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
188 // httpd_register_uri_handler(stream_httpd, &stream_uri);
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
189 // }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
190 }
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
191
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
192 void loop() override {}
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
193 };
82213d91471c new cam component with http server
drewp@bigasterisk.com
parents:
diff changeset
194 } // namespace esphome