UBB Store

Magnetic Door/Window Alarm GPIO Electronic Project Kit for Raspberry Pi 4 / Zero
When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Magnetic Door/Window Alarm GPIO Electronic Project Kit for Raspberry Pi 4 / Zero
Price: GB $16.23
Everything you need to monitor a door or window using your Raspberry Pi. Receive alerts & photos on your phone. Compatible with Raspberry Pi A, B, A+, B+, Pi 2, Pi 3 and Pi 4 models.
  • Mini breadboard, with peel-off adhesive backing. (colour supplied may vary from photo)
  • Magnetic reed switch sensor, magnet block with adhesive backing - attaches to the door or window you want to monitor. (see photo block
  • Three metres of bell wire.
  • 3x Raspberry Pi connection wires (colours supplied may vary from photo).
  • DVD with 18 page PDF instruction eBook & various useful shell scripts.


Attach the sensor to a door that you want to monitor. Wired magnetic reed switch screws onto door frame & magnet screws onto door. (you can use your own adhesive pads instead, if you prefer).

When the door is opened, the Raspberry Pi will send a series of emails to your email account. If you have the Gmail app running on your iPhone or Android phone you\'ll be instantly notified of the time & date the door was opened or closed by text email & if you have a camera attached to the Pi you\'ll also receive an attachment from either your USB webcam or Raspberry Pi Camera module.This has been thoroughly tested on our own Pi & is in everyday use at our office.

Just some of the scripts included on DVD:

test.sh - use this script to troubleshoot that everything is working correctly. Scrolls \'0\'s up the screen and \'1\'s when you open the door. Changes when magnet is 1cm or less away from magnetic reed sensor.

magdoor.sh - sends details of alarm triggers by email to a Gmail account. You need to setup a Gmail account just for the Pi to use and tweak a few simple settings. Records time & date door was opened/closed to a log file.magdoor-rpicam.sh - sends an image from your Raspberry Pi Camera module to the Gmail account on your PC/phone, also records a H.264 video clip to the SD card. Records time & date door was opened/closed to a log file.(when you setup a new Gmail account for the Pi to use, you also need to allow access for \"less secure apps\" )Includes PDF manual with example code on DVD, mini 170 tie point breadboard, magnetic reed switch, resistors, wires. Plus any help you need by email.
If you have a Bluetooth or WiFi dongle, we also show you how to scan for devices present when the door alarm is triggered.Topics covered in the PDF manual:
  • Connecting wires to magnetic reed switch.
  • Layout of components on breadboard
  • Connection of jumper wires to Raspberry Pi GPIO port
  • Shell scripts to detect GPIO activity - these can be pulled down from our server with a wget command.
  • How to configure Pi to send emails using Gmail
  • Capture photos from your Raspberry Pi camera moduleand email you the photo as an attachment.
  • Record 10 second HD videoclip to SD card when the alarm is triggered (easy to make longer or shorter).
  • Shell scripts for grabbing CCTV images from USB video grabbers(STK1160 chipset only).
  • We show you how to grab photos from the Sony PS3 eyetoy USBcamera.
  • How to connect to your Pi remotely from your PC or Mac using Putty
  • How to transfer captured videos from your Pi to PC/Mac use Filezilla
  • How to install Tshark, put WiFi card in monitor mode, grab WiFi Probe Requests from nearby phones. (USB wifi adapter required)
  • Install Bluetooth hardware & software guide (CSR chipset Bluetooth USB device required)
  • Shell script that captures details of any nearby phones with Bluetooth & WiFi enabled & emails Mac address and ID to your email account. (includes facility to exclude neighbours)
  • How to install latest Raspbian SD card image to an SD card on a Windows or Linux PC.
Includes everything shown in the photo above. Doesn\'t include Raspberry Pi or Pi camera module.
Your Pi should be running a recent version of Raspbian & be connected to your internet router.
Compatible with Raspberry Pi A, B, A+, B+, Pi 2,Pi 3, Pi 4 and Pi Zero W (with a GPIO header fitted) models.
Price includes VAT, receipt provided.
We are not affiliated with the Raspberry Pi Foundation.
Raspberry Pi is a trademark of the Raspberry Pi Foundation.
All rights acknowledged.

Important information about Gmail account for Raspberry Pi.You need to setup a brand new Gmail account just for your Pi to use to send emails.In addition to the information in the instructions, when you\'ve setup the new Gmail account using your PC, with the account logged in, open another browser window & go check the Enable radio button.Also, when choosing a password for the Gmail account don\'t use the # symbol.
Password test9247!# would fail to send, where test9247!! would work just fine. (try it)




Buy Now