Saturday, August 3, 2019

Introduction

In this blog I describe the Alexa enabled dog feeder, or dogbot for short, which feeds, refills water, and drops treats for my dog Lula.  It’s powered by a Raspberry Pi acting as an AWS IoT Thing.  If you've found this blog, I suspect you might be trying to build something like this.  Here is a short rundown of the major steps to get started..
  1. Register for an AWS account - This will enable you to use AWS IoT to communicate with your Raspberry Pi
  2. Connect your Raspberry Pi to AWS IoT 
  3. Register for an Alexa Developer account - This lets you create an Alexa Skill of your own that you can use with the Alexas on your home network tied to the same Amazon identity
Digging into the technical details, most of the time the actions run on a schedule using AWS CloudWatch Events to trigger Lambda functions.  These functions update the desired state of the Pi's IoT Shadow for the various actions, such as:
  • Dropping a meal into the food bowl
  • Refilling the water bowl
  • Dropping a treat
Also, when any action happens it starts taking a few photos and sends them off to AWS Rekognition to see if it captured a dog in the photo.  If so, it posts the image to a Slack channel so I can check out how Lula is doing while I'm at work.  If Rekognition doesn’t detect a dog, I don’t really want to see the photo so it just ignores it.  In a short amount of time, Pavlov's response has shown itself by Lula showing up more and more often on camera as she learns the scheduled feedings and even water bowl refills.  

The Alexa integration lets me give Lula a treat from my couch, or anywhere I have Alexa, which is nice when she's staring at me to get up, and also lets me tell dogbot to pause and unpause feeding when we will be gone.  Here's a video overview... 


It was a fun project learning some new AWS resources for a work Hackathon, and my family actually uses it to take care of Lula!  It helps with my wife's bad back as she doesn't need to bend down to pick up and refill the water bowl (ever), and the same for breakfast, dinner, and treats.  Check out the rest of this blog for details on the build!