Last active
August 29, 2015 14:07
-
-
Save bdunlay/335b4c8f63095372606c to your computer and use it in GitHub Desktop.
Dim a bulb (1-100)
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 | |
# USAGE | |
# turn a bulb on or off: | |
# dim.sh [1 - 100] | |
# you need to know the device ID of the bulb you are trying to toggle. | |
YOUR_DEVICE_ID=12345678 | |
# Set brightness | |
curl -d 'cmd=DeviceSendCommand&data=<gip><version>1</version><token>1234567890</token><did>'$YOUR_DEVICE_ID'</did><type>level</type><value>'$1'</value></gip>&fmt=xml' 'http://lighting.local/gwr/gop.php' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment