Skip to content

A Fauxmo frontend that facilitates multi-device control via Alexa services by emulating wemo devices, enabling users to turn computers on/off seamlessly using voice commands.

License

Notifications You must be signed in to change notification settings

CristianEduardMihai/alexa-wol

Repository files navigation

Alexa-Wake-On-Lan

A Fauxmo frontend that facilitates multi-device control via Alexa services by emulating wemo devices, enabling users to turn computers on/off seamlessly using voice commands.

Based on fauxmo

Additional resources

Requirements:

  • At least one computer capable of WOL
  • A home server (could be a raspberry pi) running 24/7
  • An amazon echo device

Installing

  • Via docker compose:
---
version: "3.7"

volumes:
  alexa-wol:
    name: alexa-wol

services:
  alexa:
    image: cristianeduardmihai/alexa-wol:latest
    container_name: Alexa-WOL
    restart: unless-stopped
    network_mode: host
    environment:
      - TZ=Europe/Bucharest
    volumes:
      - alexa-wol:/alexa/api/config

Configure devices

  • All configuration is done via the web UI. Additional software needs to be installed on all client PCs, see below. Web UI

Download windows executable

!! This only works if you don't change the default power off key

Download the latest alexa-shutdown.exe from releases,

Compile windows executable (CLIENT PC)

!! Do this if you have any reasons to not use the default poweroff key

  • Download the windows-binary folder to your windows PC

  • Download rust

  • Change poweroff-securitykey (line 11 in main.rs) to poweroff-yourkey(that you set via the Web UI)

  • Compile by running

cargo build --release

Run the executable on boot

  • Open the windows run menu and type shell:startup

  • Place the compiled alexa_shutdown.exe in the folder

Setup linux service (CLIENT PC)

  • Download the shutdown.py file from the linux-service folder. Place it in a location you can remember

  • Set your shutdown security key on the first line

  • Install python packages (yes it should run as root)

sudo pip3 install sockets
  • Create systemd services

Make sure to replace PATH with the location of your file.

printf "Description=Running alexa-shutdown on boot

[Service]
Environment=XDG_RUNTIME_DIR=/run/user/1000
ExecStart=/bin/bash -c 'python3 -u PATH/shutdown.py'
WorkingDirectory=PATH
Restart=always
User=root
[Install]
WantedBy=multi-user.target" > /lib/systemd/system/alexa-shutdown.service
  • Enable and start services
sudo systemctl enable alexa-shutdown
sudo systemctl start alexa-shutdown

Add your devices to alexa

Simply say Alexa, discover devices

Alexa should respons with

Starting discovery,
...

After about a minute, alexa should say

I have found and connected X new devices

External Contributors

Support

If you have any questions, feel free to ping @cristianmihai_ on your support request on Novaspirit's discord.

About

A Fauxmo frontend that facilitates multi-device control via Alexa services by emulating wemo devices, enabling users to turn computers on/off seamlessly using voice commands.

Topics

Resources

License

Stars

Watchers

Forks