Created
November 7, 2015 00:30
-
-
Save akash1810/e05a21132226c57899c6 to your computer and use it in GitHub Desktop.
toggle the power of Lifx bulbs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
: ' | |
Toggle the power of Lifx bulbs. | |
Save to a directory on your PATH for simplicity - remember to give it execute permissions! | |
Requires a Lifx token (https://community.lifx.com/t/creating-a-lifx-http-api-token/25) to be stored in $HOME/.config/lifx/token | |
' | |
TOKEN=`cat $HOME/.config/lifx/token` | |
curl -XPOST -H "Authorization: Bearer $TOKEN" "https://api.lifx.com/v1/lights/all/toggle" --silent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment