Writing the Script

The package delivery monitoring script needs to perform several functions, from listening for and reacting to triggers from the package delivery monitoring hardware to sending an email alert about the event and everything in between. Specifically, the script needs to do the following:

  1. Listen for threshold exceeded events (i.e., package delivery and removal) sent via the soft serial port communications between the XBee radios.

  2. Timestamp these events generated by the force sensitive resistor in the deliverystatus table.

  3. If a high value is received (i.e., a package is delivered), query tracking numbers stored in the tracking table. If a low value is received (i.e., a package is removed), send an email alert stating such ...

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.