Skip to content

Emulates multiple wemo devices on a RaspberryPi and accepts and executes commands from Alexa

License

Notifications You must be signed in to change notification settings

amansx/alexa-raspberry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wemo Emulation Server

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"
	}

}

Installation

# Install Globally
sudo npm install alexa-raspberry -g

Execution

# 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

Usage

Use the alexa app on your cell phone/tablet to search for devices

Alexa search for devices
Alexa turn on 'Display'

Start as a service on RaspberryPi

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

About

Emulates multiple wemo devices on a RaspberryPi and accepts and executes commands from Alexa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published