logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>
[*** UNDER CONSTRUCTION ***] [What's a 'Door Cam'  ?] [commercial door-cams] [Avoiding rip-offs] [A DIY REAL door-cam] [Audio] [Operation] [Visitor detection] [Connections] [Location] [Recording visitors] [Basic operation]
Pi door-cam

*** UNDER CONSTRUCTION ***

[top]

What's a 'Door Cam' (aka 'IoT Smart Doorbell') ?

Essentially, this is just a fancy new name (at a fancy new price) for a standard Internet connected 'IP Camera' with added audio. Most systems also allow the camera to be used for security (i.e. they allow you to record images of anyone approaching your front door), so the camera resolution (and system ability to actually detect approaching visitors) is vital. Few, if any, include an IR (night time) mode, however that's not an issue since most users will already have a (security) light system that provides adequate illumination of all visitors coming to your door

Older systems run at VGA (640x480) or SVGA (800x600) resolution, however almost all door-cams are now "HD" which is a Marketing term (i.e. a lie), the truth being 'half-HD', aka '720p' which is 1280×720 resolution (real (or full) HD is 1920x1080 aka '1080p').
 
Some units ahve 'automatic visitor' detection, whilst others rely on the door bell push. To 'detect' visitors, cheaper systems take the (usually more reliable) PIR (Passive Infra-Red) detection path, whilst 'clever' systems use (video) Motion Detection.
 
Irrespective of the approach, many 'automatic' systems are so (in)sensitive that they trigger on every pedestrian that walks past the end of your drive - and some even 'trigger' on every motor vehicle passing in the road !

Prices start with the Zmodo Greet WiFi Video Doorbell (720p, $85), Powerlead WiFi Video Doorbell ("VGA/720 640*480", £90), VueBell WiFi Video Doorbell (720p, £90), the massively 'advertised on TV**' Ring (720p, $199 plus an annual $30 subscription) or SkyBell Video Doorbell (640x480, $199) and go all the way up to the over-sized (and over priced) UK Bird Home Automation 'DoorBird' Video Doorbell (720p, £299+).

** As a rule, your should always avoid anything you see 'advertised on TV'. TV ads cost £tens (or £hundreds) of thousands to make and broadcast and the cost of all this has to come out of the pockets of the mugs who buy the product.

[top]

(Issues with) commercial door-cams

If you really are considering buying one, check it's Amazon feedback very carefully (all types have drawbacks that can make them useless when fitted to your door).

Some of the more typical issues are :-
1) an inability to tell the difference between visitors and passing pedestrians (or even passing cars) i.e. no 'detection zone' setting
2) a 30seconds+ delay before you are notified of a bell-press (by which time the average Amazon/eBay courier has thrown the package over your back-gate and departed)
3) poor contrast control, so if you have a porch (or your front door is south facing) all you ever see is a black silhouetted visitor against a nice well-balanced bright sun-lit background.
4) 'live view' only (i.e. no recording capability at all) - so by the time you are looking at the video feed, all you see is some criminals thumb over the lens (or the back of the visitors head as they turn away to go)
5) no local back-up battery (so fails as soon as the some criminal flips your mains power switch found in the 'meter box' on the side of your property)
6) no local storage (so can't record anything when power fails and your internet router is 'off')
7) only records to some 'cloud' based 'repository' (which typically requires a monthly subscription for access and is of no use what-so-ever when the criminal takes the trouble of pulling your phone wires before approaching your property)
8) no record prior to 'detection' (same thumb/back-of-head issue as 4)
9) only runs from (rechargeable) batteries which can just go flat without any means of notification or detection
10) consists of a hugely expensive self-contained unit that must be mounted on the outside of your property (from where any passing criminal can just pull it off and walk away with it, together with your WiFi password)
11) operates via WiFi only (so fails at the first bit of radio interference or deliberate jamming) [you need an Ethernet cable option]
12) has totally a non-standard WiFi set-up requirement (including 'custom' video/audio protocols )that means it won't actually connect to your WiFi (and even if it does, it won't actually work with any but their own proprietary software 'app' and for sure never with anything Open Source - like iSpy)

If you manage to find a commercial system that avoids all of the above issues (for less than £1,000), by all means 'go for it' :-)

[top]

