Type: | Package |
Title: | 'WeMo Switch' Smart Plug Utilities |
Version: | 0.1.0 |
Author: | Simon Garnier |
Maintainer: | Simon Garnier <garnier@njit.edu> |
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/. |
License: | GPL-3 |
URL: | https://github.com/swarm-lab/magicLamp |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | httr (≥ 1.3.1), tibble (≥ 1.3.4) |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2017-09-21 03:24:49 UTC; simon |
Repository: | CRAN |
Date/Publication: | 2017-09-21 09:04:42 UTC |
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, garnier@njit.edu
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, garnier@njit.edu
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, garnier@njit.edu
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, garnier@njit.edu
Examples
## Not run:
wemo_STATE("192.0.1.1")
## End(Not run)