Door bell with pi camera and motion detection

Just to let you know , I havent abandoned this project , I have a dabble every moment I have to spare but I seem to be hitting obstacles with almost every implementation of code.
As it stands now I have it running as a doorbell/camera, which polls for face detection (not recognition), when it detects a face at the front door it then sends a photo to my phone via telegram (via home assistant) , It does the same thing when someone presses the doorbell (without the face detection).
It is still buggy , crashes every now and then.
The doorbell button wired into the GPIO still, I havent found any 433rf input modules which work for python 2. I did try to get a few to work with future, but either I havent got a grips to how it works or Im not doing it right so still a work in progress. Ill keep you posted , but things still hectic at the moment, trying to sell the house and helping our daughter settle in , new job, it all seems to be happening at once, lol.

Sound very busy! Also the project sounds pretty complete? OpenCV just made it into HA so il look at having a HASS instance on my pi zero and running it in master-slave config. Currently writing up my progress on Hackster

When it is running , its great. But it will randomly crash with a conflict error, I havent had much time to pursue that side of it, Ive got my piannouncer running on the zero which is tied in with owntracks and home assistant, So when i arrive home it greets me. Unfortunately this is where I think the conflict is, so I might run the announcer on my PI (running home assistant), the only thing is I can barley hear it from the front door as I walk in, as the pi is in the office at the back of our house.

Nice! With the new Hassbian it should be possible to have multiple zero/hass instances dotted about, and could hook up to speakers in convenient locations

Posted my progress on https://www.hackster.io/robin-cole/pi-camera-doorbell-with-notifications-408d3d

4 Likes

Nicely done

1 Like

Nice! Definitely using this as a starting point for my Doorbell project.

1 Like

Hi
I know I havent posted for a while, so I thought I would show you what Ive managed so far.
The photo’s are of my first attempt using an enclosure purchased from Maplins.
It involves an Ir LED, vandal proof momentary push button, raspberry pi zero W, and a Raspberry Pi NOIR CAM, only thing not in photo’s which I have added since is an RGBW LED ,2 x 330 ohm resistors for the LED’s.

The infra red led will be set to come on at sunset and off at sunrise.
The RGBW LED will glow white when a face is detected through the camera and blue when the button is pressed
I have yet to add the code for this , but I believe it is fairly straight forward.

I am still not 100% happy with the enclosure , although it has allowed me to prove the device works (more or less)

Problems encountered.
Sometimes a button is press is missed due to the face detection being quite demanding on the processor, this has happened twice in the last three months although its not a big deal, It still isnt to the standard Im looking for. I have debated using a PI3 for more processor power, only downside being the PI3 is quite bulky.

I will add more over the next week once Ive tweaked the code a little.

4 Likes

Did you try using the zerolipo with your raspberry pi zero w? how was the battery life?

I am looking to build something similar but I am after simple cameras which are battery operated. I came across this topic and you provided the zero lipo alternative to powering up the pi zero w which I think is a good idea which can be converted into a portable CCTV.

Any ideas?

Thanks.

I havent tried the lipo, I know my system will easily drain the battery within a few hours, as it is polling the camera constantly.

It is powered with a usb - micro usb lead poked through a hole in our door frame, which goes straight into the back of the device.

You could probably build a less power hungry unit by using a motion detector instead of using the camera. But Im not sure how practical it would be to run it on batteries due to power consumption.

I need a CCTV or more like a baby monitor but I need it to be operated by batteries instead of power. Think I need to find an alternative solution.

Have you looked at motion eye?

Yeah but that’s not a standalone is it? You would need to hook up a Webcam to your pi which again requires power?!

You can use a picam with it , I had a zero and a picam with motioneye installed, I ran it from a phone charger battery, it lasted around 8 hours. But if you are using it as a baby monitor, dont you need to input and send sound too?

you mean you ran it with a phone battery?
yeah I do need input and to monitor sound which seems like will require more power then just powering the pi and the camera.

I could be wrong but I think streaming sound and vision on a pi is probably going to chew batteries up fairly quick.
However, I am still a novice with the pi.

No I ran it with a portable phone charging battery

hmm I think you are right in saying it would chew up the batteries.

I am looking for a cheap camera battery powered which I can integrate it to HA. The closest I have come across is the Blink Camera. Surprisingly Aliexpress dont have one!

Before I started playing with the raspberry pi’s I was looking at getting one of these, the only thing is I am not sure how easy it integrates with homeassistant, thats why I didnt go for it.

https://www.alibaba.com/product-detail/Outdoor-Operated-Security-Battery-Powered-Wireless_60637434504.html?s=p

Is this the sort of thing you mean?

Perfect ! This is what I was looking for. However, I am not sure if this connects to the wifi? if it does then I could use the ip camera component on HA I suppose?

Its a wireless p2p ip camera which connects to android and IOS, so it must connect to wifi.