-
Notifications
You must be signed in to change notification settings - Fork 0
Syntax ‐ v1.x
Each program is one STEP
(with potentially infinite nested STEP
s) as defined below.
There may also be a name. If omitted, the name of the file will be used.
If version is omitted, the latest 1.x version will be assumed.
name?
version?
STEP = TRANSITION | SERIAL | PARALLEL
Performs a change on a set of devices (color, brightness, etc).
Devices may be omitted if they're defined in a parent SERIAL or PARALLEL step.
transition:
DEVICES?
PAUSE?
WAIT?
STATE
This is where you set your lights' colors, brightness, and turn them on/off. See Transitions for full documentation.
state:
on: true
bri: 254
Runs child steps in order. Child steps may be transitions, SERIAL, or PARALLEL steps.
Devices are optional. If given, they'll be used in any child transitions that don't define their own devices.
serial:
LOOP?
DEVICES?
PAUSE?
steps: STEP[]
Runs child steps in parallel. Child steps may be transitions, SERIAL, or PARALLEL steps.
Devices are optional. If given, they'll be used in any child transitions that don't define their own devices.
parallel:
LOOP?
DEVICES?
PAUSE?
steps: STEP[]
Defines one or more groups, lights, or CLI inputs that will be used in a transition.
devices:
GROUPS?
LIGHTS?
INPUTS?
Groups of Hue lights.
groups:
- Downstairs
- Upstairs
Individual Hue lights.
lights:
- Lamp 1
- Lamp 2
Numbered references to Hue lights and groups passed from the command line. The special input $all
refers to every light or group passed in.
inputs: $all | inputs:
- $1
- $2
Pauses the program for N seconds before and/or after the current step is finished.
pause: 5 # seconds after
pause: 3
pause:
before: 1.5
after: 3
pause: 3
pause:
before: 1.5
after: 3
pause:
before:
random:
min: 1.2
max: 10
after:
random:
min: 5
max: 20.5
By default, Huebot pauses the program until a transition is complete. To skip this, set wait: false
.
transition:
state:
...
wait: false
Several types of loops may be used inside a SERIAL or PARALLEL step.
LOOP = INFINITE_LOOP | COUNTED_LOOP | RANDOM_LOOP | TIMER_LOOP | DEADLINE_LOOP
Runs until you kill the program.
loop:
infinite: true
PAUSE?
Performs the step N times.
loop:
count: 10
PAUSE?
Performs the loop a random number of times:
loop:
random:
min: 1
max: 10
PAUSE?
Performs the loop until time has run out.
loop:
timer:
hours: 1 # optional, defaults to 0
minutes: 15 # optional, defaults to 0
PAUSE?
Performs the loop until the given time.
loop:
until:
date: "YYYY-MM-DD" # optional, defaults to current date
time: "HH:MM" # optional, defaults to "00:00"
PAUSE?