Package 'magicLamp'

Title: 'WeMo Switch' Smart Plug Utilities
Description: Set of utility functions to interact with 'WeMo Switch', a smart plug that can be remotely controlled via wifi. The provided functions make it possible to turn one or more 'WeMo Switch' plugs on and off in a scriptable fashion. More information about 'WeMo Switch' can be found at <http://www.belkin.com/us/p/P-F7C027/>.
Authors: Simon Garnier
Maintainer: Simon Garnier <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-17 02:53:26 UTC
Source: https://github.com/swarm-lab/magiclamp

Help Index


Turn WeMo Switch OFF

Description

Turn WeMo Switch smart plugs off

Usage

wemo_OFF(ip)

Arguments

ip

A characted string or vector of character strings representing the IP address(es) of WeMo Switch smart plug(s).

Value

A tibble with two columns:

ip

The IP address of the WeMo Switch smart plug

success

A logical indicating whether the WeMo Switch was successfully turned off. NA will be returned is no WeMo Switch is detected at this IP.

Author(s)

Simon Garnier, [email protected]

Examples

## Not run: 
wemo_OFF("192.0.1.1")

## End(Not run)

Turn WeMo Switch ON

Description

Turn WeMo Switch smart plugs on.

Usage

wemo_ON(ip)

Arguments

ip

A characted string or vector of character strings representing the IP address(es) of WeMo Switch smart plug(s).

Value

A tibble with two columns:

ip

The IP address of the WeMo Switch smart plug

success

A logical indicating whether the WeMo Switch was successfully turned on. NA will be returned is no WeMo Switch is detected at this IP.

Author(s)

Simon Garnier, [email protected]

Examples

## Not run: 
wemo_ON("192.0.1.1")

## End(Not run)

WeMo Switch Port

Description

Automatically detects the port used by WeMo Switch smart plugs.

Usage

wemo_PORT(ip, timeout = 0.1)

Arguments

ip

A characted string or vector of character strings representing the IP address(es) of WeMo Switch smart plug(s).

timeout

Number of seconds to wait for a response until giving up. Can not be less than 1 ms (default: 0.1).

Value

A tibble with two columns:

ip

The IP address of the WeMo Switch smart plug.

port

The port at which the WeMo Switch smart plug can be accessed. NA will be returned is no WeMo Switch is detected at this IP.

Author(s)

Simon Garnier, [email protected]

Examples

## Not run: 
wemo_PORT("192.0.1.1")

## End(Not run)

Check WeMo Switch State

Description

Check the ON/OFF state of WeMo Switch smart plugs.

Usage

wemo_STATE(ip)

Arguments

ip

A characted string or vector of character strings representing the IP address(es) of WeMo Switch smart plug(s).

Value

A tibble with two columns:

ip

The IP address of the WeMo Switch smart plug

state

'ON' if the WeMo Switch is turned on, 'OFF' if it is turned off. NA will be returned is no WeMo Switch is detected at this IP.

Author(s)

Simon Garnier, [email protected]

Examples

## Not run: 
wemo_STATE("192.0.1.1")

## End(Not run)