Skip to content

Host Install

Motea Marius edited this page Jan 1, 2019 · 5 revisions

When installing diyHue directly on the host, you have two installation methods available. An easy automatic installation script or the commands to install it manually. The automatic install is highly recommended and is kept most up to date.

Automatic install

Just run the following command to install:
curl -s https://raw.githubusercontent.com/diyhue/diyHue/master/BridgeEmulator/easy_install.sh | sudo bash /dev/stdin

Once complete, diyHue is installed and running. It will also automatically start on boot. diyHue can also be stopped, started and restarted with the following command:

sudo systemctl [start/stop/restart] hue-emulator.service

Manual install

  • Download or clone the mirror with git (recommended) git clone https://github.com/diyhue/diyHue.git
  • Create startup systemd file based on the following example:
    sudo nano /lib/systemd/system/hue-emulator.service
    paste the following code and edit the path of the emulator script
[Unit]
Description=Hue Emulator Service
After=multi-user.target

[Service]
Type=idle
Restart=always
RestartSec=30
StartLimitInterval=200
StartLimitBurst=5

WorkingDirectory=/home/pi
ExecStart=/home/pi/HueEmulator.py

[Install]
WantedBy=multi-user.target

save and execute the following commands:

sudo chmod 644 /lib/systemd/system/hue-emulator.service
sudo systemctl daemon-reload
sudo systemctl enable hue-emulator.service 
sudo systemctl start hue-emulator.service

If you want to disable logging to syslog you must add in systemd file StandardOutput=null. you can check the service status with sudo systemctl status hue-emulator.service

Please return to the getting started page for configuration details.

Clone this wiki locally