Page 14 of 14

Re: ESP32-CAM as doorbell with camera

Posted: Monday 02 May 2022 11:25
by finch666
hmm, I can't seem to figure out at which hex addresses the bin files should be placed. :?:
Tried 0x10000 for firmware.bin and 0x4000 and 0x25000 for spiffs.bin, but that does not work.
I'm using the esp32 download tool from espressif.
Can I find the addresses somewhere?

Update: finally managed to build and upload a spiffs.bin through platformio and upload the firmware.bin with the esptool and got it working now. I'm guessing there have been some changes in the platformio configuration that made it impossible to build the firmware.

Other update: uploaded tasmota webcam software to the ESP32 cam. Works like a charm.

Re: ESP32-CAM as doorbell with camera

Posted: Thursday 25 August 2022 22:47
by ronh123
Did anyone install an esp32 cam these days. I installed latest Visual Studio Code, folllowed the instructions but keep getting:
Compiling .pio\build\ESP_4096\lib4b7\FS\FS.cpp.o
Compiling .pio\build\ESP_4096\lib4b7\FS\vfs_api.cpp.o
In file included from C:/Users/ronho/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:76,
from C:/Users/ronho/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
from C:/Users/ronho/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:24,
from C:/Users/ronho/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFi.h:37,
from src/Main.cpp:7:
src/Main.cpp: In function 'void setup()':
src/Main.cpp:111:18: error: 'TAG' was not declared in this scope
ESP_LOGE(TAG, "An Error has occurred while mounting SPIFFS");
^~~
C:/Users/ronho/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h:159:72: note: in definition of macro 'log_e'
#define log_e(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
^~~~~~~~~~~
src/Main.cpp:111:9: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(TAG, "An Error has occurred while mounting SPIFFS");
^~~~~~~~
*** [.pio\build\ESP_4096\src\Main.cpp.o] Error 1
src/domoticz.cpp: In function 'String process_messageReceived(String)':
src/domoticz.cpp:98:51: warning: 'typename ArduinoJson6194_F1::enable_if<ArduinoJson6194_F1::is_same<T, char*>::value, const char*>::type ArduinoJson6194_F1::VariantRef::as() const [with T = char*; typename ArduinoJson6194_F1::enable_if<ArduinoJson6194_F1::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
const char *value = kv.value().as<char *>();
^
In file included from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Array/ArrayIterator.hpp:8,
from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Array/ArrayRef.hpp:8,
from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson.hpp:24,
from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson.h:9,
from src/domoticz.cpp:12:
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/VariantRef.hpp:113:7: note: declared here
as() const {
^~
========================================================================================= [FAILED] Took 12.15 seconds =========================================================================================

Thanks, Ron

ESP32-CAM uploading files

Posted: Saturday 13 July 2024 15:42
by THBR
Tried to upload the files to the ESP32-cam as described under “First time files upload”, but when I try to compile, Platformio keeps throwing an error. I’am new to Visual Studio Code/PlatformIO and can’t get rid of a error message about not finding “the package with ‘alanswx/ESPAsyncWiFiManager @ ˄0.22’.

That's why I want to upload both bin files (firmware.bin and spiffs.bin) to the ESP32 cam with the esp32 download tool from Espressif.

I can't seem to figure out at which hex addresses the bin files should be placed. Which addresses should I use for this?

Thanks!

Re: ESP32-CAM as doorbell with camera

Posted: Saturday 13 July 2024 16:52
by Kedi
Use

Code: Select all

alanswx/ESPAsyncWiFiManager @ ^0.31

Re: ESP32-CAM as doorbell with camera

Posted: Sunday 14 July 2024 13:54
by THBR
Yes, thanks, that problem solved.

But now new errors (deleting en reinstalling the package "framework-arduinoespressif32" without result).

Any idea?

##### Starting script. #######
Compiling .pio\build\ESP_4096\src\Main.cpp.o
Compiling .pio\build\ESP_4096\src\WebServer.cpp.o
Compiling .pio\build\ESP_4096\src\cam.cpp.o
Compiling .pio\build\ESP_4096\src\domoticz.cpp.o
In file included from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:80,
from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:24,
from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFi.h:37,
from src/Main.cpp:7:
src/Main.cpp: In function 'void setup()':
src/Main.cpp:111:18: error: 'TAG' was not declared in this scope
ESP_LOGE(TAG, "An Error has occurred while mounting SPIFFS");
^~~
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h:159:72: note: in definition of macro 'log_e'
#define log_e(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
^~~~~~~~~~~
src/Main.cpp:111:9: note: in expansion of macro 'ESP_LOGE'
ESP_LOGE(TAG, "An Error has occurred while mounting SPIFFS");
^~~~~~~~
*** [.pio\build\ESP_4096\src\Main.cpp.o] Error 1
src/cam.cpp: In function 'void initcamera()':
src/cam.cpp:343:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
config.pin_sscb_sda = SIOD_GPIO_NUM;
^~~~~~~~~~~~
In file included from src/cam.cpp:9:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:123:87: note: declared here
int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead"))); /*!< GPIO pin for camera SDA line (legacy name) */
^
src/cam.cpp:343:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
config.pin_sscb_sda = SIOD_GPIO_NUM;
^~~~~~~~~~~~
In file included from src/cam.cpp:9:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:123:87: note: declared here
int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead"))); /*!< GPIO pin for camera SDA line (legacy name) */
^
src/cam.cpp:343:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
config.pin_sscb_sda = SIOD_GPIO_NUM;
^~~~~~~~~~~~
In file included from src/cam.cpp:9:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:123:87: note: declared here
int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead"))); /*!< GPIO pin for camera SDA line (legacy name) */
^
src/cam.cpp:344:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
config.pin_sscb_scl = SIOC_GPIO_NUM;
^~~~~~~~~~~~
In file included from src/cam.cpp:9:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:127:87: note: declared here
int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead"))); /*!< GPIO pin for camera SCL line (legacy name) */
^
src/cam.cpp:344:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
config.pin_sscb_scl = SIOC_GPIO_NUM;
^~~~~~~~~~~~
In file included from src/cam.cpp:9:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:127:87: note: declared here
int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead"))); /*!< GPIO pin for camera SCL line (legacy name) */
^
src/cam.cpp:344:12: warning: 'camera_config_t::<unnamed union>::pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
config.pin_sscb_scl = SIOC_GPIO_NUM;
^~~~~~~~~~~~
In file included from src/cam.cpp:9:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp32-camera/driver/include/esp_camera.h:127:87: note: declared here
int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead"))); /*!< GPIO pin for camera SCL line (legacy name) */
^
In file included from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson.hpp:42,
from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson.h:9,
from src/domoticz.cpp:12:
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp: In instantiation of 'static T ArduinoJson::V6215PB2::Converter<T, Enable>::fromJson(ArduinoJson::V6215PB2::JsonVariantConst) [with T = char*; Enable = void]':
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/VariantRefBase.hpp:53:34: required from 'typename ArduinoJson::V6215PB2::detail::enable_if<(! ArduinoJson::V6215PB2::detail::ConverterNeedsWriteableRef<T>::value), T>::type ArduinoJson::V6215PB2::detail::VariantRefBase<TDerived>::as() const [with T = char*; TDerived = ArduinoJson::V6215PB2::JsonVariant; typename ArduinoJson::V6215PB2::detail::enable_if<(! ArduinoJson::V6215PB2::detail::ConverterNeedsWriteableRef<T>::value), T>::type = char*]'
src/domoticz.cpp:98:51: required from here
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:32:20: error: no matching function for call to 'convertFromJson(ArduinoJson::V6215PB2::JsonVariantConst&, char*&)'
convertFromJson(src, result); // Error here? See https://arduinojson.org/v6/unsupported-as/
~~~~~~~~~~~~~~~^~~~~~~~~~~~~
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:275:13: note: candidate: 'void ArduinoJson::V6215PB2::convertFromJson(ArduinoJson::V6215PB2::JsonVariantConst, String&)' <near match>
inline void convertFromJson(JsonVariantConst src, ::String& dst) {
^~~~~~~~~~~~~~~
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:275:13: note: conversion of argument 2 would be ill-formed:
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:32:26: error: cannot bind non-const lvalue reference of type 'String&' to an rvalue of type 'String'
convertFromJson(src, result); // Error here? See https://arduinojson.org/v6/unsupported-as/
^~~~~~
In file included from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:188,
from src/domoticz.h:1,
from src/domoticz.cpp:7:
C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:59:9: note: after user-defined conversion: 'String::String(const char*)'
String(const char *cstr = "");
^~~~~~
In file included from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson.hpp:42,
from .pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson.h:9,
from src/domoticz.cpp:12:
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:291:13: note: candidate: 'void ArduinoJson::V6215PB2::convertFromJson(ArduinoJson::V6215PB2::JsonVariantConst, std::__cxx11::string&)' <near match>
inline void convertFromJson(JsonVariantConst src, std::string& dst) {
^~~~~~~~~~~~~~~
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:291:13: note: conversion of argument 2 would be ill-formed:
.pio/libdeps/ESP_4096/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:32:26: error: cannot bind non-const lvalue reference of type 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'}
convertFromJson(src, result); // Error here? See https://arduinojson.org/v6/unsupported-as/
^~~~~~
In file included from c:\users\theo\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\string:52,
from c:\users\theo\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\stdexcept:39,
from c:\users\theo\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\array:39,
from c:\users\theo\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\tuple:39,
from c:\users\theo\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\functional:54,
from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.h:49,
from C:/Users/Theo/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:196,
from src/domoticz.h:1,
from src/domoticz.cpp:7:
c:\users\theo\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits\basic_string.h:514:7: note: after user-defined conversion: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
^~~~~~~~~~~~
*** [.pio\build\ESP_4096\src\domoticz.cpp.o] Error 1
========================================================================================================================== [FAILED] Took 9.60 seconds ==========================================================================================================================
* The terminal process "C:\Users\Theo\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'ESP_4096'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

Re: ESP32-CAM as doorbell with camera

Posted: Sunday 14 July 2024 18:53
by Kedi
This is an OLD project, started some 4 years ago. I compiled it at that time. Tried to compile it now and ran into some errors.
Tried different (older) platform ([email protected]) that solved some of the problems, but not all.
The only persons that could possibly help are the 2 git users Hoeby and jvanderzande of which both are still present in this form:
@hoeby and @jvdz

Re: ESP32-CAM as doorbell with camera

Posted: Sunday 14 July 2024 19:37
by jvdz
I saw the question, but haven't compiled/looked at this myself for a long time now, as we stopped with the development.

Re: ESP32-CAM as doorbell with camera

Posted: Monday 15 July 2024 6:45
by Kedi
It looks to me that the partitioning was from the 'default.csv'.
So from that file you could take the addresses. (no guarantee)
Normally you can find that file in:
C:\Users\<username>\AppData\Local\Arduino15\packages\esp32\hardware\esp32\<version>\tools\partitions

Re: ESP32-CAM as doorbell with camera

Posted: Tuesday 16 July 2024 20:50
by THBR
Thanks for responding, hoping for a solution, I already purchased the hardware and a printed 3d case.

The contents of the default.csv:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x140000,
app1, app, ota_1, 0x150000,0x140000,
spiffs, data, spiffs, 0x290000,0x160000,
coredump, data, coredump,0x3F0000,0x10000,
So I tried the offset:
firmware.bin 0x10000
spiffs.bin 0x290000

and also
firmware.bin 0x150000
spiffs.bin 0x290000

Both times writing went ok without errors and ended with "is stub and send flash finish"

But both uploads did not result that the camera came in into Wifi AP mode (no ESP Doorbell ssid).

Re: ESP32-CAM as doorbell with camera

Posted: Tuesday 16 July 2024 21:15
by jvdz
Why do you need all of this? When you follow the available wiki the segmentation is part of the steps when using platformio to upload the firmware and data files

Re: ESP32-CAM as doorbell with camera

Posted: Wednesday 17 July 2024 7:38
by Kedi
@jvdz Because it did not compile.
I changed the JSON lib to an old(er) one and then it did compile.
Try in platformio.ini: And be sure to remove the ' ^ '

Re: ESP32-CAM as doorbell with camera

Posted: Wednesday 17 July 2024 9:25
by jvdz
I've made some changes to my local version of the project to make it compile again:
  • replaced SPIFFS for LittleFS as support for SPIFFS is dropped
  • replaced "me-no-dev/ESP Async WebServer@^1.2.3" with "https://github.com/me-no-dev/ESPAsyncWebServer.git" as workaround.
    There seems to be an issue with this for a while now in Platformio.
After that, the source compiled fine, but still need to test loading it to the ESP32CAM.
I also see that there are 24 commits in de Development branch which aren't merged into the Master yet.
Will test my changes first we I have some time later today/tomorrow and commit when working.

Re: ESP32-CAM as doorbell with camera

Posted: Wednesday 17 July 2024 16:38
by jvdz
I can't get it to work at the moment... get a "brown out" when the Wifi is trying to connect and have no idea's left to try to fix that.

Re: ESP32-CAM as doorbell with camera

Posted: Wednesday 17 July 2024 17:11
by Kedi

Code: Select all

#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
void setup(){
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
Might help, because probably a power issue (on the wifi connect).

Re: ESP32-CAM as doorbell with camera

Posted: Wednesday 17 July 2024 18:10
by jvdz
Seen that one and tried it... :(

Re: ESP32-CAM as doorbell with camera

Posted: Sunday 04 August 2024 12:13
by THBR
Thanks !

I don't know exactly how ("try and error"), but finally I got it working with the settings in the platform.ini:
- platform = [email protected]
- alanswx/ESPAsyncWiFiManager@^0.31.0
- bblanchon/[email protected]

Camera is working now, also added it with succes to Domoticz.

Another question (I am a noob...): when I push the button, a snapshot should be saved in /var/tmp ?
Nothing happens/no files saved in that dir

additonal information:
The push button apparently does not communicate with Domoticz at all. Switching a dummy/virtual switch (in this case with idx 724) also does not work.

Re: ESP32-CAM as doorbell with camera

Posted: Monday 05 August 2024 11:52
by Kedi
THBR wrote: Sunday 04 August 2024 12:13 Another question (I am a noob...): when I push the button, a snapshot should be saved in /var/tmp ?
Nothing happens/no files saved in that dir
Do you have write rights to /var/tmp ??

Re: ESP32-CAM as doorbell with camera

Posted: Monday 05 August 2024 20:30
by THBR
Kedi wrote: Monday 05 August 2024 11:52
THBR wrote: Sunday 04 August 2024 12:13 Another question (I am a noob...): when I push the button, a snapshot should be saved in /var/tmp ?
Nothing happens/no files saved in that dir
Do you have write rights to /var/tmp ??
Yes, I have.