This shows you the differences between two versions of the page.
action_exdim_tutorial [2015/03/22 15:05] pilino1234 old revision restored (2015/02/20 16:23) |
action_exdim_tutorial [2015/11/27 22:09] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Extended dim action for pilight eventing ===== | ||
- | ==== Introduction ==== | ||
- | The extended dim action replaces the built-in dim action of pilight V6.0. | ||
- | This dim action now supports TO, UP, and DOWN. | ||
- | This tutorial describes the installation and usage of this action. | ||
- | |||
- | ==== Compatibility ==== | ||
- | The modified action is compatible with pilight version 6.0. This version contains the pilight eventing system. | ||
- | ==== Dim ==== | ||
- | The modified dim action accepts, besides the existing TO statement, the UP and DOWN statements. | ||
- | ==== Installation ==== | ||
- | Log on as superuser and cd to your pilight folder: | ||
- | |||
- | <code>pi@raspi2 ~ $ sudo su | ||
- | root@raspi2:/home/pi/# cd pilight</code> | ||
- | |||
- | Stop the pilight service: | ||
- | |||
- | <code>root@raspi2:/home/pi/pilight# service pilight stop</code> | ||
- | |||
- | Download the source code: | ||
- | |||
- | <code>root@raspi2:/home/pi/pilight# git clone --depth 5 -b master https://github.com/niekd/pilight-actions.git</code> | ||
- | |||
- | This will create a folder called pilight-actions in your pilight folder. | ||
- | |||
- | Copy the dim.* files from this folder to the pilight actions library folder: | ||
- | |||
- | <code>root@raspi2:/home/pi/pilight# cp pilight-actions/dim.* libs/actions/</code> | ||
- | |||
- | Then compile the sources to create the modules (.so files). | ||
- | |||
- | <code>root@raspi2:/home/pi/pilight# gcc -fPIC -shared libs/actions/dim.c -Ilibs/pilight -Ilibs/config -o dim.so -DMODULE=1</code> | ||
- | |||
- | Next copy the dim.so files you have just created to the actions subfolder of /usr/local/lib/pilight (create the folder /usr/local/lib/pilight/actions/ first if it doesn't exist): | ||
- | |||
- | <code>root@raspi2:/home/pi/pilight# cp dim.so /usr/local/lib/pilight/actions/</code> | ||
- | |||
- | ==== Configuration ==== | ||
- | |||
- | Edit your config.json according to your needs. | ||
- | |||
- | Now you can start pilight and the new dim action will be loaded and can be used in your rules. | ||
- | |||
- | Note: After installation, the pilight-actions folder and its contents are not required any more and may be deleted. | ||
- | |||
- | |||
- | Have fun! |