Avoiding rip-offs (the 'home security system' merchants)

You are often offered a 'video door-cam' unit as part of many rip-off "monthly subscription" Home Security systems (such as the Vivint Sky).

I would only recommend 'subscription' systems if you live in a high-risk country (such as South Africa) and can take up the "15 minute armed response team" option as part of the package.
 
Otherwise you are just wasting your money. If they respond at all, it will be hours (or days) after your neighbours (who you can rely upon to call the Police and complain every few minutes whilst your alarm is sounding).
 
Often the best you can hope from these 'monthly subscription' services is a text message (or email) (that you will receive when skiing half-way up the Austrian Alps) informing you that your alarm was triggered sometime during the previous day (or previous week).
 
Many such systems are very basic and poorly designed = and very easy to circumvent = after all, most of the vendors efforts will have gone into generating the publicity material (and all their funds into paying their sales-force), and not into any sort of testing and evaluation to select the best system = in fact, the 'best' system will be the one from the cheapest manufacturer and with the biggest shiny brochures.
 
See, for example, Comcast's Xfinity home security and automation "service", which, when the sensor WiFi is jammed(note 1), defaults to the "all clear" state for up to three hours (which should be plenty of time for even the slowest crook to empty your entire house of anything of the slightest value), after which, when communication is re-established between sensor and the service base station, the system fails to 'detect' that there was any problem !
 
All such systems provide you with is an expensive sense of false security ..

For those who think that some custom hardware and 'clever' software is needed to "jam" WiFi, well all you actually need is a normal Laptop and this simple Python script

A better explanation of "how it works", can be found here

[top]

A DIY REAL door-cam

You need a basic DIY Pi Zero camera together with a microphone and loudspeaker and an Ethernet (cable) connection to the Internet

Rather than replace your existing door-bell push button, I recommend you just add a wire to one of the Pi i/o pins (and leave the existing bell sounder in place).
 
For software support, it has to be the Open Source iSpy Home CCTV Security suite (just use 'add IP camera')
 
This has the ability to 'save to the web' and send eMails with (pohoto attachments) as well as all the usual 'bells and whistles' (such as zone based motion detection etc.)

The only real problem is the audio requirement. The Pi Zero has no support for audio at all, whist the the A+/B+ etc. only have audio output ('headphone socket').

You have 2 main choices - one is to go the USB route (and buy a 99p 'USB audio adapter' from eBay), the other is go for an I2C audio i/o 'HAT' with microphone support (which will cost well over £10 from one of the Pi distributors). Whichever route you take, the actual microphone and speaker will be 'extras'.

