alexa-local-server
Description
This is a server for local control of different components in my house. Controls chromecast, commanding it to play youtube videos/and other chromecast media controls as well as infrared microcontrollers to turn on tvs,air conditioners, sound bars, etc.
Instructions
Build
Running make build
will generate a binary in the folder ${project_directory}/bin/
. This can be deployed via running ./bin_name
.
Deploying via docker is possible. Running make docker_build
will build an image with the name aa/alexa-local-server
.
That image can then be used via running docker run -d -p 8000:8000 aa/alexa-local-server
Deployment
-
Install the Alexa CLI.
-
modify the .serverconf.json.template with appropriate config values.
- AlexaAppID is autogenerated by the deploy.sh script. Don't need to mess with it.
- ServerAddress is the port where the server should listen on.
- The IRFunctionality is based on an ir blaster arduino endpoint.. Not really mandatory to input.
- Google Key is the google API key with the values to access youtube api. (Youtube Data API V3)
-
Run ./scripts/deploy.sh
-
Tell alexa to do things like
alexa, tell local server to play summertime sadness
alexa, tell local server to pause
alexa, tell local server i'm home
-
Terminate by running the ./scripts/kill.sh
script.
Notes
config file named .serverconf.json
is read in the following order from
- the current directory of the application,
- a directory called
.als
in the current
- a directory called
.als
in the user's home directory
Images
References
References alexaskilserver for middleware, encoding, and validation.