Wemo v0.1.2 Wemo.Switch View Source

Query and change the on/off status of Wemo Switches using the functions in this module.

Link to this section Summary

Functions

Search for a Wemo Switch with the assigned name

Switches off the supplied switch. For example

Switches on the supplied switch. For example

Checks and returns the status of the supplied switch. For example

Link to this section Functions

Search for a Wemo Switch with the assigned name.

Switches off the supplied switch. For example:

iex> Wemo.Switch.find_by_name(“WeMo Switch”) |> Wemo.Switch.off

If the switch was already off, the returned value is {:no_change, 0}

Switches on the supplied switch. For example:

iex> Wemo.Switch.find_by_name(“WeMo Switch”) |> Wemo.Switch.on

If the switch was already on, the returned value is {:no_change, 1}

Checks and returns the status of the supplied switch. For example:

iex> Wemo.Switch.find_by_name(“WeMo Switch”) |> Wemo.Switch.status 0