Remember - in a REAL system, as much as possible of your (expensive) kit will be INSIDE your property (so the criminal can't just pick it up and walk away with it)

More to the point, if mains power is lost, the only record will be what the unit itself manages to record and store internally - so it needs to be 'hidden' i.e. positioned where it might be overlooked.
 
Of course, if you have a UPS, 'all' you need to do is make sure your modem/router is kept running to maintain connection to the internet.

[top]

Audio (Microphone / speaker)

The cheapest approach is to go the 'USB audio adapter' route.

The most suitable audio adapters are those with USB 'wire tail' plugs (rather than a 'mono-block' USB plug) since it's then easy enough to chop off the USB plug end and solder** the wires direct to the Pi Zero (or use a standard USB to micro-USB 'insert'). You should also look for one that states "no driver required for Mac, Windows XP, 7, .... and Linux" = for example, on eBay I found the "USB 2.0 3D Virtual 7.1 Channel Audio Sound Card Adapter for PC Laptop WIN7" for 99p (post free from China)
 
**Reliability is paramount for any alarm system system - and connectors of any type are the enemy of reliability. So, 'as a rule', solder everything (and especially the power supply).

In addition to the USB adapter, you will need an actual microphone and (if you want to 'interact' with your visitors a small 'weather proof' loudspeaker, even if just to have the Pi play back some default 'announcement' like "Sorry I can't get to the door right now, please leave the package with my next-door neighbour at number 8" (or whatever), but NEVER say anything like "Sorry I'm out" (which means "If you break in now, you can ransack my house whilst I'm away").

Any microphone with a 3.5mm jack should be suitable = for example "AF Flexible 3.5mm Jack Mini Microphone Mic For PC Laptop Desktop Skype" (99p eBay, post free, China) has the advantage of 'staying where it's put' (but disadvantage of needing space for the 'stalk'), whilst "Hands Clip On Lapel Mic Microphone+Head-Mounted microphone 3.5mm" (same cost) needs a lot less space (but would have to be mounted (glued) into position).
 
Whilst most USB audio adapters are only intended to support headphones or 'active speakers', at the Poundshop I found a pair of loudspeakers intended to be used with a Laptop headphone socket (cost, £1 :-) ).
 
WARNING. The standard '8 ohm' impedance speaker is NOT SUITABLE for direct use (you will need to add a cheap mono amplifier), however speakers with an 'impedance' of at least 32ohms should deliver acceptable volume, although I really recommend going for one of 64ohms (or above). 
 
If you have a covered porch, any old speaker will do - however if your speaker is going to be exposed to the weather, you really need a 'weatherproof' (mylar cone) loudspeaker.
 
These come in various sizes - "Miniature Mylar Cone Loudspeaker" (eBay, £1.39+£1.45p&p = £2.84) is a 32ohm 45mm diameter unit, whilst "Weatherproof LoudSpeaker 64 Ohm 66mm Mylar Weathertight" (eBay, £2.26+£1.45p&p = £3.71) is a 66mm dia. 64ohms unit (so should be twice as loud). To this you have to add the cost of the 3.5mm (stereo) plug.

[top]

Operation

If all you only want a 'visitor greeting', then the unit can be 'triggered' by the bell-button push. However most of us will want the unit to 'double up' as a security camera - which means detecting "visitors" who don't actually push the bell

Having detected a visitor, photos need to be taken and transmitted to your mobile device.

As with most security camera's, your door-cam can be 'live' all the time, taking photos and saving images to a 'circular ring-buffer' in RAM disk.
 
The 'depth' of the buffer only needs to be a few seconds i.e. just enough to show some-one approaching prior to 'detection' (as opposed to just a nice close-up of some-ones mouth and nose (or some criminals thumb over the camera lens :-) )

Plainly speed of response is vital = no delivery courier is going to wait on your door-step for a response for very long.

Fortunately it's a simple matter to have your home built unit 'play back' an immediate greeting message (such as "Please wait for a moment") as soon as the bell button is pushed !

[top]

Visitor detection

At the very least, your system needs to detect a bell-push. If you want to use the camera for security, you also need some means of detecting visitors who don't press your bell button. The 'easy' way is via PIR, Infrared 'beam break' or even 'pressure mat' (weight detect)

Many commercial units (such as the Ring unit) support video 'motion detection'.
 
Whilst 'motion detection' is likely beyond the Pi Zero, the iSpy software does support this function, along with the vital ability to 'ignore' motion is user defined 'zones' (something that most commercial door-cams lack)
 
Some door-cams (such as the 'DoorBird' unit) come with a Passive Infrared (PIR) sensor and use this instead of (or in addition to) motion detect.
 
Some even have IR diodes for night-time use - however (like most people) I have a (PIR triggered) 'Welcome light' that comes on at night, so all my visitors are well lit

I recommend you start with a (cheap) stand-alone PIR sensor and use this to activate your security lights at night. The output from the sensor can then be wired to a Pi i/o pin and used to trigger video recording of anyone approaching your front door.

[top]

Connections (Internet and power)

Most commercial units use WiFi, which is not the most reliable of approaches, especially as most will be mounted on an outside wall. What's worse, all these units must 'remember' your WiFi password = and that makes it available to any criminal who can physically get access to the unit !

Few commercial units have any form of security built-in = indeed (before a firmware update) all you needed to do to discover the users WiFi password on the 'Ring' was to press it's reset button !

WiFi can be a real pain to setup at the best of times - and that's without the 'impossible to setup' use of 'bar code' ID's or other obscure requirements that commercial door-cams force on your Router.
 
When the potential for (deliberate) interference (and hacking) are taken into account, it should be obvious that WiFi is the last thing a security camera should be replying on. 

Since you may wish to use a mobile device to interact with visitors when not a home, it's vital that a reliable 'persistent' Internet connection exist

Many modern Routers will auto-disconnect WiFi devices that have not been 'active' for some time.
 
This means your WiFi connected door-cam will have to re-establish WiFi before sending images - and this can mean long delays = in the case of the Zmodo unit the delay between 'visitor detected' (or 'door bell button pushed') and an image becoming available on your mobile device is over 30 seconds !
 
Finally, some commercial units - such as the 'Ring' - are battery operated. So when the battery fails you won't hear anyone at the door at all :-)

So, for reliability and persistence, your Pi door-cam unit must be wired directly into your LAN with an Ethernet cable, which means PoE is the obvious way to power the unit.

[top]

Location

Placing a commercial 'door cam' that cost you over £200 on the outside of your property is simply an invitation for any passing crook to pick it up and walk away with it. This is especially true of the more expensive commercial units for which there is likely a 'second hand' market = and even more so since they use WiFi and thus contain your WiFi password (usually in a non-encrypted form) which they offer up to anyone who cares to 'connect' using a simple Internet browser

So the 'guts' of your Pi Zero camera system must be on the inside of your door, where the Pi and camera can't be stolen (and the Ethernet cable can't be accessed) without breaking in

