Installation

Index

  1. Apt repository
  2. pkgNG repository
  3. Manually Compiled Version
  4. Updating
  5. Post-Installation steps

Apt repository

Through the apt repository in Raspbian, XBian or Raspbmc

  1. Login to your Raspberry Pi.
  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:
    root@pilight:~# nano /etc/apt/sources.list
  4. You will probably see (at least) the following line:
    deb https://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
    
  5. Add the next line below it:
    deb https://apt.pilight.org/ stable main
  6. Then save the file by using the following key combinations [CTRL]-X then Y then [ENTER].
  7. pilight uses a signed repository. This means packages get validated by their consistency, making false package distribution harder. However, to safely download and install pilight packages we need to add the pilight key:
    root@pilight:~# wget -O - https://apt.pilight.org/pilight.key | apt-key add -
  8. Now update the apt package list:
    root@pilight:~# apt-get update
  9. And install pilight:
    root@pilight:~# apt-get install pilight
  10. When no errors are shown, pilight will be installed and automatically started at boot time. To manually start pilight:
    root@pilight:~# service pilight start
  11. And to stop pilight:
    root@pilight:~# service pilight stop

If you want to use the developmental or nightly repository you can just follow all steps, but except just adding the stable repository in the /etc/apt/sources.list you add:

deb https://apt.pilight.org/ development main
deb https://apt.pilight.org/ nightly main

pkgNG repository

The FreeBSD repo isn't actively maintained. If you want to have a FreeBSD package, please post a message on the forum.

Through the pkgNG repository in FreeBSD and OpenBSD

  1. Login to your system.
  2. Make sure you are running as root. Run the following command and use your root password:
    [ssh@server ~]$ su
    Password:
  3. Add the pilight repository to the pkgNG sources:
    [root@server /home/ssh]# mkdir -p /etc/pkg
    [root@server /home/ssh]# fetch -o - https://pkg.pilight.org/pilight.conf > /etc/pkg/pilight.conf
  4. Then update the pkgNG repository:
    [root@server /home/ssh]# pkg update
  5. And install pilight:
    root@server /home/ssh]# pkg install pilight
  6. When no errors are shown, pilight was successfully installed.
  7. To start pilight run:
    [root@server /home/ssh]# pilight-daemon
  8. And to stop pilight run:
    [root@server /home/ssh]# pkill pilight-daemon

Manually Compiled Version

Manually compiling pilight is also a possibility. Use this method is you are not using a Debian-based OS.

  1. Login to your Raspberry Pi.
  2. Make sure you are running as root. Run the following command and use your own password.
    pi@pilight:~# sudo su
    Password:
  3. Install all packages needed for manually compiling software. The best way to do this depends on your system. The packages needed are:
    1. build-essential
    2. cmake
    3. git
    4. dialog
    5. libunwind-dev
    6. libpcap-dev
       
  4. Then download the pilight source code from the pilight github:
    root@pilight:~# git clone --depth 5 -b [branch] https://github.com/pilight/pilight.git
    root@pilight:~# cd pilight
  5. Replace the [branch] with either master for the latest master version (also available through apt) or by development for the very latest developmental build.
     
  6. pilight can be compiled with various built-in features which can be included or excluded. This is done through a menu driven setup. This will also automatically compile and install pilight:
    root@pilight:~/pilight# chmod +x setup.sh
    root@pilight:~/pilight# ./setup.sh
    
    
  7. When you are thrown back into the command prompt without error(s), pilight has been installed succesfully. It will also install a default settings file in /etc/pilight/settings.json. This file can be used to set various specific settings of pilight.
     
  8. Make sure to run the following command after installation:
    root@pilight:~/pilight# ldconfig
  9. pilight can now be started with:
    root@pilight:~/pilight# service pilight start
  10. And be stopped by:
    root@pilight:~/pilight# service pilight stop

Updating

The updating proces depends on the way you have installed pilight in the first place. If you have used the apt repository, just run the following commands:

pi@pilight:~# sudo apt-get update
pi@pilight:~# sudo apt-get upgrade

If a new pilight version is available, it will automatically be installed.

When you have manually compiled pilight, just rerun the steps described here.

Post-Installation steps

Before pilight can be properly used, you need to configure it to your needs in the config.json. The most important ones are:

  1. Make sure your hardware pins are correctly defined.
  2. Make sure all settings fit your needs. The behavior of pilight can be changed in various ways by adjusting various settings.
  3. If you now have a working setup in which you can send and receive data, you can define devices so pilight can actually store and process the data it sends and receives.
  4. The last optional step would be configuring your devices as GUI elements.

Please notify me when you have found typos or errors on this page.

Published on