Installation instructions

Installation (for Mac OS X)

Make sure you have brew installed and updated: http://brew.sh/.

brew install lopter/lightsd/lightsd

Or,

brew tap lopter/lightsd
brew install lightsd

Make sure you execute the ln -sfv command displayed at the end of the installation:

ln -sfv /usr/local/opt/lightsd/*.plist ~/Library/LaunchAgents

Please, also install Python 3 and ipython if you want to follow the examples in the next section:

brew install python3
pip3 install ipython

Read on First steps to see how to use lightsd.

Installation (for Arch Linux)

Make sure you have Yaourt installed: https://archlinux.fr/yaourt-en (wiki page).

yaourt -Sya lightsd

Make sure to follow the post-installation instructions: replace $USER with the user you usually use.

Please also install ipython if you want to follow the examples in the next section:

yaourt -Sya ipython

Read on First steps to see how to use lightsd.

Installation (OpenWRT trunk)

If you’re running OpenWRT trunk then, from your build root, just add lightsd’s feed:

cat >>feeds.conf`[ -f feeds.conf ] || echo .default` <<EOF
src-git lightsd https://github.com/lopter/openwrt-lightsd.git
EOF
./scripts/feeds update -a

Install lightsd:

./scripts/feeds install lightsd

Run your usual make menuconfig, make firmware flash flow, lightsd should be running at startup.

Read on First steps to see how to use lightsd.

Build instructions for Debian based systems (Ubuntu/Raspbian)

Note

Those instructions have been tested on Debian Wheezy & Jessie.

Install the following packages:

apt-get install build-essential cmake libevent-dev git ca-certificates ipython3 fakeroot wget devscripts debhelper

Download and extract lightsd:

wget -O lightsd_1.1.2.orig.tar.gz https://github.com/lopter/lightsd/archive/1.1.2.tar.gz
tar -xzf lightsd_1.1.2.orig.tar.gz
cd lightsd-1.1.2
wget -O - https://github.com/lopter/lightsd/releases/download/1.1.2/dpkg-1.1.2.tar.gz | tar -xzf -

Build the package:

debuild -uc -us

Install the package:

Note

You will need to run this command as root with sudo(8) or be logged in as root already.

dpkg -i ../lightsd_1.1.2-1_`dpkg --print-architecture`.deb

Still as root, run the command the package asks you to run:

Note

If you are not using sudo on your system replace $USER by your regular non-root username:

gpasswd -a $USER lightsd

Log out and back in as $USER for the change to take effect.

Read on First steps to see how to use lightsd.

Build instructions (for other systems)

lightsd should work on any slightly POSIX system (i.e: not Windows), make sure you have the following requirements installed:

  • libevent ≥ 2.0.19 (released May 2012);
  • CMake ≥ 2.8.9 (released August 2012).

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

Please also install ipython with Python 3 if you want to follow the examples in the next section.

From a terminal prompt, clone the repository and move to the root of it:

git clone https://github.com/lopter/lightsd.git
cd lightsd

From the root of the repository:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
make -j5 lightsd

Read on First steps to see how to use lightsd.