Emulates multiple devices using the "Wemore" Library on RaspberryPi (or anything running Node.Js) as Wemo Switches and executes commands described in the configuration.
// Example Configuration
{
"Terminal A":{
"oncommand": "/bin/chvt 1"
},
"Display": {
"oncommand" : "/opt/vc/bin/tvservice -p",
"offcommand" : "/opt/vc/bin/tvservice -o"
}
}
# Install Globally
sudo npm install alexa-raspberry -g
# Place devices.json in the execution path
alexa-raspberry
or
# Provide file path as
alexa-raspberry ./examples/devices.json
alexa-raspberry /etc/wemo/devices.json
Use the alexa app on your cell phone/tablet to search for devices
Alexa search for devices
Alexa turn on 'Display'
Use your favorite text editor to create the systemd config file and devices.json file
#@file: /etc/systemd/system/alexaraspberry.service
[Unit]
Description=Wemo emulation server for Alexa
After=network.target
[Service]
ExecStart=/usr/bin/alexa-raspberry /etc/alexa/devices.json
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=Alexa-Raspberry
[Install]
WantedBy=multi-user.target
#Enable the service
systemctl enable alexaraspberry.service
#Start the service
systemctl start alexaraspberry.service