-
Notifications
You must be signed in to change notification settings - Fork 17
SmartLine Controller
Table of Contents
The SmartLine Controller allows to control other Tubelib compatible blocks by means of IF-THIS-THEN-THAT rules. These rules allow to execute actions based on conditions. Examples for conditions are:
- the Player Detector detects a player
- a button is pressed
- a block state is fault, blocked, standby,...
Actions are:
- turn on/off tubelib blocks, like lamps, door blocks, machines
- send chat messages to the owner
- output a text message to the display
- open/close doors
- debug outputs via print command
Symbolic examples:
- IF a chest becomes empty THEN output a warning on the display
- IF a chest becomes full THEN stop the production of items
You can configure up to 8 rules per Controller, one per row. Each rule consists of:
- a cycle time (how often the condition shall be checked in seconds)
- a condition and an action. If the condition becomes true, the action is executed
- an "after" timer to execute actions delayed (in seconds)
For condition and action a submenu is used:
The controller executes all rules cyclically. The cycle time for each rule is configurable (1..1000 sec). The value 0 is used for an event driven execution of the rule. This rule is called only if the controller has received a command from another block, such as buttons.
Actions can be delayed. Therefore, the 'after' value can be set (0..1000 sec).
Each Tubelib compatible block has a command interface and a unique block number. The block number is shown as block infotext. This number is used as block reference for the controller rules.
The image above shows two rules, interacting with the blocks "0921" and "0923". The second action is a delayed action, it is executed 28 seconds after the condition becomes true.
Keep in mind that the cycle time always has to be higher than the "after" value. Otherwise the cycle frequency can't be fulfilled.
The Controller supports edit commands to exchange, copy or delete rows. The commands work according to the following examples:
- 'x 1 8' exchange rows 1 with row 8
- 'c 1 2' copy row 1 to 2
- 'd 3' delete row 3
The block form has the following Tabs:
- the
rules
tab for the rules - the
outp
tab for debugging outputs viaprint
action and for rule listings - the
notes
tab for your notes - the
help
tab with some further help
States:
- "running", "stopped"
Features:
- none
Supported Commands:
- "control": turn the device/block "on" or "off"
- via SmartLine Controller:
switch
- via SaferLua Controller:
$send_cmnd(num, text)
- "state": read the state of the block
- via SmartLine Controller:
state
- via SaferLua Controller:
$get_status(num)
The controller needs battery power to work.
The battery pack has to be placed near the controller (1 block distance).
The needed battery power is directly dependent on the CPU time the controller consumes.
Because of that, it is important to reduce the cycle time of the rules as much as possible (which helps the admin to keep server lags down :))
For some controller examples, see SmartLine Controller examples.