Wemo

Elixir package for discovering and controlling Belkin Wemo devices.

Build Status

Installation

If available in Hex, the package can be installed by adding wemo to your list of dependencies in mix.exs:

def deps do
  [{:wemo, "~> 0.1.0"}]
end

Usage examples

Searching for a specific switch:

Wemo.Switch.find_by_name("Laundry") |> Switch.status
=> {:ok, 1}

Turning a switch on and off:

living_room = Wemo.Switch.find_by_name("Living Room")
Switch.on(living_room)
=> {:ok, 1}

Switch.off(living_room)
=> {:ok, 0}

Checking the status of a switch:

Wemo.Switch.on?(living_room)
=> true

Wemo.Switch.off?(living_room)
=> true

Wemo.Switch.status(living_room)
=> 1