Tagged With: CLI
dsbox-lightgpio , a command line interface for my lightswitches
Introduction
I’m writing a command line tool called dsbox-lightgpio to wrap GPIO and web services. Command can be entered as arguments or interactively.
for example
dsbox-lightgpio “hue get all”
or
dsbox-lightgpio
> all enable debug
> hue get all
> exit
I have finished coding handlers…
To get the status of all lights excerpt the office
hue get all -office
To set all lights on to white except turn the bedroom off and leave the office as is
hue set all=white bedroom=off -office
To brighten the lounge only if it is on already
hue set lounge?on=+5
To detect motion ( prints when there is motion detected, and when no motion has been detected for 60 seconds )
motion enable detection
To request a heartbeat timer event every 5 minutes ( 300 seconds )
timer heartbeat myevent=300
To cancel a timer
timer cancel myevent
To scroll a text message (once) on the 8×8 led matrix ( including a named icon )
matrix marque Hello world this is a test
To display a eye that winks ( and leave it on the display}
matrix animate “{eyeopen}{eyeoclosed}{eyeopen}”
I’m still coding handlers for …
To blink (once) the lights blue as a notification indicator and then return them tot heir previous state
hue blink all=blue
To gradually brighten a room to full red on a work day over a 30 minute interval (1800 seconds)
hue fade up 1800 bedroom=red
To gradually fade off the office ( if it is turned on ) over a 30 minute interval (1800 seconds)
hue fade down 1800 office?on
To detect taps and gestures on a touch device
touch enable detection