Amazon AWS IoT Button Demo


IoT Button Status

Button Click: SINGLE
Date: 8/17/2018
Time: 9:18:00 AM


At Remote Location...

  1. IoT Button
    • Button has been registered in Amazon Web Services (AWS)
    • Security keys have been imported from AWS into the button
    • Button is connected to local WiFi
  2. The button uses WiFi to transmit button click data to the AWS cloud via HTTPS
    • The button comes pre-configured to use an endpoint at Amazon AWS
  3. AWS routes the following button click data to a Lambda Function:
    • Button Serial Number
    • Click Type (Single | Double | Long)
    • Battery Voltage
  4. The AWS Lambda Function uses Python language to POST the data from AWS to a PHP script located at this website
    • The PHP script stores the click data to a MySQL database

Meanwhile, at this website...

  • PHP framework
  • MySQL database
  • HTML web design
  • JQuery polls the database every 3 seconds to look for a new record. If it finds new data then the DIV is updated with new HTML. In this experiment, the click text and date/time are updated, and a new icon is selected based on the click value:
    • NO CLICK TODAY = airplane icon
    • SINGLE = one-finger icon
    • DOUBLE = two-finger icon
    • LONG = hand icon

Download the Code

AWS IoT Button To PHP — Integrate an Amazon AWS IoT Button with AWS Lambda to send button clicks to a PHP web page, which uses jQuery to automatically update the page.

AWS IoT Button Use Cases

The system you see here could do more than just change text and an icon... it could be used to change entire pages, including pictures. At the simplest it could be used as an online "OPEN" or "CLOSED" sign for a retail store.

Amazon's most popular use case is the Dash Button, and they also sell AWS IoT buttons to nerds like me :-)

Here's a great tutorial that shows how to integrate your IoT button with Slack: Slack Messaging with the AWS IoT Button. In that implementation, the use case is as follows:

  1. the business occupies multiple floors of a building
  2. each floor has a coffee machine
  3. if someone notices that the coffee is running out, they can press an IoT button next to the machine
  4. using AWS Lambda, each button triggers a unique message
  5. the message is POSTed to a channel in Slack
  6. the person responsible for making coffee only needs to monitor the Slack channel to know when coffee needs to be replenished

Right now (early 2018), the AWS IoT Button is still pretty much a prototype. Amazon doesn't recommend any practical use for the AWS IoT button, except to experiment with it.

AWS IoT Button Limitations

Real-world use is limited until a newer generation of buttons resolves the current limitations. At a minimum, a consumer-level button needs a longer battery life and visual feedback. Future designs might also include more functionality, such as voice control, more buttons, and additional environment data (like the originating IP Address).

Some Limitations

  • limited lifetime — battery not replaceable
  • limited feedback — does not report click type back to user
  • limited functionality — 4-state button: OFF, SINGLE, DOUBLE, LONG
  • limited data returned — Click Type, Serial Number, Battery Voltage
  • limited to WiFi — no cellular, no wired connections
  • limited to one WiFi connection at a time — no profiles
  • limited to Amazon AWS — can not change the HTTPS endpoint
  • too expensive for mass consumption — $20 for AWS IoT button vs $5 for a Dash button