Belkin WeMo

Michał Rutka edited this page Jan 25, 2017 · 11 revisions
Clone this wiki locally

Belkin has a range of home automation products which were tested with OpenRemote. Currently there were WeMo Switch (wall plug), WeMo Motion (presence detector) and WeMo Insight (wall plug with energy measurement).

Introduction

The Belkin WeMo allows for switching devices, based on presence. As the sensor and switch plug are two sperate devices, the sensor and actuator can be at completely different locations. Moreover, WeMo insight give another layer of energy monitoring information which can be further visualised with EmonCMS or with RRD4J. These opens new possibilities beyond what is originally available to a regular WeMo user.

Hardware

To integrate OpenRemote and WeMo Switch and Motion, we have tested the WeMo products listed in the table below.

For a complete setup, you will need:

  1. A WeMo Switch and Motion or and WeMo Insight
  2. Ouimeux Python API (optional)
  3. OpenRemote Designer Account
  4. OpenRemote Controller installed on your PC, RPi, NAS, etc.
  5. A web browser, Android or iOS device for control
  6. Additional automation controls for lighting, curtains, switches, etc.

Although it is possible to talk with WeMo devices directly from within OpenRemote as described in the MQL Service's blog post, this method is highly unreliable. WeMo devices use UPnP protocol while OpenRemote interface was done in the lower HTTP layer, missing therefore extras which UPnP offer, most importantly automatic device discovery and configuration. This leads to problems that manually configured WeMo devices disappear after few days and the configuration procedure need to be repeated manually every few days. This is of course not desirable, therefore a 3rd party open source WeMo API is used to address these issues. This API is called Ouimeaux and can be installed from here.

Belkin WeMo - table1

Installation

Pre-requisites:

It is written in Python and available for Linux and Windows. It is still actively developed and currently supports WeMo Light and WeMo Maker.

  • Start the server by running:

wemo server &

Now you can see your demo devices:

curl http://localhost:5000/api/environment

Example:

root@orb ~> curl http://localhost:5000/api/environment
{
    "TV HDR switch": {
        "host": "192.168.1.3", 
        "model": "Belkin Plugin Socket 1.0", 
        "name": "TV HDR switch", 
        "serialnumber": "222340K510190B", 
        "state": 0, 
        "type": "Switch"
    }, 
    "Upstairs hall motion": {
        "host": "192.168.1.5", 
        "model": "Belkin Plugin Socket 1.0", 
        "name": "Upstairs hall motion", 
        "serialnumber": "221411B2155420", 
        "state": 0, 
        "type": "Motion"
    }, 
    "WeMo Insight": {
        "currentpower": 0, 
        "host": "192.168.1.22", 
        "lastchange": "2015-05-07 13:24:38", 
        "model": "Belkin Insight 1.0", 
        "name": "WeMo Insight", 
        "onfor": 0, 
        "ontoday": 0, 
        "ontotal": 198810, 
        "serialnumber": "221443G22455H9", 
        "state": 0, 
        "todaymw": 0.0, 
        "totalmw": 30221127, 
        "type": "Insight"
    }
}

More about the Ouimeaux server

OpenRemote Designer Configuration

Create HTTP commands in OpenRemote Designer for all necessary devices you need.

Example of upstairs motion sensor command:

Belkin WeMo - motion

These commands can be connected to labels, buttons in UI Designer View.

For correct JSONPath Expression please use JSONPath Expression Tester.

See also