💡 Control your LIFX bulbs from the command line or AWS Iot Button
Control your LIFX bulbs from the command line or AWS Iot Button.
echo "export LifxAccessToken=0000ffff0000ffff0000ffff0000ffff0000ffff" >> ~/.bash_profile
npm install
npm link
💡 You can find the ID (also known as a selector) for a specific bulb using the LIFX List Lights API. You can also use the lifx-get function in this repo.
Toggles the light(s) power.
lifx-toggle --bulb=<bulb ID|all>
Example:
lifx-toggle --bulb=100010000001
This function invokes the toggleIt
function in index.js
.
Sets the light(s) parameters to change it's current state.
lifx-set --bulb=<bulb ID|all> --color=<string> --power=<on|off> --brightness=<number> --duration=<number>
Example:
lifx-set --bulb=100010000001 --color=red --power=on --duration=1
This function invokes the setIt
function in index.js
.
Gets the current states of the lights(s).
lifx-get --bulb=<bulb ID|all>
Example:
lifx-toggle --bulb=100010000001
This function invokes the getIt
function in index.js
.
lifx --bulb=<bulb ID|all> --click=<SINGLE|DOUBLE|LONG>
This function invokes the handler
function in index.js
. You can edit this function to decide which functions are triggered by different clicks of your IoT button or change the settings in iot-settings.json
.
handler
function in index.js
(see lifx.template.json for an example).