LogicWolfe / wemo

Ruby WeMo Device API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WeMo Device API

Some code snippets coppied from https://github.com/ballantyne/wemo and https://github.com/bobbrodie/siriproxy-wemo

Rewritten to use playful because simple_upnp wasn't working for me.

Usage

require 'wemo'

# Find all WeMo light switches on your network
#
switches = WeMo.light_switches

# Pick one you'd like to work with
#
basement_floods = switches.find {|s| s.name == "Basement Floods" }

# Find out if it's on of off
#
basement_floods.status
# => true

# Turn it off
#
basement_floods.off

# Get an outlet instead
#
outlets = WeMo.outlets.first

# Get all WeMo devices on the network
#
WeMo.all

Pull requests welcome 😄

About

Ruby WeMo Device API

License:MIT License


Languages

Language:Ruby 100.0%