These functions help manage the environment variables that the PhilipsHue package uses to store authentication secrets.
has_local_auth()write_auth(path = ".Renviron", append = TRUE)
reset_auth()
file path to write secrets to
passed to write()
has_local_auth()
returns a logical value; write_auth()
and
reset_auth()
return TRUE
invisibly upon success.
Local authentication requires setting two environment variables:
PHILIPS_HUE_BRIDGE_IP
and PHILIPS_HUE_BRIDGE_USERNAME
. has_local_auth()
uses regular expressions to check if these variables are set (but does not
check if the credentials actually work). reset_auth()
sets these variables
to empty strings, and write_auth()
writes the current values to a file
(e.g. an .Renviron
file for use during development).