Tag Archives: Wemo

Install Ouimeaux on Raspberry Pi

I am working on a custom home automation solution that combines several different systems in a single easy to use control panel. The design is to have a Raspberry Pi 3 B running Ubuntu Mate 16.04 LTS become a hub device that can control all the devices that have automation built in.

The first item on my list is to get my WeMo setup responding to basic commands, to do this we will be installing ouimeaux. The first step is to install the the prerequisites.
sudo apt-get install python-setuptools python-dev python-pip

Next we will run the installer, we will install the server version so that we can use the default web interface and use the REST API in a later project.
sudo pip install ouimeaux[server]

We will need to open a port on the firewall or we will not get any response from any device, I am using ufw. We need to port 54321 for discovery of devices, 5000 for the rest api for the server, and 80 if you will be running the web app.
sudo ufw allow 54321
sudo ufw allow 5000

Now we will want to see if everything is working properly by running the following command to detect and list any devices found.
wemo list

If everything worked properly we should see a list of devices returned like the example below.
Bridge: WeMo Link
Light: lightBedroom
Light: lightHallway

If everything is working properly you can now start the server by running wemo server, if you wanted to keep the server running in the background it would be best to launch with the server with screen or a cron job. you can now open your browser to http://localhost:5000/ to use the page control page provided with Ouimeaux.