Skip to content

deployable local server for controlling chromecast device/other iot devices for alexa.

License

Notifications You must be signed in to change notification settings

AndreasAbdi/alexa-local-server

Repository files navigation

alexa-local-server

GoDoc Go Report Card Build Status

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

  1. Install the Alexa CLI.

  2. 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)
  3. Run ./scripts/deploy.sh

  4. 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
  5. 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

Image of tv/sound bar turning on and a youtube stream loading

References

References alexaskilserver for middleware, encoding, and validation.

About

deployable local server for controlling chromecast device/other iot devices for alexa.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published