As a general rule, the camera, microphone and loudspeaker need to be mounted 'close together' = it's a natural human tendency that even criminals can't resist to look (and speak) toward where-ever the sound is coming from. So having the camera next to the loudspeaker will be the best way to get good images of the visitors face.

However, we have a dilemma - when you start speaking, the visiting criminals attention will be drawn to the loudspeaker = and if they spot a camera lens (and decide to break in anyway) they will be sure to 'disable' the camera unit after they gain access

One 'trick' is to mount a 'normal' bell box on the inside of your door.
 
These tend to come with a nice big (2x U2) battery compartment (so you don't need mains power). If you remove the batteries there will be plenty of room inside for the Pi and it's camera (mounted so it's lens is aligned with a hole drilled through the door), you will need a nearby housing containing the (cheap) loudspeaker and microphone.
 
Of course you will need to power the bell box (and the Pi), however for this you can use PoE (and run a single 'Ethernet cable to the unit).
 
The loudspeaker and microphone can then be mounted on the outside of your front door in an old 'door intercom' style box, containing the (cheap) loudspeaker and microphone, along with a (dummy) 'push to speak' button.
 
Unlike the joke 'door cam' units, entry phones are at least designed so they mount 'flush' with the brickwork. However since anything in the 'security industry' costs an arm and a leg, the front 'face plate' of an 'intercom' or 'entryphone' unit will cost you in excess of £30 (even on eBay). If you want the mounting (back-box), that will be another £20 or so.
 
If you can't find a second-hand unit, I suggest you throw together something youself using a 'project box'
 
The speaker and microphone wires can run through the door and be plugged into the USB audio adapter 3.5mm sockets in such a way that a crook stealing the 'intercom' housing (and ripping out the wires) won't result in further damage.

Many commercial camera units have a real problem with dark porches, often ending up setting their exposure levels for the bright sunlit background, with the result that visitor can only be seen as a dark silhouette. Whilst some systems incorporate IR LEDS for 'night use', none have daylight illumination

You should set your Pi camera to use 'center weighted' exposure level control. If you have aligned the camera correctly, on a sunny day this should show the visitors face correctly exposed against a 'washed out' background.
 
Even so, if your door is south facing, or you have a covered porch, I would stil recommend setting your night light so that it also comes on during the day.
 
If it's too difficult to align a PIR so it only 'triggers' on actual visitors (rather than on passing cars etc), you will need to set up a 'break beam' detector at the entrance to your porch / driveway (or perhaps a 'weight detector' under your welcome mat)
 
Of course with a DIY system, there is nothing to stop you wiring up multiple sensors to cover 'all the angles'

[top]

Recording visitors

In theory, you only need to start taking photos (or start the video running) when a visitor is detected (or the door-bell button is pushed)

The advantage a DIY system is that you can program it to 'free-run' the camera all the time but only start 'saving' photos/video from a few seconds BEFORE a visitor is 'detected' !
 
This is achieved by using a RAM disk 'ring buffer' of the desired pre-trigger time 'depth' = about 5 seconds should be more than enough in most cases

[top]

Basic operation

The pages in this topic are :-


Next subject :- Building a Pi astro cam - (project)

[top]