Trigger Cmd
Published © CC BY

Open your garage with Alexa and a Raspberry Pi

Run commands on your Raspberry Pi with Alexa and TRIGGERcmd. Example phrase: "Alexa, tell TRIGGER C M D to run door on garage"

IntermediateProtip1 hour1,701
Open your garage with Alexa and a Raspberry Pi

Things used in this project

Hardware components

Amazon Echo
Amazon Alexa Amazon Echo
×1
Echo Dot
Amazon Alexa Echo Dot
×1

Software apps and online services

TRIGGERcmd
TRIGGERcmd Alexa Skill

Story

Read more

Code

Example configuration file with 3 commands

JSON
The Garage Door example is meant to run on a Raspberry Pi. I used it to run a command that turns a GPIO pin on for half a second. I have a relay connected to that pin. The relay is connected just like you'd connect a physical button for opening/closing a garage door.
[
  {"trigger":"Reboot","command":"shutdown /r /t 10","ground":"background"},
  {"trigger":"Notepad Foreground","command":"notepad","ground":"foreground"}, 
  {"trigger":"Calculator","command":"calc","ground":"foreground"}, 
  {"trigger":"Garage Door","command":"\/root\/garagedoor.sh","ground":"background","voice":"door"}
]

Bash script to close the garage door button circuit for half a second.

SH
You'll need to install this software on your Pi:
http://wiringpi.com/the-gpio-utility/
#!/bin/sh
gpio mode 3 out
gpio write 3 0
sleep .5
gpio write 3 1

Credits

Trigger Cmd

Trigger Cmd

0 projects • 4 followers
My name is Russ. I enjoy nerdy yet practical applications of technology. I've been building the TRIGGERcmd.com service for a few months.

Comments