Installation

Linux Debian Based

Install pilight by using the apt repository in Debian / Ubuntu based distributions.

  1. Login to your computer.

  2. Make sure you are running as root. Run the following command and use your own password.

    pi@pilight:~# sudo su
    Password:
    
  3. Add the apt repository to the apt sources list:

    pi@pilight:~# echo "deb http://apt.pilight.org/ stable main" > /etc/apt/sources.list.d/pilight.list
    

    If you want to install the nightly version of pilight then also add:

    root@pilight:~# echo "deb http://apt.pilight.org/ nightly main" >> /etc/apt/sources.list.d/pilight.list
    
  4. pilight uses a signed repository. This means packages get validated before installation. So, to safely download and install pilight packages the pilight key needs to be installed.

    root@pilight:~# wget -O - http://apt.pilight.org/pilight.key | apt-key add -
    
  5. Now update the apt package list:

    root@pilight:~# apt-get update
    
  6. And install pilight

    root@pilight:~# apt-get install pilight
    
  7. When no errors are shown, pilight will be installed and automatically started at boot time. To manually start pilight:

    root@pilight:~# service pilight start
    
  8. And to stop pilight:

    root@pilight:~# service pilight stop
    

Note

pilight makes it easy to install previous version, because all stable versions and all nightly versions between two stable versions will remain available in the apt repository. To see what versions are available, you can run the following command:

root@pilight:~# apt-cache policy pilight
pilight:
  Installed: 7.0.16-g233c268
  Candidate: 7.0.21-ga8b12ea
  Version table:
     7.0.21-ga8b12ea 500
        500 http://apt.pilight.org nightly/main armhf Packages
 *** 7.0.16-g233c268 500
        500 http://apt.pilight.org nightly/main armhf Packages
     7.0.9-gfbc2643 500
        500 http://apt.pilight.org nightly/main armhf Packages
     7.0.8-g953bb85 500
        500 http://apt.pilight.org nightly/main armhf Packages
     7.0 500
        500 http://apt.pilight.org stable/main armhf Packages
     6.0 500
        500 http://apt.pilight.org stable/main armhf Packages
     5.0 500
        500 http://apt.pilight.org stable/main armhf Packages
     4.0 500
        500 http://apt.pilight.org stable/main amd64 Package

In this case, both the stable and the nightly apt repositories are enabled. If you want to install a specific version run the following command:

root@pilight:~# apt-get install pilight=7.0.67-g960219e

Windows 7 and up

  1. Go to http://download.pilight.org.
  2. Download the latest Windows executable called pilight-vX.0-win32.exe. Run it to install pilight.
  3. By default pilight will install into to c:\pilight\.
  4. A default configuration can also be found in that folder.
  5. If you want to use the pilight USB nano you can use the pilight-usb-nano.hex found in the default folder.

OpenWRT Routers

  1. When using OpenWRT you are assumed also to know how to login to your router with SSH.

  2. Go to http://download.pilight.org.

  3. Download the latest pilight OpenWRT compilation called pilight-Atheros-AR9132-vX.0.tar.gz.

  4. Unpack this file like this:

    root@OpenWrt:~# tar -zxvf pilight-Atheros-AR9132-vX.0.tar.gz -C /
    
  5. The OpenWRT package only contains pilight-daemon to save space.

  6. A default configuration is put into /etc/pilight/config.json.

Manually Compiled Version

Warning

We try to provide as many options as possible for you to keep up-to-date with the latest developments. Compiling C software requires some level of expertise, which we cannot and will not provide. This means that no support is given if any issues occur with manually compiling pilight.

Manually compiling pilight is also possible. Use this method is you are not using a Debian-based or a *BSD based operating system.

  1. Login to your computer.

  2. Make sure you’ve configured the pilight stable apt repository, because some required dependencies are not available elsewhere.

  3. Make sure you are running as root. Run the following command and use your own password.

    pi@pilight:~# sudo su
    Password:
    
  4. Install all packages needed for manually compiling pilight. The best way to do this depends on your operating system. The packages needed for Debian are:

    1. build-essential
    2. cmake
    3. git
    4. dialog
    5. libwiringx-dev
    6. libwiringx
    7. libpcap0.8-dev
    8. libpcap0.8
    9. libmbedtls-dev
    10. libmbedx509-0
    11. libmbedcrypto0
    12. libmbedtls10
    13. liblua5.2
    14. liblua5.2-dev
  5. Then download the pilight source code from the pilight GitHub:

    root@pilight:~# git clone --depth 5 -b [branch] https://www.github.com/pilight/pilight.git
    root@pilight:~# cd pilight
    
  6. Replace the [branch] with either master for the latest stable version. This version is exactly the same as the stable version available through the apt repository. Or use development for the very latest developmental build. This development version of pilight is also automatically generated each night. You can download it from the pilight nightly repository.

  7. pilight can be compiled with various built-in features which can be included or excluded. This is done through a menu driven program. This program will also automatically compile and install pilight:

    root@pilight:~/pilight# chmod +x setup.sh
    root@pilight:~/pilight# ./setup.sh
    
    _images/installation.png
  8. When you are thrown back into the command prompt without error(s), pilight has been installed successfully. It will also install a default configuration in /etc/pilight/config.json.

  9. Make sure to run the following command after installation:

    root@pilight:~/pilight# ldconfig
    
  10. pilight can now be started with:

    root@pilight:~/pilight# service pilight start