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.

8 thoughts on “Install Ouimeaux on Raspberry Pi

  1. Aaron T

    Thanks for this. Does this replace the need to buy a Wemo Link device? Or is that still required? Ultimately, I just want to buy the Wemo bulbs and have the Pi act as the controller

    Reply
  2. thought

    I have downloaded Ouimeaux to a Pi and have run command:
    “sudo apt-get install python-setuptools python-dev”
    This appears to work.

    Now i’m trying to run command “sudo pip install ouimeaux[server]”
    but this doesn’t work and it says “sudo: pip: command not found”

    Any suggestions as to why this doesn’t work?

    Reply
    1. nightred Post author

      It looks like i missed the step of installing pip in the list, sorry about that. you can run “sudo apt-get install python-pip” to install pip.
      I have updated the post with that detail.

      Reply
  3. Danny Martin

    Thanks for this post on Ouimeaux. I had tried another post for Ouimeaux, but had considerable trouble getting anything to work. I was able to get your example install and after running “wemo list” I was able to see my two WEMO Smart Switches. However when I run “wemo server” and then browse to “http://localhost/5000” all I see is the Ouimeaux title and a solid black line at the top of the page, nothing else.
    Any suggestions what I can try and fix this problem?
    Thanks for your hel.
    Danny

    Reply
    1. nightred Post author

      I had not used the web based interface as I was interested in the command line results.
      I setup Node-Red on the same system as this a then used shell commands though Node-Red to toggle devices.

      Reply
      1. nightred Post author

        This guide was setup to use the command line options for ouimeaux, I have not used the website and I do know it has issues displaying the light bulbs.
        The idea here was to create a dashboard that could issue the commands to turn the light on and off. I had used Node-Red for that part of the project, and had a shell command run when I pressed the button on the panel I made.

        Reply

Leave a Reply to nightredCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.