logo
Bardolph
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.
If you're a bit of a beginning programmer and just want to experiment, this may be what you're looking for. The language is designed to "scale down", and be especially easy to use for simple actions with your lights. If you're more advanced, you might enjoy developing your own set of scripts to create the ultimate lighting environment and access them from your phone's web browser.
Implemented in Python, Bardolph runs on any platform that supports Python 3.7 or later. It is open source, distributed free of charge under the Apache 2.0 license.
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.
For information about the language, please refer to the Language Reference.
To try it out, do a Basic Installation.
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
begin
   get the_light
   brightness {brightness * 0.9}
   set the_light
end
		  
If you prefer, control your lights with intuitive RGB coordinates instead of HSB.
units rgb
red 50
green 75
blue 75
set all
            
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.
Bugs and Feature Requests
In all my years of writing code, I've never had a bug, but hey, there's a first time for everything.
Please report bugs and make feature requests at https://github.com/al-fontes-jr/bardolph/issues or send email to bardolph@fontes.org.
Made with ♥ in San Francisco