11

(Marcin) #1

TUTORIAL


Build your own ANPR home automation setup


Automatically switch on the lights when your car is recognised parking outside your house


Build your own ANPR


home automation setup


A


Paul
Freeman-Powell

Paul is a technology
enthusiast, geek, video
producer, drummer,
cyclist, husband, father
to three children,
including twins, and host
of the award-winning
Switched On Network
YouTube channel. You
can find his website at
switchedonnetwork.com

@paulfp

utomatic number-plate
recognition systems (ANPR, or
ALPR / ‘License Plate’ for our
American friends) are used by the
police to spot cars of interest, and
by some car parks to record when
you enter/leave. We’ve always fancied building one
but, as we run neither a car park nor an international
crime-busting agency, there’s been little point...
up until now. In recent years, with the explosion
of the Internet of Things and the IoT’s integration
with cloud-based services for such devices, a world
of possibilities has opened up, and the price of
components has also become much more accessible
for the hobbyist, so that got my imagination ticking.
This project works by setting up an IP security
camera to point at your driveway, or the street outside

your house, at the spot in which you park your car. A
Raspberry Pi, connected to your home network, then
monitors the network stream from the camera and
passes the video through some free software called
OpenALPR, which spots and reads car number-plates.
A Python script then processes the results and any
number-plates found and, when it spots your car
number-plate arriving home, it communicates with a
smart WiFi LED bulb, via the IFTTT service, to turn the
hallway light on. When you drive your car away, the
reverse happens and the light is switched off again.
See the diagram overleaf to understand the program
flow and sequence of events.
There are a number of ways you can approach this
project. OpenALPR offers a cloud-based API where
your program can upload still images and return
results found. You can also choose to use their cloud

Right
Pi connects to your
home network with
an ethernet cable.
The indicator LED
connected via
a breadboard is
optional, but you
can use this same
concept to drive a
relay switch to do
other things, if
you like
Free download pdf