Last updated on August 5th, 2020 at 09:13 am
In this video I will show you the ESP32-CAM, Node-RED & Home Assistant. This is the cheapest WIFI camera that I’ve ever found on the market. Also This tiny Camera can stream video via web server and can work with Node-RED & Home Assistant and I will show you how.
Steps for ESP32-CAM, Node-RED & Home Assistant
To make this camera to work as I want I will flash it will Arduino sketch which will actually start a mini Web Server inside it that can be accessed from any web browser and of course Node-Red and Home-Assistant.
Before I continue I want to say that all the credits for the Arduino sketch and the Idea as a whole goes to the guys from https://randomnerdtutorials.com.
They have a great video and article about ESP32-CAM showing how to flash the camera and how to integrate it with Home Assistant. So thank you guys for your great work.
Be careful with the ESP32-CAM model, there a 4-5 different brands out there the one that you want is Ai-Thinker.
To complete this tutorial you will need:
- A computer with USB and Arduino installed – link to Arduino
- ESP32-CAM with OV2640 – http://s.click.aliexpress.com/e/_sD0uUd around $10
- FTDI programmer – https://amzn.to/36hGGp6 around $1.65
- Female-to-female jumper wires – https://amzn.to/2F69gxt around $7 ($0.12 for two wires)
- Fake/dummy dome security camera (optional) – http://s.click.aliexpress.com/e/_rIrELj around $4
- 5V power supply for ESP32-CAM – http://s.click.aliexpress.com/e/_sGcdip around $1.5
Other brands may also work, but it’s not guaranteed. I tried with the one camera that looks the same, but it has no labels on it and everything went fine, but at the end there is some strange flickering during the streaming.
Flashing the ESP32-CAM
With that being said lets flash the ESP32-CAM now:
- Install Arduino IDE for your OS
- Go to Arduino \ Preferences
- Enter https://dl.espressif.com/dl/package_esp32_index.json into the “Additional Board Manager URLs”
- Go to Tools \ Board \ Boards Manager…
- Install “ESP32 by Espressif Systems“ for me only version 1.0.2 worked OK
- Copy and paste the following sketch inside your Arduino – https://github.com/peyanski/ESP32-CAM/blob/master/ESP32-cam-simple-web-server.ino
- Replace SSID and password with your WIFI credentials
- If you are using other ESP32-CAM model than Ai-Thinker uncomment your camera model in the code
- Connect the ESP32-CAM board to your computer using an FTDI adapter and Follow the diagram shown below.
- Chose all the settings in Arduino exactly as shown in the video
- Click the upload button to upload the code.
- After uploading the code, disconnect IO0 from GND. Open the Serial Monitor at a baud rate of 115200. Press the ESP32-CAM on-board Reset button. The ESP32 IP address should be printed in the Serial Monitor.
ESP32-CAM, Node-RED & Home Assistant
- Inside Node-RED Install node-red-dashboard from Manage Palette menu, if you don’t have it already
- add a template node and add the following:
<img src=”http://YOUR_ESP32-CAM_IP” width=”600″ height=”400″>
- You can also directly import the whole flow from here – https://github.com/peyanski/ESP32-CAM/blob/master/ESP32-CAM%20Node-RED
- Don’t forget to create and assign Group and Tab to the template in your Node-RED
- Open your dashboard
Home Assistant integration
- Click on Configure UI in the upper right corner
- Find the Plus button in the lower right corner and click on it
- Click on the Picture Card
- Type the URL of the ESP32-CAM in the Image Path of the Picture Card Configuration
Are you interested in image recognition software – you can say yes or no in the comments section bellow and I will know for what you are talking about.
Support my work
Any sort of engagement on this site and YouTube channel does really help out a lot with the Google and YouTube algorithm, so make sure you leave comments, hit the subscribe, Like and Bell buttons If you enjoy this post.
You can also find my other articles here – https://peyanski.com/blog/
Also feel free to add me on Twitter by searching for KPeyanski username. I post there pretty much daily.
I really hope that you find this information useful and you are going to make your ESP32-CAM to work with Node-RED, Home Assistant and as video streaming web-server
Thank you for watching, stay safe and see you next time.