Skip to content

Thomptronics/ESP8266-Virtual-Buttons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

ESP8266-Virtual-Buttons

Use Virtual Buttons to trigger an Alexa Routine with an ESP8266

What is Virtual Buttons?

Virtual Buttons combines an Alexa Smart Home skill with a REST API, allowing you to trigger Alex Routines with a simple REST call. To learn more about Virtual Buttons, please visit www.virtualbuttons.com

The trick here is that the Virtual Buttons API requires HTTPS, which can be an issue on small devices such as the ESP8266. To learn more about HTPPS on the ESP8266, we recommend you watch Andreas Spiess' "How to secure our devices using SSL" YouTube video

How it's Done

This ESP8266 sketch is based on the HTTP over TLS (HTTPS) example found here. We simply modified it a bit to include the current certificate for the api.virtualbuttons.com endpoint. This certificate can change, so you might have to update the certificate data in the future. That said, the certificate claims it will remain valid until June 29, 2034.

How to Use It

Use of our example sketch assumes you have an Alexa device and an ESP8266 device setup for use with the Arduino IDE. With these things in place, your next steps are:

  1. Follow the instructions on www.virtualbuttons.com to enable the Virtual Buttons skill and ensure it is working for you
  2. Download and unzip this repository, then open the ESP8266_VB_HTTPS_call.ino file with the Arduino IDE
  3. Change the STASSID, STAPSK, and STACODE defines in the ESP8266_VB_HTTPS_call file to match your SSID, WiFi password, and Virtual Buttons access code
  4. Upload the edited sketch to your ESP8266 and see if it works
  5. Think up all the great things you can now do with your ESP8266 and Alexa!

About

How to use Virtual Buttons to trigger Alexa Routines with an ESP8266

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages