Chapter 6
Package Delivery Detector
There is nothing like that surge of anticipation when coming home after a long day to discover a package delivery resting outside the front door. Even if it was a package you were expecting and tracked online with every departure hub, seeing that parcel safely awaiting your arrival can sometimes feel like receiving a birthday gift.
Wouldn’t it be even more comforting to know the very moment when your package arrived versus waiting up to hours later for an email from the courier confirming the delivery? (See Figure 16, Receive an email from your home whenever a package arrives) What if the driver accidentally delivered the package to the wrong location? Say goodbye to those worries. The Package Delivery Detector will send you an email when a package is left at your doorstep. You can further filter the notification by delaying the message until the shipper confirms delivery via its web services.

Figure 16. Receive an email from your home whenever a package arrives.
This project combines the components we used in Chapter 5, Tweeting Bird Feeder, with a similar alert monitoring mechanism used in Chapter 4, Electric Guard Dog. Instead of using a PIR, the Package Delivery Detector will sense deliveries with a force sensitive resistor. When a box approximating the weight of a small package (or about half a kilogram) is dropped on top of a delivery pad containing a force sensitive resistor, the sensor sends a notification via an XBee-connected serial port. In turn, this notification processes a Python script that logs the delivery and sends an email notification. Optionally, the delivery notification can wait an hour and confirm delivery with the courier’s website before transmitting the verified message.