

IIRC, on the Model B, I was able to edit /etc/motion/nf and add the lines: stream_tls on Because I wanted to enable HTTPS on the camera URL, I got a certificate from Let’s Encrypt, so the URL, :8081, was able to use the HTTPS protocol. I used Dynamic DNS (on Google Domains, my registrar) to redirect to the IP address that my Pi was running on. With the Pi Model B, I had the webcam’s address on a subdomain of my site. I also installed Apache Web server using the command: sudo apt install apache2 -y After I found the Pi Zero’s IP address on my network (by looking at the client list on my Asus router) I gave it a static IP address then used these great Circuit Basics instructions to setup Motion.


This makes it easier to do a headless setup. One thing that I had forgotten with the imager app was that using Ctrl-Shift-x will bring up an Advanced options dialog box where you can set the hostname, enable SSH, configure WiFi and locale settings. I used the Raspberry Pi Imager app to setup the micro SD card. With the new Raspberry Pi Zero W 2, I had initially tried installing the just released Raspberry Pi OS, Bullseye, but I saw that other people were having some problems with Motion and Bullseye, so I installed Buster 10.11 instead. On my Pi Model B, Motion had been crashing frequently with the errors, “unexpected camera control callback event, 0x4f525245” and “ motion_watchdog: Thread 1 – Watchdog timeout Trying to do a graceful restart.” I was never able to sort out the problem after spending more time on it ( here and here) than I wanted. With the Pi Zero, you also need the Pi Zero Camera Cable because of the smaller the CSI-2 camera connector. In the last iteration of my webcam, I was using Motion with the Raspberry Pi HQ Camera and the 6mm wide angle lens.

(The window where I have the camera now gets direct sun on sunny days, causing a lot of lens flare.)Ī couple of weeks ago, I found a Raspberry Pi Zero W 2 in stock at Chicago Electronic Distributors, so I decided to switch my webcam from the Pi Model B to a Pi Zero 2 W. I bought a Raspberry Pi model B revision 2.0 nine years ago and I’ve been using it with various cameras as a webcam server pointed out my window in places that I’ve lived.
