Wednesday, March 6, 2019

Smart Coffee Maker

I wanted to be able to control my coffee machine using voice, and more importantly, be able to start the brew process as soon as I wake up. Of course, I still have to grind the beans and load up my coffee machine, so it's not fully automatic.

This is just a simple relay, powered by a Raspberry Pi and a custom Alexa Smart Home skill.

The SmartHome skill invokes an AWS Lambda hosted on my AWS account to control the device. That lambda drops a message in an SQS queue, and my Pi watches the queue for updates. When it sees an update, it toggles the GPIO pin connected to the relay, toggling power to the coffee maker.

One interesting hack is that the Smart Home skill requires integration with some OAuth provider. If you're developing your own skill for your own home, you can just use Login with Amazon as the OAuth provider and disregard the identity in your skill. This guide explains how to enable Login with Amazon for your skill: https://www.jovo.tech/tutorials/alexa-login-with-amazon-email