Skip to content

cboettig/lifxr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis-CI Build Status

LIFX

Quickstart

Install the package:

devtools::install_github("cboettig/lifxr")

Get your Personal Authentication Token from the LIFX cloud: https://cloud.lifx.com/settings. Add this token into R using options() in your .Rprofile or current session:

options(LIFX_PAT = "<TOKEN>")

You can now load the library and control your lights:

library("lifxr")
lights()
on()
off()

Function overview

All endpoints in v1beta1 of api.lifx.com are implemented, along with a few helper functions.

  • on() Turn a light or group of lights on
  • off() Turn a light group off
  • breathe() run the breathe effect on a light group (with desired settings)
  • color() change the color of a light or group
  • label() add a label to a light
  • lights() List all lights and their status
  • pulse() run the pulse effect
  • scene() switch to a certain preset scene
  • toggle() toggle lights on or off
  • current_color() return the current color of a light group (in a format appropriate for use with color/breathe/pulse)
  • ping() the API to confirm it responds.

See package documentation for details.

About

R interface to LIFX lightbulb API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages