Simplified Scripting for Connected Lights
Bardolph lets you control LIFX light bulbs through a small scripting language. It is targeted at people who would like to control or experiment with their lights in a programmatic way with minimal code.
The program does not use the Internet to access the bulbs, and no login is required; all of its communication occurs over the local WiFi network. You edit scripts with a plain text editor and run them from the command line.
Implemented in Python, Bardolph runs on any platform that supports Python 3.5.1 or later. It is open source, distributed free of charge under the Apache 2.0 license.
For more information on how the language works, please see the introductory article, which outlines the evolution of the project.
Sample Scripts
Set all the lights to a bright orange, wait 5 seconds, and turn them to an intense purple.
hue 90
saturation 90
brightness 90
kelvin 2700
set all
time 5 hue 280 set all
Darken each light by 10% of its current brightness while keeping the same color.
repeat all as the_light
   get the_light
   brightness {brightness * 0.9}
   set the_light
Make the color of each light closer to green.
define green 120
repeat all as the_light
    get the_light
    hue {green + ((hue - green) * 0.8)}
    set the_light
The scripting language has the ability to turn lights on or off, set their brightness, and control their color. It can use a timed delay or wait for a keypress between each action. Using their names, you can control individual lights, groups or locations. If you have any multi-zone lights, the language allows you to set colors for specific zones.
Browser-Based UI
With a set of useful scripts, you can run a local web server for the purpose of executing them. Rather than using a platform-specific app, you will be able to control your lights with any device attached to your WiFi network that has a basic web browser.
Under normal conditions, the web server can run on an inexpensive computer like a Raspberry Pi Zero W, generally available in a complete starter kit for around US$30.
smart TV screenshot mobile browser screenshot
With the a 1:1 mapping between a script and its URL, you can launch a script immediately through a bookmark or home screen shortcut, which for common actions can be more convenient than navigating an app.
mobile home screenshot
Try It!
Head over to the installation page for instructions on how to install and run the application. If you would like more information, please see the complete documentation.