2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 22:56:34 +00:00

HMCCU: Example FHEM configuration

git-svn-id: https://svn.fhem.de/fhem/trunk@10008 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
fhemzap 2015-11-26 18:19:17 +00:00
parent b036d2f6ff
commit ba578bec17

View File

@ -3,21 +3,23 @@
*** HMCCU/HMCCUDEV - Modules for FHEM - Homematic CCU integration *** *** HMCCU/HMCCUDEV - Modules for FHEM - Homematic CCU integration ***
======================================================================= =======================================================================
* Document covers HMCCU/HMCCUDEV version 1.9. * Document covers HMCCU/HMCCUDEV/HMCCUCHN version 2.0 (RPC server)
* Please read carefully before using the modules. * Please read carefully before using the modules.
* Last modified: 25.11.2015
------------------------------------ ----------------------------------------------
Content Content
----------------------------------------------
1 HMCCU Introduction 1 HMCCU Introduction
1.1 HMCCU Description 1.1 HMCCU Description
1.2 HMCCU Requirements 1.2 HMCCU Requirements & Installation
2 HMCCU Usage 2 HMCCU Usage
2.1 HMCCU Set Commands 2.1 HMCCU Set Commands
2.2 HMCCU Get Commands 2.2 HMCCU Get Commands
2.3 HMCCU Attributes 2.3 HMCCU Attributes
2.4 HMCCU Parameter File 2.4 HMCCU Parameter File
2.5 RPC daemon
3 HMCCUDEV Introduction 3 HMCCUDEV Introduction
3.1 HMCCUDEV Description 3.1 HMCCUDEV Description
@ -28,39 +30,46 @@
4.2 HMCCUDEV Get Commands 4.2 HMCCUDEV Get Commands
4.3 HMCCUDEV Attributes 4.3 HMCCUDEV Attributes
5 Hints and Tips 5 HMCCUCHN Usage
5.1 Requesting information from CCU 5.1 HMCCUCHN Set Commands
5.2 Executing FHEM commands on CCU 5.2 HMCCUCHN Get Commands
5.3 HMCCUCHN Attributes
------------------------------------ 6 Hints and Tips
6.1 Requesting information from CCU
6.2 Executing FHEM commands on CCU
6.3 Use RAM disk for /tmp on Raspbian
----------------------------------------------
------------------------------------ ====================================
1 HMCCU Introduction 1 HMCCU Introduction
------------------------------------ ====================================
------------------------------------ ------------------------------------
1.1 HMCCU Description 1.1 HMCCU Description
------------------------------------ ------------------------------------
The modules HMCCU and HMCCUDEV provide a simple interface between FHEM and The modules HMCCU, HMCCUDEV and HMCCUCHN provide a simple interface between FHEM
a Homematic CCU2. HMCCU is the IO device for the communication with the CCU. and a Homematic CCU2. HMCCU is the IO device for the communication with the CCU.
The states and values of CCU channels and variables are not updated automatically The states and values of CCU channels and variables are not updated automatically
in FHEM. You have to define an AT device with a HMCCU get command to ensure a in FHEM. You have to define AT devices with get commands to ensure a continuous
continuous update of CCU readings in FHEM. update of CCU readings in FHEM or use the external RPC server.
------------------------------------ --------------------------------------
1.2 HMCCU Requirements 1.2 HMCCU Requirements & Installation
------------------------------------ --------------------------------------
The module HMCCU requires the XML-API CCU addon (version >= 1.10). The FHEM The module HMCCU no longer requires the XML-API CCU addon. The FHEM module requires
module requires the packages XML::Simple and File::Queue. the packages LWP::UserAgent, Time::HiRes and File::Queue. The RPC server ccurpcd.pl
The module 88_HMCCU.pm must be copied into folder FHEM under the FHEM installation requires the packages File::Queue, RPC::XML::Server, RPC::XML::Client, XML::Simple
directory. and IO::Socket::INET.
All module files 88_HMCCU* and the RPC daemon ccurpcd.pl must be copied into the
folder FHEM under the FHEM installation directory.
------------------------------------ ====================================
2 HMCCU Usage 2 HMCCU Usage
------------------------------------ ====================================
Define a new IO device for communication with Homematic CCU: Define a new IO device for communication with Homematic CCU:
@ -68,51 +77,57 @@ Define a new IO device for communication with Homematic CCU:
The only parameter is the name or the IP address of the Homematic CCU. All The only parameter is the name or the IP address of the Homematic CCU. All
other adjustments are done by setting attributes. other adjustments are done by setting attributes.
Some commands use channel or datapoint addresses. A channel address has the Some commands use device, channel or datapoint addresses. A channel address has
following format: the following format:
[<interface>.]<device-address>:<channel-number> [<interface>.]<device-address>:<channel-number>
The default value for <interface> is BidCoS-RF. A datapoint is identified by
[<interface>.]<device-address>:<channel-number>.<datapoint-name> A device address is a channel address without the channel number. The default
value for <interface> is "BidCoS-RF". A datapoint is identified by
<channel-address>.<datapoint-name>
or or
<channel-name>.<datapoint-name> <channel-name>.<datapoint-name>
IMPORTANT NOTE: During device definition HMCCU reads the available CCU devices
and channels via XML-API. After a reload of the module this must be repeated
by using command 'get devicelist'. Otherwise HMCCU and HMCCUDEV won't work
correctly. It's recommended to define an automatic device synchronization
with AT and 'get devicelist'.
A <channel-name> or a <device-name> is the alias for an device or channel defined
in the CCU.
IMPORTANT NOTE: During device definition HMCCU reads the available CCU devices.
This request must be repeated by using command "get devicelist" after a reload
of the module or after modification or definition of devices in the CCU. Otherwise
HMCCU, HMCCUDEV and HMCCUCHN won't work correctly. It's recommended to define
an automatic device synchronization (i.e. daily) with AT and command
'get <name> devicelist'.
------------------------------------ ------------------------------------
2.1 HMCCU Set commands 2.1 HMCCU Set commands
------------------------------------ ------------------------------------
If attribute 'stateval' is set the specified string substitutions are applied If attribute 'stateval' is set the specified string substitutions are applied
before setting the device state, a variable or a datapoint value. This is for values before setting the device state, a variable or a datapoint value.
important because CCU states are often 'true' or 'false' while in FHEM one like This is important because CCU states are often 'true' or 'false' while in FHEM
to use 'on' or 'off'. So setting 'stateval' to 'on:true,off:false' will ensure one like to use 'on' or 'off'. So i.e. setting 'stateval' to 'on:true,off:false'
that FHEM commands 'on' and 'off' are replaced by 'true' and 'false' before will ensure that FHEM commands 'on' and 'off' are replaced by 'true' and 'false'
transmitting them to the CCU. before transmitting them to the CCU.
Set state of a CCU channel: Set state of a CCU channel:
set <name> devstate {<channel-name>|<channel-address>} <value> [...] set <name> devstate {<channel-name>|<channel-address>} <value> [...]
Parameters <channel-name> or <channel-address> refer to the CCU device Parameters <channel-name> or <channel-address> refer to the CCU device
channel with datapoint STATE. If more than one <value> is specified the channel with datapoint STATE. This default datapoint can be changed by setting
values are concatinated by blanks to a single value. attribute 'statedatapoint'.
If more than one <value> is specified the values are concatinated by blanks
to one text string.
Set value of a CCU device datapoint: Set value of a CCU device datapoint:
set <name> datapoint {<channel-name>|<channel-address>.<datapoint> <value> [...] set <name> datapoint {<channel-name>|<channel-address>}.<datapoint> <value> [...]
Parameters are the same as with 'devstate' command. In addition the name Parameters correspond to 'devstate' command. In addition the name of a CCU
of a CCU channel datapoint must be specified. channel datapoint must be specified.
Set value of a CCU system variable: Set value of a CCU system variable:
@ -124,70 +139,78 @@ Execute CCU program:
set <name> execute <program> set <name> execute <program>
The program is executed even it's deactivated in CCU. The program is executed even if it's deactivated in CCU.
Clear CCU alarms:
set <name> clearmsg
Execute Homematic script:
set <name> hmscript <script-file>
If script returns parameter=value pairs via standard output these values are
stored as readings.
------------------------------------ ------------------------------------
2.2 HMCCU Get commands 2.2 HMCCU Get commands
------------------------------------ ------------------------------------
If attribute 'ccureadings' is set to 1 (default) the results of the get If attribute 'ccureadings' is set to 1 (default) the results of the get commands
commands are stored in readings. The reading names by default correspond are stored in readings. By default the reading names correspond to the CCU
to the CCU datapoints, including the channel-name. By setting the attribute datapoints, including the channel-name. This behaviour can be changed by setting
'ccureadingformat' reading names can be changed to channel-address and the attribute 'ccureadingformat'. If attribute 'ccureadings' is set to 0 the
datapoint name. The attribute 'ccureadingformat' is ignored if the same results of the get commands are displayed in the browser window. No readings will
attribute is defined in a client device. be set in this case. Some get commands allow an optional parameter <reading>. If
If attribute 'ccureadings' is set to 0 the results of the get commands this parameter is specified the CCU value is stored in FHEM using this reading name.
are displayed in the browser window. No readings will be set in this case.
Some get commands allow an optional parameter <reading>. If this parameter The attribute 'updatemode' controls wether readings are updated in the IO device,
is specified the CCU value is stored in FHEM using this reading name. in client devices only or both in IO device and client devices.
With attribute 'substitute' you can define expressions which are substituted
by strings before CCU values are stored in readings. For example if CCU With attribute 'substitute' one can define expressions which are substituted by
reports device states as 'true' or 'false' these values can be replaced with strings before CCU values are stored in readings. For example if CCU reports
'open' or 'closed' by setting 'substitute' to 'true:open,false:closed'. device states as "true" or "false" these values can be replaced by "open" or
The attribute 'substitute' is ignored if the same attribute is defined "closed" by setting "substitute" to "true:open,false:closed". The attribute
in a client device. 'substitute' is ignored if the same attribute is defined in a client device.
Get values of channel datapoints: Get values of channel datapoints:
get <name> channel {<channel-name>|<channel-address>}[.<datapoint_exp>] get <name> channel {<channel-name>|<channel-address>}[.<datapoint_exp>]
Attention: There's no blank between channel and datapoint. If datapoint Attention: There's no blank between channel and datapoint. If datapoint is
is not specified all datapoints will be read. The command accepts a not specified all datapoints will be read. The command accepts a regular
regular expression as parameter datapoint. expression as parameter <datapoint_exp>.
Get value of datapoint: Get value of datapoint:
get <name> datapoint {<channel-name>|<channel-address>}.<datapoint> get <name> datapoint {<channel-name>|<channel-address>}.<datapoint> [<reading>]
Read list of devices and channels from CCU: Read list of devices and channels from CCU:
get <name> devicelist get <name> devicelist [dump]
This command must be executed after HMCCU is reloaded or after devices are
defined, modified or deleted in the CCU. Otherwise HMCCU does not know
the alias names of CCU devices and most of the get/set commands will fail.
With option 'dump' all devices/channels are displayed in browser window.
Get state of channel: Get state of channel:
get <name> devstate {<channel-name>|<channel-address>} [<reading>] get <name> devstate {<channel-name>|<channel-address>} [<reading>]
Specified channel must contain the datapoint 'STATE'. Specified channel must contain the datapoint 'STATE'. This default datapoint
can be modified by setting attribute 'statedatapoint'.
Get multiple channels and datapoints: Get multiple channels and datapoints:
get <name> parfile [<parfile>] get <name> parfile [<parfile>]
If attribute 'parfile' is set parameter <parfile> can be omitted. If attribute 'parfile' is set parameter <parfile> can be omitted. See
See parameter file description below. parameter file description below.
Get CCU variable values: Get CCU variable values:
get <name> vars <varname_exp> get <name> vars <varname_exp>
Variable name can be a regular expression. Variables are stored Variable name can be a regular expression. Variables are stored as readings
as readings with same name as in CCU. with same name as in CCU.
------------------------------------ ------------------------------------
2.3 HMCCU Attributes 2.3 HMCCU Attributes
@ -196,80 +219,140 @@ Get CCU variable values:
Set reading name format (default is 'name'): Set reading name format (default is 'name'):
attr <name> ccureadingformat { name | address } attr <name> ccureadingformat { name | address }
Control reading update in IO and client devices (default is 'hmccu'):
attr <name> updatemode { hmccu | both | client }
Control reading creation (default is 1): Control reading creation (default is 1):
attr <name> ccureadings { 0 | 1 } attr <name> ccureadings { 0 | 1 }
Remove character from CCU device or variable specification in set Set datapoint for "get/set devstate" commands (default is 'STATE'):
commands:
attr <name> statedatapoint <datapoint>
Remove character from CCU device or variable specification in set commands:
attr <name> stripchar <character> attr <name> stripchar <character>
If a variable name ends with the specified character this If a variable name ends with the specified character this character will be
character will be removed. removed.
Specify name of parameter file for command 'get parfile': Specify name of parameter file for command "get parfile":
attr <name> parfile <parfile> attr <name> parfile <parfile>
Set interval for RPC event processing:
attr <name> rpcinterval { 3 | 5 | 10 }
Set interval in seconds for reading RPC events from RPC event queue.
Set port of CCU RPC interface (default is 2001):
attr <name> rpcport <port>
Set RPC event queue file (default is /tmp/ccuqueue):
attr <name> rpcqueue <filename>
Parameter <filename> is a prefix. The RPC event queue consists of two files
with extension .idx and .dat.
Start/stop RPC server:
attr <name> rpcserver { on | off }
After starting the RPC server it takes 3 minutes until events from CCU arrive.
Stopping RPC server can take a few seconds.
Specify text substitutions for values in set commands: Specify text substitutions for values in set commands:
attr <name> stateval <text1>:<subtext1>[,...] attr <name> stateval <text1>:<subtext1>[,...]
Note: Parameters <textn> are no regular expressions.
Specify text substitutions for values returned by get commands: Specify text substitutions for values returned by get commands:
attr <name> substitute <regexp1>:<text1>[,...] attr <name> substitute <regexp1>:<text1>[,...]
------------------------------------ ------------------------------------
2.4 HMCCU Parameter files 2.4 HMCCU Parameter files
------------------------------------ ------------------------------------
A parameter file contains a list of CCU channel or datapoint A parameter file contains a list of CCU channel or datapoint definitions. Each
definitions. Each line can contain a text substitution rule. A parameter line can contain a text substitution rule. A parameter file is used by command
file is used by command 'get parfile'. "get parfile". The format of a parfile entry is:
The format of a parfile entry is:
<channel-name>|<channel-address>[.<datapoint_exp>] [<regexp1>:<subtext1>[,...]] {<channel-name>|<channel-address>}[.<datapoint_exp>] [<regexp1>:<subtext1>[,...]]
First part corresponds to command 'get channel'. Empty lines and lines starting First part corresponds to command 'get channel'. Empty lines and lines starting
with a '#' are ignored. with a '#' are ignored.
------------------------------------
2.5 RPC daemon
------------------------------------
------------------------------------ Because of several restrictions of FHEM regarding socket communication and
forking external processes the RPC daemon is realized as a standalone process.
The communication between ccurpcd and FHEM happens by using a file based FIFO
queue. On systems running on SD cards like Raspberry PI it's recommended to
set the attribute 'rpcqueue' pointing to a file located on a RAM disk (see
section 6.3 for more information about setting up a RAM disk on Raspbian).
ccurpcd is started under user 'fhem'. So this user must have the permission to
read and write data on from/into queue file and also write log file entries in
the standard FHEM log directory. The daemon writes error messages to file
ccurpcd.log in the FHEM log directory.
The RPC daemon is controlled via attribute 'rpcserver'. After setting this
attribute to "on" the HMCCU module will start ccurpcd as a separate process.
The PID of ccurpcd is stored in the internal "RPCPID". After start of ccurpcd
it takes 3 minnutes until first events from CCU arrive in FHEM (don't know
why - ask EQ-3 ;-)
The RPC daemon is stopped when setting 'rpcserver' to "off" or by sending a
signal "INT" to the process. Because ccurpcd will gracefully shutdown the
CCU interface it can take some time until process disappears. After process
has been terminated the internal "RPCPID" is deleted.
For more information see attributes 'rpcport', 'rpcserver', 'rpcqueue' and
'rpcinterval'.
====================================
3 HMCCUDEV Introduction 3 HMCCUDEV Introduction
------------------------------------ ====================================
------------------------------------ ------------------------------------
3.1 HMCCUDEV Description 3.1 HMCCUDEV Description
------------------------------------ ------------------------------------
HMCCUDEV is used to define client devices. HMCCU can be used standalone (without HMCCUDEV is used to define HMCCU client devices for CCU devices. Note: HMCCU
defining client devices). can be used standalone without defining client devices.
------------------------------------ ------------------------------------
3.2 HMCCUDEV Requirements 3.2 HMCCUDEV Requirements
------------------------------------ ------------------------------------
See 1.2 HMCCU Requirements. The module 88_HMCCUDEV.pm must be copied into folder See 1.2 HMCCU Requirements. The module 88_HMCCUDEV.pm must be copied into folder
FHEM under the FHEM installation directory. FHEM under the FHEM installation directory. A IO device of type HMCCU must be
defined before defining any client devices.
------------------------------------ ====================================
4 HMCCUDEV Usage 4 HMCCUDEV Usage
------------------------------------ ====================================
Define a new client device: Define a new client device:
define <name> HMCCUDEV {<Device-Name>|<Device-Address>} [<StateChannel>] [readonly] define <name> HMCCUDEV {<Device-Name>|<Device-Address>} [<channel-number>] [readonly]
Parameter <Device-Address> is the CCU device address without the channel number. Parameter <Device-Address> is the CCU device address without the channel number.
The CCU device must be known by HMCCU. If the device can't be found the device The CCU device must be known by HMCCU. If the device can't be found the device
list of the HMCCU device must be updated with command 'get devicelist'. list of the HMCCU device must be updated with command 'get devicelist'.
The Parameter <StateChannel> is the number of the channel which contains the The channel number for devstate commands can be specified with parameter
datapoint 'STATE'. Because not every CCU device has a 'STATE' datapoint this <channel-number> or via attribute 'statechannel'.
parameter is optional. The state channel number can also be set with the attribute
command.
The keyword 'readonly' declares a device as read only (i.e. a sensor). For read The keyword 'readonly' declares a device as read only (i.e. a sensor). For read
only devices no set command is available. only devices no set command is available.
@ -287,9 +370,9 @@ Set state of device:
set <name> <state-value> set <name> <state-value>
If attribute 'statevals' is defined 'devstate' can be ommitted. The channel If attribute 'statevals' is defined 'devstate' can be ommitted. The channel
number which contains datapoint 'STATE' must be set during device definition number which contains datapoint 'STATE' must be set via attribute 'statechannel'.
or via attribute 'statechannel'. If no state channel is specified the command If no state channel is specified the command is not available. The default
is not available. datapoint 'STATE' can be modified by setting attribute 'statedatapoint'.
------------------------------------ ------------------------------------
4.2 HMCCUDEV Get Commands 4.2 HMCCUDEV Get Commands
@ -297,14 +380,24 @@ Set state of device:
Get value of datapoint: Get value of datapoint:
get <name> datapoint <channel-number>.<datapoint-name> get <name> datapoint <channel-number>[.<datapoint-name>]
If no datapoibt is specified all datapoints for specified channel are read.
Get multiple datapoints of channel:
get <name> channel <channel-number>[.<datapoint-expr>]
Parameter <datapoint-expr> is a regular expression. Default is .* (query all
datapoints of a channel).
Get state of device: Get state of device:
get <name> devstate get <name> devstate
Requires the specification of the channel number which contains datapoint Requires the specification of the channel number which contains datapoint
'STATE'. See also command 'set devstate'. "STATE" by using attribute 'statechannel'. The default datapoint "STATE"
can be modified by setting attribute 'statedatapoint'.
------------------------------------ ------------------------------------
4.3 HMCCUDEV Attributes 4.3 HMCCUDEV Attributes
@ -321,6 +414,10 @@ Set reading name format (default is 'name'):
Control reading creation (default is 1): Control reading creation (default is 1):
attr <name> ccureadings { 0 | 1 } attr <name> ccureadings { 0 | 1 }
Set datapoint for 'devstate' command (default is "STATE"):
attr <name> statedatapoint <datapoint>
Specify IO device for client device: Specify IO device for client device:
@ -332,7 +429,7 @@ Specify channel number of STATE datapoint:
attr <name> statechannel <channel-number> attr <name> statechannel <channel-number>
If no statechannel is set the command set devstate fails. If no statechannel is set the commands 'get/set devstate' are not available.
Specify text substitutions for values in set commands: Specify text substitutions for values in set commands:
@ -347,10 +444,108 @@ Specify text substitutions for values in set commands:
Specify text substitutions for values returned by get commands: Specify text substitutions for values returned by get commands:
attr <name> substitute <regexp1>:<text1>[,...] attr <name> substitute <regexp1>:<text1>[,...]
====================================
5 HMCCUCHN Usage
====================================
Define a new client device:
define <name> HMCCUCHN {<Channel-Name>|<Channel-Address>} [readonly]
Parameter <Channel-Address> is the CCU channel address including the channel
number. If <Channel-Name> is specified it must be known by HMCCU. If the channel
can't be found the device list of the HMCCU device must be updated with command
'get devicelist'. The keyword 'readonly' declares a channel as read only (i.e.
a sensor). For read only channels no set command is available.
------------------------------------
5.1 HMCCUCHN Set Commands
------------------------------------
Set value of datapoint:
set <name> datapoint <datapoint-name> <value> [...]
Set state of channel:
set <name> devstate <value>
set <name> <state-value>
If attribute 'statevals' is defined 'devstate' can be ommitted. The default
datapoint "STATE" can be modified by setting attribute 'statedatapoint'.
------------------------------------
4.2 HMCCUCHN Get Commands
------------------------------------
Get value of datapoint:
get <name> datapoint [<datapoint-name>]
If no datapoint is specified all datapoints are read.
Get multiple datapoints:
get <name> channel [<datapoint-exp>]
Parameter <datapoint-expr> is a regular expression. Default is .* (query all
datapoints of a channel).
Get state of device:
get <name> devstate
The default datapoint "STATE" can be modified by setting attribute
'statedatapoint'.
------------------------------------
4.3 HMCCUCHN Attributes
------------------------------------
Client device attributes overwrite corresponding HMCCU attributes!
Set reading name format (default is 'name'):
attr <name> ccureadingformat { name | address | datapoint }
If set to 'datapoint' the reading name is the datapoint name without channel.
Control reading creation (default is 1):
attr <name> ccureadings { 0 | 1 }
Set datapoint for "devstate" command (default is "STATE"):
attr <name> statedatapoint <datapoint>
Specify IO device for client device:
attr <name> IODev <HMCCU-Device>
Normally this is set automatically during HMCCUDEV device definition.
Specify text substitutions for values in set commands:
attr <name> stateval <text1>:<subtext1>[,...]
The values <textn> are available as set commands, i.e.
attr switch1 stateval on:true,off:false
set switch1 on
set switch1 off
set switch1 devstate on
Specify text substitutions for values returned by get commands:
attr <name> substitute <regexp1>:<text1>[,...]
====================================
6 Hints and tipps
====================================
------------------------------------ ------------------------------------
5.2 Requesting information from CCU 6.1 Requesting information from CCU
------------------------------------ ------------------------------------
By using XML-API one can query device names, channel names, channel addresses By using XML-API one can query device names, channel names, channel addresses
@ -362,10 +557,9 @@ information:
The following request returns a list of datapoints with current values: The following request returns a list of datapoints with current values:
http://ccuname-or-ip/config/xmlapi/statelist.cgi?show_internal=1 http://ccuname-or-ip/config/xmlapi/statelist.cgi?show_internal=1
------------------------------------ ------------------------------------
5.1 Executing FHEM commands on CCU 6.2 Executing FHEM commands on CCU
------------------------------------ ------------------------------------
It's possible to execute FHEM commands from CCU via the FHEM telnet port. It's possible to execute FHEM commands from CCU via the FHEM telnet port.
@ -396,6 +590,23 @@ The script should be called from a CCU program by using the CUXD exec object
(requires installation of CUxD). If FHEM command contains blanks it should be (requires installation of CUxD). If FHEM command contains blanks it should be
enclosed in double quotes. enclosed in double quotes.
--------------------------------------
6.3 Use RAM disk for /tmp on Raspbian
--------------------------------------
By default ccurpcd creates the queue files in directory /tmp. On systems which
are running on a SD card like Raspbian this can shorten the lifetime of the
SD card. To avoid this /tmp can be moved to a RAM disk:
1) Edit file /etc/fstab as user 'root' and append the following line
tmpfs /tmp tmpfs nodev,nosuid,relatime,size=100M 0 0
This will define /tmp as a RAM disk with a size of 100 MByte.
2) Restart the system.
*** Have fun! zap *** *** Have fun! zap ***