Skip to content

Commit 84b55ba

Browse files
authored
No face (#117)
* RemoveFace recognition, add basic OTA * Document new IDE board selection * #120 Correctly free boxes * Disable WiFi Powersave for better responsiveness (#123) * #116 OTA Password * Force correct partition table for PlatformIO * Readme notes regarding the 3.x branch * Cleanup unused vars
1 parent b03317e commit 84b55ba

15 files changed

+121
-625
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_script:
2828
script:
2929
- cd $TRAVIS_BUILD_DIR
3030
- export PATH="$HOME/arduino_ide:$PATH"
31-
- arduino --board esp32:esp32:esp32:PartitionScheme=huge_app,FlashFreq=80 --pref compiler.warning_level=all --save-prefs
31+
- arduino --board esp32:esp32:esp32:PartitionScheme=default,FlashFreq=80 --pref compiler.warning_level=all --save-prefs
3232
- arduino --verbose --verify esp32-cam-webserver.ino
3333
- cp --preserve --verbose myconfig.sample.h myconfig.h
3434
- arduino --verbose --verify esp32-cam-webserver.ino

Docs/ota-board-selection-small.png

138 KB
Loading
164 KB
Loading

Docs/ota-board-selection.png

162 KB
Loading

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ But expanded with:
1010
* Save and restore settings
1111
* Control of on-board lamps, rotate the view in the browser
1212
* Dedicated standalone stream viewer
13+
* Over The Air firmware updates
1314
* Lots of minor fixes and tweaks, documentation etc.
1415

16+
And 'reduced' by removing the Face Recognition features
17+
* **If you want to try the Face Recognition features** please use the [`3.x` maintenance branch](https://github.com/easytarget/esp32-cam-webserver/tree/3.x), which still recieves bugfixes, but is not reciving any further development.
18+
* They were a demo, only worked in low resolution modes, did not preserve the face database between power cycles, and were of little use in real-world applications.
19+
* There are other (specialised) sketches for the ESP-CAM that do use face recognitioni more effectively, if this is your thing :-)
20+
1521
The original example is a bit incomprehensible and hard to modify as supplied. It is very focused on showing off the face recognition capabilities, and forgets the 'webcam' part.
1622
* There are many other variants of a webcam server for these modules online, but most are created for a specific scenario and not good for general, casual, webcam use.
1723

@@ -41,8 +47,6 @@ The ESP itself is susceptable to the usual list of WiFi problems, not helped by
4147

4248
A basic limitation of the sketch is that it can can only support one stream at a time. If you try to connect to a cam that is already streaming (or attempting to stream) you will get no response and, eventually, a timeout. The stream itself is a [MJPEG stream](https://en.wikipedia.org/wiki/Motion_JPEG), which relies on the client (the web browser) to hold the connection open and request each new frame in turn via javascript. This can cause errors when browsers run into Javascript or caching problem, fail to request new frames or refuse to close the connection.
4349

44-
Another known issue is that if you are streaming with face detection turned on any new tatic mage capture request will cause the stream to exit.
45-
4650
The existing [issues list](https://github.com/easytarget/esp32-cam-webserver/issues?q=is%3Aissue) on Github is a good place to start if you have a specific issue not covered above
4751

4852
## Setup:
@@ -78,13 +82,17 @@ To make a permanent config with your home wifi settings, different defaults or a
7882

7983
### Programming
8084

81-
Assuming you are using the latest Espressif Arduino core the `AI-THINKER` board (or whatever board you select for programming) will appear in the ESP32 Arduino section of the boards list.
82-
![IDE board config](Docs/board-selection-small.png)
85+
Assuming you are using the latest Espressif Arduino core the `ESP32 Dev Module` board will appear in the ESP32 Arduino section of the boards list. Select this (do not use the `AI-THINKER` entry listed in the boiards menu, it is not OTA compatible, and will caus the module to crash and reboot rather than updating if you use it.
86+
![IDE board config](Docs/ota-board-selection.png)
87+
88+
Make sure you select the `Default 4MB with Spiffs` partition scheme and turn `PSRAM` on.
8389

84-
Compile and upload the code from the IDE, when the `Connecting...` appears in the console reboot the ESP32 module while keeping **GPIO0** grounded. You can release GPO0 once the sketch is uploading, most boards have a 'boot' button to trigger a reboot.
90+
The first time you program (or if OTA is failing) you need to compile and upload the code from the IDE, and when the `Connecting...` appears in the console reboot the ESP32 module while keeping **GPIO0** grounded. You can release GPO0 once the sketch is uploading, most boards have a 'boot' button to trigger a reboot.
8591

8692
Once the upload completes (be patient, it can be a bit slow) open the serial monitor in the IDE and reboot the board again without GPIO0 grounded. In the serial monitor you should see the board start, connect to the wifi and then report the IP address it has been assigned.
8793

94+
Once you have the initial upload done and the board is connected to the wifi network you should see it appearing in the `network ports` list of the IDE, and you can upload wirelessly.
95+
8896
If you have a status LED configured it will give a double flash when it begins attempting to conenct to WiFi, and five short flashes once it has succeeded. It will also flash briefly when you access the camera to change settings.
8997

9098
Go to the URL given in the serial output, the web UI should appear with the settings panel open. Click away!
@@ -95,17 +103,17 @@ Go to the URL given in the serial output, the web UI should appear with the sett
95103

96104
The WiFi details can be stored in an (optional) header file to allow easier code development, and a camera name for the UI title can be configured. The lamp and status LED's are optional, and the lamp uses a exponential scale for brightness so that the control has some finess.
97105

106+
All of the face recognition code has been removed as of V4.0; this reduces the code size enough to allow OTA programming while improving compile and programming times.
107+
98108
The compressed and binary encoded HTML used in the example has been unpacked to raw text, this makes it much easier to access and modify the Javascript and UI elements. Given the relatively small size of the index page there is very little benefit from compressing it.
99109

100110
The streamviewer, lamp control, and all the other new features have been added. I have tried to retain the basic structure of the original example,extending where necesscary.
101111

102-
I have left all the Face Recognition code untouched, it works, and with good lighting and camera position it can work quite well. But you can only use it in low-resolution modes, and it is not something I will be using.
103-
104112
The web UI has had changes to add the lamp control (only when enabled) and make the streamm window rotate and resize appropriately. I also made the 'Start Stream' and 'Snapshot' controls more prominent, and added feedback of the camera name + firmware.
105113

106114
I would also like to shoutout to @jmfloyd; who suggested rotating the image in the browser since the esp32 itself cannot do this.
107115

108-
![The stream viewer](Docs/streamview.png)<br>*Standalone StreamViewer; No decoration or controls, resizable, doubleclick image for fullscreen*
116+
![The stream viewer](Docs/streamview.png)<br>*Standalone StreamViewer; No decoration or controls, the image is resizable, and you can doubleclick it for fullscreen*
109117

110118
![The info page](Docs/infodump.png)<br>*Boring Details*
111119

@@ -125,10 +133,15 @@ Contributions are welcome; please see the [Contribution guidelines](CONTRIBUTING
125133

126134
Time allowing; my Current plan is:
127135

128-
V4 Remove face recognition entirely;
129-
* Dont try to make it optional, this is a code and maintenance nightmare. V3 can be maintained on a branch for those who need it.
136+
V4
137+
* Remove face recognition entirely;
138+
* **Done**, see the `NoFace` branch :sunglasses:
139+
* Not optional, this is a code and maintenance nightmare. V3 can be maintained on a branch for those who need it.
130140
* Investigate using SD card to capture images
131-
* implement OTA and a better network stack for remembering multiple AP's, auto-config etc.
141+
* Implement OTA and a better network stack for remembering multiple AP's, auto-config etc.
142+
* **Basic OTA is Done**, see the `NoFace` branch.
143+
* Advanced (web upload) OTA might be nice to have is possible
144+
* For the Network setup I want to implement https://github.com/Hieromon/AutoConnect
132145
* UI Skinning/Theming
133146
* OSD
134147
* Temperature/humidity/pressure sensor suport (bme20,dht11)

0 commit comments

Comments
 (0)