You are quite right, I missed that somehow. Cheers.
So I’ve noticed 2 other people asked a similar question in this thread, but let me get to it.
I’d like to use my ESP32 CAM on the NVR software “iSpy”, and have HA simply just display a live view of the ESP cam (which I already have set up).
I’ve been looking into how to enable an http web server on the ESP firmware that simply displays the stream kind of like on the example camera code in the Arduino IDE. If I am able to get the stream showing on a web server, I am confident I can get the camera working in iSpy. I am aware of the stream link generated in home assistant, but I would rather not convolute the stream by passing it through HA first; seems like a waste of CPU.
Does anyone have an idea?
Maybe the example code from this link will help:
Not via esphome.
Like @Oleksii_Zelivianskyi stated I use the code in the link he provided and it works great with motion eye (running as a hassio addon) which then again trunks the stream in to home assistant. It gives me motion detection and a time lag of about 5 seconds.
As @nickrout stated this is not (yet) possible to do with esphome.
Also I think the quality of the picture is measurable better with the code from here https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/ than using esphome (with resolution and jpg quality set to maximum). The lag with esphome (about 10 seconds) is also significant higher than with the randomnerdtutorial sketch
To give an idea about the quality here is a shot with two esp 32 cam boards side by side:
cam 1 is esphomatized and has a pir sensor added. Beside that the onboard led is integrated as switch.
cam 2 is powered by the sketch from randomnerdtutorial and feed into motion eye. Their I have motion running over the stream and once again trunk the stream into ha from their.
I have switched over to that, but unfortunately, my NVR and HA cannot use the stream at the same time. I think I will allow iSpy to access the stream, and then I can import the stream from iSpy’s stream feature outlined and described here:
My computer running iSpy is way overpowered, so using CPU on it is a non-issue.
Pretty sure this will work, will find out later tonight.
Edit: Works great, would recommend.
Whatever config I take, I don’t get any camera feed, the rest is working. I just got a second board and this is also not working
Any tipps?
Current config:
esphome:
name: mobile_camera
platform: ESP32
board: nodemcu-32s
wifi:
ssid: "bla"
password: "blabla"
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
password: 'bla'
ota:
password: 'bla'
esp32_camera:
name: Mobile Camera
external_clock:
pin: GPIO0
frequency: 20 MHz
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
reset_pin: GPIO32
output:
- platform: gpio
pin: GPIO4
id: gpio_4
binary_sensor:
- platform: status
name: "ESP32Cam status"
sensor:
- platform: wifi_signal
name: "ESP32Cam WiFi Signal Sensor"
update_interval: 60s
light:
- platform: binary
output: gpio_4
name: ESP32Cam light
I have these two boards:
Looks like the one I have,
here’s my camera config
esp32_camera:
name: ${upper_devicename} Camera
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
resolution: 1024x768
#max_framerate: 15 fps
And set the board to this
esphome:
name: ${devicename}
platform: ESP32
board: esp-wrover-kit
I did find out powering this from the ftdi adapter or through a breadboard doesn’t work and give a brownout error.
Powering it with 5v works like a charm
I ended up with the configuration mentioned by @orange-assistant.
Installed MotionEye addon, flashed esp32-cam with this firmware: https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
And it works better. With esphome, my esp32-cam stopped reporting in a day or two and was more laggy. With this firmware and motioneye it is stable for 2 weeks now, Raspberry Pi 3 processor load is about 15-20%. MotionEye records video to separate NAS.
The only problem is - I don’t know yet how to add a button trigger to this firmware.
And I am wondering, maybe it will be better to have a separate installation of MotionEye on another raspberry? Or on the same raspberry but separate from HA (in Docker)?
Looking at that firmware is it possible to flash that using ESPHome or do I need to pull out the FTDI programmer again?
Right now I have the cam working with ESPHome and it is in place where I want it but I can easily pull it apart if I needed just wondering if it is possible to not do that.
Hass.io Addon’s are already docker images so if you want improvements you’d need to move MotionEye to another pi (or move everything to a real server)
Nice, I’ll try this.
To flash this firmware you have to use FTDI programmer and I used Arduino IDE for this.
Good day! Does anyone have problems with the module? Somewhere after 10 minutes of work the signal from the camera disappears although the backlight and other sensors work! Only a reboot helps! The module in the picture!
Thanks for the tipp, its working greate with motion eye. Now I just need to find out, how I can integrate the camera feed as camera component in HA to expose it’s to the deepstack AI compontent.
you’ll have to be specific. The picture doesn’t identify it. What exactly is it?
In HA in in Lovelace map with camera with esp32-cam either shows a grey squared or map quite disappears, and menu integration under choosing cameras is a popup window color themes HA! the loss of the camera occurs from 10 minutes to an hour sometimes 1.5 hours!
Map? What card is that?
Lovelas
type: picture-entity
entity: camera.bedroom
image: 'https://www.home-assistant.io/images/merchandise/shirt-frontpage.png'
aspect_ratio: 75%
camera_image: camera.bedroom
name: камера коридор
camera_view: live
lower the resolution and/or framerate