Skip to content
A daemon with a JSON-RPC API to control your light bulbs
Branch: master
Clone or download
lopter lightsd: get the build system and time_monotonic to work on Windows
This is the first step towards Windows portability.
Latest commit 9f976a6 May 18, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
apps/monolight monolight: trivial typing fixes Feb 11, 2017
compat lightsd: get the build system and time_monotonic to work on Windows May 18, 2017
core lightsd: get the build system and time_monotonic to work on Windows May 18, 2017
dist lightsd: harden the systemd service configuration and add a sample dr… May 18, 2017
docs Add new changelog section & remove useless comment in the release script Feb 13, 2017
examples lightsd: harden the systemd service configuration and add a sample dr… May 18, 2017
share Replace `b64encode' by `openssl base64' in Nov 8, 2015
slides slides: add slides for a small talk at while42 sf May 18, 2017
.hgignore cmake: update UseLatex.cmake to 2.4.2 May 16, 2017
.hgtags Tagging release 1.2.1 Feb 13, 2017 Feed the clang compilation database to YouCompleteMe Aug 24, 2015
CONTRIBUTING.rst Update CONTRIBUTING.rst and add a code of conduct Feb 2, 2017
COPYING Change the license to GPLv3 Mar 8, 2015
README.rst Update the README and trivial installation docs update for OpenWrt Feb 12, 2017


lightsd, a daemon to control smart bulbs

lightsd acts a central point of control for your LIFX WiFi bulbs. lightsd should be a small, simple and fast daemon exposing an easy to use protocol inspired by how musicpd works.

Having to run a daemon to control your LIFX bulbs may seem a little bit backward but has some advantages:

  • no discovery delay ever, you get all the bulbs and their state right away;
  • lightsd is always in sync with the bulbs and always knows their state;
  • lightsd act as an abstraction layer and can expose new discovery mechanisms and an unified API across different kind of smart bulbs;
  • For those of you with a high paranoia factor, lightsd let you place your bulbs in a totally separate and closed network.

Current features

lightsd discovers your LIFX bulbs, stays in sync with them and support the following commands through a JSON-RPC interface:

  • power_off (with auto-retry);
  • power_on (with auto-retry);
  • power_toggle (power on if off and vice-versa, with auto-retry);
  • set_light_from_hsbk;
  • set_waveform (change the light according to a function like SAW or SINE);
  • get_light_state;
  • set_label;
  • tag/untag (group/ungroup bulbs together).

The JSON-RPC interface works on top of TCP/IPv4/v6, Unix sockets, or over a command pipe (named pipe, see mkfifo(1)).

lightsd can target single or multiple bulbs at once:

  • by device address;
  • by device label;
  • by tag;
  • broadcast;
  • composite (list of targets);

lightsd works and is developed against a variety of LIFX firmwares from the oldest ones to the newest ones.


lightsd is packaged for Mac OS X, Arch Linux, Debian based systems and OpenWRT. Check out for installation instructions and a walk-through some interactive examples.

lightsd and monolight, an user interface for a programmable button array, were presented at Fosdem 2017. Check out the slides for a presentation of lightsd's capabilities, architecture and an example of project built with lightsd:


lightsd aims to be highly portable on any slightly POSIX system and on any kind of hardware including embedded devices. Hence why lightsd is written in C with reasonable dependencies:

  • libevent ≥ 2.0.19 (released in May 2012);
  • CMake ≥ 2.8.9 (released in August 2012): only if you want to build lightsd from its sources.

lightsd is actively developed and tested from Arch Linux, Debian, Mac OS X, OpenWRT and OpenBSD; both for 32/64 bits and little/big endian architectures.

Native Windows support has been kept in mind, but isn't really the focus.


Feel free to reach out via email or irc (#lightsd on Freenode, insist if I don't reply). As the project name implies, I'm fairly interested in other smart bulbs.

Check out the contribution guide for the vision behind the project and how to contribute.

Join the conversation on the LIFX forum.

You can’t perform that action at this time.