github twitter linkedin
AWS IoT Button With Home Assistant
Sep 13, 2018
2 minutes read

Have you ever wanted a light switch on a wall where there was none? Have you ever wanted to turn a lamp on that was plugged in all the way across the room?

I ran into this issue after moving into a new home. We needed a lamp in the area we call “the loft”. The issue, the best place to plug in the lamp was on the other side of the room, away from the hallway. I started doing some research into what my options were.

I already have a couple Wemo devices from Belkin, and decided to buy one of their Wemo Mini Smart Plugs. From their I knew I could use my phone, or my install of Home Assistant to control it. That still didn’t solve being able to turn it on with a switch across the room. That’s when I discovered the AWS IoT Button.

The AWS IoT button can be configured, among many thing, to call a Lambda function. Additionally, Home Assistant provides an API in which actions can be performed with a simple web call. So I came up with this idea:

IoT Button Flow

It’s simple:

  1. I push the IoT button
  2. A lambda function in AWS is triggered, which calls Home Assistant installed on a server at home.
  3. Home Assistant triggers the Wemo Mini Smart Plug directly, turning on or off the lamp.

See how it works for yourself!

Okay, so it takes about 8-9 seconds to run. It would be quicker to walk over and turn on the lamp. Also, the IoT button only has about 2,000 clicks before it stops working. Maybe this isn’t the most practical solution.

Would you like to do this yourself? Head on over to my GitLab project where you can download the code and even setup your own Lambda function to perform this trick.



Back to posts