SmartLine - joe7575/techpack GitHub Wiki
Table of Contents
- SmartLine Button/Switch
- SmartLine Repeater
- SmartLine State Collector
- SmartLine Timer
- SmartLine Sequencer
- SmartLine Player Detector
- SmartLine Signal Tower
- SmartLine Display
- SmartLine Controller
The following SmartLine blocks are functional identical to the Tubelib blocks with the same names, the only different is the block housing. (see addons2)
You can switch on/off other blocks by means of the Button/Switch.
To switch the block on/off, the number of the block has to be entered into the Button form.
(Don't forget the leading zeros!)
This block can be configured as button or as switch. For the button configuration, times between 2 to 16 seconds are possible.
You can control several blocks by means of one button. In this case all numbers with blanks in between have to be entered.
States:
- none
Features:
- sends "on"/"off" events
- Programmer support (store node numbers)
Supported Commands:
- none
The Repeater is a multiplier block, sending received commands to all connected blocks.
The list of destination block numbers has to be configured, but can easily programmed by means of the Programmer.
States:
- none
Features:
- Programmer support (store node numbers)
Supported Commands:
- none
In contrast to the Repeater, the Collector is a block collecting states from other blocks.
The list of block numbers has to be configured, but can easily programmed by means of the Programmer.
The Collector reads one block state each second. After reading all states, the result will be used
as own state and can be read by means of a Controller.
In addition, a state severity level can be configured. If this level is reached or exceeded,
the Collector sends an "on" event to a configured block (e.g. a Controller).
States:
- "running", "stopped", "standby", "blocked", "fault", "defect"
Features:
- sends "on"/"off" events
- Programmer support (store node numbers)
Supported Commands:
- "state": read the state of the block
- via SmartLine Controller:
state
- via SaferLua Controller:
$get_status(num)
The Timer is for a daytime controlled sending of commands e.g. to turn street lights on/off.
The timer checks the time every few seconds. If the block was just loaded, the timer will check the last 4 hours
for commands.
States:
Features:
- sends "on"/"off" events
Supported Commands:
- "control": turn the device/block "on" or "off"
- via SmartLine Controller:
switch
- via SaferLua Controller:
$send_cmnd(num, text)
The Sequencer block allows to define sequences of on/off commands with time delays in between.
For this purpose, a sequence of up to 8 steps can be programmed, each with
destination block numbers, on/off command, and time gap to the next step in seconds.
The Sequencer can run endless or only once and can be switches on/off by other blocks.
States:
Features:
- sends "on"/"off" events
Supported Commands:
- "control": turn the device/block "on" or "off"
- via SmartLine Controller:
switch
- via SaferLua Controller:
$send_cmnd(num, text)
The Player Detector sends a "on" command to all connected blocks, when a player is nearby (4 blocks radius).
The player name can be requested by means of a "name" request command (see [SmartLine Controller).
The Player Detector can be programmed with player names (with blanks in between). In this case only the "known"
players trigger the command.
States:
- returns the name of the player
Features:
- sends an "on" message, if a player is nearby (4 nodes radius)
- Programmer support (store node numbers)
Supported Commands:
- "detector_state": read the state of the playerdetector
- via SmartLine Controller:
playerdetector
- via SaferLua Controller:
$playerdetector(num)
A Signal Tower is used to indicate machine or controller states optically. The Signal Tower
has green, amber, and red lamps, which can be switched on by means of the
corresponding commands "green", "amber", "red", and "off".
In addition the Signal Tower supports to request the block state, which is "green", "amber", "red", or "off".
(To control the Signal Tower, see [SmartLine Controller).
States:
- "green", "amber", "red", "off"
Features:
- none
Supported Commands:
- "tower": set the signaltower color
- via SmartLine Controller:
signaltower
- 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 Display is used for text outputs from the Controller.
Is supports commands to clear the screen, position related output and scroll mode.
The display has 9 text rows (1..9). If you output to row 0, the display 'infotext' is written instead.
(To control the Display, see SmartLine Controller).
States:
Features:
- none
Supported Commands:
- "display": output text to the display
- via SmartLine Controller:
display
- via SaferLua Controller:
$display(num, row, text,...)
- "cl_screen": clear the display
- via SmartLine Controller:
cleardisplay
- via SaferLua Controller:
$clear_screen("1234")
The most complex block of SmartLine is the SmartLine Controller, a 'computer' to control and monitor Tubelib based machines.
You don't need any programming skills, it is more like a configuration based on rules with conditions and actions.
Examples for conditions are:
- the Player Detector detects a player
- a button is pressed
- a block state is fault, blocked, standby,...
- a timer is expired
Examples for 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
(see SmartLine Controller)
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)