Friday, July 29, 2016

Amazon AWS IoT button controlling my lights

When I saw the AWS IoT button for sale, I had to have one. I ordered it back in May, and it arrived at the end of July. I immediately set it up and did a proof of concept that turned on my kitchen and dining room lights. As you can see from the above video, it works! It's dog slow, as there is a very long pause as the device connects to my wifi in order to send the button press event. But it made me happy, because it is the modern equivalent to this:

In my case:

  • Press button
  • Connect to wifi
  • Send event to AWS SQS
  • AWS Lambda spins up a NodeJS instance to process the request
  • NodeJS calls a NodeJS instance running in my house, telling it to 'turn on kitchen and dining room lights' via a restful API
  • NodeJS adds that command to its queue, which resides back out in the AWS cloud
  • NodeJS pulls that command back down from cloud, processes it and sends two restful commands to my ISY-994i (lighting controller), one for each lighting scene
  • ISY-994i initiates a scene change for each room, waiting for the switches to acknowledge receipt of change command.
  • Lights turns on.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...