How I Automated My Barn with Arduino, Raspberry Pi, Kafka, Docker, Kubernetes, Autonomous Database, and the Cloud

Session Number: 8689
Track: Emerging Technologies
Sub-Categorization: IoT
Session Type: Solutions
Primary Presenter: Todd Sharp [Cloud Developer Evangelist - Oracle]
Time: Jun 24, 2019 (03:45 PM - 04:45 PM)
Room: 620, Level 6

Speaker Bio: Todd Sharp is a developer advocate for Oracle focusing on the Oracle Cloud. He has 14 years of experience as a full stack developer. He’s been working with dynamic JVM languages and various JavaScript frameworks through his whole career—originally with ColdFusion and more recently Groovy/Grails on the server side. Todd has experience with everything from jQuery and ExtJS to all versions of Angular on the front end.

Todd is obsessed with technology and programming and feels extremely lucky to get paid to do what he loves every single day. When he’s not learning a new language, tool, or framework, he can usually be found volunteering at his local school, working with the FLL Lego Robotics club, working on his barn automation project built with Raspberry Pi and various sensors with a web-based interface, or making new friends at a conference.

Todd has been happily married to his lovely wife Rhonda for the past 16 years. They live in the beautiful Appalachian Mountains of north Georgia with their 12-year-old daughter, 11-year-old son, seven chickens, a potbelly pig, a dog, and a cat.

Technologies or Products Used: Kubernetes, Docker, NodeJS, Groovy, Helidon, Apache Kafka, Autonomous Database

Session Summary for Attendees:  A few years ago, I created a small system to automate some tasks in our barn, where we keep a pet potbelly pig and our chickens. Simple things, like scheduling when the lights turn on and off, temperature monitoring, and a webcam. It was nice to automate those things, but the best part for me was being able to tinker with the sensors and devices and learn new libraries, frameworks, and languages.

I’ve recently re-imagined the system as a way to learn more new technologies. I’ve created a prototype version to demonstrate how I might build it again if I were to start over from scratch. In this session, we’ll look at that model and learn about the hardware and software used. At its core, the system uses an Arduino, Raspberry Pi, and various pumps, solenoids, motors, and sensors to simulate the automation of certain tasks like filling a water bowl, opening and closing doors, monitoring environment, and turning on and off lights on demand or via a schedule. The hardware runs a Groovy-based program which interfaces with Kafka via a cloud-based microservice for messaging to both store sensor data in an autonomous database instance and stream data to the front-end in real time via server-sent events. The Raspberry Pi program also receives commands for remotely performing certain tasks on demand. The persisted data is formatted and displayed on a web application running in a Docker container which is deployed to a cloud-based Kubernetes cluster.

We’ll look at both the hardware and software that power this system and how I’ve used the project as a playground for learning new technologies, languages, and frameworks.