DIY digital doorbell / peephole camera

Tags: #<Tag:0x00007fc3e37d9728>

Hi,

just a quick note:
In the IPCamera Thread @matt1 was looking forward for an DIY doorbell/peephole camera :wink:

I’ve taken the TTGO Camera Plus (important - take the long cable version to face display and camera away) and created some initial code to enable the board to:

  • provide snapshots and display the same image on display
  • go into stream (MJPEG) mode and refresh the display

I’ll create features when time permits. My list currently is:

  1. Include WiFi Manager to change credentials without reflash
  2. Speed up display refresh as fast as possible
  3. Include MQTT to provide and get information (status display…)
  4. Include Motion Trigger (movement) based on absolute changed pixels

Best,
Sascha

3 Likes

pictures or it did not happen!!!


very cool!!!

Yes very cool, I now understand the larger screen model as I had no idea it could display video feeds. Peephole camera is the perfect description for this or if you can turn the camera around it could display a picture for the person at the door.

Just updated the repo and optimized a few things but introduced a nasty bug :frowning:

New: Near realtime local streaming
Bugs:

  • Capturing/download JPEG currently only works for a few times
  • Streaming MJPEG does not work currently

I’ll be on vacation the next days so please don’t expect miracles :wink:

Update:

Changed:

  • Minimized Tearing
  • Changed to Tasks for easier multi-functioning
  • Capturing JPEGs while displaying on screen

Please note:
For installation, you need to configure Arduino IDE with ESP32, download the repository content, adjust SSID and WIFI Password and Upload.

Demo Video

2 Likes

If it helps, I have mine running in Openhab (snapshots every second working great and animated gif only at this stage) with the following setup.

EDIT: I have mjpeg stream working in openhab but it will need a newer binding version to work. You MUST have the stream stopped in the cameras webpage for Openhab to have access as this camera only allows 1 stream to be open at a time. This binding allows you to open more streams on multiple devices and works.

camera.things

Thing ipcamera:HTTPONLY:TTGoCamera "TTGo Camera" @ "Cameras"
[
	IPADDRESS="192.168.1.181", POLL_CAMERA_MS=1000, SERVER_PORT=54321,
	IP_WHITELIST="DISABLE", IMAGE_UPDATE_EVENTS=1, UPDATE_IMAGE=true, GIF_PREROLL=1, GIF_POSTROLL=6,
	SNAPSHOT_URL_OVERRIDE="http://192.168.1.181/capture",
	STREAM_URL_OVERRIDE="http://192.168.1.181:81/stream",
	FFMPEG_OUTPUT="/tmp/TTGoCamera/", FFMPEG_INPUT="http://192.168.1.181:81/stream",
	FFMPEG_HLS_OUT_ARGUMENTS="Not much chance your CPU can make this work in realtime"
]

camera.items

Image  TTGoCameraImage { channel="ipcamera:HTTPONLY:TTGoCamera:image" }
Switch TTGoCameraCreateGif "Create animated GIF" { channel="ipcamera:HTTPONLY:TTGoCamera:updateGif" }
String TTGoCameraMjpegStreamUrl "Mjpeg Stream" { channel="ipcamera:HTTPONLY:TTGoCamera:streamUrl" }
2 Likes