Did you already unplug and reattach the lens? In the past that worked for me when the camera setup always failed.
I have not tried it with the first one, but the second which is new in the package I had to insert the lens to the board for the initial setup didn’t work. Which leads me to believe it could be version issue either with HA or esphome??
Hi. Do you have to take off this MB from ESP32-CAM in order to use with HA? Or it can be used as it is. I mean: can you use through MB to power of ESP-CAM?
Hi,
Just to add to this thread, I got a M5Stack Timer Cam F working with the help of the yml file snippets posted by @daveyrb and @frank451, however needed to replace data pin GPIO17
with GPIO32
following the pinmap in [1]. Otherwise I ran into got invalid frame from camera!
and last boot was an unhandled reset
errors which were a bit cryptic for me.
Cheers,
Dinyar
[1] m5-docs
How about adding that to the esphome docs?
There are some new features in esp32cam in esphome 2022.2
Been looking trough all the post but did not find any recommendations…
Witch cam are recommended with highest resolution and decent frames?
Hello all,
trying to use this camera in an battery application to get every serveal hours an picture. Found a solution here: https://www.reddit.com/r/Esphome/comments/q14986/esp32cam_deep_sleep_occasional_wake_take_a_pic/
But I cannot compile:
Could not find file '/config/esphome/driver/rtc_io.h'. Please make sure it exists (full path: /config/esphome/driver/rtc_io.h).
It seems to be, this rtc_io is an lib whih is not available in ESPhome standard installation. Any idea from where to get and how to integrate?
Regards
Micha
Essentially every esp32 camera I have seen is based on the same chipset. Not to say that there are not manufacturing differences and the usual quality problems with cheaply put together devices with crappy capacitors, voltage regulators and the like, but the camera hardware is usually the same on all of them.
Hi there,
Sorry, if this is not the right place to post this. If not, please advice where I should go.
As mentioned by nickrout in post 495 above https://community.home-assistant.io/t/esp32-cam-working/109140/505, there are new and more advanced ESPHome features for configuring esp32cam. Details are here: https://github.com/esphome/esphome/pull/3090. and https://esphome.io/components/esp32_camera.html?highlight=camera
And, on that page it is described that is now possible to “push camera parameters to module, initially present into setup() method. This piece of code was put into pubic API to allowing update of parameters “on-the-fly”. Behavior during setup() is not changed. In addition, temporary solution consist to make user-defined service (detailed into config.yaml
example, below). Result is one service available on home assistant to update camera parameters easily, to view influence of modification without need to recompile firmware.”
I am having difficulties figuring out what this exactly means. For one I am not sure what the config.yaml is, but I assume it is configuration.yaml in home assistant?
But, more importantly, I do not how to use the proposed code. There is an API part with some lambda for the different camera parameters. I do not how to set the different settings, ie how do I feed into those parameters?
And, assuming somebody explains that, how are these parameters then fed into the camera?
And below that there is the # ESP32-CAM configuration with pins etc, which looks like the one that goes into the ESPHome file. I tried including that also in the configuration.yaml, but that did not work?
Perhaps I got this all wrong? Should it go into the ESPHome yaml? And if so, how do I then feed the parameters to the camera.
Very confused here, but sure there is a simple solution…
The example config is for your esphome yaml. (Clue, it has lambdas, which ha doesn’t have)
The esphome config provides ha services which will change the cam’s parameters on the fly, see Native API Component — ESPHome
Thanks a lot for this nickrout! That was it, works now.
What I want to do is to change the settings for day and night. I can get a really clear night picture with a high agc_value, but then it is all white during the day. So if anybody got some good settings for that, please let me know.
Hello, I have a problem, maybe some one can help me.
I’m using this ESP32 cam with my home assistant. Is working quite good, for the live stream.
esphome config:
esp32_camera:
name: esp32_cam_new
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
vertical_flip: false
horizontal_mirror: false
An entity esp32_cam_new appears which I can show in dashboard.
Now I want to have a possibility to store from time to time a snapshot. But is not working. The trigger via MQTT works, but the snapshot isn’t stored on expected location.
esphome config:
mqtt:
broker: xxx.xxx.xxx.xxx
username: !secret mqtt_username
password: !secret mqtt_passwort
birth_message:
will_message:
on_message:
- topic: esp32_cam/takesnapshot
payload: 'ON'
then:
# - light.turn_on: esp32cam_light
- output.set_level:
id: esp32camnew_light
level: "100%"
- delay: 1000ms
- logger.log: Calling snapshot service
- homeassistant.service:
service: camera.snapshot
data:
entity_id: camera.birdbox_camera
filename: '/config/www/tmp/snapshot-birdbox.jpg'
- delay: 1000ms
- logger.log: Calling local_file service
- homeassistant.service:
service: local_file.update_file_path
data:
entity_id: camera.birdbox_snapshot
file_path: '/config/www/tmp/snapshot-birdbox.jpg'
- logger.log: Called snapshot service
- delay: 1000ms
- logger.log: Sleeping
- output.set_level:
id: esp32camnew_light
level: "0%"
If I trigger snapshot from MQTT I get following output. Also the light becomes active, so trigger is working, but nothing stored:
[06:55:47][D][main:102]: Calling snapshot service
[06:55:48][D][main:113]: Calling local_file service
[06:55:48][D][main:120]: Called snapshot service
[06:55:49][D][main:127]: Sleeping
[06:55:49][D][sensor:125]: 'SupplyVoltage': Sending state 5.05337 V with 2 decimals of accuracy
[06:55:50][D][esp32_camera:168]: Got Image: len=19048
[06:55:54][D][sensor:125]: 'SupplyVoltage': Sending state 5.05337 V with 2 decimals of accuracy
[06:55:59][D][sensor:125]: 'SupplyVoltage': Sending state 5.05337 V with 2 decimals of accuracy
[06:56:00][D][esp32_camera:168]: Got Image: len=19439
[06:56:01][D][sensor:125]: 'ESP32CamNew YT WiFi Signal': Sending state -52.00000 dBm with 0 decimals of accuracy
[06:56:04][D][sensor:125]: 'SupplyVoltage': Sending state 5.05337 V with 2 decimals of accuracy
[06:56:09][D][sensor:125]: 'SupplyVoltage': Sending state 5.05337 V with 2 decimals of accuracy
[06:56:10][D][esp32_camera:168]: Got Image: len=18438
[06:56:14][D][sensor:125]: 'SupplyVoltage': Sending state 5.05337 V with 2 decimals of accuracy
[06:56:16][D][main:102]: Calling snapshot service
[06:56:17][D][main:113]: Calling local_file service
[06:56:18][D][main:120]: Called snapshot service
[06:56:19][D][main:127]: Sleeping
In my home assistant yaml file I have following configuration:
homeassistant:
customize: !include customize.yaml
packages: !include_dir_named packages
allowlist_external_dirs:
- "/config/www/tmp/"
.
.
.
camera:
- platform: local_file
name: birdbox Snapshot
file_path: /tmp/snapshot-birdbox.jpg
I have installed my home assistant in a container on Raspi4B.
Any idea, what happens wrong here?
Fixed the Problem by myself. Entity name for snaphot service was wrong…
This seems to work:
light:
- platform: monochromatic
output: gpio_4
name: PWM light
id: pwm_light
on_turn_on:
then:
- light.turn_on:
id: pwm_light
brightness: 10%
or:
output:
- platform: ledc
pin: GPIO4
id: gpio_4
channel: 2
max_power: 0.25
Control the led with a slider
output:
- platform: ledc
pin: GPIO4
channel: 2 # channel 1 is used for esp32_camera
id: led
number:
- platform: template
name: Câmera Led
optimistic: true
min_value: 0
max_value: 100
step: 1
mode: slider
on_value:
then:
lambda: 'id(led).set_level(x/150);'
But how to make the LED turn on just while taking the image?
I didn’t test, but I think you can call number.set service if you are using HA automation.
Any tips/prep on how to solder the resistor to use the external antenna with a conventional solder iron?