User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:christmas [2019/12/13 17:27] (current)
vmyslivec created
Line 1: Line 1:
 +====== Christmas package ======
 +
 +If you want to shine your Turris router like a Christmas tree, you can simply
 +use our ''​christmas''​ package.
 +
 +To install and enable the Christmas on your router, you will need access to
 +//LuCI// web interface or command line (e.g. over //SSH//).
 +
 +<WRAP center round important 80%>
 +**Warning**:​
 +Christmas package needs programmable RGB LED diodes (and ''​rainbow''​ utility) so
 +it is available for //Turris 1.x// and //Turris Omnia// routers only.
 +</​WRAP>​
 +
 +{{ :​en:​public:​christmas.png?​600 |}}
 +
 +
 +===== Enabling the service =====
 +
 +If you have Christmas package installed on your router, you just need to enable
 +and start the ''​christmas''​ service.
 +
 +==== LuCI ====
 +
 +In LuCI, go to //​System/////​Startup//​ configuration,​ look for a service called
 +''​christmas''​ – should be located at the bottom. Then click on //​Disabled//​ (to
 +enable the service when the router starts) and then also on //Start// button to
 +start the service immediately.
 +
 +The configuration should look like this after these changes:
 +
 +{{ :​en:​public:​christmas-luci-service.png?​600&​direct |}}
 +
 +If you can't find ''​christmas''​ service, you should need to install Christmas
 +package first (see //​Installation//​ section below).
 +
 +==== CLI ====
 +
 +In command line, simply enable and start the service via its *init* script:
 +
 +<​code>​
 +/​etc/​init.d/​christmas enable
 +/​etc/​init.d/​christmas start
 +</​code>​
 +
 +
 +===== Installation =====
 +
 +Christmas package was introduced in Turris OS //3.11.10// and Turris OS //4.0.2//.
 +If you run older Turris OS version, please upgrade your router first.
 +
 +<WRAP center round tip 80%>
 +**Note**:
 +Turris OS version can be displayed in //About// tab //Foris// web interface or via
 +command ''​cat /​etc/​turris-version''​.
 +</​WRAP>​
 +
 +
 +
 +Christmas package is installed automatically during Christmas time. You would
 +need to install it manually if you want to have it available permanently or at
 +some other time.
 +
 +==== LuCI ====
 +
 +In LuCI, go to //​System/////​Software//​ configuration and search for ''​christmas''​
 +keyword among installed packages:
 +
 +{{ :​en:​public:​christmas-luci-installed.png?​direct&​600 |}}
 +
 +If the package is not present, you can install it in //Available packages// tab
 +by clicking //Install// button next to it:
 +
 +{{ :​en:​public:​christmas-luci-install.png?​direct&​600 |}}
 +
 +==== CLI ====
 +
 +Simply run the following command to check whether the package is installed:
 +
 +<​code>​
 +opkg list-installed christmas
 +</​code>​
 +
 +If so, you should see output similar to:
 +
 +<code txt>
 +christmas - 0.3-3.6-1.2
 +</​code>​
 +
 +If there is no output of this command, you can install the package manually.
 +
 +<​code>​
 +opkg update
 +opkg install christmas
 +</​code>​
 +
 +
 +===== Configuration =====
 +
 +You can tune your Christmas tree in form of changing the blink speed and
 +configuring a set of colors.
 +
 +To change this configuration,​ you have to edit a //UCI// configuration file on the
 +device and so you need a CLI access.
 +
 +Open the configuration file ''/​etc/​config/​christmas''​ with your favorite text
 +editor (that is ''​vim''​) and you can change following values there:
 +
 +^ Parameter name      ^ Type    ^ Value type    ^ Description ​  ^
 +| enable_probability ​ | option ​ | float         | Probability of turning on a LED diode |
 +| sleep_max ​          | option ​ | float         | Each blink will be performed in that maximum number of seconds (lower this value if you want to speed up the blinking) |
 +| colors ​             | list    | string ​       | List of colors for ''​rainbow''​ utility: RGB code or name of predefined color (see ''​rainbow --help''​ for details) |
 +
 +Example configuration with default values looks like:
 +
 +<​file>​
 +config christmas "​christmas"​
 + option enable_probability '​0.7'​
 + option sleep_max '​3'​
 + list colors '​00FF00'​
 + list colors '​0000AA'​
 + list colors '​FF6600'​
 + list colors '​FF0000'​
 +</​file>​
 +
 +You can use ''​uci''​ command line tool to update these setting as well. Please use
 +''​christmas''​ //config// file and ''​christmas''​ //section// everytime:
 +
 +<​code>​
 +uci set christmas.christmas.sleep_max=3
 +uci set christmas.christmas.enable_probability=0.7
 +uci add_list christmas.christmas.colors=00FF00
 +uci add_list christmas.christmas.colors=0000AA
 +uci add_list christmas.christmas.colors=FF6600
 +uci add_list christmas.christmas.colors=FF0000
 +uci commit
 +</​code>​
 +
 +Do not forget to restart the service after you change the settings:
 +
 +<​code>​
 +/​etc/​init.d/​christmas restart
 +</​code>​