FeedMyFurBabies
Related Blog Posts
- Smart Cat Feeder – Part 1
- Smart Cat Feeder – Part 2
- Smart Cat Feeder – Part 3
- Smart Cat Feeder – Part 4
- Event Sourcing using Amazon EventBridge
- Switching to AWS CDK
- Custom Resources for IoT Certificates
- MicroPython MQTT Integration
- Storing Data in Timestream
Overview
FeedMyFurBabies is a smart cat feeder project that combines IoT hardware with AWS cloud services to create an automated feeding system. The project evolved over multiple iterations, incorporating event sourcing, real-time monitoring, and remote control capabilities.
Problem Statement
Like many pet owners, I often forgot to feed my cats when away from home or at work. This project solves that problem by creating a smart, remotely-controllable cat feeder that can be triggered from anywhere via a mobile app or even a simple IoT button.
Technologies Used
- Hardware: ESP32 microcontrollers, Seeed IoT Button, motors, sensors
- Firmware: MicroPython, Arduino C++
- Cloud: AWS IoT Core, AWS Lambda, Amazon EventBridge, Amazon Timestream
- Infrastructure: AWS CDK, Terraform
- Frontend: AWS Amplify, Route53
Key Features
IoT-Enabled Feeding
- Remote feeding via AWS IoT 1-Click button
- Mobile app control through AWS Amplify
- MQTT communication between device and cloud
Event Sourcing Architecture
- All feeding events stored in EventBridge
- Complete audit trail of feeding history
- Event replay capabilities for debugging
Real-Time Monitoring
- Historical data stored in Amazon Timestream
- Real-time state tracking via MQTT
- CloudWatch integration for alerts
Custom Resources
- Automated AWS IoT Core certificate and key generation
- AWS CDK custom resources for device provisioning
- Secure device onboarding
Architecture Highlights
The system uses a modern event-driven architecture:
- ESP32 microcontroller publishes MQTT messages to AWS IoT Core
- IoT Rules trigger Lambda functions
- Events are published to EventBridge for event sourcing
- Historical data flows to Timestream for analytics
- Frontend hosted on Amplify consumes real-time updates
Evolution of the Project
Part 1: AWS IoT 1-Click
Started with a simple Seeed IoT button triggering a Lambda function to dispense food.
Part 2: Custom IoT Device
Built custom ESP32-based hardware with motors and sensors, communicating via MQTT.
Part 3: Event Sourcing
Introduced EventBridge for event sourcing pattern, enabling complete feeding history tracking.
Part 4: Real-Time Analytics
Added Amazon Timestream for storing historical MQTT state data and time-series analytics.
Part 5: MicroPython Migration
Migrated from Arduino C++ to MicroPython for easier development and debugging.
Part 6: Infrastructure as Code
Consolidated infrastructure using AWS CDK with custom resources for IoT certificates.
GitHub Repositories
feedmyfurbabies-cdk-iot
AWS CDK infrastructure for IoT Core, Lambda, and custom resources
feedmyfurbabies-cdk-iot-timestream
AWS CDK project for storing MQTT data in Amazon Timestream
feedmyfurbabies-micropython-iot
MicroPython firmware for ESP32 with AWS IoT Core integration
feedmyfurbabies-202303-eventsourcing-using-eventbridge
Event sourcing implementation using Amazon EventBridge and Terraform
aws-iot-cat-feeder
Original Arduino-based IoT cat feeder implementation
Live Demo
Visit the live application: feedmyfurbabies.com