mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5374 2b470e98-0d58-463d-a4d8-8e2adae1ed80
27525 lines
1.1 MiB
27525 lines
1.1 MiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
|
||
<html>
|
||
|
||
<head>
|
||
<title>FHEM reference</title>
|
||
<script type="text/javascript" src="fhemdoc.js"></script>
|
||
<noscript>
|
||
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
|
||
</noscript>
|
||
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
|
||
<link rel="shortcut icon" href="/fhem/icons/favicon.ico"/>
|
||
</head>
|
||
|
||
|
||
<body>
|
||
<div id="menuScrollArea">
|
||
<div id="logo"></div>
|
||
<div id="menu">
|
||
<h3>fhem.pl reference</h3>
|
||
Version: <b>EN</b> <a href="commandref_DE.html">DE</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="right">
|
||
|
||
<h3>Contents</h3>
|
||
<ul>
|
||
<a href="#intro">Introduction</a><br>
|
||
<a href="#command">Fhem command types</a><br>
|
||
<a href="#devspec">Device specification</a><br>
|
||
|
||
<br>
|
||
<b>Fhem commands</b>
|
||
<ul>
|
||
<a href="#apptime">apptime</a>
|
||
<a href="#attr">attr</a>
|
||
<a href="#backup">backup</a>
|
||
<a href="#CULflash">CULflash</a>
|
||
<a href="#cmdalias">cmdalias</a>
|
||
<a href="#createlog">createlog</a>
|
||
<a href="#define">define</a>
|
||
<a href="#delete">delete</a>
|
||
<a href="#deleteattr">deleteattr</a>
|
||
<a href="#deletereading">deletereading</a>
|
||
<a href="#displayattr">displayattr</a>
|
||
<a href="#fheminfo">fheminfo</a>
|
||
<a href="#get">get</a>
|
||
<a href="#getstate">getstate</a>
|
||
<a href="#help">?,help</a>
|
||
<a href="#include">include</a>
|
||
<a href="#inform">inform</a>
|
||
<a href="#JsonList">JsonList</a>
|
||
<a href="#list">list</a>
|
||
<a href="#modify">modify</a>
|
||
<a href="#notice">notice</a>
|
||
<a href="#quit">quit</a>
|
||
<a href="#reload">reload</a>
|
||
<a href="#rename">rename</a>
|
||
<a href="#rereadcfg">rereadcfg</a>
|
||
<a href="#save">save</a>
|
||
<a href="#set">set</a>
|
||
<a href="#setdefaultattr">setdefaultattr</a>
|
||
<a href="#setreading">setreading</a>
|
||
<a href="#setstate">setstate</a>
|
||
<a href="#shutdown">shutdown</a>
|
||
<a href="#sleep">sleep</a>
|
||
<a href="#trigger">trigger</a>
|
||
<a href="#update">update</a>
|
||
<a href="#usb">usb</a>
|
||
<a href="#version">version</a>
|
||
<a href="#xmllist">xmllist</a>
|
||
|
||
</ul>
|
||
|
||
<br>
|
||
<b>Devices</b>
|
||
<ul>
|
||
<a href="#global">global</a><br>
|
||
<a href='#ALL3076'>ALL3076</a>
|
||
<a href='#ALL4000T'>ALL4000T</a>
|
||
<a href='#ALL4027'>ALL4027</a>
|
||
<a href='#BBB_BMP180'>BBB_BMP180</a>
|
||
<a href='#BS'>BS</a>
|
||
<a href='#CM11'>CM11</a>
|
||
<a href='#CO20'>CO20</a>
|
||
<a href='#CUL'>CUL</a>
|
||
<a href='#CUL_EM'>CUL_EM</a>
|
||
<a href='#CUL_FHTTK'>CUL_FHTTK</a>
|
||
<a href='#CUL_HM'>CUL_HM</a>
|
||
<a href='#CUL_HOERMANN'>CUL_HOERMANN</a>
|
||
<a href='#CUL_IR'>CUL_IR</a>
|
||
<a href='#CUL_MAX'>CUL_MAX</a>
|
||
<a href='#CUL_RFR'>CUL_RFR</a>
|
||
<a href='#CUL_TX'>CUL_TX</a>
|
||
<a href='#CUL_WS'>CUL_WS</a>
|
||
<a href='#ECMD'>ECMD</a>
|
||
<a href='#ECMDDevice'>ECMDDevice</a>
|
||
<a href='#EGPM'>EGPM</a>
|
||
<a href='#EGPM2LAN'>EGPM2LAN</a>
|
||
<a href='#EIB'>EIB</a>
|
||
<a href='#EM'>EM</a>
|
||
<a href='#EMEM'>EMEM</a>
|
||
<a href='#EMGZ'>EMGZ</a>
|
||
<a href='#EMWZ'>EMWZ</a>
|
||
<a href='#ENECSYSGW'>ENECSYSGW</a>
|
||
<a href='#ENECSYSINV'>ENECSYSINV</a>
|
||
<a href='#ENIGMA2'>ENIGMA2</a>
|
||
<a href='#ESA2000'>ESA2000</a>
|
||
<a href='#EnOcean'>EnOcean</a>
|
||
<a href='#FBAHA'>FBAHA</a>
|
||
<a href='#FBDECT'>FBDECT</a>
|
||
<a href='#FHT'>FHT</a>
|
||
<a href='#FHT8V'>FHT8V</a>
|
||
<a href='#FHZ'>FHZ</a>
|
||
<a href='#FRM'>FRM</a>
|
||
<a href='#FRM_AD'>FRM_AD</a>
|
||
<a href='#FRM_I2C'>FRM_I2C</a>
|
||
<a href='#FRM_IN'>FRM_IN</a>
|
||
<a href='#FRM_LCD'>FRM_LCD</a>
|
||
<a href='#FRM_OUT'>FRM_OUT</a>
|
||
<a href='#FRM_PWM'>FRM_PWM</a>
|
||
<a href='#FRM_RGB'>FRM_RGB</a>
|
||
<a href='#FRM_ROTENC'>FRM_ROTENC</a>
|
||
<a href='#FRM_SERVO'>FRM_SERVO</a>
|
||
<a href='#FRM_STEPPER'>FRM_STEPPER</a>
|
||
<a href='#FS20'>FS20</a>
|
||
<a href='#GDS'>GDS</a>
|
||
<a href='#GEOFANCY'>GEOFANCY</a>
|
||
<a href='#GUEST'>GUEST</a>
|
||
<a href='#HMLAN'>HMLAN</a>
|
||
<a href='#HMS'>HMS</a>
|
||
<a href='#HMinfo'>HMinfo</a>
|
||
<a href='#HTTPMOD'>HTTPMOD</a>
|
||
<a href='#HUEBridge'>HUEBridge</a>
|
||
<a href='#HUEDevice'>HUEDevice</a>
|
||
<a href='#I2C_BMP180'>I2C_BMP180</a>
|
||
<a href='#I2C_DS1307'>I2C_DS1307</a>
|
||
<a href='#I2C_LCD'>I2C_LCD</a>
|
||
<a href='#I2C_PCA9532'>I2C_PCA9532</a>
|
||
<a href='#I2C_PCF8574'>I2C_PCF8574</a>
|
||
<a href='#I2C_SHT21'>I2C_SHT21</a>
|
||
<a href='#IF'>IF</a>
|
||
<a href='#IPCAM'>IPCAM</a>
|
||
<a href='#IPWE'>IPWE</a>
|
||
<a href='#IT'>IT</a>
|
||
<a href='#Itach_Relay'>Itach_Relay</a>
|
||
<a href='#JSONMETER'>JSONMETER</a>
|
||
<a href='#JeeLink'>JeeLink</a>
|
||
<a href='#JsonList2'>JsonList2</a>
|
||
<a href='#KM271'>KM271</a>
|
||
<a href='#KS300'>KS300</a>
|
||
<a href='#LGTV'>LGTV</a>
|
||
<a href='#LINDY_HDMI_SWITCH'>LINDY_HDMI_SWITCH</a>
|
||
<a href='#LIRC'>LIRC</a>
|
||
<a href='#LISTENLIVE'>LISTENLIVE</a>
|
||
<a href='#LUXTRONIK2'>LUXTRONIK2</a>
|
||
<a href='#LaCrosse'>LaCrosse</a>
|
||
<a href='#M232'>M232</a>
|
||
<a href='#M232Counter'>M232Counter</a>
|
||
<a href='#M232Voltage'>M232Voltage</a>
|
||
<a href='#MAX'>MAX</a>
|
||
<a href='#MAXLAN'>MAXLAN</a>
|
||
<a href='#MPD'>MPD</a>
|
||
<a href='#MSG'>MSG</a>
|
||
<a href='#MSGFile'>MSGFile</a>
|
||
<a href='#MSGMail'>MSGMail</a>
|
||
<a href='#NetIO230B'>NetIO230B</a>
|
||
<a href='#ONKYO_AVR'>ONKYO_AVR</a>
|
||
<a href='#OREGON'>OREGON</a>
|
||
<a href='#OWAD'>OWAD</a>
|
||
<a href='#OWCOUNT'>OWCOUNT</a>
|
||
<a href='#OWDevice'>OWDevice</a>
|
||
<a href='#OWFS'>OWFS</a>
|
||
<a href='#OWID'>OWID</a>
|
||
<a href='#OWLCD'>OWLCD</a>
|
||
<a href='#OWMULTI'>OWMULTI</a>
|
||
<a href='#OWSWITCH'>OWSWITCH</a>
|
||
<a href='#OWServer'>OWServer</a>
|
||
<a href='#OWTEMP'>OWTEMP</a>
|
||
<a href='#OWTHERM'>OWTHERM</a>
|
||
<a href='#OWX'>OWX</a>
|
||
<a href='#PCA301'>PCA301</a>
|
||
<a href='#PHTV'>PHTV</a>
|
||
<a href='#PID20'>PID20</a>
|
||
<a href='#PIFACE'>PIFACE</a>
|
||
<a href='#POKEYS'>POKEYS</a>
|
||
<a href='#Pushover'>Pushover</a>
|
||
<a href='#RESIDENTS'>RESIDENTS</a>
|
||
<a href='#RFXCOM'>RFXCOM</a>
|
||
<a href='#RFXMETER'>RFXMETER</a>
|
||
<a href='#RFXX10REC'>RFXX10REC</a>
|
||
<a href='#ROOMMATE'>ROOMMATE</a>
|
||
<a href='#RPII2C'>RPII2C</a>
|
||
<a href='#RPI_GPIO'>RPI_GPIO</a>
|
||
<a href='#Revolt'>Revolt</a>
|
||
<a href='#SCIVT'>SCIVT</a>
|
||
<a href='#SISPM'>SISPM</a>
|
||
<a href='#SIS_PMS'>SIS_PMS</a>
|
||
<a href='#SML'>SML</a>
|
||
<a href='#STACKABLE_CC'>STACKABLE_CC</a>
|
||
<a href='#STV'>STV</a>
|
||
<a href='#SWAP'>SWAP</a>
|
||
<a href='#SWAP_0000002200000003'>SWAP_0000002200000003</a>
|
||
<a href='#SYSMON'>SYSMON</a>
|
||
<a href='#TCM'>TCM</a>
|
||
<a href='#THZ'>THZ</a>
|
||
<a href='#TRX'>TRX</a>
|
||
<a href='#TRX_ELSE'>TRX_ELSE</a>
|
||
<a href='#TRX_LIGHT'>TRX_LIGHT</a>
|
||
<a href='#TRX_SECURITY'>TRX_SECURITY</a>
|
||
<a href='#TRX_WEATHER'>TRX_WEATHER</a>
|
||
<a href='#TUL'>TUL</a>
|
||
<a href='#TellStick'>TellStick</a>
|
||
<a href='#Text2Speech'>Text2Speech</a>
|
||
<a href='#UNIRoll'>UNIRoll</a>
|
||
<a href='#USBWX'>USBWX</a>
|
||
<a href='#USF1000'>USF1000</a>
|
||
<a href='#VIERA'>VIERA</a>
|
||
<a href='#VantagePro2'>VantagePro2</a>
|
||
<a href='#WEBCOUNT'>WEBCOUNT</a>
|
||
<a href='#WEBIO'>WEBIO</a>
|
||
<a href='#WEBIO_12DIGITAL'>WEBIO_12DIGITAL</a>
|
||
<a href='#WEBTHERM'>WEBTHERM</a>
|
||
<a href='#WS2000'>WS2000</a>
|
||
<a href='#WS300'>WS300</a>
|
||
<a href='#WS3600'>WS3600</a>
|
||
<a href='#WWO'>WWO</a>
|
||
<a href='#Weather'>Weather</a>
|
||
<a href='#X10'>X10</a>
|
||
<a href='#XBMC'>XBMC</a>
|
||
<a href='#XmlList'>XmlList</a>
|
||
<a href='#YAMAHA_AVR'>YAMAHA_AVR</a>
|
||
<a href='#YAMAHA_BD'>YAMAHA_BD</a>
|
||
<a href='#ZWDongle'>ZWDongle</a>
|
||
<a href='#ZWave'>ZWave</a>
|
||
<a href='#cloneDummy'>cloneDummy</a>
|
||
<a href='#configdb'>configdb</a>
|
||
<a href='#geodata'>geodata</a>
|
||
<a href='#netatmo'>netatmo</a>
|
||
<a href='#panStamp'>panStamp</a>
|
||
<a href='#pilight'>pilight</a>
|
||
<a href='#withings'>withings</a>
|
||
<a href='#xxLG7000'>xxLG7000</a>
|
||
|
||
</ul>
|
||
|
||
<br>
|
||
<b>Helper modules</b>
|
||
<ul>
|
||
<a href="#at">at</a>
|
||
<a href="#autocreate">autocreate</a>
|
||
<a href="#average">average</a>
|
||
<a href="#Calendar">Calendar</a>
|
||
<a href="#configDB">configDB</a>
|
||
<a href="#Dashboard">Dashboard</a>
|
||
<a href="#DbLog">DbLog</a>
|
||
<a href="#dewpoint">dewpoint</a>
|
||
<a href="#dummy">dummy</a>
|
||
<a href="#eventTypes">eventTypes</a>
|
||
<a href="#FHEM2FHEM">FHEM2FHEM</a>
|
||
<a href="#FHEMWEB">FHEMWEB</a>
|
||
<a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>
|
||
<a href="#FileLog">FileLog</a>
|
||
<a href="#FLOORPLAN">FLOORPLAN</a>
|
||
<a href="#HCS">HCS</a>
|
||
<a href="#HTTPSRV">HTTPSRV</a>
|
||
<a href="#Heating_Control">Heating_Control</a>
|
||
<a href="#holiday">holiday</a>
|
||
<a href="#LightScene">LightScene</a>
|
||
<a href="#mailcheck">mailcheck</a>
|
||
<a href="#notify">notify</a>
|
||
<a href="#openweathermap">openweathermap</a>
|
||
<a href="#PID">PID</a>
|
||
<a href="#PRESENCE">PRESENCE</a>
|
||
<a href="#PachLog">PachLog</a>
|
||
<a href="#RSS">RSS</a>
|
||
<a href="#RandomTimer">RandomTimer</a>
|
||
<a href="#rain">rain</a>
|
||
<a href="#readingsGroup">readingsGroup</a>
|
||
<a href="#readingsProxy">readingsProxy</a>
|
||
<a href="#remotecontrol">remotecontrol</a>
|
||
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
||
<a href="#SYSSTAT">SYSSTAT</a>
|
||
<a href="#sequence">sequence</a>
|
||
<a href="#speedtest">speedtest</a>
|
||
<a href="#structure">structure</a>
|
||
<a href="#SVG">SVG</a>
|
||
<a href="#telnet">telnet</a>
|
||
<a href="#Twilight">Twilight</a>
|
||
<a href="#THRESHOLD">THRESHOLD</a>
|
||
<a href="#Utils">Utils</a>
|
||
<a href="#WeekdayTimer">WeekdayTimer</a>
|
||
<a href="#watchdog">watchdog</a>
|
||
<a href="#weblink">weblink</a>
|
||
<a href="#WOL">WOL</a>
|
||
</ul>
|
||
|
||
<br>
|
||
<a href="#perl">Perl specials</a><br>
|
||
<a href="#gnuplot-syntax">gnuplot file syntax</a><br>
|
||
</ul>
|
||
|
||
|
||
<a name="intro"></a>
|
||
<h3>Introduction</h3>
|
||
<ul>
|
||
Fhem is mainly used for home automation, but it is suitable for other tasks
|
||
too, where notification, timers and logging plays an important role.<br>
|
||
<br>
|
||
|
||
It supports different hardware devices to interface with certain protocols
|
||
(e.g. FHZ1000PC to interface FS20 and HMS, CM11 to access X10), and logical
|
||
devices like FS20 or FHT to digest the messages for a certain device type using
|
||
this protocol.<br>
|
||
<br>
|
||
|
||
Fhem is modular. The different devices are represented through modules which
|
||
implement certain functions (e.g. define, get, set). Even seemingly integral
|
||
parts of fhem like triggers (<a href="#notify">notify</a>) and timers (<a
|
||
href="#at">at</a>) are implemented this way, giving the possibility to
|
||
replace/extend this functionality.<br> <br>
|
||
|
||
Fhem is controlled through readable / ascii commands, which are specified in
|
||
files (e.g. the configuration file), or issued over a TCP/IP connection, either
|
||
directly in a telnet session, with a fhem.pl in client mode or from one of the
|
||
web frontends.<br> <br>
|
||
|
||
When starting the server you have to specify a configuration file:<br>
|
||
<ul>
|
||
<code>perl fhem.pl fhem.cfg</code>
|
||
</ul>
|
||
<br>
|
||
|
||
A minimal configuration file looks like: <pre>
|
||
attr global <a href="#logfile">logfile</a> log/fhem.log
|
||
attr global <a href="#modpath">modpath</a> .
|
||
attr global <a href="#statefile">statefile</a> log/fhem.save
|
||
attr global <a href="#verbose">verbose</a> 3
|
||
define telnetPort <a href="#telnet">telnet</a> 7072 global
|
||
define WEB <a href="#FHEMWEB">FHEMWEB</a> 8083 global</pre>
|
||
|
||
Note: the last two lines are optional and assume you wish to use the
|
||
builtin telnet and WEB interface.<br>
|
||
<br>
|
||
|
||
The web interface can be reached at
|
||
<ul>
|
||
http://<fhemhost>:8083
|
||
</ul>
|
||
<br>
|
||
|
||
TCP/IP communication with fhem can either happen in a "session" (via
|
||
telnet) or single client command (via fhem.pl). Example:
|
||
<ul>
|
||
<code>telnet <fhemhost> 7072<br>
|
||
<NL> </code>(This newline switches into "prompt" mode)<code><br>
|
||
<command>...<br>
|
||
quit</code><br>
|
||
</ul>
|
||
or
|
||
<ul>
|
||
<code>fhem.pl <fhemhost>:7072 "<fhem-command>" "..."</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="command"></a>
|
||
<h3>Fhem command types</h3>
|
||
<ul>
|
||
There are three types of commands: "fhem" commands (described in this
|
||
document), shell commands (they must be enclosed in double quotes ") and perl
|
||
expressions (enclosed in curly brackets {}). shell commands or perl expressions
|
||
are needed for complex <a href="#at">at</a> or <a href="#notify">notify</a>
|
||
arguments, but can also issued as a "normal" command.<br>
|
||
<br>
|
||
E.g. the following three commands all do the same when issued from a telnet
|
||
prompt:<br>
|
||
<ul>
|
||
set lamp off<br>
|
||
"fhem.pl 7072 "set lamp off""<br>
|
||
{fhem("set lamp off")}<br>
|
||
</ul>
|
||
<br>
|
||
|
||
Shell commands will be executed in the background, perl expressions and
|
||
fhem commands will be executed in the main "thread". In order to make perl
|
||
expressions easier to write, some special functions and variables are
|
||
available. See the section <a href="#perl">Perl special</a> for a description.
|
||
To trigger fhem commands from a shell script (this is the "other way round"),
|
||
use the client form of fhem.pl (described above).<br>
|
||
<br>
|
||
|
||
Multiple fhem commands are separated by semicolon (;). In order to use semicolon
|
||
in perl code or shell programs, they have to be escaped by the double semicolon
|
||
(;;). See the <b>Notes</b> section of the <a href="#notify">notify</a>
|
||
chapter on command parameters and escape rules.<br>
|
||
|
||
E.g. the following first command switches Lamp1 off at 07:00 and Lamp2
|
||
immediately (at the point of definition), the second one switches both lamps
|
||
off at 07:00.<br>
|
||
<ul>
|
||
define lampoff at 07:00 set Lamp1 off; set Lamp2 off<br>
|
||
define lampoff at 07:00 set Lamp1 off;; set Lamp2 off<br>
|
||
</ul>
|
||
For every further indirection you need to double the semicolons:, e.g. to
|
||
switch on every day 2 devices at 7:00 for 10 minutes you have to write:<br>
|
||
<ul>
|
||
define onAt at 07:00 set Lamp1 on;;set Lamp2 on;; define offAt at +00:10 set Lamp1 off;;;;set Lamp2 off
|
||
</ul>
|
||
Don't dispair, the previous example can also be written as
|
||
<ul>
|
||
define onAt at 07:00 set Lamp1,Lamp2 on-for-timer 600
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
Commands can be either typed in plain, or read from a file (e.g. the
|
||
configuration file at startup). The commands are either executed directly, or
|
||
later if they are arguments to the <a href="#at">at</a> and <a
|
||
href="#notify">notify</a> fhem commands.<br>
|
||
<br>
|
||
|
||
A line ending with \ will be concatenated with the next one, so long lines
|
||
(e.g. multiple perl commands) can be split in multiple lines. Some web fronteds
|
||
(e.g. webpgm2) make editing of multiline commands transparent for you (i.e. there is no need for \) .<br>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="devspec"></a>
|
||
<h3>Device specification (devspec)</h3>
|
||
<ul>
|
||
The commands
|
||
<a href="#attr">attr</a>,
|
||
<a href="#deleteattr">deleteattr</a>,
|
||
<a href="#displayattr">displayattr</a>,
|
||
<a href="#delete">delete</a>,
|
||
<a href="#get">get</a>,
|
||
<a href="#list">list</a>,
|
||
<a href="#set">set</a>,
|
||
<a href="#setreading">setreading</a>,
|
||
<a href="#setstate">setstate</a>,
|
||
<a href="#trigger">trigger</a>
|
||
can take a more complex device specification as argument, which will be
|
||
expanded to a list of devices. A device specification (short devspec) can be:
|
||
<ul>
|
||
<li>a single device name. This is the most common case.</li>
|
||
<li>a list of devices, separated by comma (,)</li>
|
||
<li>a regular expression</li>
|
||
<li>a NAME=VALUE pair, where NAME can be an Internal value like TYPE, a
|
||
Reading-Name or an attribute. VALUE is a regexp. To negate the
|
||
comparison, use NAME!=VALUE</li>
|
||
<li>if the spec is followed by the expression :FILTER=NAME=VALUE, then the
|
||
values found in the first round are filtered by the second expression.
|
||
</ul>
|
||
Examples:
|
||
<ul>
|
||
<code>set lamp1 on</code><br>
|
||
<code>set lamp1,lamp2,lamp3 on</code><br>
|
||
<code>set lamp.* on</code><br>
|
||
<code>set room=kitchen off</code><br>
|
||
<code>set room=kitchen:FILTER=STATE=on off</code><br>
|
||
<code>set room=kitchen:FILTER=STATE!=off off</code><br>
|
||
<code>list disabled=</code><br>
|
||
<code>list TYPE=FS20 STATE</code><br>
|
||
</ul>
|
||
Notes:
|
||
<ul>
|
||
<li>the spec may not contain space characters.</n>
|
||
<li>if there is a device which exactly corresponds to the spec, then
|
||
no special processing is done.</li>
|
||
<li>first the spec is separated by komma, then the regular expression and
|
||
filter operations are executed.</li>
|
||
<li>the returned list can contain the same device more than once, so
|
||
"set lamp3,lamp3 on" switches lamp3 twice.</li>
|
||
<li>for more complex structuring demands see the <a href="#structure">
|
||
structure</a> device.
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="help"></a>
|
||
<h3>?, help</h3>
|
||
<ul>
|
||
<code>?</code><br>
|
||
<code>help</code><br>
|
||
<br>
|
||
Get a list of all commands and short description for each one
|
||
</ul>
|
||
|
||
<a name="attr"></a>
|
||
<h3>attr</h3>
|
||
<ul>
|
||
<code>attr <devspec> <attrname> [<value>] </code><br>
|
||
|
||
<br>Set an attribute for a device defined by <a href="#define">define</a>.
|
||
You can define your own attributes too to use them in other applications.
|
||
|
||
Use "attr <name> ?" to get a list of possible attributes.
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.
|
||
<br><br>
|
||
|
||
Attributes used by all devices:
|
||
<ul>
|
||
<a name="verbose"></a>
|
||
<li>verbose<br>
|
||
Set the verbosity level. Possible values:
|
||
<ul>
|
||
<li>0 - server start/stop
|
||
<li>1 - error messages or unknown packets
|
||
<li>2 - major events/alarms.
|
||
<li>3 - commands sent out will be logged.
|
||
<li>4 - you'll see whats received by the different devices.
|
||
<li>5 - debugging.</li>
|
||
</ul>
|
||
The value for the <a href="#global">global</a> device is a default for
|
||
other devices without own verbose attribute set.
|
||
</li>
|
||
|
||
<a name="comment"></a>
|
||
<li>comment<br>
|
||
Add an arbitrary comment.
|
||
<a name="alias"></a>
|
||
<li>alias<br>
|
||
Used by FHEMWEB to display a device with another name e.g. when using
|
||
special characters/spaces not accepted by device definition.
|
||
<a name="room"></a>
|
||
<li>room<br>
|
||
Filter/group devices. Recognized by web-pgm2 and web-pgm3. A device
|
||
can appear in more than one room, in this case the rooms have to be
|
||
specified comma-separated.<br>
|
||
Devices in the room hidden will not appear in the web output, or set
|
||
the <a href="#hiddenroom"> FHEMWEB attribute to selectively disable
|
||
rooms for certain FHEMWEB instances.
|
||
</li>
|
||
|
||
<a name="group"></a>
|
||
<li>group<br>
|
||
Group devices. Recognized by web-pgm2 (module <a href="#FHEMWEB">FHEMWEB</a>), it makes
|
||
devices in the same group appear in the same box).
|
||
This is used to further group
|
||
devices together. A device can appear in more than one group, in this
|
||
case the groups have to be specified comma-separated.<br>
|
||
If this attribute is not set then the device type is used as the
|
||
grouping attribute.
|
||
</li>
|
||
|
||
<a name="showtime"></a>
|
||
<li>showtime<br>
|
||
Used in the webfrontend pgm2 to show the time of last activity
|
||
instead of the state in the summary view. Useful e.g. for FS20 PIRI
|
||
devices.
|
||
</li>
|
||
|
||
<a name="readingFnAttributes"></a>
|
||
<h4>readingFnAttributes</h4>
|
||
The following attributes are honored by the modules that make use
|
||
of the standardized readings updating mechanism in fhem.pl. Check the
|
||
modules attribute list if you want to know if it is supporting it.
|
||
<br>
|
||
<br>
|
||
|
||
<a name="stateFormat"></a>
|
||
<li>stateFormat<br>
|
||
Modifies the STATE of the device, shown by the list command or in the room
|
||
overview in FHEMWEB. If not set, its value is taken from the state reading.
|
||
If set, then every word in the argument is replaced by the value of the
|
||
reading if such a reading for the current device exists. If the value of
|
||
this attribute is enclused in {}, then it is evaluated. This attribute is
|
||
evaluated each time a reading is updated.
|
||
</li>
|
||
|
||
<a name="event-on-update-reading"></a>
|
||
<li>event-on-update-reading<br>
|
||
If not set, every update of any reading creates an event, which e.g. is
|
||
handled by <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a>.
|
||
The attribute takes a comma-separated list of readings. You may use regular
|
||
expressions in that list. If set, only updates of the listed readings
|
||
create events.
|
||
</li>
|
||
|
||
<a name="event-on-change-reading"></a>
|
||
<li>event-on-change-reading<br>
|
||
The attribute takes a comma-separated list of readings. You may use regular
|
||
expressions in that list. If set, only changes of the listed readings
|
||
create events. In other words, if a reading listed here is updated with the
|
||
new value identical to the old value, no event is created.
|
||
</li>
|
||
The precedence of event-on-update-reading and event-on-change-reading is as
|
||
follows:
|
||
<ol>
|
||
<li>If both attributes are not set, any update of any reading of the device
|
||
creates an event.</li>
|
||
<li>If any of the attributes is set, no events occur for updates or changes
|
||
of readings not listed in any of the attributes.</li>
|
||
<li>If a reading is listed in event-on-update-reading, an update of the
|
||
reading creates an event no matter whether the reading is also listed
|
||
in event-on-change-reading.</li>
|
||
</ol>
|
||
|
||
<a name="event-min-interval"></a>
|
||
<li>event-min-interval<br>
|
||
This attribute takes a comma-separated list of reading:minInterval pairs.
|
||
You may use regular expressions for reading. Events will only be
|
||
generated, if at least minInterval seconds elapsed since the last reading
|
||
of the matched type.
|
||
</li>
|
||
|
||
<a name="userReadings"></a>
|
||
<li>userReadings<br>
|
||
A comma-separated list of definitions of user-defined readings. Each
|
||
definition has the form:
|
||
<ul>
|
||
<code>
|
||
<reading>[:<trigger>] [<modifier>] { <perl code> }
|
||
</code>
|
||
</ul>
|
||
After a single or bulk readings update, the user-defined readings are set
|
||
by evaluating the <a href="#perl">perl code</a><code> { <perl code>
|
||
}</code> for all definitions and setting the value of the respective
|
||
user-defined reading <code><reading></code> to the result. If
|
||
<trigger> is given, then all processing for this specific user
|
||
reading is only done if one of the just updated "reading: value"
|
||
combinations matches <trigger>, which is treated as a regexp.
|
||
<br>
|
||
Examples:<br>
|
||
<ul><code>
|
||
attr myEnergyMeter userReadings energy
|
||
{ ReadingsVal("myEnergyMeter","counters.A",0)/1250.0;; }<br>
|
||
attr myMultiMeter userReadings
|
||
energy1:counters.A { ReadingsVal("myMultiMeter","counters.A",0)/1250.0;; },
|
||
energy2:counters.B { ReadingsVal("myMultiMeter","counters.B",0)/1250.0;; }
|
||
</code></ul>
|
||
<code><modifier></code> can take one of these values:
|
||
<ul>
|
||
<li>none: the same as it would not have been given at all.</li>
|
||
<li>difference: the reading is set to the difference between the current
|
||
and the previously evaluated value.</li>
|
||
<li>differential: the reading is set to the difference between the
|
||
current and the previously evaluated value divided by the time in
|
||
seconds between the current and the previous evaluation. Granularity
|
||
of time is one second. No value is calculated if the time past is
|
||
below one second. Useful to calculate rates.</li>
|
||
<li>offset: if the current evaluated value is smaler than the previously
|
||
evaluated value the reading is incremented by the previous value.
|
||
the reading can then be used as an offset correct for a counter that
|
||
is reset for example due to a power loss.</li>
|
||
<li>monotonic: if the difference between the current and the previously
|
||
evaluated value is positive the reading is incremented by this difference.
|
||
this allows to derive a monotonic growing counter from an original counter
|
||
even if the original will be rest by a power loss</li>
|
||
</ul>
|
||
Example:<br>
|
||
<ul><code>attr myPowerMeter userReadings power
|
||
differential { ReadingsVal("myPowerMeter","counters.A",0)/1250.0;; }
|
||
</code></ul>
|
||
Note: user readings with modifiers difference and differential store the
|
||
calculated values internally. The user reading is set earliest at the
|
||
second evaluation. Beware of stale values when changing definitions!
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Device specific attributes are documented in the corresponding device section.
|
||
<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>attr global verbose 3</code><br>
|
||
<code>attr lamp room kitchen</code><br>
|
||
<code>attr lamp group lights</code><br>
|
||
<code>attr lamp loglevel 6</code><br>
|
||
<code>attr weatherstation event-on-update-reading wind,temperature,humidity</code><br>
|
||
<code>attr weatherstation event-on-change-reading israining</code><br>
|
||
<code>attr weatherstation event-on-change-reading israining,state</code><br>
|
||
<code>attr heating stateFormat Temp:measured-temp, Valve:actuator</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:<br>
|
||
<ul>
|
||
<li>See <a href="#deleteattr">deleteattr</a> to delete attributes.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="setdefaultattr"></a>
|
||
<h3>setdefaultattr</h3>
|
||
<ul>
|
||
<code>setdefaultattr [<attrname> [<value>]] </code><br>
|
||
|
||
<br>Add a default attribute. Each device defined from now on will receive
|
||
this attribute.<br> If no attrname is specified, then the default attribute
|
||
list will be deleted.
|
||
<br><br>
|
||
|
||
Example to set the attribute "room kitchen" and "loglevel 4" to
|
||
each of the lamps:
|
||
<ul>
|
||
<code>setdefaultattr room kitchen</code><br>
|
||
<code>setdefaultattr loglevel 4</code><br>
|
||
<code>define lamp1 FS20 1234 11</code><br>
|
||
<code>define lamp2 FS20 1234 12</code><br>
|
||
<code>define lamp3 FS20 1234 13</code><br>
|
||
<code>setdefaultattr</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:<br>
|
||
<ul>
|
||
<li>There is no way to delete a single default-attribute from the list</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="define"></a>
|
||
<h3>define</h3>
|
||
<ul>
|
||
<code>define <name> <type> <type-specific></code><br>
|
||
<br>
|
||
Define a device. You need devices if you want to manipulate them (e.g.
|
||
set on/off), and the logfile is also more readable if it contains e.g.
|
||
"lamp off" instead of "Device 5673, Button 00, Code 00 (off)". <br>
|
||
Use "define <name> ?" to get a list of possible types.<br>
|
||
After definition, the global event "DEFINED" will be generated, see the
|
||
notify section for details.<br>
|
||
<br><br>
|
||
|
||
Each device takes different additional arguments at definition, see the
|
||
corresponding device section for details.<br>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="delete"></a>
|
||
<h3>delete</h3>
|
||
<ul>
|
||
<code>delete <devspec></code> <br>
|
||
<br>
|
||
Delete something created with the <a href="#define">define</a> command.
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.<br>
|
||
After deletion, the global event "DELETED" will be generated, see the notify
|
||
section for details.<br>
|
||
Examples:
|
||
<ul>
|
||
<code>delete lamp</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="deleteattr"></a>
|
||
<h3>deleteattr</h3>
|
||
<ul>
|
||
<code>deleteattr <devspec> [<attrname>]</code> <br>
|
||
<br>
|
||
Delete either a single attribute (see the <a href="#attr">attr</a> command)
|
||
or all attributes for a device (if no <attrname> is defined).
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.<br>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>deleteattr lamp follow-on-for-timer</code><br>
|
||
<code>deleteattr lamp</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="deletereading"></a>
|
||
<h3>deletereading</h3>
|
||
<ul>
|
||
<code>deletereading <devspec> <readingname></code> <br>
|
||
<br>
|
||
Delete the reading <readingname>
|
||
for a device. <readingname> is a perl regular expression that must match the whole name of the reading.
|
||
Use with greatest care! FHEM might crash if you delete vital readings of a device.
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.<br>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>deletereading mySensor temp1</code><br>
|
||
<code>deletereading mySensor temp\d+</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="displayattr"></a>
|
||
<h3>displayattr</h3>
|
||
<ul>
|
||
<code>displayattr <devspec> [<attrname>]</code> <br>
|
||
<br>
|
||
Display either the value of a single attribute (see the <a href="#attr">attr</a> command)
|
||
or all attributes for a device (if no <attrname> is defined).
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.<br>
|
||
If more then one device is specified, then the device name will also included
|
||
in the output.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>
|
||
fhem> di WEB<br>
|
||
menuEntries AlarmOn,/fhem?cmd=set%20alarm%20on<br>
|
||
room Misc.<br>
|
||
fhem> di WEB room<br>
|
||
Misc.<br>
|
||
</code>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="get"></a>
|
||
<h3>get</h3>
|
||
<ul>
|
||
<code>get <devspec> <type-specific></code>
|
||
<br><br>
|
||
Ask a value directly from the device, and wait for an answer. In general, you
|
||
can get a list of possible parameters by
|
||
<ul>
|
||
<code>get <device> ?</code>
|
||
</ul>
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.<br>
|
||
<br>
|
||
Each device has different get parameters, see the corresponding device
|
||
section for details.<br>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="getstate"></a>
|
||
<h3>getstate</h3>
|
||
<ul>
|
||
<code>getstate <devspec></code>
|
||
<br><br>
|
||
Output a short space seperated status for <devspec>. It is useful for
|
||
monitoring the device in e.g. Cacti.<br>
|
||
Examples:
|
||
<ul><code>
|
||
getstate lamp<br>
|
||
state:1<br>
|
||
<br>
|
||
getstate fl<br>
|
||
ack:0 actuator:2 day-temp:21.5 desired-temp:22.5 [...] measured-temp:22.9 [...]
|
||
</code></ul>
|
||
Note: to use this command copy the file contrib/getstate/99_getstate.pm into
|
||
your FHEM directory.
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="include"></a>
|
||
<h3>include</h3>
|
||
<ul>
|
||
<code>include <filename></code> <br>
|
||
<br>
|
||
Read in the file, and process every line as a fhem command. Makes
|
||
configuration files more modular and enables to reread them.
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="inform"></a>
|
||
<h3>inform</h3>
|
||
<ul>
|
||
<code>inform {on|off|timer|raw} [regexp]</code> <br>
|
||
<br>
|
||
If set to on, and a device state changes, send a notification to the current
|
||
client. This command can be used by other programs/modules to receive a
|
||
notification.<br>
|
||
The option timer prepends a timerstamp to the line. Note: this command is
|
||
a nice way to check which events are generated, to help you when creating
|
||
<a href="#notify">notify</a> or <a href="#FileLog">FileLog</a> entries.
|
||
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="list"></a>
|
||
<h3>list</h3>
|
||
<ul>
|
||
<code>list [devspec] [value]</code>
|
||
<br><br>
|
||
Output a list of all definitions, all notify settings and all at
|
||
entries. This is one of the few commands which return a string in a
|
||
normal case.
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.
|
||
<br>
|
||
If value is specified, then output this property (like DEF, TYPE, etc) or
|
||
reading (actuator, measured-temp) for all devices from the devspec.
|
||
<br><br>
|
||
Example:
|
||
<pre><code> fhem> list
|
||
|
||
Type list <name> for detailed info.
|
||
|
||
Internal:
|
||
global (Internal)
|
||
|
||
FHZ:
|
||
FHZ (fhtbuf: 23)
|
||
|
||
FS20:
|
||
Btn4 (on-old-for-timer)
|
||
Roll1 (on)
|
||
Stehlampe (off)
|
||
|
||
FHT:
|
||
fl (measured-temp: 21.1 (Celsius))
|
||
|
||
KS300:
|
||
out1 (T: 2.9 H: 74 W: 2.2 R: 8.2 IR: no)
|
||
|
||
at:
|
||
at_rollup (Next: 07:00:00)
|
||
|
||
notify:
|
||
ntfy_btn4 (active)
|
||
|
||
FileLog:
|
||
avglog (active)
|
||
|
||
</code></pre>
|
||
If specifying <code>name</code>, then a detailed status for <code>name</code>
|
||
will be displayed, e.g.:
|
||
<pre><code> fhem> list fl
|
||
|
||
Internals:
|
||
CODE 5102
|
||
DEF 5102
|
||
NAME fl
|
||
NR 15
|
||
STATE measured-temp: 21.1 (Celsius)
|
||
TYPE FHT
|
||
IODev FHZ
|
||
Attributes:
|
||
room Heizung
|
||
Readings:
|
||
2006-11-02 09:45:56 actuator 19%
|
||
[...]
|
||
</code></pre>
|
||
</ul>
|
||
|
||
|
||
<a name="modify"></a>
|
||
<h3>modify</h3>
|
||
<ul>
|
||
<code>modify <name> <type-dependent-options></code>
|
||
<br><br>
|
||
|
||
Used to modify some definitions. Useful for changing some <a
|
||
href="#at">at</a> or <a href="#notify">notify</a> definitions. If specifying
|
||
one argument to an at type definition, only the time part will be changed. In
|
||
case of a notify type definition, only the regex part will be changed. All
|
||
other values (state, attributes, etc) will remain intact.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>define lampon at 19:00 set lamp on</code><br>
|
||
<code>modify lampon *19:00</code><br>
|
||
<code>modify lampon 19:00 set lamp on-for-timer 16</code><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="quit"></a>
|
||
<h3>quit</h3>
|
||
<ul>
|
||
<code>quit</code>
|
||
<br><br>
|
||
If used in a TCP/IP session, terminate the client session.<br>
|
||
If used in a script, terminate the parsing of the current script.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>quit</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="reload"></a>
|
||
<h3>reload</h3>
|
||
<ul>
|
||
<code>reload <module></code>
|
||
<br><br>
|
||
Reload the given module from the module directory. It is a convenient way to
|
||
test modules whithout restarting the program.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>reload 99_PRIV</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="rename"></a>
|
||
<h3>rename</h3>
|
||
<ul>
|
||
<code>rename <oldname> <newname></code>
|
||
<br><br>
|
||
Rename a device from the <oldname> to <newname>, together with
|
||
its attributes. The global event RENAMED will be generated, see the notify
|
||
section for details.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>rename FHT_1234 fht.kitchen</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="rereadcfg"></a>
|
||
<h3>rereadcfg</h3>
|
||
<ul>
|
||
<code>rereadcfg [fhem-config-file]</code>
|
||
<br><br>
|
||
Re-read the active configuration file, or the optionally specified file.<br>
|
||
The sequence: the <a href="#statefile">statefile</a> will be saved first,
|
||
then all devices will be deleted, then the currently active config file (or
|
||
the specified file) will be read and at last the statefile will be
|
||
reloaded.<br>
|
||
Upon completion it triggers the global:REREADCFG event. All existing
|
||
connections up to the one issuing the rereadcfg will be closed.
|
||
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>rereadcfg</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="save"></a>
|
||
<h3>save</h3>
|
||
<ul>
|
||
<code>save [<configfile>]</code>
|
||
<br><br>
|
||
Save first the <a href="#statefile">statefile</a>, then the
|
||
<a href="#configfile">configfile</a> information. If a parameter is specified,
|
||
it will be used instead the global configfile attribute.<br><br>
|
||
Notes:
|
||
<ul>
|
||
<li>save only writes out definitions and attributes, but no (set/get)
|
||
commands which were previously part of the config file. If you need such
|
||
commands after the initialization (e.g. <a href="FHZset">FHTcode</a>), you
|
||
should trigger them via <a href="#notify">notify</a>, when receiving the
|
||
INITIALIZED event.</li>
|
||
|
||
<li>save tries to preserve comments (lines starting with #) and include
|
||
structures, but it won't work correctly if some of these files are not
|
||
writeable.</li>
|
||
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="set"></a>
|
||
<h3>set</h3>
|
||
<ul>
|
||
<code>set <devspec> <type-specific></code>
|
||
<br><br>
|
||
Set parameters of a device / send signals to a device. You can
|
||
get a list of possible parameters by
|
||
<ul>
|
||
<code>set <name> ?</code>
|
||
</ul>
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>. The set command returns only a value on error.<br>
|
||
<br>
|
||
Each device has different set parameters, see the corresponding device
|
||
section for details.<br>
|
||
<br>
|
||
<br>
|
||
<a name="setExtensions"></a>
|
||
Some modules support a common list of <b>set extensions</b>, and point in
|
||
their documentation to this section. If the module itself implements one of
|
||
the following commands, then the module-implementation takes precedence.
|
||
|
||
<ul>
|
||
<li>on-for-timer <seconds><br>
|
||
Issue the on command for the device, and after <seconds> the off
|
||
command. For issuing the off command an internal timer will be
|
||
scheduled, which is deleted upon a restart. To delete this internal
|
||
timer without restart specify 0 as argument.</li>
|
||
<li>off-for-timer <seconds><br>
|
||
see on-for-timer above.</li>
|
||
<li>on-till <timedet><br>
|
||
Issue the on command for the device, and create an at definition with
|
||
<timedet> (in the form HH:MM[:SS]) to set it off. This definition
|
||
is visible, and its name is deviceName+"_till". To cancel the scheduled
|
||
off, delete the at definition.</li>
|
||
<li>off-till <timedet><br>
|
||
see on-till above.</li>
|
||
<li>blink <number> <blink-period><br>
|
||
set the device on for <blink-period> then off for
|
||
<blink-period> and repeat this <number> times.
|
||
To stop blinking specify "0 0" as argument.</li>
|
||
<li>intervals <from1>-<till1> <from2>-<till2>...
|
||
</br>
|
||
set the device on for the specified intervals, which are all timespecs
|
||
in the form HH:MM[:SS]. The intervals are space separated.</li>
|
||
</ul>
|
||
Examples:
|
||
<ul>
|
||
<code>
|
||
set switch on-for-timer 12.5<br>
|
||
set switch on-till {sunset()}<br>
|
||
set switch blink 3 1<br>
|
||
set switch intervals 08:00-12:00 13:00-18:00<br>
|
||
</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="setreading"></a>
|
||
<h3>setreading</h3>
|
||
<ul>
|
||
<code>setreading <devspec> <reading> <value></code>
|
||
<br><br>
|
||
Set the reading <reading> for the device <code><name></code> to
|
||
<value> without sending out commands to the device, but triggering
|
||
events and eventMap/stateFormat transformations as usual.
|
||
<br><br>
|
||
Examples:
|
||
<ul>
|
||
setreading lamp state on
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="setstate"></a>
|
||
<h3>setstate</h3>
|
||
<ul>
|
||
<code>setstate <devspec> <value></code>
|
||
<br><br>
|
||
Set the STATE entry for the device specified by <code><devspec></code>,
|
||
which is used for displaying the device state in different frontends.
|
||
No signals will be sent to the device, no events will be generated, and no
|
||
eventMap or stateFormat translation will be done either.
|
||
This command is also used in the <a href="#statefile">statefile</a>.
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.
|
||
<br><br>
|
||
Examples:
|
||
<ul>
|
||
setstate lamp on
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="shutdown"></a>
|
||
<h3>shutdown</h3>
|
||
<ul>
|
||
<code>shutdown [restart]</code>
|
||
<br><br>
|
||
Shut down the server (after saving the <a href="#statefile">state information
|
||
</a>). It triggers the global:SHUTDOWN event. If the optional restart
|
||
parameter is specified, fhem tries to restart itself.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>shutdown</code><br>
|
||
<code>shutdown restart</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="trigger"></a>
|
||
<h3>trigger</h3>
|
||
<ul>
|
||
<code>trigger <devspec> <state></code>
|
||
<br><br>
|
||
Trigger a <a href="#notify">notify</a> definition.
|
||
See the <a href="#devspec">Device specification</a> section for details on
|
||
<devspec>.
|
||
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>trigger btn3 on</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="sleep"></a>
|
||
<h3>sleep</h3>
|
||
<ul>
|
||
<code>sleep <sec> [quiet]</code>
|
||
<br><br>
|
||
Sleep for a given amount, millisecond accuracy.<br>
|
||
When called in a notify/at/etc, then nonempty return values of the following
|
||
commands is logged to the global logfile with loglevel 2.<br>
|
||
If quiet is specified, then skip this logging.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>sleep 0.5</code><br>
|
||
<code>define n3 notify btn3.* set lamp toggle;;sleep 0.5;;set lamp
|
||
toggle</code><br>
|
||
<code>define a3 at +*00:05 set Windsensor 1w_measure;; sleep 2 quiet;; get
|
||
Windsensor 1w_temp</code>
|
||
</ul>
|
||
<br>
|
||
Note: sleep followed by another command and issued in at/notify/etc is not
|
||
blocking fhem<br>
|
||
</ul>
|
||
|
||
<a name="version"></a>
|
||
<h3>version</h3>
|
||
<ul>
|
||
<code>version [filter]</code>
|
||
<br><br>
|
||
List the version of fhem.pl and all loaded modules. The optional parameter
|
||
can be used to filter the ouput.
|
||
|
||
<br><br>
|
||
Example output:
|
||
<ul>
|
||
<code>
|
||
# $Id: fhem.pl 3405 2013-07-11 19:46:39Z rudolfkoenig $<br>
|
||
# $Id: 00_CUL.pm 3237 2013-06-01 17:15:59Z rudolfkoenig $<br>
|
||
# $Id: 10_CUL_HM.pm 3378 2013-07-02 16:57:27Z martinp876 $<br>
|
||
</code>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="global"></a>
|
||
<h3>global</h3>
|
||
<ul>
|
||
The global device is used to set different global attributes. It will be
|
||
automatically defined, it cannot be deleted or renamed and has no set or get
|
||
parameters<br>
|
||
<br>
|
||
|
||
<b>Define</b><ul>N/A</ul><br>
|
||
|
||
<b>Set </b><ul>N/A</ul><br>
|
||
|
||
<b>Get</b><ul>N/A</ul><br>
|
||
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#archivedir">archivedir</a></li>
|
||
<li><a href="#archivecmd">archivecmd</a></li>
|
||
<li><a href="#nrarchive">nrarchive</a></li><br>
|
||
|
||
<a name="autoload_undefined_devices"></a>
|
||
<li>autoload_undefined_devices<br>
|
||
If set, automatically load the corresponding module when a message
|
||
of this type is received. This is used by the <a href="#autocreate">
|
||
autocreate</a> device, to automatically create a fhem device upon
|
||
receiving a corresponding message.
|
||
</li><br>
|
||
|
||
<a name="updateInBackground"></a>
|
||
<li>updateInBackground<br>
|
||
If this attribute is set to 1, the update will be executed in the
|
||
backgrund process. The return message is communicated via events, and
|
||
in telnet the inform command is activated, in FHEMWEB the Event
|
||
Monitor.
|
||
</li><br>
|
||
|
||
<a name="backup_before_update"></a>
|
||
<li>backup_before_update<br>
|
||
If this attribute is set to 0, an update skip always backing up your
|
||
installation via the <a href="#backup">backup</a> command. The default
|
||
is to backup always before updates.<br>
|
||
Note: Set this attribute only if you know what you do!<br>
|
||
This Attribute is used by the <a href="#update">update</a> command.<br>
|
||
Example:<br>
|
||
<ul>
|
||
attr global backup_before_update 0
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="backupcmd"></a>
|
||
<li>backupcmd<br>
|
||
You could pass the backup to your own command / script by using this attribute.
|
||
If this attribute is specified, then it will be started as a shell command and
|
||
passes a space separated list of files / directories as <strong>one</strong>
|
||
argument to the command, like e.g.:
|
||
<br>
|
||
<ul>
|
||
<code>"/etc/fhem.cfg /var/log/fhem/fhem.save /usr/share/fhem/contrib
|
||
/usr/share/fhem/FHEM /usr/share/fhem/foo /usr/share/fhem/foobar
|
||
/usr/share/fhem/www"</code>
|
||
</ul>
|
||
Note: Your command / script has to return the string "backup done" or
|
||
everything else to report errors, to work properly with updatefhem!<br>
|
||
This Attribute is used by the <a href="#backup">backup</a> command.<br>
|
||
Example:<br>
|
||
<ul>
|
||
attr global backupcmd /usr/local/bin/myBackupScript.sh
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="backupdir"></a>
|
||
<li>backupdir<br>
|
||
A folder to store the compressed backup file.
|
||
This Attribute is used by the <a href="#backup">backup</a> command.<br>
|
||
Example:<br>
|
||
<ul>
|
||
attr global backupdir /Volumes/BigHD
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="backupsymlink"></a>
|
||
<li>backupsymlink<br>
|
||
If this attribute is set to everything else as "no", the archive command tar
|
||
will support symlinks in your backup. Otherwise, if this attribute is set to
|
||
"no" symlinks are ignored by tar.
|
||
This Attribute is used by the <a href="#backup">backup</a> command.<br>
|
||
Example:<br>
|
||
<ul>
|
||
attr global backupsymlinks yes
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="configfile"></a>
|
||
<li>configfile<br>
|
||
Contains the name of the fhem configuration file. If <a
|
||
href="#save">save</a> is called without argument, then the output will
|
||
be written to this file.
|
||
</li><br>
|
||
|
||
<a name="exclude_from_update"></a>
|
||
<li>exclude_from_update<br>
|
||
Contains a space separated list of file which will be excluded by an update.
|
||
This Attribute is used by the <a href="#update">update</a> command.<br>
|
||
Example:<br>
|
||
<ul>
|
||
attr global exclude_from_update 21_OWTEMP.pm temp4hum4.gplot FS20.on.png FS20.off.png
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="holiday2we"></a>
|
||
<li>holiday2we<br>
|
||
If this attribute is set, then the <a href="#perl">$we</a> variable
|
||
will be true, if the value of the <a href="#holiday">holiday</a>
|
||
variable referenced by this attribute is not none.<br>
|
||
Example:<br>
|
||
<ul>
|
||
attr global holiday2we hessen
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="lastinclude"></a>
|
||
<li>lastinclude<br>
|
||
If this attribute is set, then the last command of the generated
|
||
configfile (see the <a href="#save">save</a> command) will be<br>
|
||
include <lastinclude-value><br>
|
||
This attribute is DEPRECATED, use <a href="#notify">notify</a>, with
|
||
the INITIALIZED event to execute commands after initialization.
|
||
</li><br>
|
||
|
||
<a name="logfile"></a>
|
||
<li>logfile<br>
|
||
Specify the logfile to write. You can use "-" for
|
||
stdout, in this case the server won't background itself.<br>
|
||
The logfile name can also take wildcards for easier logfile rotation,
|
||
see the <a href="#FileLog">FileLog</a> section. Just apply the
|
||
<code>archivecmd / archivedir / nrarchive</code> attributes to the
|
||
<code>global</code> device as you would do for a FileLog device.<br>
|
||
You can access the current name of the logfile with
|
||
<code>{ $currlogfile }</code>.
|
||
</li><br>
|
||
|
||
<a name="modpath"></a>
|
||
<li>modpath<br>
|
||
Specify the path to the modules directory <code>FHEM</code>. The path
|
||
does <b>not</b> contain the directory FHEM. Upon setting the
|
||
attribute, the directory will be scanned for filenames of the form
|
||
NN_<NAME>.pm, and make them available for device definition under
|
||
<NAME>. If the first device of type <NAME> is defined, the
|
||
module will be loaded, and its function with the name
|
||
<NAME>_Initialize will be called. Exception to this rule are
|
||
modules with NN=99, these are considered to be utility modules
|
||
containing only perl helper functions, they are loaded at startup (i.e.
|
||
modpath attribute definition time).
|
||
</li><br>
|
||
|
||
<a name="motd"></a>
|
||
<li>motd<br>
|
||
Message Of The Day. Displayed on the homescreen of the FHEMWEB package,
|
||
or directly after the telnet logon, before displaying the fhem> prompt.
|
||
SecurityCheck is setting motd if it is not defined upon startup, to
|
||
avoid this set the motd value to none
|
||
</li><br>
|
||
|
||
<a name="mseclog"></a>
|
||
<li>mseclog<br>
|
||
If set, the timestamp in the logfile will contain a millisecond part.
|
||
</li><br>
|
||
|
||
<a name="nofork"></a>
|
||
<li>nofork<br>
|
||
If set and the logfile is not "-", do not try to background. Needed on
|
||
some Fritzbox installations, and it will be set automatically for
|
||
Windows.
|
||
</li><br>
|
||
|
||
<a name="pidfilename="></a>
|
||
<li>pidfilename<br>
|
||
Write the process id of the perl process to the specified file. The
|
||
server runs as a daemon, and some distributions would like to check by
|
||
the pid if we are still running. The file will be deleted upon
|
||
shutdown.
|
||
</li><br>
|
||
|
||
<li><a href="#fheminfo">sendStatistics</a>
|
||
|
||
<a name="statefile"></a>
|
||
<li>statefile<br>
|
||
Set the filename where the state and certain <a href="#at">at</a>
|
||
information will be saved before shutdown. If it is not specified, then
|
||
no information will be saved.
|
||
</li><br>
|
||
|
||
<a name="title"></a>
|
||
<li>title<br>
|
||
Used by the web frontend fhemweb.pl (webpgm2) as a Page title.
|
||
</li><br>
|
||
|
||
<li><a href="#fheminfo">uniqueID</a>
|
||
|
||
<a name="updatebranch"></a>
|
||
<li>updatebranch<br>
|
||
The update branch will be set by the file FhemUtils/release.pm contained
|
||
in the modpath. For example, if a stable version (version 5.3 upwards) of
|
||
fhem is installed via a direct download connection of the archieve on the
|
||
fhem-website, then the branch of the update is automatically on "stable".
|
||
In this branch, only updates fixing confirmed errors, relevant security
|
||
fixes or new stable versions are provided.<br>
|
||
By using the command "update development <filename>", particular files
|
||
or packages can always be installed directly from the development branch
|
||
(e.g. "update development <package>").<br>
|
||
If you want to update from the development branch in stable verion in
|
||
general, you can force this behaviour by using the attribute "updatebranch DEVELOPMENT".
|
||
In case the installation of fhem should generally using the development
|
||
branch, this attribute would not have to be set. Instead, use "update development force"
|
||
to update all files including release.pm (containing the release-information)
|
||
to the newest version.
|
||
</li><br>
|
||
|
||
<a name="userattr"></a>
|
||
<li>userattr<br>
|
||
A space separated list which contains the names of additional
|
||
attributes. Without specifying them you will not be able to set them
|
||
(in order to prevent typos).
|
||
</li><br>
|
||
|
||
<a name="dupTimeout"></a>
|
||
<li>dupTimeout<br>
|
||
Define the timeout for which 2 identical events from two different
|
||
receiver are considered a duplicate. Default is 0.5 seconds.
|
||
</li><br>
|
||
|
||
<a name="showInternalValues"></a>
|
||
<li>showInternalValues<br>
|
||
Show data used for internal computations. If the name of an internal
|
||
value, reading or attribute starts with dot (.), then it is normally
|
||
hidden, and will only be visible, if this attribute is set to 1.
|
||
The attribute is checked by the list command, by the FHEMWEB room
|
||
overview and by xmllist.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="ALL3076"></a>
|
||
<h3>ALL3076</h3>
|
||
<ul>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br><br>
|
||
<a name="ALL3076define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ALL3076 <ip-address> </code>
|
||
<br><br>
|
||
Defines an Allnet 3076 device (Dimmable lightswitch) via its ip address or dns name<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define lamp1 ALL3076 192.168.1.200</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ALL3076set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
dimdown
|
||
dim10%
|
||
dim20%
|
||
dim30%
|
||
dim40%
|
||
dim50%
|
||
dim60%
|
||
dim70%
|
||
dim80%
|
||
dim90%
|
||
dim100%
|
||
dim[0-100]%
|
||
dimup
|
||
off
|
||
on
|
||
toggle
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set lamp1 on</code><br>
|
||
<code>set lamp1 dim11%</code><br>
|
||
<code>set lamp2 toggle</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="ALL4000T"></a>
|
||
<h3>ALL4000T</h3>
|
||
<ul>
|
||
Note: this module requires the following perl modules: XML::Simple LWP::UserAgent
|
||
HTTP::Request.
|
||
<br><br>
|
||
<a name="ALL4000Tdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ALL4000T <ip-address> <port> <delay></code>
|
||
<br><br>
|
||
Defines a temperature sensor connected on an Allnet 4000 device via its ip address and port. Use the delay argument to define the delay between polls.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define AUSSEN.POOL.TEMP.vorlauf ALL4000T 192.168.68.20 t2 120</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<a name="ALL4027"></a>
|
||
<h3>ALL4027</h3>
|
||
<ul>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br><br>
|
||
<a name="ALL4027define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ALL4027 <ip-address> <port> <relay_nr> <delay></code>
|
||
<br><br>
|
||
Defines an Allnet 4027 device (Box with 8 relays) connected to an ALL4000 via its ip address. The status of the device is also pooled (delay interval), because someone else is able to change the state via the webinterface of the device.<br><br>
|
||
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define lamp1 ALL4027 192.168.8.200 0 7 60</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ALL4027set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
off
|
||
on
|
||
on-for-timer <Seconds>
|
||
toggle
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set poolpump on</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="BBB_BMP180"></a>
|
||
<h3>BBB_BMP180</h3>
|
||
<ul>
|
||
|
||
<b>Prerequesits</b>
|
||
<ul>
|
||
<br/>
|
||
Module was developed for use with Beaglebone Black.<br/><br/>
|
||
To create the device, run the following command on system console:<br/><br/>
|
||
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-1/new_device</code><br/><br/>
|
||
To check if successful:<br/><br/>
|
||
<code>
|
||
dmesg | grep bmp<br/>
|
||
[ 76.989945] i2c i2c-1: new_device: Instantiated device bmp085 at 0x77<br/>
|
||
[ 77.040606] bmp085 1-0077: Successfully initialized bmp085!<br/>
|
||
</code>
|
||
<br/>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="BBB_BMP180define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<br/>
|
||
<code>define <name> BBB_BMP180 [bus]</code>
|
||
<br/><br/>
|
||
This module provides air pressure measurement by a BMP180 sensor connected to I2C bus.<br/>
|
||
Optional parameter [bus] defines number of I2C-bus in your hardware (default = 1).<br/>
|
||
<br/>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="BBB_BMP180set"></a>
|
||
<b>Set-Commands</b><br/>
|
||
<ul>
|
||
<br/>
|
||
No set commands implemented.<br/>
|
||
<br/>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="BBB_BMP180get"></a>
|
||
<b>Get-Commands</b><br/>
|
||
<ul>
|
||
<br/>
|
||
<code>get <name> readValues</code>
|
||
<br/><br/>
|
||
<ul>
|
||
Update all values immediately.
|
||
</ul>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="BBB_BMP180attr"></a>
|
||
<b>Attributes</b><br/><br/>
|
||
<ul>
|
||
<li><b>bbbInterval</b> - Interval for readings update (default = 300 seconds)</li>
|
||
<li><b>bbbRoundPressure</b> - If set to 1 = pressure value will be presented without decimals (default = 2 decimals)</li>
|
||
<li><b>bbbRoundTemperatue</b> - If set to 1 = temperature value will be presented without decimals (default = 1 decimal)</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Generated Readings/Events:</b>
|
||
<br/><br/>
|
||
<ul>
|
||
<li><b>temperature</b> - temperature at sensor</li>
|
||
<li><b>pressure</b> - pressure (absolute)</li>
|
||
<li><b>pressure-nn</b> - pressure (relative), global attribute altitude needed for calculation</li>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Author's notes</b><br/><br/>
|
||
<ul>
|
||
<li>Have fun!</li><br/>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="BS"></a>
|
||
<h3>BS</h3>
|
||
<ul>
|
||
The module BS allows to collect data from a brightness sensor through a
|
||
<a href="#FHZ">FHZ</a> device. For details on the brightness sensor see
|
||
<a href="http://www.busware.de/tiki-index.php?page=CPM-BS">busware wiki</a>.
|
||
You can have at most nine different brightness sensors in range of your
|
||
FHZ.<br>
|
||
<br>
|
||
|
||
The state contains the brightness in % (reading <code>brightness</code>) and
|
||
the brightness in lux (reading <code>lux</code>). The <code>flags</code>
|
||
reading is always zero. The meaning of these readings is explained in more
|
||
detail on the above mentioned wiki page.<br>
|
||
<br>
|
||
|
||
<a name="BSDefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> BS <sensor#> [<RExt>]</code>
|
||
<br><br>
|
||
|
||
<code><sensor#></code> is the number of sensor in the brightness
|
||
sensor address system that runs from 1 to 9.<br>
|
||
<br>
|
||
<code><RExt></code> is the value of the resistor on your brightness
|
||
sensor in Ω (Ohm). The brightness reading in % is proportional to the resistance, the
|
||
lux reading is proportional to the resistance squared. The value is
|
||
optional. The default resistance is RExt= 50.000Ω.<br>
|
||
<br>
|
||
|
||
Example:<br>
|
||
<ul>
|
||
<code>define bs1 BS 1 40000</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="BSset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="BSget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="BSattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a> (bs)</li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="CM11"></a>
|
||
<h3>CM11</h3>
|
||
<ul>
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module.
|
||
<br><br>
|
||
<a name="CM11define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CM11 <serial-device></code>
|
||
<br><br>
|
||
CM11 is the X10 module to interface X10 devices with the PC.<br><br>
|
||
|
||
The current implementation can evaluate incoming data on the powerline of
|
||
any kind. It can send on, off, dimdown and dimup commands.
|
||
<br><br>
|
||
The name of the serial-device depends on your distribution. If
|
||
serial-device is none, then no device will be opened, so you can experiment
|
||
without hardware attached.<br>
|
||
|
||
If you experience problems (for verbose 4 you get a lot of "Bad CRC message"
|
||
in the log), then try to define your device as <br>
|
||
<code>define <name> FHZ <serial-device> strangetty</code><br>
|
||
<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define x10if CM11 /dev/ttyUSB3</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="CM11set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> reopen</code>
|
||
<br><br>
|
||
Reopens the serial port.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CM11get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> fwrev</code>
|
||
<br><br>
|
||
Reads the firmware revision of the CM11 device. Returns <code>error</code>
|
||
if the serial connection to the device times out. Can be used for error
|
||
detection.
|
||
<br><br>
|
||
|
||
<code>get <name> time</code>
|
||
<br><br>
|
||
Reads the internal time of the device which is the total uptime (modulo one
|
||
year), since fhem sets the time to 0.00:00:00 if the device requests the time
|
||
to be set after being powered on. Returns <code>error</code>
|
||
if the serial connection to the device times out. Can be used for error
|
||
detection.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CM11attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#model">model</a> (CM11)</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="CO20"></a>
|
||
<h3>CO20</h3>
|
||
<ul>
|
||
Module for measuring air quality with usb sticks based on the AppliedSensor iAQ-Engine sensor.
|
||
Products currently know to work are the VOLTCRAFT CO-20 and the Sentinel Haus Institut RaumluftWächter.
|
||
Probably works with all devices recognized as iAQ Stick (0x03eb:0x2013).<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>Device::USB hast to be installed on the FHEM host.<br>
|
||
It can be installed with '<code>cpan install Device::USB</code>'<br>
|
||
or on debian with '<code>sudo apt-get install libdevice-usb-perl'</code>'</li>
|
||
<li>FHEM has to have permissions to open the device. To configure this with udev
|
||
rules see here: <a href="https://code.google.com/p/usb-sensors-linux/wiki/Install_AirSensor_Linux">Install_AirSensor_Linux
|
||
usb-sensors-linux</a></li>
|
||
</ul><br>
|
||
|
||
<a name="CO20_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CO20 [bus:device]</code><br>
|
||
<br>
|
||
|
||
Defines a CO20 device. bus:device hast to be used if more than one sensor is connected to the same host.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define CO20 CO20</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="CO20_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>voc</br>
|
||
CO2 equivalents in the range of 450-2000ppm.</li>
|
||
</ul><br>
|
||
|
||
<a name="CO20_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>update<br>
|
||
trigger an update</li>
|
||
</ul><br>
|
||
|
||
<a name="CO20_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>interval<br>
|
||
the interval in seconds used to read updates. the minimum and default ist 60.</li>
|
||
<li>disable<br>
|
||
1 -> disconnect and stop polling</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="CUL"></a>
|
||
<h3>CUL</h3>
|
||
<ul>
|
||
|
||
<table>
|
||
<tr><td>
|
||
The CUL/CUN(O) is a family of RF devices sold by <a
|
||
href="http://www.busware.de">busware.de</a>.
|
||
|
||
With the opensource firmware
|
||
<a href="http://culfw.de/culfw.html">culfw</a> they are capable
|
||
to receive and send different 433/868 MHz protocols (FS20/FHT/S300/EM/HMS/MAX!).
|
||
It is even possible to use these devices as range extenders/routers, see the
|
||
<a href="#CUL_RFR">CUL_RFR</a> module for details.
|
||
<br> <br>
|
||
|
||
Some protocols (FS20, FHT and KS300) are converted by this module so that
|
||
the same logical device can be used, irrespective if the radio telegram is
|
||
received by a CUL or an FHZ device.<br>
|
||
Other protocols (S300/EM) need their
|
||
own modules. E.g. S300 devices are processed by the CUL_WS module if the
|
||
signals are received by the CUL, similarly EMWZ/EMGZ/EMEM is handled by the
|
||
CUL_EM module.<br><br>
|
||
|
||
It is possible to attach more than one device in order to get better
|
||
reception, FHEM will filter out duplicate messages.<br><br>
|
||
|
||
Note: This module may require the <code>Device::SerialPort</code> or
|
||
<code>Win32::SerialPort</code> module if you attach the device via USB
|
||
and the OS sets strange default parameters for serial devices.<br><br>
|
||
|
||
</td><td>
|
||
<img src="ccc.jpg"/>
|
||
</td></tr>
|
||
</table>
|
||
|
||
<a name="CULdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL <device> <FHTID></code> <br>
|
||
<br>
|
||
USB-connected devices (CUL/CUN):<br><ul>
|
||
<device> specifies the serial port to communicate with the CUL.
|
||
The name of the serial-device depends on your distribution, under
|
||
linux the cdc_acm kernel module is responsible, and usually a
|
||
/dev/ttyACM0 device will be created. If your distribution does not have a
|
||
cdc_acm module, you can force usbserial to handle the CUL by the
|
||
following command:
|
||
<ul><code>
|
||
modprobe usbserial vendor=0x03eb product=0x204b
|
||
</code></ul>
|
||
In this case the device is most probably /dev/ttyUSB0.<br><br>
|
||
|
||
You can also specify a baudrate if the device name contains the @
|
||
character, e.g.: /dev/ttyACM0@38400<br><br>
|
||
|
||
If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
|
||
perl module <code>Device::SerialPort</code> is not needed, and FHEM
|
||
opens the device with simple file io. This might work if the operating
|
||
system uses sane defaults for the serial parameters, e.g. some Linux
|
||
distributions and OSX.<br><br>
|
||
|
||
</ul>
|
||
Network-connected devices (CUN(O)):<br><ul>
|
||
<device> specifies the host:port of the device, e.g.
|
||
192.168.0.244:2323
|
||
</ul>
|
||
<br>
|
||
If the device is called none, then no device will be opened, so you
|
||
can experiment without hardware attached.<br>
|
||
|
||
The FHTID is a 4 digit hex number, and it is used when the CUL talks to
|
||
FHT devices or when CUL requests data. Set it to 0000 to avoid answering
|
||
any FHT80b request by the CUL.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CULset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li>raw<br>
|
||
Issue a CUL firmware command. See the <a
|
||
href="http://culfw.de/commandref.html">this</a> document
|
||
for details on CUL commands.
|
||
</li><br>
|
||
|
||
<li>freq / bWidth / rAmpl / sens<br>
|
||
<a href="#rfmode">SlowRF</a> mode only.<br>
|
||
Set the CUL frequency / bandwidth / receiver-amplitude / sensitivity<br>
|
||
|
||
Use it with care, it may destroy your hardware and it even may be
|
||
illegal to do so. Note: The parameters used for RFR transmission are
|
||
not affected.<br>
|
||
<ul>
|
||
<li>freq sets both the reception and transmission frequency. Note:
|
||
Although the CC1101 can be set to frequencies between 315 and 915
|
||
MHz, the antenna interface and the antenna of the CUL is tuned for
|
||
exactly one frequency. Default is 868.3 MHz (or 433 MHz)</li>
|
||
<li>bWidth can be set to values between 58 kHz and 812 kHz. Large values
|
||
are susceptible to interference, but make possible to receive
|
||
inaccurately calibrated transmitters. It affects tranmission too.
|
||
Default is 325 kHz.</li>
|
||
<li>rAmpl is receiver amplification, with values between 24 and 42 dB.
|
||
Bigger values allow reception of weak signals. Default is 42.
|
||
</li>
|
||
<li>sens is the decision boundary between the on and off values, and it
|
||
is 4, 8, 12 or 16 dB. Smaller values allow reception of less clear
|
||
signals. Default is 4 dB.</li>
|
||
</ul>
|
||
</li><br>
|
||
<a name="hmPairForSec"></a>
|
||
<li>hmPairForSec<br>
|
||
<a href="#rfmode">HomeMatic</a> mode only.<br>
|
||
Set the CUL in Pairing-Mode for the given seconds. Any HM device set into
|
||
pairing mode in this time will be paired with FHEM.
|
||
</li><br>
|
||
<a name="hmPairSerial"></a>
|
||
<li>hmPairSerial<br>
|
||
<a href="#rfmode">HomeMatic</a> mode only.<br>
|
||
Try to pair with the given device. The argument is a 10 character
|
||
string, usually starting with letters and ending with digits, printed on
|
||
the backside of the device. It is not necessary to put the given device
|
||
in learning mode if it is a receiver.
|
||
</li><br>
|
||
<a name="hmPairForSec"></a>
|
||
<li>led<br>
|
||
Set the CUL led off (00), on (01) or blinking (02).
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="CULget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>version<br>
|
||
returns the CUL firmware version
|
||
</li><br>
|
||
<li>uptime<br>
|
||
returns the CUL uptime (time since CUL reset)
|
||
</li><br>
|
||
<li>raw<br>
|
||
Issues a CUL firmware command, and waits for one line of data returned by
|
||
the CUL. See the CUL firmware README document for details on CUL
|
||
commands.
|
||
</li><br>
|
||
<li>fhtbuf<br>
|
||
CUL has a message buffer for the FHT. If the buffer is full, then newly
|
||
issued commands will be dropped, and an "EOB" message is issued to the
|
||
FHEM log.
|
||
<code>fhtbuf</code> returns the free memory in this buffer (in hex),
|
||
an empty buffer in the CUL V2 is 74 bytes, in CUL V3/CUN(O) 200 Bytes.
|
||
A message occupies 3 + 2x(number of FHT commands) bytes,
|
||
this is the second reason why sending multiple FHT commands with one
|
||
<a href="#set">set</a> is a good idea. The first reason is, that
|
||
these FHT commands are sent at once to the FHT.
|
||
</li> <br>
|
||
|
||
<li>ccconf<br>
|
||
Read some CUL radio-chip (cc1101) registers (frequency, bandwidth, etc.),
|
||
and display them in human readable form.
|
||
</li><br>
|
||
|
||
<li>cmds<br>
|
||
Depending on the firmware installed, CULs have a different set of
|
||
possible commands. Please refer to the README of the firmware of your
|
||
CUL to interpret the response of this command. See also the raw command.
|
||
</li><br>
|
||
<li>credit10ms<br>
|
||
One may send for a duration of credit10ms*10 ms before the send limit
|
||
is reached and a LOVF is generated.
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="CULattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a> (CUL,CUN)</li>
|
||
<li><a name="sendpool">sendpool</a><br>
|
||
If using more than one CUL for covering a large area, sending
|
||
different events by the different CUL's might disturb each other. This
|
||
phenomenon is also known as the Palm-Beach-Resort effect.
|
||
Putting them in a common sendpool will serialize sending the events.
|
||
E.g. if you have three CUN's, you have to specify following
|
||
attributes:<br>
|
||
<code>attr CUN1 sendpool CUN1,CUN2,CUN3<br>
|
||
attr CUN2 sendpool CUN1,CUN2,CUN3<br>
|
||
attr CUN3 sendpool CUN1,CUN2,CUN3</code><br>
|
||
</li><br>
|
||
<li><a name="addvaltrigger">addvaltrigger</a><br>
|
||
Create triggers for additional device values. Right now these are RSSI
|
||
and RAWMSG for the CUL family and RAWMSG for the FHZ.
|
||
</li><br>
|
||
<li><a name="rfmode">rfmode</a><br>
|
||
Configure the RF Transceiver of the CUL (the CC1101). Available
|
||
arguments are:
|
||
<ul>
|
||
<li>SlowRF<br>
|
||
To communicate with FS20/FHT/HMS/EM1010/S300/Hoermann devices @1 kHz
|
||
datarate. This is the default.</li>
|
||
|
||
<li>HomeMatic<br>
|
||
To communicate with HomeMatic type of devices @10 kHz datarate.</li>
|
||
|
||
<li>MAX<br>
|
||
To communicate with MAX! type of devices @10 kHz datarate.</li>
|
||
|
||
</ul>
|
||
</li><br>
|
||
<li><a name="hmId">hmId</a><br>
|
||
Set the HomeMatic ID of this device. If this attribute is absent, the
|
||
ID will be F1<FHTID>. Note 1: After setting or changing this
|
||
attribute you have to relearn all your HomeMatic devices. Note 2: The
|
||
value <b>must</b> be a 6 digit hex number, and 000000 is not valid. FHEM
|
||
won't complain if it is not correct, but the communication won't work.
|
||
</li><br>
|
||
|
||
<li><a name="hmProtocolEvents">hmProtocolEvents</a><br>
|
||
Generate events for HomeMatic protocol messages. These are normally
|
||
used for debugging, by activating "inform timer" in a telnet session,
|
||
or looking at the Event Monitor window in the FHEMWEB frontend.<br>
|
||
Example:
|
||
<ul>
|
||
<code>
|
||
2012-05-17 09:44:22.515 CUL CULHM RCV L:0B N:81 CMD:A258 SRC:...... DST:...... 0000 (TYPE=88,WAKEMEUP,BIDI,RPTEN)
|
||
</code>
|
||
</ul>
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="CUL_EM"></a>
|
||
<h3>CUL_EM</h3>
|
||
<ul>
|
||
The CUL_EM module interprets EM type of messages received by the CUL, notably
|
||
from EMEM, EMWZ or EMGZ devices.
|
||
<br><br>
|
||
|
||
<a name="CUL_EMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_EM <code> [corr1 corr2
|
||
CostPerUnit BasicFeePerMonth]</code> <br>
|
||
<br>
|
||
<code> is the code which must be set on the EM device. Valid values
|
||
are 1 through 12. 1-4 denotes EMWZ, 5-8 EMEM and 9-12 EMGZ devices.<br><br>
|
||
|
||
<b>corr1</b> is used to correct the current number, <b>corr2</b>
|
||
for the total number.
|
||
<ul>
|
||
<li>for EMWZ devices you should specify the rotation speed (R/kW)
|
||
of your watt-meter (e.g. 150) for corr1 and 12 times this value for
|
||
corr2</li>
|
||
<li>for EMEM devices the corr1 value is 0.01, and the corr2 value is
|
||
0.001 </li>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>CostPerUnit</b> and <b>BasicFeePerMonth</b> are used to compute your
|
||
daily and monthly fees. Your COST will appear in the log, generated once
|
||
daily (without the basic fee) or month (with the bassic fee included). Your
|
||
definition should look like e.g.:
|
||
<ul><code>
|
||
define emwz 1 75 900 0.15 12.50<br>
|
||
</code></ul>
|
||
and the Log looks like:
|
||
<ul><code>
|
||
CUM_DAY: 6.849 CUM: 60123.4 COST: 1.02<br>
|
||
CUM_MONTH: 212.319 CUM: 60123.4 COST: 44.34<br>
|
||
</code></ul>
|
||
|
||
Tip: You can configure your EMWZ device to show in the CUM column of the
|
||
STATE reading the current reading of your meter. For this purpose: multiply
|
||
the current reading (from the real device) with the corr1 value (RperKW),
|
||
and subtract the RAW CUM value from it. Now set the basis reading of your
|
||
EMWZ device (named emwz) to this value.<br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_EMset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_EMget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_EMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#model">model</a> (EMEM,EMWZ,EMGZ)</li><br>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
<li><a href="#eventMap">eventMap</a></li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="CUL_FHTTK"></a>
|
||
<h3>CUL_FHTTK</h3>
|
||
<ul>
|
||
This module handles messages from the FHT80 TF "Fenster-Tür-Kontakt" (Window-Door-Contact)
|
||
which are normally only acted upon by the <a href="#FHT">FHT80B</a>. With this module,
|
||
FHT80 TFs are in a limited way (see <a href="http://fhz4linux.info/tiki-index.php?page=FHT+protocol">Wiki</a>
|
||
for detailed explanation of TF's mode of operation) usable similar to HMS100 TFK. The name
|
||
of the module was chosen as a) only CUL will spill out the datagrams and b) "TF" designates
|
||
usually temperature+humidity sensors (no clue, why ELV didn't label this one "TFK" like with
|
||
FS20 and HMS).<br><br>
|
||
As said before, FHEM can receive FHT80 TF radio (868.35 MHz) messages only through an
|
||
<a href="#CUL">CUL</a> device, so this must be defined first.<br><br>
|
||
|
||
<a name="CUL_FHTTKdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_FHTTK <devicecode></code>
|
||
<br><br>
|
||
|
||
<code><devicecode></code> is a six digit hex number, given to the FHT80 TF during
|
||
production, i. e. it is not changeable. (Yes, it keeps this code after changing batteries
|
||
as well.)<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define TK_TEST CUL_FHTTK 965AB0</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_FHTTKset"></a>
|
||
<b>Set </b>
|
||
<ul> Nothing to set here yet ... </ul>
|
||
<br>
|
||
|
||
<b>Get</b>
|
||
<ul> No get implemented yet ...
|
||
</ul><br>
|
||
|
||
<a name="CUL_FHTTKattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#verbose">verbose</a></li><br>
|
||
<li><a href="#model">model</a> (FHT80TF, FHT80TF-2)</li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#eventMap">eventMap</a></li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="CUL_HM"></a>
|
||
<h3>CUL_HM</h3>
|
||
<ul>
|
||
Support for eQ-3 HomeMatic devices via the <a href="#CUL">CUL</a> or the <a
|
||
href="#HMLAN">HMLAN</a>.<br>
|
||
<br>
|
||
<a name="CUL_HMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code><B>define <name> CUL_HM <6-digit-hex-code|8-digit-hex-code></B></code>
|
||
|
||
<br><br>
|
||
Correct device definition is the key for HM environment simple maintenance.
|
||
<br>
|
||
|
||
Background to define entities:<br>
|
||
HM devices has a 3 byte (6 digit hex value) HMid - which is key for
|
||
addressing. Each device hosts one or more channels. HMid for a channel is
|
||
the device's HMid plus the channel number (1 byte, 2 digit) in hex.
|
||
Channels should be defined for all multi-channel devices. Channel entities
|
||
cannot be defined if the hosting device does not exist<br> Note: FHEM
|
||
mappes channel 1 to the device if it is not defined explicitely. Therefore
|
||
it does not need to be defined for single channel devices.<br>
|
||
|
||
Note: if a device is deleted all assotiated channels will be removed as
|
||
well. <br> An example for a full definition of a 2 channel switch is given
|
||
below:<br>
|
||
|
||
<ul><code>
|
||
define livingRoomSwitch CUL_HM 123456<br>
|
||
define LivingroomMainLight CUL_HM 12345601<br>
|
||
define LivingroomBackLight CUL_HM 12345602<br><br></code>
|
||
</ul>
|
||
|
||
livingRoomSwitch is the device managing communication. This device is
|
||
defined prior to channels to be able to setup references. <br>
|
||
LivingroomMainLight is channel 01 dealing with status of light, channel
|
||
peers and channel assotiated register. If not defined channel 01 is covered
|
||
by the device entity.<br> LivingRoomBackLight is the second 'channel',
|
||
channel 02. Its definition is mandatory to operate this function.<br><br>
|
||
|
||
Sender specials: HM threats each button of remotes, push buttons and
|
||
similar as channels. It is possible (not necessary) to define a channel per
|
||
button. If all channels are defined access to pairing informatin is
|
||
possible as well as access to channel related register. Furthermore names
|
||
make the traces better readable.<br><br>
|
||
|
||
define may also be invoked by the <a href="#autocreate">autocreate</a>
|
||
module, together with the necessary subType attribute.
|
||
Usually you issue a <a href="#CULset">hmPairForSec</a> and press the
|
||
corresponding button on the device to be paired, or issue a <a
|
||
href="#CULset">hmPairSerial</a> set command if the device is a receiver
|
||
and you know its serial number. Autocreate will then create a fhem
|
||
device and set all necessary attributes. Without pairing the device
|
||
will not accept messages from fhem. fhem may create the device even if
|
||
the pairing is not successful. Upon a successful pairing you'll see a
|
||
CommandAccepted entry in the details section of the CUL_HM device.<br><br>
|
||
|
||
If you cannot use autocreate, then you have to specify:<br>
|
||
<ul>
|
||
<li>the <6-digit-hex-code>or HMid+ch <8-digit-hex-code><br>
|
||
It is the unique, hardcoded device-address and cannot be changed (no,
|
||
you cannot choose it arbitrarily like for FS20 devices). You may
|
||
detect it by inspecting the fhem log.</li>
|
||
<li>the subType attribute<br>
|
||
which is one of switch dimmer blindActuator remote sensor swi
|
||
pushButton threeStateSensor motionDetector keyMatic winMatic
|
||
smokeDetector</li>
|
||
</ul>
|
||
Without these attributes fhem won't be able to decode device messages
|
||
appropriately. <br><br>
|
||
|
||
<b>Notes</b>
|
||
<ul>
|
||
<li>If the interface is a CUL device, the <a href="#rfmode">rfmode </a>
|
||
attribute of the corresponding CUL/CUN device must be set to HomeMatic.
|
||
Note: this mode is BidCos/Homematic only, you will <b>not</b> receive
|
||
FS20/HMS/EM/S300 messages via this device. Previously defined FS20/HMS
|
||
etc devices must be assigned to a different input device (CUL/FHZ/etc).
|
||
</li>
|
||
<li>Currently supported device families: remote, switch, dimmer,
|
||
blindActuator, motionDetector, smokeDetector, threeStateSensor,
|
||
THSensor, winmatic. Special devices: KS550, HM-CC-TC and the KFM100.
|
||
</li>
|
||
<li>Device messages can only be interpreted correctly if the device type is
|
||
known. fhem will extract the device type from a "pairing request"
|
||
message, even if it won't respond to it (see <a
|
||
href="#hmPairSerial">hmPairSerial</a> and <a
|
||
href="#hmPairForSec">hmPairForSec</a> to enable pairing).
|
||
As an alternative, set the correct subType and model attributes, for a
|
||
list of possible subType values see "attr hmdevice ?".</li>
|
||
<a name="HMAES"></a>
|
||
<li>The so called "AES-Encryption" is in reality a signing request: if it is
|
||
enabled, an actor device will only execute a received command, if a
|
||
correct answer to a request generated by the actor is received. This
|
||
means:
|
||
<ul>
|
||
<li>Reaction to commands is noticably slower, as 3 messages are sent
|
||
instead of one before the action is processed by the actor.</li>
|
||
<li>Every command and its final ack from the device is sent in clear,
|
||
so an outside observer will know the status of each device.</li>
|
||
<li>The firmware implementation is buggy: the "toggle" event is executed
|
||
<b>before</b> the answer for the signing request is received, at
|
||
least by some switches (HM-LC-Sw1-Pl and HM-LC-SW2-PB-FM).</li>
|
||
<li>The <a href="#HMLAN">HMLAN</a> configurator will answer signing
|
||
requests by itself, and if it is configured with the 3-byte address
|
||
of a foreign CCU which is still configurerd with the default
|
||
password, it is able to answer signing requests correctly.</li>
|
||
<li>AES-Encryption is not useable with a CUL device as the interface,
|
||
but it is supported with a HMLAN. Due to the issues above I do not
|
||
recommend using Homematic encryption at all.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="CUL_HMset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
Note: devices which are normally send-only (remote/sensor/etc) must be set
|
||
into pairing/learning mode in order to receive the following commands.
|
||
<br>
|
||
<br>
|
||
|
||
Universal commands (available to most hm devices):
|
||
<ul>
|
||
<li><B>clear <[readings|register|msgEvents]></B><a name="CUL_HMclear"></a><br>
|
||
A set of variables can be removed.<br>
|
||
<ul>
|
||
readings: all readings will be deleted. Any new reading will be added usual. May be used to eliminate old data<br>
|
||
register: all captured register-readings in FHEM will be removed. This has NO impact to the values in the device.<br>
|
||
msgEvents: all message event counter will be removed. Also commandstack will be cleared. <br>
|
||
rssi: collected rssi values will be cleared. <br>
|
||
</ul>
|
||
</li>
|
||
<li><B>getConfig</B><a name="CUL_HMgetConfig"></a><br>
|
||
Will read major configuration items stored in the HM device. Executed
|
||
on a channel it will read pair Inforamtion, List0, List1 and List3 of
|
||
the 1st internal peer. Furthermore the peerlist will be retrieved for
|
||
teh given channel. If executed on a device the command will get the
|
||
above info or all assotated channels. Not included will be the
|
||
configuration for additional peers. <br> The command is a shortcut
|
||
for a selection of other commands.
|
||
</li>
|
||
<li><B>getRegRaw [List0|List1|List2|List3|List4|List5|List6]
|
||
<peerChannel> </B><a name="CUL_HMgetRegRaw"></a><br>
|
||
|
||
Read registerset in raw format. Description of the registers is beyond
|
||
the scope of this documentation.<br>
|
||
|
||
Registers are structured in so called lists each containing a set of
|
||
registers.<br>
|
||
|
||
List0: device-level settings e.g. CUL-pairing or dimmer thermal limit
|
||
settings.<br>
|
||
|
||
List1: per channel settings e.g. time to drive the blind up and
|
||
down.<br>
|
||
|
||
List3: per 'link' settings - means per peer-channel. This is a lot of
|
||
data!. It controlls actions taken upon receive of a trigger from the
|
||
peer.<br>
|
||
|
||
List4: settings for channel (button) of a remote<br><br>
|
||
|
||
<PeerChannel> paired HMid+ch, i.e. 4 byte (8 digit) value like
|
||
'12345601'. It is mendatory for List 3 and 4 and can be left out for
|
||
List 0 and 1. <br>
|
||
|
||
'all' can be used to get data of each paired link of the channel. <br>
|
||
|
||
'selfxx' can be used to address data for internal channels (associated
|
||
with the build-in switches if any). xx is the number of the channel in
|
||
decimal.<br>
|
||
|
||
Note1: execution depends on the entity. If List1 is requested on a
|
||
device rather then a channel the command will retrieve List1 for all
|
||
channels assotiated. List3 with peerChannel = all will get all link
|
||
for all channel if executed on a device.<br>
|
||
|
||
Note2: for 'sender' see <a href="#CUL_HMremote">remote</a> <br>
|
||
|
||
Note3: the information retrieval may take a while - especially for
|
||
devices with a lot of channels and links. It may be necessary to
|
||
refresh the web interface manually to view the results <br>
|
||
|
||
Note4: the direct buttons on a HM device are hidden by default.
|
||
Nevertheless those are implemented as links as well. To get access to
|
||
the 'internal links' it is necessary to issue <br>
|
||
'set <name> <a href="#CUL_HMregSet">regSet</a> intKeyVisib visib'<br>
|
||
or<br>
|
||
'set <name> <a href="#CUL_HMregBulk">regBulk</a> RegL_0: 2:81'<br>
|
||
|
||
Reset it by replacing '81' with '01'<br> example:<br>
|
||
|
||
<ul><code>
|
||
set mydimmer getRegRaw List1<br>
|
||
set mydimmer getRegRaw List3 all <br>
|
||
</code></ul>
|
||
</li>
|
||
<li><B>getSerial</B><a name="CUL_HMgetSerial"></a><br>
|
||
Read serial number from device and write it to attribute serialNr.
|
||
</li>
|
||
<li><B>inhibit [on|off]</B><br>
|
||
Block / unblock all changes to the actor channel, i.e. actor state is frozen
|
||
until inhibit is set off again. Inhibit can be executed on any actor channel
|
||
but obviously not on sensors - would not make any sense.<br>
|
||
Practically it can be used to suspend any notifies as well as peered channel action
|
||
temporarily without the need to delete them. <br>
|
||
Examples:
|
||
<ul><code>
|
||
# Block operation<br>
|
||
set keymatic inhibit on <br><br>
|
||
</ul></code>
|
||
</li>
|
||
|
||
<li><B>pair</B><a name="CUL_HMpair"></a><br>
|
||
Pair the device with a known serialNumber (e.g. after a device reset)
|
||
to FHEM Central unit. FHEM Central is usualy represented by CUL/CUNO,
|
||
HMLAN,...
|
||
If paired, devices will report status information to
|
||
FHEM. If not paired, the device won't respond to some requests, and
|
||
certain status information is also not reported. Paring is on device
|
||
level. Channels cannot be paired to central separate from the device.
|
||
See also <a href="#CUL_HMgetpair">getPair</a> and
|
||
<a href="#CUL_HMunpair">unpair</a>.<br>
|
||
Don't confuse pair (to a central) with peer (channel to channel) with
|
||
<a href="#CUL_HMpeerChan">peerChan</a>.<br>
|
||
</li>
|
||
<li><B>peerBulk</B> <peerch1,peerch2,...> [set|unset]<a name="CUL_HMpeerBulk"></a><br>
|
||
peerBulk will add peer channels to the channel. All peers in the
|
||
list will be added. <br>
|
||
peering sets the configuration of this link to its defaults. As peers are not
|
||
added in pairs default will be as defined for 'single' by HM for this device. <br>
|
||
More suffisticated funktionality is provided by
|
||
<a href="#CUL_HMpeerChan">peerChan</a>.<br>
|
||
peerBulk will not delete existing peers, just handle the given peerlist.
|
||
Other already installed peers will not be touched.<br>
|
||
peerBulk may be used to remove peers using <B>unset</B> option while default ist set.<br>
|
||
|
||
Main purpose of this command is to re-store data to a device.
|
||
It is recommended to restore register configuration utilising
|
||
<a href="#CUL_HMregBulk">regBulk</a> subsequent. <br>
|
||
Example:<br>
|
||
<ul><code>
|
||
set myChannel peerBulk 12345601,<br>
|
||
set myChannel peerBulk self01,self02,FB_Btn_04,FB_Btn_03,<br>
|
||
set myChannel peerBulk 12345601 unset # remove peer 123456 channel 01<br>
|
||
</code></ul>
|
||
</li>
|
||
<li><B>regBulk <reg List>:<peer> <addr1:data1> <addr2:data2>...
|
||
</B><a name="CUL_HMregBulk"></a><br>
|
||
This command will replace the former regRaw. It allows to set register
|
||
in raw format. Its main purpose is to restore a complete register list
|
||
to values secured before. <br>
|
||
Values may be read by <a href="#CUL_HMgetConfig">getConfig</a>. The
|
||
resulting readings can be used directly for this command.<br>
|
||
<reg List> is the list data should be written to. Format could be
|
||
'00', 'RegL_00', '01'...<br>
|
||
<peer> is an optional adder in case the list requires a peer.
|
||
The peer can be given as channel name or the 4 byte (8 chars) HM
|
||
channel ID.<br>
|
||
<addr1:data1> is the list of register to be written in hex
|
||
format.<br>
|
||
Example:<br>
|
||
<ul><code>
|
||
set myChannel regBulk RegL_00: 02:01 0A:17 0B:43 0C:BF 15:FF 00:00<br>
|
||
RegL_03:FB_Btn_07
|
||
01:00 02:00 03:00 04:32 05:64 06:00 07:FF 08:00 09:FF 0A:01 0B:44 0C:54 0D:93 0E:00 0F:00 11:C8 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 1A:00 1B:00 1C:00 1D:FF 1E:93 1F:00 81:00 82:00 83:00 84:32 85:64 86:00 87:FF 88:00 89:FF 8A:21 8B:44 8C:54 8D:93 8E:00 8F:00 91:C8 92:00 93:00 94:00 95:00 96:00 97:00 98:00 99:00 9A:00 9B:00 9C:00 9D:05 9E:93 9F:00 00:00<br>
|
||
set myblind regBulk 01 0B:10<br>
|
||
set myblind regBulk 01 0C:00<br>
|
||
</code></ul>
|
||
myblind will set the max drive time up for a blind actor to 25,6sec</li>
|
||
<li><B>regSet [prep|exec] <regName> <value> <peerChannel></B><a name="CUL_HMregSet"></a><br>
|
||
For some major register a readable version is implemented supporting
|
||
register names <regName> and value conversionsing. Only a subset
|
||
of register can be supproted.<br>
|
||
Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
|
||
improve data transmission.
|
||
Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
|
||
The last command must have the parameter "exec" in order to transmitt the information.<br>
|
||
|
||
<value> is the data in human readable manner that will be written
|
||
to the register.<br>
|
||
<peerChannel> is required if this register is defined on a per
|
||
'peerChan' base. It can be set to '0' other wise.See <a
|
||
href="#CUL_HMgetRegRaw">getRegRaw</a> for full description<br>
|
||
Supported register for a device can be explored using<br>
|
||
<ul><code>set regSet ? 0 0</code></ul>
|
||
Condensed register description will be printed
|
||
using<br>
|
||
<ul><code>set regSet <regname> ? 0</code></ul>
|
||
</li>
|
||
<li><B>reset</B><a name="CUL_HMreset"></a><br>
|
||
Factory reset the device. You need to pair it again to use it with
|
||
fhem.
|
||
</li>
|
||
<li><B>sign [on|off]</B><a name="CUL_HMsign"></a><br>
|
||
Activate or deactivate signing (also called AES encryption, see the <a
|
||
href="#HMAES">note</a> above). Warning: if the device is attached via
|
||
a CUL, you won't be able to switch it (or deactivate signing) from
|
||
fhem before you reset the device directly.
|
||
</li>
|
||
<li><B>statusRequest</B><a name="CUL_HMstatusRequest"></a><br>
|
||
Update device status. For multichannel devices it should be issued on
|
||
an per channel base
|
||
</li>
|
||
<li><B>unpair</B><a name="CUL_HMunpair"></a><br>
|
||
"Unpair" the device, i.e. make it available to pair with other master
|
||
devices. See <a href="#CUL_HMpair">pair</a> for description.</li>
|
||
<li><B>virtual <number of buttons></B><a name="CUL_HMvirtual"></a><br>
|
||
configures a defined curcuit as virtual remote controll. Then number
|
||
of button being added is 1 to 255. If the command is issued a second
|
||
time for the same entity additional buttons will be added. <br>
|
||
Example for usage:
|
||
<ul><code>
|
||
define vRemote CUL_HM 100000 # the selected HMid must not be in use<br>
|
||
set vRemote virtual 20 # define 20 button remote controll<br>
|
||
set vRemote_Btn4 peerChan 0 <actorchannel> # peers Button 4 and 5 to the given channel<br>
|
||
set vRemote_Btn4 press<br>
|
||
set vRemote_Btn5 press long<br>
|
||
</code></ul>
|
||
see also <a href="#CUL_HMpress">press</a>
|
||
</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<B>subType dependent commands:</B>
|
||
<ul>
|
||
<br>
|
||
<li>switch
|
||
<ul>
|
||
<li><B>on</B> <a name="CUL_HMon"> </a> - set level to 100%</li>
|
||
<li><B>off</B><a name="CUL_HMoff"></a> - set level to 0%</li>
|
||
<li><B>on-for-timer <sec></B><a name="CUL_HMonForTimer"></a> -
|
||
set the switch on for the given seconds [0-85825945].<br> Note:
|
||
off-for-timer like FS20 is not supported. It may to be programmed
|
||
thru channel register.</li>
|
||
<li><B>on-till <time></B><a name="CUL_HMonTill"></a> - set the switch on for the given end time.<br>
|
||
<ul><code>set <name> on-till 20:32:10<br></code></ul>
|
||
Currently a max of 24h is supported with endtime.<br>
|
||
</li>
|
||
<li><B>press <[short|long]> <[on|off|<peer>]> <btnNo></B><a name="CUL_HMpress"></a><br>
|
||
simulate a press of the local button or direct connected switch of the actor.<br>
|
||
<B>[short|long]</B> select simulation of short or long press of the button.
|
||
Parameter is optional, short is default<br>
|
||
<B>[on|off|<peer>]</B> is relevant for devices with direct buttons per channel (blind or dimmer).
|
||
Those are available for dimmer and blind-actor, usually not for switches<br>
|
||
<B><peer></B> allows to stimulate button-press of any peer of the actor.
|
||
i.e. if the actor is peered to any remote, virtual or io (HMLAN/CUL)
|
||
press can trigger the action defined. <br>
|
||
<B>[noBurst]</B> relevant for virtual only <br>
|
||
It will cause the command being added to the command queue of the peer. <B>No</B> burst is
|
||
issued subsequent thus the command is pending until the peer wakes up. It therefore
|
||
<B>delays the button-press</B>, but will cause less traffic and performance cost. <br>
|
||
<B>Example:</B>
|
||
<code>
|
||
set actor press # trigger short of internal peer self assotiated to the channel<br>
|
||
set actor press long # trigger long of internal peer self assotiated to the channel<br>
|
||
set actor press on # trigger short of internal peer self related to 'on'<br>
|
||
set actor press long off # trigger long of internal peer self related to 'of'<br>
|
||
set actor press long FB_Btn01 # trigger long peer FB button 01<br>
|
||
set actor press long FB_chn:8 # trigger long peer FB button 08<br>
|
||
set actor press self01 # trigger short of internal peer 01<br>
|
||
set actor press HMLAN1 2 # trigger short of FHEM IO 'HMLAN1' channel 2<br>
|
||
</code>
|
||
</li>
|
||
<li><B>toggle</B><a name="CUL_HMtoggle"></a> - toggle the Actor. It will switch from any current
|
||
level to off or from off to 100%</li>
|
||
</ul>
|
||
<br>
|
||
</li>
|
||
<li>dimmer, blindActuator<br>
|
||
Dimmer may support virtual channels. Those are autocrated if applicable. Usually there are 2 virtual channels
|
||
in addition to the primary channel. Virtual dimmer channels are inactive by default but can be used in
|
||
in parallel to the primay channel to control light. <br>
|
||
Virtual channels have default naming SW<channel>_V<no>. e.g. Dimmer_SW1_V1 and Dimmer_SW1_V2.<br>
|
||
Dimmer virtual channels are completely different from FHEM virtual buttons and actors but
|
||
are part of the HM device. Documentation and capabilities for virtual channels is out of scope.<br>
|
||
<ul>
|
||
<li><B>0 - 100 [on-time] [ramp-time]</B><br>
|
||
set the actuator to the given value (in percent)
|
||
with a resolution of 0.5.<br>
|
||
Optional for dimmer on-time and ramp time can be choosen, both in seconds with 0.1s granularity.<br>
|
||
On-time is analog "on-for-timer".<br>
|
||
Ramp-time default is 2.5s, 0 means instantanous<br>
|
||
</li>
|
||
<li><B><a href="#CUL_HMon">on</a></B></li>
|
||
<li><B><a href="#CUL_HMoff">off</a></B></li>
|
||
<li><B><a href="#CUL_HMpress">press <[short|long]><[on|off]></a></B></li>
|
||
<li><B><a href="#CUL_HMtoggle">toggle</a></B></li>
|
||
<li><B><a href="#CUL_HMonForTimer">on-for-timer <sec></a></B> - Dimmer only! <br></li>
|
||
<li><B><a href="#CUL_HMonTill">on-till <time></a></B> - Dimmer only! <br></li>
|
||
<li><B>stop</B> - stop motion (blind) or dim ramp</li>
|
||
<li><B>pct <level> [<ontime>] [<ramptime>]</B> - set actor to a desired <B>absolut level</B>.<br>
|
||
Optional ontime and ramptime could be given for dimmer.<br>
|
||
ontime may be time in seconds. It may also be entered as end-time in format hh:mm:ss
|
||
</li>
|
||
<li><B>up [changeValue] [<ontime>] [<ramptime>]</B> dim up one step</li>
|
||
<li><B>down [changeValue] [<ontime>] [<ramptime>]</B> dim up one step<br>
|
||
changeValue is optional an gives the level to be changed up or down in percent. Granularity is 0.5%, default is 10%. <br>
|
||
ontime is optional an gives the duration of the level to be kept. '0' means forever and is default.<br>
|
||
ramptime is optional an defines the change speed to reach the new level. It is meaningful only for dimmer.
|
||
<br></li>
|
||
</ul>
|
||
<br>
|
||
</li>
|
||
<li>remotes, pushButton<a name="CUL_HMremote"></a><br>
|
||
This class of devices does not react on requests unless they are put
|
||
to learn mode. FHEM obeys this behavior by stacking all requests until
|
||
learn mode is detected. Manual interaction of the user is necessary to
|
||
activate learn mode. Whether commands are pending is reported on
|
||
device level with parameter 'protCmdPend'.
|
||
<ul>
|
||
</li>
|
||
<li><B>peerIODev [IO] <btn_no> [<u>set</u>|unset]</B><a name="CUL_HMpeerIODev"></a><br>
|
||
The command is similar to <a href="#CUL_HMpeerChan">peerChan</a></B>. While peerChan
|
||
is executed on a remote and peers any remote to any actor channel peerIODev is
|
||
executed on an actor channel and peer this to an channel of an FHEM IO device.<br>
|
||
An IO device according to eQ3 supports up to 50 virtual buttons. Those
|
||
will be peered/unpeerd to the actor. <a href="CUL_HMpress">press</a> can be
|
||
used to stimulate the related actions as defined in the actor register.
|
||
<ul>
|
||
<li><B>peerChan <btn_no> <actChan> [single|<u>dual</u>]
|
||
[<u>set</u>|unset] [<u>both</u>|actor|remote]</B><a name="CUL_HMpeerChan"></a><br>
|
||
|
||
peerChan will establish a connection between a sender-<B>channel</B> and
|
||
an actuator-<B>channel</B> called link in HM nomenclatur. Peering must not be
|
||
confused with pairing.<br>
|
||
<B>Pairing</B> refers to assign a <B>device</B> to the central.<br>
|
||
<B>Peering</B> refers to virtally connect two <B>channels</B>.<br>
|
||
Peering allowes direkt interaction between sender and aktor without
|
||
the necessity of a CCU<br>
|
||
Peering a sender-channel causes the sender to expect an ack from -each-
|
||
of its peers after sending a trigger. It will give positive feedback (e.g. LED green)
|
||
only if all peers acknowledged.<br>
|
||
Peering an aktor-channel will setup a parameter set which defines the action to be
|
||
taken once a trigger from -this- peer arrived. In other words an aktor will <br>
|
||
- process trigger from peers only<br>
|
||
- define the action to be taken dedicated for each peer's trigger<br>
|
||
An actor channel will setup a default action upon peering - which is actor dependant.
|
||
It may also depend whether one or 2 buttons are peered <B>in one command</B>.
|
||
A swich may setup oen button for 'on' and the other for 'off' if 2 button are
|
||
peered. If only one button is peered the funktion will likely be 'toggle'.<br>
|
||
The funtion can be modified by programming the register (aktor dependant).<br>
|
||
|
||
Even though the command is executed on a remote or push-button it will
|
||
as well take effect on the actuator directly. Both sides' peering is
|
||
virtually independant and has different impact on sender and receiver
|
||
side.<br>
|
||
|
||
Peering of one actuator-channel to multiple sender-channel as
|
||
well as one sender-channel to multiple Actuator-channel is
|
||
possible.<br>
|
||
|
||
<actChan> is the actuator-channel to be peered.<br>
|
||
|
||
<btn_no> is the sender-channel (button) to be peered. If
|
||
'single' is choosen buttons are counted from 1. For 'dual' btn_no is
|
||
the number of the Button-pair to be used. I.e. '3' in dual is the
|
||
3rd button pair correcponding to button 5 and 6 in single mode.<br>
|
||
|
||
If the command is executed on a channel the btn_no is ignored.
|
||
It needs to be set, should be 0<br>
|
||
|
||
[single|dual]: this mode impacts the default behavior of the
|
||
Actuator upon using this button. E.g. a dimmer can be learned to a
|
||
single button or to a button pair. <br>
|
||
Defaults to dual.<br>
|
||
|
||
'dual' (default) Button pairs two buttons to one actuator. With a
|
||
dimmer this means one button for dim-up and one for dim-down. <br>
|
||
|
||
'single' uses only one button of the sender. It is useful for e.g. for
|
||
simple switch actuator to toggle on/off. Nevertheless also dimmer can
|
||
be learned to only one button. <br>
|
||
|
||
[set|unset]: selects either enter a peering or remove it.<br>
|
||
Defaults to set.<br>
|
||
'set' will setup peering for the channels<br>
|
||
'unset' will remove the peering for the channels<br>
|
||
|
||
[actor|remote|both] limits the execution to only actor or only remote.
|
||
This gives the user the option to redo the peering on the remote
|
||
channel while the settings in the actor will not be removed.<br>
|
||
Defaults to both.<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>
|
||
set myRemote peerChan 2 mySwActChn single set #peer second button to an actuator channel<br>
|
||
set myRmtBtn peerChan 0 mySwActChn single set #myRmtBtn is a button of the remote. '0' is not processed here<br>
|
||
set myRemote peerChan 2 mySwActChn dual set #peer button 3 and 4<br>
|
||
set myRemote peerChan 3 mySwActChn dual unset #remove peering for button 5 and 6<br>
|
||
set myRemote peerChan 3 mySwActChn dual unset aktor #remove peering for button 5 and 6 in actor only<br>
|
||
set myRemote peerChan 3 mySwActChn dual set remote #peer button 5 and 6 on remote only. Link settings il mySwActChn will be maintained<br>
|
||
</code>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>virtual<a name="CUL_HMvirtual"></a><br>
|
||
<ul>
|
||
<li><B><a href="#CUL_HMpeerChan">peerChan</a></B> see remote</li>
|
||
<li><B>press [long|short]<a name="CUL_HMpress"></a></B>
|
||
simulates a button press short (default) or long. Note that the current
|
||
implementation will not specify the duration for long. Only one trigger
|
||
will be sent of type "long".
|
||
</li>
|
||
<li><B>virtTemp <[off -10..50]><a name="CUL_HMvirtTemp"></a></B>
|
||
simulates a thermostat. If peered to a device it periodically sends the
|
||
temperature until "off" is given. See also <a href="#CUL_HMvirtHum">virtHum</a><br>
|
||
</li>
|
||
<li><B>virtHum <[off -10..50]><a name="CUL_HMvirtHum"></a></B>
|
||
simulates the humidity part of a thermostat. If peered to a device it periodically sends
|
||
the temperature and humidity until both are "off". See also <a href="#CUL_HMvirtTemp">virtTemp</a><br>
|
||
</li>
|
||
<li><B>valvePos <[off 0..100]><a name="CUL_HMvalvePos"></a></B>
|
||
stimulates a VD<br>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>smokeDetector<br>
|
||
Note: All these commands work right now only if you have more then one
|
||
smoekDetector, and you peered them to form a group. For issuing the
|
||
commands you have to use the master of this group, and currently you
|
||
have to guess which of the detectors is the master.<br>
|
||
smokeDetector can be setup to teams using
|
||
<a href="#CUL_HMpeerChan">peerChan</a>. You need to peer all
|
||
team-members to the master. Don't forget to also peerChan the master
|
||
itself to the team - i.e. peer it to itself! doing that you have full
|
||
controll over the team and don't need to guess.<br>
|
||
<ul>
|
||
<li><B>teamCall</B> - execute a network test to all team members</li>
|
||
<li><B>alarmOn</B> - initiate an alarm</li>
|
||
<li><B>alarmOff</B> - switch off the alarm</li>
|
||
</ul>
|
||
</li>
|
||
<li>4Dis (HM-PB-4DIS-WM)
|
||
<ul>
|
||
<li><B>text <btn_no> [on|off] <text1> <text2></B><br>
|
||
Set the text on the display of the device. To this purpose issue
|
||
this set command first (or a number of them), and then choose from
|
||
the teach-in menu of the 4Dis the "Central" to transmit the data.<br>
|
||
If used on a channel btn_no and on|off must not be given but only pure text.
|
||
Example:
|
||
<ul>
|
||
<code>
|
||
set 4Dis text 1 on On Lamp<br>
|
||
set 4Dis text 1 off Kitchen Off<br>
|
||
<br>
|
||
set 4Dis_chn4 text Kitchen Off<br>
|
||
</code>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br></li>
|
||
<li>Climate-Control (HM-CC-TC)
|
||
<ul>
|
||
<li><B>desired-temp <temp></B><br>
|
||
Set different temperatures. <temp> must be between 6 and 30
|
||
Celsius, and precision is half a degree.</li>
|
||
<li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
|
||
Specify a list of temperature intervals. Up to 24 intervals can be
|
||
specified for each week day, the resolution is 10 Minutes. The
|
||
last time spec must always be 24:00.<br>
|
||
Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
|
||
22.5, thereafter until midnight, 19 degrees celsius is desired.<br>
|
||
<code> set th tempListSat 06:00 19 23:00 22.5 24:00 19<br></code>
|
||
</li>
|
||
<li><B>partyMode <HH:MM><durationDays></B><br>
|
||
set control mode to party and device ending time. Add the time it ends
|
||
and the <b>number of days</b> it shall last. If it shall end next day '1'
|
||
must be entered<br></li>
|
||
<li><B>systime</B><br>
|
||
set time in climate channel to system time</li>
|
||
</ul><br>
|
||
</li>
|
||
|
||
<li>Climate-Control (HM-CC-RT-DN|HM-CC-RT-DN-BoM)
|
||
<ul>
|
||
<li><B>controlMode <auto|boost|day|night></B><br></li>
|
||
<li><B>controlManu <temp></B><br></li>
|
||
<li><B>controlParty <temp><startDate><startTime><endDate><endTime></B><br>
|
||
set control mode to party, define temp and timeframe.<br>
|
||
example:<br>
|
||
<code>set controlParty 15 03.8.13 20:30 5.8.13 11:30</code></li>
|
||
<li><B>systime</B><br>
|
||
set time in climate channel to system time</li>
|
||
<li><B>desired-temp <temp></B><br>
|
||
Set different temperatures. <temp> must be between 6 and 30
|
||
Celsius, and precision is half a degree.</li>
|
||
<li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
|
||
<li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
|
||
Specify a list of temperature intervals. Up to 24 intervals can be
|
||
specified for each week day, the resolution is 10 Minutes. The
|
||
last time spec must always be 24:00.<br>
|
||
Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
|
||
improve data transmission. This is especially helpful if device is operated in wakeup mode.
|
||
Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
|
||
The last command must have the parameter "exec" in order to transmitt the information.<br>
|
||
Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
|
||
22.5, thereafter until midnight, 19 degrees celsius is desired.<br>
|
||
<code> set th tempListSat 06:00 19 23:00 22.5 24:00 19<br></code>
|
||
<br>
|
||
<code> set th tempListSat prep 06:00 19 23:00 22.5 24:00 19<br>
|
||
set th tempListSun prep 06:00 19 23:00 22.5 24:00 19<br>
|
||
set th tempListMon prep 06:00 19 23:00 22.5 24:00 19<br>
|
||
set th tempListTue exec 06:00 19 23:00 22.5 24:00 19<br></code>
|
||
</li>
|
||
</ul><br>
|
||
</li>
|
||
<li>OutputUnit (HM-OU-LED16)
|
||
<ul>
|
||
<li><B>led [off|red|green|yellow]</B><br>
|
||
switches the LED of the channel to the color. If the command is
|
||
executed on a device it will set all LEDs to the specified
|
||
color.<br>
|
||
For Expert all LEDs can be set individual by providing a 8-digit hex number to the device.<br></li>
|
||
<li><B>ilum <brightness><duration> </B><br>
|
||
<brightness> [0-15] of backlight.<br>
|
||
<duration> [0-127] in sec. 0 is permanent 'on'.<br></li>
|
||
</ul><br></li>
|
||
<li>OutputUnit (HM-OU-CFM-PL)
|
||
<ul>
|
||
<li><B>led <color>[,<color>..] [<repeat>..]</B><br>
|
||
Possible colors are [redL|greenL|yellowL|redS|greenS|yellowS|pause]. A
|
||
sequence of colors can be given separating the color entries by ','.
|
||
White spaces must not be used in the list. 'S' indicates short and
|
||
'L' long ilumination. <br>
|
||
<b>repeat</b> defines how often the sequence shall be executed. Defaults to 1.<br>
|
||
</li>
|
||
<li><B>playTone <MP3No>[,<MP3No>..] [<repeat>..]</B><br>
|
||
Play a series of tones. List is to be entered separated by ','. White
|
||
spaces must not be used in the list.<br>
|
||
<b>replay</b> can be entered to repeat the last sound played once more.<br>
|
||
<b>repeat</b> defines how often the sequence shall be played. Defaults to 1.<br>
|
||
Example:
|
||
<ul><code>
|
||
# "hello" in display, symb bulb on, backlight, beep<br>
|
||
set cfm_Mp3 playTone 3 # MP3 title 3 once<br>
|
||
set cfm_Mp3 playTone 3 3 # MP3 title 3 3 times<br>
|
||
set cfm_Mp3 playTone 3,6,8,3,4 # MP3 title list 3,6,8,3,4 once<br>
|
||
set cfm_Mp3 playTone 3,6,8,3,4 255# MP3 title list 3,6,8,3,4 255 times<br>
|
||
set cfm_Mp3 playTone replay # repeat last sequence<br>
|
||
<br>
|
||
set cfm_Led led redL 4 # led red blink 3 times long<br>
|
||
set cfm_Led led redS,redS,redS,redL,redL,redL,redS,redS,redS 255 # SOS 255 times<br>
|
||
</ul></code>
|
||
|
||
</li>
|
||
</ul><br></li>
|
||
<li>HM-RC-19xxx
|
||
<ul>
|
||
<li><B>alarm <count></B><br>
|
||
issue an alarm message to the remote<br></li>
|
||
<li><B>service <count></B><br>
|
||
issue an service message to the remote<br></li>
|
||
<li><B>symbol <symbol> [set|unset]</B><br>
|
||
activate a symbol as available on the remote.<br></li>
|
||
<li><B>beep [off|1|2|3]</B><br>
|
||
activate tone<br></li>
|
||
<li><B>backlight [off|on|slow|fast]</B><br>
|
||
activate backlight<br></li>
|
||
<li><B>display <text> comma unit tone backlight <symbol(s)>
|
||
</B><br>
|
||
control display of the remote<br>
|
||
<text> : up to 5 chars <br>
|
||
comma : 'comma' activates the comma, 'no' leaves it off <br>
|
||
[unit] : set the unit symbols.
|
||
[off|Proz|Watt|x3|C|x5|x6|x7|F|x9|x10|x11|x12|x13|x14|x15]. Currently
|
||
the x3..x15 display is not tested. <br>
|
||
|
||
tone : activate one of the 3 tones [off|1|2|3]<br>
|
||
|
||
backlight: activate backlight flash mode [off|on|slow|fast]<br>
|
||
|
||
<symbol(s)> activate symbol display. Multople symbols can be
|
||
acticated at the same time, concatinating them comma separated. Don't
|
||
use spaces here. Possiblesymbols are
|
||
|
||
[bulb|switch|window|door|blind|scene|phone|bell|clock|arrowUp|arrowDown]<br><br>
|
||
Example:
|
||
<ul><code>
|
||
# "hello" in display, symb bulb on, backlight, beep<br>
|
||
set FB1 display Hello no off 1 on bulb<br>
|
||
# "1234,5" in display with unit 'W'. Symbols scene,phone,bell and
|
||
# clock are active. Backlight flashing fast, Beep is second tone<br>
|
||
set FB1 display 12345 comma Watt 2 fast scene,phone,bell,clock
|
||
</ul></code>
|
||
</li>
|
||
</ul><br>
|
||
</li>
|
||
<li>keyMatic<br><br>
|
||
<ul>The Keymatic uses the AES signed communication. Therefore the control
|
||
of the Keymatic is only together with the HM-LAN adapter possible. But
|
||
the CUL can read and react on the status information of the
|
||
Keymatic.</ul><br>
|
||
<ul>
|
||
<li><B>lock</B><br>
|
||
The lock bolt moves to the locking position<br></li>
|
||
<li><B>unlock [sec]</B><br>
|
||
The lock bolt moves to the unlocking position.<br>
|
||
[sec]: Sets the delay in seconds after the lock automatically locked again.<br>
|
||
0 - 65535 seconds</li>
|
||
<li><B>open [sec]</B><br>
|
||
Unlocked the door so that the door can be opened.<br>
|
||
[sec]: Sets the delay in seconds after the lock automatically locked
|
||
again.<br>0 - 65535 seconds</li>
|
||
</ul></li>
|
||
<li>winMatic <br><br>
|
||
<ul>winMatic provides 2 channels, one for the window control and a second
|
||
for the accumulator.</ul><br>
|
||
<ul>
|
||
<li><B>level <level> <relockDelay> <speed></B><br>
|
||
set the level. <br>
|
||
<level>: range is 0 to 100%<br>
|
||
<relockDelay>: range 0 to 65535 sec. 'ignore' can be used to igneore the value alternaly <br>
|
||
<speed>: range is 0 to 100%<br>
|
||
</li>
|
||
<li><B>stop</B><br>
|
||
stop movement<br>
|
||
</li>
|
||
</ul></li>
|
||
<li>HM-Sys-sRP-Pl<br><br>
|
||
setup the repeater's entries. Up to 36entries can be applied.
|
||
<ul>
|
||
<li><B>setRepeat <entry> <sender> <receiver> <broadcast></B><br>
|
||
<entry> [1..36] entry number in repeater table. The repeater can handle up to 36 entries.<br>
|
||
<sender> name or HMID of the sender or source which shall be repeated<br>
|
||
<receiver> name or HMID of the receiver or destination which shall be repeated<br>
|
||
<broadcast> [yes|no] determines whether broadcast from this ID shall be repeated<br>
|
||
<br>
|
||
short application: <br>
|
||
<code>setRepeat setAll 0 0 0<br></code>
|
||
will rewrite the complete list to the deivce. Data will be taken from attribut repPeer. <br>
|
||
attribut repPeer is formated:<br>
|
||
src1:dst1:[y/n],src2:dst2:[y/n],src2:dst2:[y/n],...<br>
|
||
<br>
|
||
Reading repPeer is formated:<br>
|
||
Number src dst broadcast verify<br>
|
||
number: entry sequence number<br>
|
||
src: message source device - read from repeater<br>
|
||
dst: message destination device - assembled from attributes<br>
|
||
broadcast: shall broadcast be repeated for this source - read from repeater<br>
|
||
verify: do attributes and readings match?<br>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
Debugging:
|
||
<ul>
|
||
<li><B>raw <data> ...</B><br>
|
||
Only needed for experimentation.
|
||
send a list of "raw" commands. The first command will be
|
||
immediately sent, the next one after the previous one is acked by
|
||
the target. The length will be computed automatically, and the
|
||
message counter will be incremented if the first two charcters are
|
||
++. Example (enable AES):<pre>
|
||
set hm1 raw ++A001F100001234560105000000001\
|
||
++A001F10000123456010802010AF10B000C00\
|
||
++A001F1000012345601080801\
|
||
++A001F100001234560106</pre>
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_HMget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
<li><B>configSave <filename></B><a name="CUL_HMconfigSave"></a><br>
|
||
Saves the configuration of an entity into a file. Data is stored in a
|
||
format to be executed from fhem command prompt.<br>
|
||
The file is located in the fhem home directory aside of fhem.cfg. Data
|
||
will be stored cumulative - i.e. new data will be appended to the
|
||
file. It is up to the user to avoid duplicate storage of the same
|
||
entity.<br>
|
||
Target of the data is ONLY the HM-device information which is located
|
||
IN the HM device. Explicitely this is the peer-list and the register.
|
||
With the register also the peering is included.<br>
|
||
The file is readable and editable by the user. Additionaly timestamps
|
||
are stored to help user to validate.<br>
|
||
Restrictions:<br>
|
||
Even though all data of the entity will be secured to the file FHEM
|
||
stores the data that is avalilable to FHEM at time of save!. It is up
|
||
to the user to read the data from the HM-hardware prior to execution.
|
||
See recommended flow below.<br>
|
||
This command will not store any FHEM attributes o device definitions.
|
||
This continues to remain in fhem.cfg.<br>
|
||
Furthermore the secured data will not automatically be reloaded to the
|
||
HM-hardware. It is up to the user to perform a restore.<br><br>
|
||
As with other commands also 'configSave' is best executed on a device
|
||
rather then on a channel. If executed on a device also the assotiated
|
||
channel data will be secured. <br><br>
|
||
<code>
|
||
Recommended work-order for device 'HMdev':<br>
|
||
set HMdev clear msgEvents # clear old events to better check flow<br>
|
||
set HMdev getConfig # read device & channel inforamtion<br>
|
||
# wait until operation is complete<br>
|
||
# protState should be CMDs_done<br>
|
||
# there shall be no warnings amongst prot... variables<br>
|
||
get configSave myActorFile<br>
|
||
</code>
|
||
</li>
|
||
<li><B>param <paramName></B><br>
|
||
returns the content of the relevant parameter for the entity. <br>
|
||
Note: if this command is executed on a channel and 'model' is
|
||
requested the content hosting device's 'model' will be returned.
|
||
</li>
|
||
<li><B>reg <addr> <list> <peerID></B><a name="CUL_HMget_reg"></a><br>
|
||
returns the value of a register. The data is taken from the storage in FHEM and not
|
||
read directly outof the device.
|
||
If register content is not present please use getConfig, getReg in advance.<br>
|
||
|
||
<addr> address in hex of the register. Registername can be used alternaly
|
||
if decoded by FHEM. "all" will return all decoded register for this entity in one list.<br>
|
||
<list> list from which the register is taken. If rgistername is used list
|
||
is ignored and can be set to 0.<br>
|
||
<peerID> identifies the registerbank in case of list3 and list4. It an be set to dummy if not used.<br>
|
||
</li>
|
||
<li><B>regVal <addr> <list> <peerID></B><br>
|
||
returns the value of a register. It does the same as <a href="#CUL_HMget_reg">reg</a> but strips off units<br>
|
||
</li>
|
||
<li><B>regList</B><br>
|
||
returns a list of register that are decoded by FHEM for this device.<br>
|
||
Note that there could be more register implemented for a device.<br>
|
||
</li>
|
||
|
||
<li><B>saveConfig <file></B><a name="CUL_HMsaveConfig"></a><br>
|
||
stores peers and register to the file.<br>
|
||
Stored will be the data as available in fhem. It is necessary to read the information from the device prior to the save.<br>
|
||
The command supports device-level action. I.e. if executed on a device also all related channel entities will be stored implicitely.<br>
|
||
Storage to the file will be cumulative.
|
||
If an entity is stored multiple times to the same file data will be appended.
|
||
User can identify time of storage in the file if necessary.<br>
|
||
Content of the file can be used to restore device configuration.
|
||
It will restore all peers and all register to the entity.<br>
|
||
Constrains/Restrictions:<br>
|
||
prior to rewrite data to an entity it is necessary to pair the device with FHEM.<br>
|
||
restore will not delete any peered channels, it will just add peer channels.<br>
|
||
</li>
|
||
<br></ul>
|
||
|
||
<a name="CUL_HMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li><a name="CUL_HMaesCommReq">aesCommReq</a>
|
||
if set HMLAN/USB is forced to request AES signature before sending ACK to the device.<br>
|
||
This funktion strictly works with HMLAN/USB - it doesn't work for CUL type IOs.<br>
|
||
</li>
|
||
<li><a name="#CUL_HMactCycle">actCycle</a>
|
||
actCycle <[hhh:mm]|off><br>
|
||
Supports 'alive' or better 'not alive' detection for devices. [hhh:mm] is the maximum silent time for the device.
|
||
Upon no message received in this period an event will be raised "<device> is dead".
|
||
If the device sends again another notification is posted "<device> is alive". <br>
|
||
This actiondetect will be autocreated for each device with build in cyclic status report.<br>
|
||
Controlling entity is a pseudo device "ActionDetector" with HMId "000000".<br>
|
||
Due to performance considerations the report latency is set to 600sec (10min).
|
||
It can be controlled by the attribute "actCycle" of "ActionDetector".<br>
|
||
Once entered to the supervision the HM device has 2 attributes:<br>
|
||
<ul>
|
||
actStatus: activity status of the device<br>
|
||
actCycle: detection period [hhh:mm]<br>
|
||
</ul>
|
||
The overall function can be viewed checking out the "ActionDetector" entity. The status of all entities is present in the READING section.<br>
|
||
Note: This function can be enabled for devices with non-cyclic messages as well. It is up to the user to enter a reasonable cycletime.
|
||
</li>
|
||
<li><a name="#CUL_HMautoReadReg">autoReadReg</a><br>
|
||
'0' autoReadReg will be ignored.<br>
|
||
'1' will execute a getConfig for the device automatically after each reboot of FHEM. <br>
|
||
'2' like '1' plus execute after power_on.<br>
|
||
'3' includes '2' plus updates on writes to the device<br>
|
||
'4' includes '3' plus tries to request status if it seems to be missing<br>
|
||
'5' checks reglist and peerlist. If reading seems incomplete getConfig will be scheduled<br>
|
||
'8_stateOnly' will only update status information but not configuration
|
||
data like register and peer<br>
|
||
Execution will be delayed in order to prevent congestion at startup. Therefore the update
|
||
of the readings and the display will be delayed depending on the size of the database.<br>
|
||
Recommendations and constrains upon usage:<br>
|
||
<ul>
|
||
use this attribute on the device or channel 01. Do not use it separate on each channel
|
||
of a multi-channel device to avoid duplicate execution<br>
|
||
usage on devices which only react to 'config' mode is not recommended since executen will
|
||
not start until config is triggered by the user<br>
|
||
usage on devices which support wakeup-mode is usefull. But consider that execution is delayed
|
||
until the device "wakes up".<br>
|
||
</ul>
|
||
</li>
|
||
<li><a name="#CUL_HMburstAccess">burstAccess</a><br>
|
||
can be set for the device entity if the model allowes conditionalBurst.
|
||
The attribut will switch off burst operations (0_off) which causes less message load
|
||
on HMLAN and therefore reduces the chance of HMLAN overload.<br>
|
||
Setting it on (1_auto) allowes shorter reaction time of the device. User does not
|
||
need to wait for the device to wake up. <br>
|
||
Note that also the register burstRx needs to be set in the device.</li>
|
||
<li><a name="#CUL_HMexpert">expert</a><br>
|
||
This attribut controls the visibility of the readings. This attibute controlls
|
||
the presentation of device parameter in the readings.<br>
|
||
3 level can be choosen:<br>
|
||
<ul>
|
||
0_off: standart level. Display commonly used parameter<br>
|
||
1_on: enhanced level. Display all decoded device parameter<br>
|
||
2_full: display all parameter plus raw register information as well. <br>
|
||
</ul>
|
||
If expert is applied a device it is used for assotiated channels.
|
||
It can be overruled if expert attibute is also applied to the channel device.<br>
|
||
Make sure to check out attribut showInternalValues in the global values as well.
|
||
extert takes benefit of the implementation.
|
||
Nevertheless - by definition - showInternalValues overrules expert.
|
||
</li>
|
||
<li><a name="#CUL_HMlevelRange">levelRange</a><br>
|
||
can be used with dimmer only. It defines the dimmable range to be used with this dimmer-channel.
|
||
It is meant to support e.g. LED light that starts at 10% and reaches maxbrightness at 40%.
|
||
levelrange will normalize the level to this range. I.e. set to 100% will physically set the
|
||
dimmer to 40%, 1% will set to 10% physically. 0% still switches physially off.<br>
|
||
Impacted are commands on, up, down, toggle and pct. <b>Not</b> effected is the off command
|
||
which still set physically 0%.<br>
|
||
To be considered:<br>
|
||
dimmer level set by peers and buttons is not impacted. Those are controlled by device register<br>
|
||
Readings level may go to negative or above 100%. This simply results from the calculation and reflects
|
||
physical level is above or below the given range.<br>
|
||
In case of virtual dimmer channels available present the attribut needs to be set for
|
||
each channel<br>
|
||
User should be careful to set min level other then '0'<br>
|
||
Example:<br>
|
||
<ul><code>
|
||
attr myChannel levelRange 0,40<br>
|
||
attr myChannel levelRange 10,80<br>
|
||
</code></ul>
|
||
</li>
|
||
<li><a name="#CUL_HMmodel">model</a>,
|
||
<a name="subType">subType</a><br>
|
||
These attributes are set automatically after a successful pairing.
|
||
They are not supposed to be set by hand, and are necessary in order to
|
||
correctly interpret device messages or to be able to send them.</li>
|
||
<li><a name="#CUL_HMmsgRepeat">msgRepeat</a><br>
|
||
defines number of repetitions if a device doesn't answer in time. <br>
|
||
Devices which donly support config mode no repeat ist allowed. <br>
|
||
For devices with wakeup mode the device will wait for next wakeup. Lonng delay might be
|
||
considered in this case. <br>
|
||
Repeat for burst devices will impact HMLAN transmission capacity.</li>
|
||
<li><a name="#CUL_HMparam">param</a><br>
|
||
param defines model specific behavior or functions. See <a href="#CUL_HMparams"><b>available parameter</b></a> for details</li>
|
||
<li><a name="#CUL_HMrawToReadable">rawToReadable</a><br>
|
||
Used to convert raw KFM100 values to readable data, based on measured
|
||
values. E.g. fill slowly your container, while monitoring the
|
||
values reported with <a href="#inform">inform</a>. You'll see:
|
||
<ul>
|
||
10 (at 0%)<br>
|
||
50 (at 20%)<br>
|
||
79 (at 40%)<br>
|
||
270 (at 100%)<br>
|
||
</ul>
|
||
Apply these values with: "attr KFM100 rawToReadable 10:0 50:20 79:40 270:100".
|
||
fhem will do a linear interpolation for values between the bounderies.
|
||
</li>
|
||
<li><a name="#CUL_HMrssiLog">rssiLog</a><br>
|
||
can be given to devices, denied for channels. If switched '1' each RSSI entry will be
|
||
written to a reading. User may use this to log and generate a graph of RSSI level.<br>
|
||
Due to amount of readings and events it is NOT RECOMMENDED to switch it on by default.
|
||
</li>
|
||
<li><a name="unit">unit</a><br>
|
||
set the reported unit by the KFM100 if rawToReadable is active. E.g.<br>
|
||
attr KFM100 unit Liter
|
||
</li>
|
||
</ul> <br>
|
||
<a name="CUL_HMparams"><b>available parameter for attribut "param"</b></a>
|
||
<ul>
|
||
<li><B>HM-Sen-RD-O</B><br>
|
||
<B>offAtPon</B> heat channel only: force heating off after powerOn<br>
|
||
<B>onAtRain</B> heat channel only: force heating on while status changes to 'rain' and off when it changes to 'dry'<br>
|
||
</li>
|
||
<li><B>virtuals</B><br>
|
||
<B>noOnOff</B> virtual entity will not toggle state when trigger is received. If this parameter is
|
||
not given the entity will toggle its state between On and Off with each trigger<br>
|
||
<B>msgReduce:<No></B> if channel is used for <a ref="CUL_HMvalvePos"></a> it skips every No message
|
||
in order to reduce transmit load. Numbers from 0 (no skip) up to 9 can be given.
|
||
VD will lose connection with more then 5 skips<br>
|
||
</li>
|
||
<li><B>blind</B><br>
|
||
<B>levelInverse</B> while HM considers 100% as open and 0% as closed this may not be
|
||
intuitive to all user. Ny default 100% is open and will be dislayed as 'on'. Setting this param the display will be inverted - 0% will be open and 100% is closed.<br>
|
||
NOTE: This will apply to readings and set commands. <B>It does not apply to any register. </B><br>
|
||
</li>
|
||
</ul><br>
|
||
<a name="CUL_HMevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li><B>general</B><br>
|
||
recentStateType:[ack|info] # cannot be used ti trigger notifies<br>
|
||
<li>ack indicates that some statusinfo is derived from an acknowledge</li>
|
||
<li>info indicates an autonomous message from the device</li>
|
||
<li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br>
|
||
Alarming configuration access to the device from a unknown source<br></li>
|
||
<li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br>
|
||
Alarming configuration access to the device that was not issued by our system<br></li>
|
||
</li>
|
||
<li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br>
|
||
T: $t H: $h<br>
|
||
battery:[low|ok]<br>
|
||
measured-temp $t<br>
|
||
humidity $h<br>
|
||
actuator $vp %<br>
|
||
desired-temp $dTemp<br>
|
||
desired-temp-manu $dTemp #temperature if switchen to manual mode<br>
|
||
desired-temp-cent $dTemp #temperature if switchen to central mode<br>
|
||
windowopen-temp-%d %.1f (sensor:%s)<br>
|
||
tempList$wd hh:mm $t hh:mm $t ...<br>
|
||
displayMode temp-[hum|only]<br>
|
||
displayTemp [setpoint|actual]<br>
|
||
displayTempUnit [fahrenheit|celsius]<br>
|
||
controlMode [manual|auto|central|party]<br>
|
||
tempValveMode [Auto|Closed|Open|unknown]<br>
|
||
param-change offset=$o1, value=$v1<br>
|
||
ValveErrorPosition_for_$dname $vep %<br>
|
||
ValveOffset_for_$dname : $of %<br>
|
||
ValveErrorPosition $vep %<br>
|
||
ValveOffset $of %<br>
|
||
time-request<br>
|
||
trig_<src> <value> #channel was triggered by <src> channel.
|
||
This event relies on complete reading of channels configuration, otherwise Data can be
|
||
incomplete or incorrect.<br>
|
||
trigLast <channel> #last receiced trigger<br>
|
||
</li>
|
||
<li><B>HM-CC-RT-DN and HM-CC-RT-DN-BoM</B><br>
|
||
state:T: $actTemp desired: $setTemp valve: $vp %<br>
|
||
motorErr: [ok|ValveTight|adjustRangeTooLarge|adjustRangeTooSmall|communicationERR|unknown|lowBat|ValveErrorPosition]
|
||
measured-temp $actTemp<br>
|
||
desired-temp $setTemp<br>
|
||
ValvePosition $vp %<br>
|
||
mode [auto|manu|party|boost]<br>
|
||
battery [low|ok]<br>
|
||
batteryLevel $bat V<br>
|
||
measured-temp $actTemp<br>
|
||
desired-temp $setTemp<br>
|
||
actuator $vp %<br>
|
||
time-request<br>
|
||
trig_<src> <value> #channel was triggered by <src> channel.
|
||
</li>
|
||
<li><B>HM-CC-VD,ROTO_ZEL-STG-RM-FSA</B><br>
|
||
$vp %<br>
|
||
battery:[critical|low|ok]<br>
|
||
motorErr:[ok|blocked|loose|adjusting range too small|opening|closing|stop]<br>
|
||
ValvePosition:$vp %<br>
|
||
ValveErrorPosition:$vep %<br>
|
||
ValveOffset:$of %<br>
|
||
ValveDesired:$vp % # set by TC <br>
|
||
operState:[errorTargetNotMet|onTarget|adjusting|changed] # operational condition<br>
|
||
operStateErrCnt:$cnt # number of failed settings<br>
|
||
</li>
|
||
<li><B>HM-CC-SCD</B><br>
|
||
[normal|added|addedStrong]<br>
|
||
battery [low|ok]<br>
|
||
</li>
|
||
<li><B>HM-SEC-SFA-SM</B><br>
|
||
powerError [on|off]<br>
|
||
sabotageError [on|off]<br>
|
||
battery: [critical|low|ok]<br>
|
||
</li>
|
||
<li><B>HM-LC-BL1-PB-FM</B><br>
|
||
motor: [opening|closing]<br>
|
||
</li>
|
||
<li><B>HM-LC-SW1-BA-PCB</B><br>
|
||
battery: [low|ok]<br>
|
||
</li>
|
||
<li><B>HM-OU-LED16</B><br>
|
||
color $value # hex - for device only<br>
|
||
$value # hex - for device only<br>
|
||
color [off|red|green|orange] # for channel <br>
|
||
[off|red|green|orange] # for channel <br>
|
||
</li>
|
||
<li><B>HM-OU-CFM-PL</B><br>
|
||
[on|off|$val]<br>
|
||
</li>
|
||
<li><B>HM-Sen-Wa-Od</B><br>
|
||
$level%<br>
|
||
level $level%<br>
|
||
</li>
|
||
<li><B>KFM100</B><br>
|
||
$v<br>
|
||
$cv,$unit<br>
|
||
rawValue:$v<br>
|
||
Sequence:$seq<br>
|
||
content:$cv,$unit<br>
|
||
</li>
|
||
<li><B>KS550/HM-WDS100-C6-O</B><br>
|
||
T: $t H: $h W: $w R: $r IR: $ir WD: $wd WDR: $wdr S: $s B: $b<br>
|
||
temperature $t<br>
|
||
humidity $h<br>
|
||
windSpeed $w<br>
|
||
windDirection $wd<br>
|
||
windDirRange $wdr<br>
|
||
rain $r<br>
|
||
isRaining $ir<br>
|
||
sunshine $s<br>
|
||
brightness $b<br>
|
||
unknown $p<br>
|
||
</li>
|
||
<li><B>HM-Sen-RD-O</B><br>
|
||
lastRain: timestamp # no trigger generated. Begin of previous Rain -
|
||
timestamp of the reading is the end of rain. <br>
|
||
</li>
|
||
<li><B>THSensor and HM-WDC7000</B><br>
|
||
T: $t H: $h AP: $ap<br>
|
||
temperature $t<br>
|
||
humidity $h<br>
|
||
airpress $ap #HM-WDC7000 only<br>
|
||
</li>
|
||
<li><B>dimmer</B><br>
|
||
overload [on|off]<br>
|
||
overheat [on|off]<br>
|
||
reduced [on|off]<br>
|
||
dim: [up|down|stop]<br>
|
||
</li>
|
||
<li><B>motionDetector</B><br>
|
||
brightness:$b<br>
|
||
alive<br>
|
||
motion on (to $dest)<br>
|
||
motionCount $cnt _next:$nextTr"-"[0x0|0x1|0x2|0x3|15|30|60|120|240|0x9|0xa|0xb|0xc|0xd|0xe|0xf]<br>
|
||
cover [closed|open] # not for HM-Sec-MDIR<br>
|
||
sabotageError [on|off] # only HM-Sec-MDIR<br>
|
||
battery [low|ok]<br>
|
||
devState_raw.$d1 $d2<br>
|
||
</li>
|
||
<li><B>remote/pushButton/outputUnit</B><br>
|
||
<ul> (to $dest) is added if the button is peered and does not send to broadcast<br>
|
||
Release is provided for peered channels only</ul>
|
||
Btn$x onShort<br>
|
||
Btn$x offShort<br>
|
||
Btn$x onLong $counter<br>
|
||
Btn$x offLong $counter<br>
|
||
Btn$x onLongRelease $counter<br>
|
||
Btn$x offLongRelease $counter<br>
|
||
Btn$x onShort (to $dest)<br>
|
||
Btn$x offShort (to $dest)<br>
|
||
Btn$x onLong $counter (to $dest)<br>
|
||
Btn$x offLong $counter (to $dest)<br>
|
||
Btn$x onLongRelease $counter (to $dest)<br>
|
||
Btn$x offLongRelease $counter (to $dest)<br>
|
||
</li>
|
||
<li><B>remote/pushButton</B><br>
|
||
battery [low|ok]<br>
|
||
trigger [Long|Short]_$no trigger event from channel<br>
|
||
</li>
|
||
<li><B>swi</B><br>
|
||
Btn$x toggle<br>
|
||
Btn$x toggle (to $dest)<br>
|
||
battery: [low|ok]<br>
|
||
</li>
|
||
<li><B>switch/dimmer/blindActuator</B><br>
|
||
$val<br>
|
||
powerOn [on|off|$val]<br>
|
||
[unknown|motor|dim] [up|down|stop]:$val<br>
|
||
timedOn [running|off]<br> # on is temporary - e.g. started with on-for-timer
|
||
</li>
|
||
<li><B>sensRain</B><br>
|
||
$val<br>
|
||
powerOn <br>
|
||
level <val><br>
|
||
timedOn [running|off]<br> # on is temporary - e.g. started with on-for-timer
|
||
trigger [Long|Short]_$no trigger event from channel<br>
|
||
</li>
|
||
<li><B>smokeDetector</B><br>
|
||
[off|smoke-Alarm|alive] # for team leader<br>
|
||
[off|smoke-forward|smoke-alarm] # for team members<br>
|
||
[normal|added|addedStrong] #HM-CC-SCD<br>
|
||
SDteam [add|remove]_$dname<br>
|
||
battery [low|ok]<br>
|
||
smoke_detect [none|<src>]<br>
|
||
teamCall:from $src<br>
|
||
</li>
|
||
<li><B>threeStateSensor</B><br>
|
||
[open|tilted|closed]<br>
|
||
[wet|damp|dry] #HM-SEC-WDS only<br>
|
||
cover [open|closed] #HM-SEC-WDS and HM-Sec-RHS<br>
|
||
alive yes<br>
|
||
battery [low|ok]<br>
|
||
contact [open|tilted|closed]<br>
|
||
contact [wet|damp|dry] #HM-SEC-WDS only<br>
|
||
sabotageError [on|off] #HM-SEC-SC only<br>
|
||
</li>
|
||
<li><B>winMatic</B><br>
|
||
[locked|$value]<br>
|
||
motorError [no|TurnError|TiltError]<br>
|
||
direction [no|up|down|undefined]<br>
|
||
charge [trickleCharge|charge|dischange|unknown]<br>
|
||
airing [inactiv|$air]<br>
|
||
course [tilt|close]<br>
|
||
airing [inactiv|$value]<br>
|
||
contact tesed<br>
|
||
</li>
|
||
<li><B>keyMatic</B><br>
|
||
unknown:40<br>
|
||
battery [low|ok]<br>
|
||
uncertain [yes|no]<br>
|
||
error [unknown|motor aborted|clutch failure|none']<br>
|
||
lock [unlocked|locked]<br>
|
||
[unlocked|locked|uncertain]<br>
|
||
</li>
|
||
</ul>
|
||
<a name="CUL_HMinternals"><b>Internals</b></a>
|
||
<ul>
|
||
<li><B>aesCommToDev</B><br>
|
||
gives information about success or fail of AES communication between IO-device and HM-Device<br>
|
||
</li>
|
||
</ul><br>
|
||
<br>
|
||
</ul>
|
||
<a name="CUL_HOERMANN"></a>
|
||
<h3>CUL_HOERMANN</h3>
|
||
<ul>
|
||
The CUL_HOERMANN module registers the 868MHz Hoermann Garage-Door-Opener
|
||
signals received by the CUL. <b>Note</b>: As the structure of this signal is
|
||
not understood, no checksum is verified, so it is likely to receive bogus
|
||
messages.
|
||
<br><br>
|
||
|
||
<a name="CUL_HOERMANNdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_HOERMANNEM <10-digit-hex-code></code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_HOERMANNset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_HOERMANNget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_HOERMANNattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="CUL_IR"></a>
|
||
<h3>CUL_IR</h3>
|
||
<ul>
|
||
|
||
The CUL_IR module interprets Infrared messages received by the CUN/CUNO/CUNOv2/TuxRadio.
|
||
Those devices can receive Infrared Signals from basically any Remote controller and will transform
|
||
that information in a so called Button-Code <br><br>
|
||
|
||
|
||
<a name="CUL_IRdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_IR <<a href="#IODev">IODev</a>></code> <br>
|
||
<br>
|
||
<<a href="#IODev">IODev</a>> is the devicename of the IR-receivung device, e.g. CUNO1.<br><br>
|
||
|
||
Your definition should look like E.g.:
|
||
<pre>
|
||
define IR-Dev CUL_IR CUNO1</pre>
|
||
</ul>
|
||
|
||
<a name="CUL_IRset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<a name="irLearnForSec"></a>
|
||
<li>irLearnForSec<br>
|
||
Sets the CUL_IR device in an IR-Code Learning mode for the given seconds. Any received IR-Code will
|
||
be stored as a Button attribute for this devices. The name of these attributes is dependent on the two
|
||
attributes <a href="#CUL_IRattr">learncount</a> and <a href="#CUL_IRattr">learnprefix</a>.<br>
|
||
Attention: Before learning IR-Codes the CUL_IR device needs to be set in IR-Receiving mode
|
||
by modifying the <a href="#irReceive">irReceive</a> attribute.
|
||
</li>
|
||
<a name="irSend"></a>
|
||
<li>irSend<br>
|
||
Sends out IR-commands via the connected IODev. The IR-command can be specified as buttonname according
|
||
to <a href="#Button.*">Button.*</a> or as IR-Code directly. If a buttonname is specified, the
|
||
corresponding IR-Code will be sent out.<br>
|
||
Example: <br>
|
||
<pre>set IR-Dev irSend ButtonA001 </pre>
|
||
If defining an IR-Code directly the following Code-Syntax needs to be followed:<br>
|
||
<pre>IRCode: <PP><AAAA><CCCC><FF> </pre>
|
||
with P = Protocol; A = Address; C = Command; F = Flags<br>
|
||
With the Flags you can modify IR-Repetition. Flags between 00-0E will produce
|
||
0-15 IR-Repetitions.
|
||
You can type the IR-Code as plain as above, or with a heading "I" as learnt for the buttons.<br>
|
||
Example: <br>
|
||
<code>set IR-Dev irSend 0A07070F0F02<br>
|
||
set IR-Dev irSend I0A07070F0F00 </code>
|
||
|
||
</li>
|
||
</ul>
|
||
|
||
<a name="CUL_IRget"></a>
|
||
<b>Get</b>
|
||
<ul>N/A</ul>
|
||
|
||
<a name="CUL_IRattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#loglevel">loglevel</a></li><br>
|
||
<li><a href="#irReceive">irReceive</a><br>
|
||
Configure the IR Transceiver of the <<a href="#IODev">IODev</a>> (the CUNO1). Available
|
||
arguments are:
|
||
<ul>
|
||
<li>OFF<br>
|
||
Switching off the reception of IR signals. This is the default.</li>
|
||
|
||
<li>ON<br>
|
||
Switching on the reception of IR signals. This is WITHOUT filtering repetitions. This is
|
||
not recommended as many remote controls do repeat their signals.</li>
|
||
|
||
<li>ON_NR<br>
|
||
Switching on the reception of IR signals with filtering of repetitions. This is
|
||
the recommended modus operandi.</li>
|
||
</ul>
|
||
</li><br>
|
||
|
||
<li><a name="Button.*"></a>Button.*<br>
|
||
Button.* is the wildcard for all learnt IR-Codes. IR-Codes are learnt as Button-Attributes.
|
||
The name for a learnt Button - IR-Code is compiled out of three elements:<br>
|
||
<pre>
|
||
Button<learnprefix><learncount>
|
||
</pre>
|
||
When the CUL_IR device is set into <a href="#irLearnForSec">learning mode</a> it will generate a
|
||
new button-attribute for each new IR-Code received.This is done according to the following syntax:<br>
|
||
<pre>
|
||
<Button-Attribute-Name> <IR-Code></pre>
|
||
Examples of learnt button-attributes with EMPTY <learnprefix> and <learncount> starting from 1:<br>
|
||
<pre>
|
||
Button001 I02029A000000
|
||
Button002 I02029A000001</pre>
|
||
To make sure that something happens when this IR-code is received later on one has to modify the attribute
|
||
and to add commands as attribute values.
|
||
Examples:
|
||
<pre>
|
||
Button001 I02029A000000 set WZ_Lamp on
|
||
Button002 I02029A000001 set Switch on</pre>
|
||
The syntax for this is:
|
||
<pre>
|
||
attr <device-name> <attribute-name> <IR-Code> <command>
|
||
</pre>
|
||
</li>
|
||
<li><a name="Group.*"></a>Group.*<br>
|
||
Group.* is the wildcard for IR-Code groups. With these attributes one can define
|
||
IR-Code parts, which may match to several Button-IR-Codes.<br>
|
||
This is done by defining group-attributes that contain only parts of the IR-Code.
|
||
The syntax is:
|
||
<pre>
|
||
<Group-Attribute-Name> <IR-Code></pre>
|
||
Examples of a group-attribute is:<br>
|
||
<pre>
|
||
Group001 I02029A</pre>
|
||
With this all IR-Codes starting with I02029A will match the Group001.
|
||
</li><br>
|
||
<li><a name="learncount"></a>learncount<br>
|
||
learncount is used to store the next button-code-number that needs to be learned.
|
||
By manually modifying this attribute new button sequences can be arranged.
|
||
</li><br>
|
||
<li><a name="learnprefix"></a>learnprefix<br>
|
||
learnprefix is a string which will be added to the button-attribute-name. <br>
|
||
A button-attribute-name is constructed by:
|
||
<pre>
|
||
Button<learnprefix><learncount> </pre>
|
||
If learnprefix is empty the button-attribute-name only contains the term
|
||
"Button" and the actual number of <a href="#learncount">learncount</a>.
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="CUL_MAX"></a>
|
||
<h3>CUL_MAX</h3>
|
||
<ul>
|
||
The CUL_MAX module interprets MAX! messages received by the CUL. It will be automatically created by autocreate, just make sure
|
||
that you set the right rfmode like <code>attr CUL0 rfmode MAX</code>.<br>
|
||
<br><br>
|
||
|
||
<a name="CUL_MAXdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_MAX <addr></code>
|
||
<br><br>
|
||
|
||
Defines an CUL_MAX device of type <type> and rf address <addr>. The rf address
|
||
must not be in use by any other MAX device.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_MAXset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>pairmode<br>
|
||
Sets the CUL_MAX into pairing mode for 60 seconds where it can be paired with
|
||
other devices (Thermostats, Buttons, etc.). You also have to set the other device
|
||
into pairing mode manually. (For Thermostats, this is pressing the "Boost" button
|
||
for 3 seconds, for example).</li>
|
||
<li>fakeSC <device> <open><br>
|
||
Sends a fake ShutterContactState message <open> must be 0 or 1 for
|
||
"window closed" or "window opened". If the <device> has a non-zero groupId,
|
||
the fake ShutterContactState message affects all devices with that groupId.
|
||
Make sure you associate the target device(s) with fakeShutterContact beforehand.</li>
|
||
<li>fakeWT <device> <desiredTemperature> <measuredTemperature><br>
|
||
Sends a fake WallThermostatControl message (parameters both may have one digit
|
||
after the decimal point, for desiredTemperature it may only by 0 or 5).
|
||
If the <device> has a non-zero groupId, the fake WallThermostatControl
|
||
message affects all devices with that groupId. Make sure you associate the target
|
||
device with fakeWallThermostat beforehand.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_MAXget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_MAXattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#loglevel">loglevel</a></li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_MAXevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>N/A</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
<a name="CUL_RFR"></a>
|
||
<h3>CUL_RFR</h3>
|
||
<ul>
|
||
<table>
|
||
<tr><td>
|
||
The CUL_RFR module is used to "attach" a second CUL to your base CUL, and
|
||
use it as a repeater / range extender. RFR is shorthand for RF_ROUTER.
|
||
Transmission of the data uses the CC1101 packet capabilities with GFSK
|
||
modulation at 250kBaud after pinging the base CUL at the usual 1kBaud. When
|
||
configured, the RFR device can be used like another CUL connected directly to
|
||
fhem.
|
||
|
||
|
||
<br><br>
|
||
Before you can use this feature in fhem, you have to enable/configure RF
|
||
ROUTING in both CUL's:
|
||
<ul>
|
||
<li>First give your base CUL (which remains connected to the PC) an RFR ID
|
||
by issuing the fhem command "set MyCUL raw ui0100". With this command
|
||
the base CUL will get the ID 01, and it will not relay messages to other
|
||
CUL's (as the second number is 00).</li>
|
||
<li>Now replace the base CUL with the RFR CUL, and set its id by issuing
|
||
the fhem command "set MyCUL raw ui0201". Now remove this CUL and attach the
|
||
original, base CUL again. The RFR CUL got the id 02, and will relay every
|
||
message to the base CUL with id 01.</li>
|
||
<li>Take the RFR CUL, and attach it to an USB power supply, as seen on
|
||
the image. As the configured base id is not 00, it will activate RF
|
||
reception on boot, and will start sending messages to the base CUL.</li>
|
||
<li>Now you have to define this RFR cul as a fhem device:</li>
|
||
</ul>
|
||
|
||
</td><td>
|
||
<img src="cul_rfr.jpg"/>
|
||
</td></tr>
|
||
</table>
|
||
<br>
|
||
|
||
<a name="CUL_RFRdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_RFR <own-id> <base-id></code> <br>
|
||
<br>
|
||
<own-id> is the id of the RFR CUL <b>not</b> connected to the PC,
|
||
<base-id> is the id of the CUL connected to the PC. Both parameters
|
||
have two characters, each representing a one byte hex number.<br>
|
||
Example:
|
||
<ul>
|
||
<code>set MyCUL raw ui0100</code><br>
|
||
# Now replace the base CUL with the RFR CUL<br>
|
||
<code>set MyCUL raw ui0201</code><br>
|
||
# Reattach the base CUL to the PC and attach the RFR CUL to a
|
||
USB power supply<br>
|
||
<code>define MyRFR CUL_RFR 02 01</code><br>
|
||
</ul>
|
||
</ul> <br>
|
||
|
||
<a name="CUL_RFRset"></a>
|
||
<b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
|
||
|
||
<a name="CUL_RFRget"></a>
|
||
<b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
|
||
|
||
<a name="CUL_RFRattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
The rest of the attributes is the same as for the <a href="#CUL">CUL</a>.</ul><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_TX"></a>
|
||
<h3>CUL_TX</h3>
|
||
<ul>
|
||
The CUL_TX module interprets TX2/TX3 type of messages received by the CUL,
|
||
see also http://www.f6fbb.org/domo/sensors/tx3_th.php.
|
||
This protocol is used by the La Crosse TX3-TH thermo/hygro sensor and other
|
||
wireless themperature sensors. Please report the manufacturer/model of other
|
||
working devices. <br><br>
|
||
|
||
<a name="CUL_TXdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_TX <code> [corr] [minsecs]</code> <br>
|
||
|
||
<br>
|
||
<code> is the code of the autogenerated address of the TX device (0
|
||
to 127)<br>
|
||
corr is a correction factor, which will be added to the value received from
|
||
the device.<br>
|
||
minsecs are the minimum seconds between two log entries or notifications
|
||
from this device. <br>E.g. if set to 300, logs of the same type will occure
|
||
with a minimum rate of one per 5 minutes even if the device sends a message
|
||
every minute. (Reduces the log file size and reduces the time to display
|
||
the plots)
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_TXset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_TXget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_TXattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_TXevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>temperature: $temp</li>
|
||
<li>humidity: $hum</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="CUL_WS"></a>
|
||
<h3>CUL_WS</h3>
|
||
<ul>
|
||
The CUL_WS module interprets S300 type of messages received by the CUL.
|
||
<br><br>
|
||
|
||
<a name="CUL_WSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> CUL_WS <code> [corr1...corr4]</code> <br>
|
||
<br>
|
||
<code> is the code which must be set on the S300 device. Valid values
|
||
are 1 through 8.<br>
|
||
corr1..corr4 are up to 4 numerical correction factors, which will be added
|
||
to the respective value to calibrate the device. Note: rain-values will be
|
||
multiplied and not added to the correction factor.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="CUL_WSset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_WSget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="CUL_WSattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev (!)</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#model">model</a> (S300,KS300,ASH2200)</li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="CULflash"></a>
|
||
<h3>CULflash</h3>
|
||
<ul>
|
||
<code>CULflash <CUL-Name> <CUL-Version></code> <br>
|
||
<br>
|
||
Download the CUL firmware from a nightly SVN chekout and flash the
|
||
hardware. Currently only the CUL is supported with its versions:
|
||
CUL_V2, CUL_V2_HM, CUL_V3, CUL_V4.<br>
|
||
<b>Note:</b> dfu-programmer has to be installed in the path, this is
|
||
already the case with the Fritz!Box 7390 image from fhem.de<br>
|
||
|
||
If the CUL is not yet flashed, then specify "none" as CUL-Name.
|
||
Example:
|
||
<ul>
|
||
<code>CULflash CUL CUL_V3<br>
|
||
CULflash none CUL_V3</code>
|
||
</ul>
|
||
Note: the message "dfu-programmer: failed to release interface 0." is
|
||
normal on the FB7390.
|
||
</ul>
|
||
|
||
|
||
<a name="Calendar"></a>
|
||
<h3>Calendar</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="Calendardefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Calendar ical url <URL> [<interval>]</code><br>
|
||
<code>define <name> Calendar ical file <FILENAME> [<interval>]</code><br>
|
||
<br>
|
||
Defines a calendar device.<br><br>
|
||
|
||
A calendar device periodically gathers calendar events from the source calendar at the given URL or from a file.
|
||
The file must be in ICal format.<br><br>
|
||
|
||
If the URL
|
||
starts with <code>https://</code>, the perl module IO::Socket::SSL must be installed
|
||
(use <code>cpan -i IO::Socket::SSL</code>).<br><br>
|
||
|
||
Note for users of Google Calendar: You can literally use the private ICal URL from your Google Calendar.
|
||
<!--Google App accounts do not work since requests to the URL
|
||
get redirected first and the fhem mechanism for retrieving data via http/https cannot handle this. -->
|
||
If your Google Calendar
|
||
URL starts with <code>https://</code> and the perl module IO::Socket::SSL is not installed on your system, you can
|
||
replace it by <code>http://</code> if and only if there is no redirection to the <code>https://</code> URL.
|
||
Check with your browser first if unsure.<br><br>
|
||
|
||
The optional parameter <code>interval</code> is the time between subsequent updates
|
||
in seconds. It defaults to 3600 (1 hour).<br><br>
|
||
|
||
Examples:
|
||
<pre>
|
||
define MyCalendar Calendar ical url https://www.google.com­/calendar/ical/john.doe%40example.com­/private-foo4711/basic.ics
|
||
define YourCalendar Calendar ical url http://www.google.com­/calendar/ical/jane.doe%40example.com­/private-bar0815/basic.ics 86400
|
||
define SomeCalendar Calendar ical file /home/johndoe/calendar.ics
|
||
</pre>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Calendarset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> update</code><br><br>
|
||
|
||
Forces the retrieval of the calendar from the URL. The next automatic retrieval is scheduled to occur
|
||
<code>interval</code> seconds later.<br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="Calendarget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> full|text|summary|location|alarm|start|end <reading>|<uid> [max]</code><br><br>
|
||
|
||
Returns, line by line, the full state or a textual representation or the summary (subject, title) or the
|
||
location or the alarm time or the start time or the end time
|
||
of the calendar event(s) listed in the
|
||
reading <reading> or identified by the UID <uid>. The optional parameter <code>max</code> limits
|
||
the number of returned lines.<br><br>
|
||
|
||
<code>get <name> find <regexp></code><br><br>
|
||
|
||
Returns, line by line, the UIDs of all calendar events whose summary matches the regular expression
|
||
<regexp>.<br><br>
|
||
|
||
</ul>
|
||
|
||
<br>
|
||
|
||
<a name="Calendarattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Description</b>
|
||
<ul>
|
||
|
||
A calendar is a set of calendar events. A calendar event has a summary (usually the title shown in a visual
|
||
representation of the source calendar), a start time, an end time, and zero, one or more alarm times. The calendar events are
|
||
fetched from the source calendar at the given URL. In case of multiple alarm times for a calendar event, only the
|
||
earliest alarm time is kept. Recurring calendar events are currently not supported.<p>
|
||
|
||
A calendar event is identified by its UID. The UID is taken from the source calendar. All non-alphanumerical characters
|
||
are stripped off the UID to make your life easier.<p>
|
||
|
||
A calendar event can be in one of the following states:
|
||
<table border="1">
|
||
<tr><td>new</td><td>The calendar event was first seen at the most recent update. Either this was your first retrieval of
|
||
the calendar or you newly added the calendar event to the source calendar.</td></tr>
|
||
<tr><td>known</td><td>The calendar event was already there before the most recent update.</td></tr>
|
||
<tr><td>updated</td><td>The calendar event was already there before the most recent update but it has changed since it
|
||
was last retrieved.</td></tr>
|
||
<tr><td>deleted</td><td>The calendar event was there before the most recent update but is no longer. You removed it from the source calendar. The calendar event will be removed from all lists at the next update.</td></tr>
|
||
</table><br>
|
||
Calendar events that lie completely in the past (current time on wall clock is later than the calendar event's end time)
|
||
are not retrieved and are thus not accessible through the calendar.
|
||
<p>
|
||
|
||
A calendar event can be in one of the following modes:
|
||
<table border="1">
|
||
<tr><td>upcoming</td><td>Neither the alarm time nor the start time of the calendar event is reached.</td></tr>
|
||
<tr><td>alarm</td><td>The alarm time has passed but the start time of the calendar event is not yet reached.</td></tr>
|
||
<tr><td>start</td><td>The start time has passed but the end time of the calendar event is not yet reached.</td></tr>
|
||
<tr><td>end</td><td>The end time of the calendar event has passed.</td></tr>
|
||
</table><br>
|
||
A calendar event transitions from one mode to another immediately when the time for the change has come. This is done by waiting
|
||
for the earliest future time among all alarm, start or end times of all calendar events.
|
||
<p>
|
||
|
||
A calendar device has several readings. Except for <code>calname</code>, each reading is a semicolon-separated list of UIDs of
|
||
calendar events that satisfy certain conditions:
|
||
<table border="1">
|
||
<tr><td>calname</td><td>name of the calendar</td></tr>
|
||
<tr><td>all</td><td>all events</td></tr>
|
||
<tr><td>modeAlarm</td><td>events in alarm mode</td></tr>
|
||
<tr><td>modeAlarmOrStart</td><td>events in alarm or start mode</td></tr>
|
||
<tr><td>modeAlarmed</td><td>events that have just transitioned from upcoming to alarm mode</td></tr>
|
||
<tr><td>modeChanged</td><td>events that have just changed their mode somehow</td></tr>
|
||
<tr><td>modeEnd</td><td>events in end mode</td></tr>
|
||
<tr><td>modeEnded</td><td>events that have just transitioned from start to end mode</td></tr>
|
||
<tr><td>modeStart</td><td>events in start mode</td></tr>
|
||
<tr><td>modeStarted</td><td>events that have just transitioned to start mode</td></tr>
|
||
<tr><td>modeUpcoming</td><td>events in upcoming mode</td></tr>
|
||
<tr><td>stateChanged</td><td>events that have just changed their state somehow</td></tr>
|
||
<tr><td>stateDeleted</td><td>events in state deleted</td></tr>
|
||
<tr><td>stateNew</td><td>events in state new</td></tr>
|
||
<tr><td>stateUpdated</td><td>events in state updated</td></tr>
|
||
</table>
|
||
</ul>
|
||
<p>
|
||
|
||
When a calendar event has changed, an event is created in the form
|
||
<code>changed: UID mode</code> with mode being the current mode the calendar event is in after the change.
|
||
|
||
<p>
|
||
|
||
<b>Usage scenarios</b>
|
||
<ul>
|
||
<i>Show all calendar events with details</i><br><br>
|
||
<ul>
|
||
<code>
|
||
get MyCalendar full all<br>
|
||
2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom known alarm 31.05.2012 17:00:00 07.06.2012 16:30:00-07.06.2012 18:00:00 Erna for coffee<br>
|
||
992hydf4y44awer5466lhfdsr­gl7tin6b6mckf8glmhui4­googlecom known upcoming 08.06.2012 00:00:00-09.06.2012 00:00:00 Vacation
|
||
</code><br><br>
|
||
</ul>
|
||
|
||
<i>Show calendar events in your photo frame</i><br><br>
|
||
<ul>
|
||
Put a line in the <a href="#RSSlayout">layout description</a> to show calendar events in alarm or start mode:<br><br>
|
||
<code>text 20 60 { fhem("get MyCalendar text modeAlarmOrStart") }</code><br><br>
|
||
This may look like:<br><br>
|
||
<code>
|
||
07.06.12 16:30 Erna for coffee<br>
|
||
08.06.12 00:00 Vacation
|
||
</code><br><br>
|
||
</ul>
|
||
|
||
<i>Switch the light on when Erna comes</i><br><br>
|
||
<ul>
|
||
First find the UID of the calendar event:<br><br>
|
||
<code>
|
||
get MyCalendar find .*Erna.*<br>
|
||
2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom
|
||
</code><br><br>
|
||
Then define a notify:<br><br>
|
||
<code>
|
||
define ErnaComes notify MyCalendar:modeStarted.*2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom.* set MyLight on
|
||
</code><br><br>
|
||
You can also do some logging:<br><br>
|
||
<code>
|
||
define LogErna notify MyCalendar:modeAlarmed.*2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom.* { Log3 %NAME, 1, "ALARM name=%NAME event=%EVENT part1=%EVTPART0 part2=%EVTPART1" }
|
||
</code><br><br>
|
||
</ul>
|
||
|
||
<i>Switch actors on and off</i><br><br>
|
||
<ul>
|
||
Think about a calendar with calendar events whose summaries (subjects, titles) are the names of devices in your fhem installation.
|
||
You want the respective devices to switch on when the calendar event starts and to switch off when the calendar event ends.<br><br>
|
||
<code>
|
||
define SwitchActorOn notify MyCalendar:modeStarted.* {
|
||
my $reading="%EVTPART0";;
|
||
my $uid= "%EVTPART1";;
|
||
my $actor= fhem("get MyCalendar summary $uid");;
|
||
if(defined $actor) {
|
||
fhem("set $actor on")
|
||
}
|
||
}<br><br>
|
||
define SwitchActorOff notify MyCalendar:modeEnded.* {
|
||
my $reading="%EVTPART0";;
|
||
my $uid= "%EVTPART1";;
|
||
my $actor= fhem("get MyCalendar summary $uid");;
|
||
if(defined $actor) {
|
||
fhem("set $actor off")
|
||
}
|
||
}
|
||
</code><br><br>
|
||
You can also do some logging:<br><br>
|
||
<code>
|
||
define LogActors notify MyCalendar:mode(Started|Ended).* { my $reading= "%EVTPART0";; my $uid= "%EVTPART1";; my $actor= fhem("get MyCalendar summary $uid");; Log 3 %NAME, 1, "Actor: $actor, Reading $reading" }
|
||
</code><br><br>
|
||
</ul>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="Dashboard"></a>
|
||
<h3>Dashboard</h3>
|
||
<ul>
|
||
Creates a Dashboard in any group can be arranged. The positioning may depend the Groups and column width are made<br>
|
||
arbitrarily by drag'n drop. Also, the width and height of a Group can be increased beyond the minimum size.<br>
|
||
<br>
|
||
|
||
<a name="Dashboarddefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Dashboard</code>
|
||
<br><br>
|
||
Example:<br>
|
||
<ul>
|
||
<code>define anyViews Dashboard</code>
|
||
</ul><br>
|
||
|
||
<b>Bestpractice beginner configuration</b>
|
||
<br><br>
|
||
<code>
|
||
define anyViews Dashboard<br>
|
||
attr anyViews dashboard_colcount 2<br>
|
||
attr anyViews dashboard_rowcentercolwidth 30,70<br>
|
||
attr anyViews dashboard_tab1groups <Group1>,<Group2>,<Group3><br>
|
||
attr anyViews dashboard_lockstate unlock<br>
|
||
attr anyViews dashboard_showhelper 1<br>
|
||
</code>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Dashboardset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Dashboardget"></a>
|
||
<h4>Get</h4> <ul>N/A</ul><br>
|
||
<a name="Dashboardattr"></a>
|
||
<h4>Attributes</h4>
|
||
|
||
<a name="dashboard_tabcount"></a>
|
||
<li>dashboard_tabcount<br>
|
||
Returns the number of displayed tabs.
|
||
Default: 1
|
||
</li><br>
|
||
<a name="dashboard_activetab"></a>
|
||
<li>dashboard_activetab<br>
|
||
Specifies which tab is activated. Can be set manually, but is also set by the switch "Set" to the currently active tab.
|
||
Default: 1
|
||
</li><br>
|
||
<a name="dashboard_tab1name"></a>
|
||
<li>dashboard_tab1name<br>
|
||
Title of Tab 1.
|
||
Default: Dashboard-Tab 1
|
||
</li><br>
|
||
<a name="dashboard_tab2name"></a>
|
||
<li>dashboard_tab2name<br>
|
||
Title of Tab 2.
|
||
Default: Dashboard-Tab 2
|
||
</li><br>
|
||
<a name="dashboard_tab3name"></a>
|
||
<li>dashboard_tab3name<br>
|
||
Title of Tab 3.
|
||
Default: Dashboard-Tab 3
|
||
</li><br>
|
||
<a name="dashboard_tab4name"></a>
|
||
<li>dashboard_tab4name<br>
|
||
Title of Tab 4.
|
||
Default: Dashboard-Tab 4
|
||
</li><br>
|
||
<a name="dashboard_tab5name"></a>
|
||
<li>dashboard_tab5name<br>
|
||
Title of Tab 5.
|
||
Default: Dashboard-Tab 5
|
||
</li><br>
|
||
<a name="dashboard_tab6name"></a>
|
||
<li>dashboard_tab6name<br>
|
||
Title of Tab 6.
|
||
Default: Dashboard-Tab 6
|
||
</li><br>
|
||
<a name="dashboard_tab7name"></a>
|
||
<li>dashboard_tab7name<br>
|
||
Title of Tab 7.
|
||
Default: Dashboard-Tab 7
|
||
</li><br>
|
||
<a name="dashboard_webfrontendfilter"></a>
|
||
<li>dashboard_webfrontendfilter<br>
|
||
If this attribute not set, or value is * the dashboard is displayed on all configured FHEMWEB instances. <br>
|
||
Set the Name of an FHEMWEB instance (eg WEB) to the Dashboard appears only in this.<br>
|
||
There may be several valid instances are separated by comma eg WEB,WEBtablet.<br>
|
||
This makes it possible to define an additional dashboard that only Show on Tablet (which of course an own instance FHEMWEB use).<br>
|
||
Default: *
|
||
<br>
|
||
It should NEVER two ore more activ dashboards in a FHEMWEB instance!
|
||
</li><br>
|
||
<a name="dashboard_tab1sorting"></a>
|
||
<li>dashboard_tab1sorting<br>
|
||
Contains the position of each group in Tab 1. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_tab2sorting"></a>
|
||
<li>dashboard_tab2sorting<br>
|
||
Contains the position of each group in Tab 2. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_tab3sorting"></a>
|
||
<li>dashboard_tab3sorting<br>
|
||
Contains the position of each group in Tab 3. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_tab4sorting"></a>
|
||
<li>dashboard_tab4sorting<br>
|
||
Contains the position of each group in Tab 4. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_tab5sorting"></a>
|
||
<li>dashboard_tab5sorting<br>
|
||
Contains the position of each group in Tab 5. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_tab6sorting"></a>
|
||
<li>dashboard_tab6sorting<br>
|
||
Contains the position of each group in Tab 6. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_tab7sorting"></a>
|
||
<li>dashboard_tab7sorting<br>
|
||
Contains the position of each group in Tab 7. Value is written by the "Set" button. It is not recommended to take manual changes.
|
||
</li><br>
|
||
<a name="dashboard_row"></a>
|
||
<li>dashboard_row<br>
|
||
To select which rows are displayed. top only; center only; bottom only; top and center; center and bottom; top,center and bottom.<br>
|
||
Default: center
|
||
</li><br>
|
||
<a name="dashboard_width"></a>
|
||
<li>dashboard_width<br>
|
||
To determine the Dashboardwidth. The value can be specified, or an absolute width value (eg 1200) in pixels in% (eg 80%).<br>
|
||
Default: 100%
|
||
</li><br>
|
||
<a name="dashboard_rowcenterheight"></a>
|
||
<li>dashboard_rowcenterheight<br>
|
||
Height of the center row in which the groups may be positioned. <br>
|
||
Default: 400
|
||
</li><br>
|
||
<a name="dashboard_rowcentercolwidth"></a>
|
||
<li>dashboard_rowcentercolwidth<br>
|
||
About this attribute, the width of each column of the middle Dashboardrow can be set. It can be stored for each column a separate value.
|
||
The values must be separated by a comma (no spaces). Each value determines the column width in%! The first value specifies the width of the first column,
|
||
the second value of the width of the second column, etc. Is the sum of the width greater than 100 it is reduced.
|
||
If more columns defined as widths the missing widths are determined by the difference to 100. However, are less columns are defined as the values of
|
||
ignores the excess values.<br>
|
||
Default: 100
|
||
</li><br>
|
||
<a name="dashboard_rowtopheight"></a>
|
||
<li>dashboard_rowtopheight<br>
|
||
Height of the top row in which the groups may be positioned. <br>
|
||
Default: 250
|
||
</li><br>
|
||
<a name="dashboard_rowbottomheight"></a>
|
||
<li>"dashboard_rowbottomheight<br>
|
||
Height of the bottom row in which the groups may be positioned.<br>
|
||
Default: 250
|
||
</li><br>
|
||
<a name="dashboard_tab1groups"></a>
|
||
<li>dashboard_tab1groups<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 1.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab2groups"></a>
|
||
<li>2<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 2.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab3groups"></a>
|
||
<li>dashboard_tab3groups<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 3.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab4groups"></a>
|
||
<li>dashboard_tab4groups<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 4.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab5groups"></a>
|
||
<li>dashboard_tab5groups<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 5.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab6groups"></a>
|
||
<li>dashboard_tab6groups<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 6.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab7groups"></a>
|
||
<li>dashboard_tab7groups<br>
|
||
Comma-separated list of the names of the groups to be displayed in Tab 7.<br>
|
||
Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
|
||
Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow
|
||
</li><br>
|
||
<a name="dashboard_tab1icon"></a>
|
||
<li>dashboard_tab1icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_tab2icon"></a>
|
||
<li>dashboard_tab2icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_tab3icon"></a>
|
||
<li>dashboard_tab3icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_tab4icon"></a>
|
||
<li>dashboard_tab4icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_tab5icon"></a>
|
||
<li>dashboard_tab5icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_tab6icon"></a>
|
||
<li>dashboard_tab6icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_tab7icon"></a>
|
||
<li>dashboard_tab7icon<br>
|
||
Set the icon for a Tab. There must exist an icon with the name ico.png in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
|
||
</li><br>
|
||
<a name="dashboard_lockstate"></a>
|
||
<li>dashboard_lockstate<br>
|
||
When set to "unlock" you can edit the Dashboard. When set to "lock" no change can be made. <br>
|
||
If the bar is hidden dashboard_lockstate is "lock". Editing is possible only with activated switch panel.<br>
|
||
Default: unlock
|
||
</li><br>
|
||
<a name="dashboard_colcount"></a>
|
||
<li>dashboard_colcount<br>
|
||
Number of columns in which the groups can be displayed. Nevertheless, it is possible to have multiple groups <br>
|
||
to be positioned in a column next to each other. This is dependent on the width of columns and groups. <br>
|
||
Default: 1
|
||
</li><br>
|
||
<a name="dashboard_showfullsize"></a>
|
||
<li>dashboard_showfullsize<br>
|
||
Hide FHEMWEB Roomliste (complete left side) and Page Header if Value is 1.<br>
|
||
Default: 0
|
||
</li><br>
|
||
<a name="dashboard_showtabs"></a>
|
||
<li>dashboard_showtabs<br>
|
||
Displays the Tabs on top or bottom, or hides them. This also applies to the Buttonbar. If the Buttonbar is hidden dashboard_lockstate the "lock" is used.<br>
|
||
Default: tabs-and-buttonbar-at-the-top
|
||
</li><br>
|
||
<a name="dashboard_showhelper"></a>
|
||
<li>dashboard_showhelper<br>
|
||
Displays frames in order to facilitate the positioning of the groups.<br>
|
||
Default: 1
|
||
</li><br>
|
||
<a name="dashboard_showtooglebuttons"></a>
|
||
<li>dashboard_showtooglebuttons<br>
|
||
Displays a Toogle Button on each Group do collapse.<br>
|
||
Default: 1
|
||
</li><br>
|
||
<a name="dashboard_debug"></a>
|
||
<li>dashboard_debug<br>
|
||
Show Hiddenfields. Only for Maintainer's use.<br>
|
||
Default: 0
|
||
</li><br>
|
||
|
||
</ul>
|
||
|
||
<a name="DbLog"></a>
|
||
<h3>DbLog</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="DbLogdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> DbLog <configfilename> <regexp></code>
|
||
<br><br>
|
||
|
||
Log events to a database. The database connection is defined in
|
||
<code><configfilename></code> (see sample configuration file
|
||
<code>contrib/dblog/db.conf</code>). The configuration is stored in a separate file
|
||
to avoid storing the password in the main configuration file and to have it
|
||
visible in the output of the <a href="../docs/commandref.html#list">list</a> command.
|
||
<br><br>
|
||
|
||
The modules <code>DBI</code> and <code>DBD::<dbtype></code>
|
||
need to be installed (use <code>cpan -i <module></code>
|
||
if your distribution does not have it).
|
||
<br><br>
|
||
|
||
<code><regexp></code> is the same as in <a href="../docs/commandref.html#FileLog">FileLog</a>.
|
||
<br><br>
|
||
Sample code to create a MySQL/PostgreSQL database is in
|
||
<code><DBType>_create.sql</code>.
|
||
The database contains two tables: <code>current</code> and
|
||
<code>history</code>. The latter contains all events whereas the former only
|
||
contains the last event for any given reading and device.
|
||
The columns have the following meaning:
|
||
<ol>
|
||
<li>TIMESTAMP: timestamp of event, e.g. <code>2007-12-30 21:45:22</code></li>
|
||
<li>DEVICE: device name, e.g. <code>Wetterstation</code></li>
|
||
<li>TYPE: device type, e.g. <code>KS300</code></li>
|
||
<li>EVENT: event specification as full string,
|
||
e.g. <code>humidity: 71 (%)</code></li>
|
||
<li>READING: name of reading extracted from event,
|
||
e.g. <code>humidity</code></li>
|
||
|
||
<li>VALUE: actual reading extracted from event,
|
||
e.g. <code>71</code></li>
|
||
<li>UNIT: unit extracted from event, e.g. <code>%</code></li>
|
||
</ol>
|
||
The content of VALUE is optimized for automated post-processing, e.g.
|
||
<code>yes</code> is translated to <code>1</code>
|
||
<br><br>
|
||
The current values can be retrieved by the following code like FileLog:<br>
|
||
<ul>
|
||
<code>get myDbLog - - 2012-11-10 2012-11-10 KS300:temperature::</code>
|
||
</ul>
|
||
<br><br>
|
||
<b>Examples:</b>
|
||
<ul>
|
||
<code># log everything to database</code><br>
|
||
|
||
<code>define myDbLog DbLog /etc/fhem/db.conf .*:.*</code>
|
||
</ul>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="DbLogset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> reopen </code><br/><br/>
|
||
<ul>Perform a database disconnect and immediate reconnect to clear cache and flush journal file.</ul><br/>
|
||
|
||
<code>set <name> count </code><br/><br/>
|
||
<ul>Count records in tables current and history and write results into readings countCurrent and countHistory.</ul><br/>
|
||
|
||
<code>set <name> deleteOldDays <n></code><br/><br/>
|
||
<ul>Delete records from history older than <n> days. Number of deleted record will be written into reading lastRowsDeleted.</ul><br/>
|
||
|
||
<code>set <name> userCommand <validSqlStatement></code><br/><br/>
|
||
<ul><b>DO NOT USE THIS COMMAND UNLESS YOU REALLY (REALLY!) KNOW WHAT YOU ARE DOING!!!</b><br/><br/>
|
||
Perform any (!!!) sql statement on connected database. Useercommand and result will be written into corresponding readings.<br/>
|
||
</ul><br/>
|
||
|
||
</ul><br>
|
||
|
||
<a name="DbLogget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> ReadingsVal <device> <reading> <default></code><br/>
|
||
<code>get <name> ReadingsTimestamp <device> <reading> <default></code><br/>
|
||
<br/>
|
||
Retrieve one single value, use and syntax are similar to ReadingsVal() and ReadingsTimestamp() functions.<br/>
|
||
</ul>
|
||
<br/>
|
||
<br/>
|
||
<ul>
|
||
<code>get <name> <infile> <outfile> <from>
|
||
<to> <column_spec> </code>
|
||
<br><br>
|
||
Read data from the Database, used by frontends to plot data without direct
|
||
access to the Database.<br>
|
||
|
||
<ul>
|
||
<li><in><br>
|
||
A dummy parameter for FileLog compatibility. Sessing by defaultto <code>-</code><br>
|
||
<ul>
|
||
<li>current: reading actual readings from table "current"</li>
|
||
<li>history: reading history readings from table "history"</li>
|
||
<li>-: identical to "history"</li>
|
||
</ul>
|
||
</li>
|
||
<li><out><br>
|
||
A dummy parameter for FileLog compatibility. Setting by default to <code>-</code>
|
||
to check the output for plot-computing.<br>
|
||
Set it to the special keyword
|
||
<code>all</code> to get all columns from Database.
|
||
<ul>
|
||
<li>ALL: get all colums from table, including a header</li>
|
||
<li>Array: get the columns as array of hashes</li>
|
||
<li>INT: internally used by generating plots</li>
|
||
<li>-: default</li>
|
||
</ul>
|
||
</li>
|
||
<li><from> / <to><br>
|
||
Used to select the data. Please use the following timeformat or
|
||
an initial substring of it:<br>
|
||
<ul><code>YYYY-MM-DD_HH24:MI:SS</code></ul></li>
|
||
<li><column_spec><br>
|
||
For each column_spec return a set of data separated by
|
||
a comment line on the current connection.<br>
|
||
Syntax: <device>:<reading>:<default>:<fn>:<regexp><br>
|
||
<ul>
|
||
<li><device><br>
|
||
The name of the device. Case sensitive. Using a the joker "%" is supported.</li>
|
||
<li><reading><br>
|
||
The reading of the given device to select. Case sensitive. Using a the joker "%" is supported.
|
||
</li>
|
||
<li><default><br>
|
||
no implemented yet
|
||
</li>
|
||
<li><fn>
|
||
One of the following:
|
||
<ul>
|
||
<li>int<br>
|
||
Extract the integer at the beginning of the string. Used e.g.
|
||
for constructs like 10%</li>
|
||
<li>int<digit><br>
|
||
Extract the decimal digits including negative character and
|
||
decimal point at the beginning og the string. Used e.g.
|
||
for constructs like 15.7°C</li>
|
||
<li>delta-h / delta-d<br>
|
||
Return the delta of the values for a given hour or a given day.
|
||
Used if the column contains a counter, as is the case for the
|
||
KS300 rain column.</li>
|
||
<li>delta-ts<br>
|
||
Replaced the original value with a measured value of seconds since
|
||
the last and the actual logentry.
|
||
</li>
|
||
</ul></li>
|
||
<li><regexp><br>
|
||
The string is evaluated as a perl expression. The regexp is executed
|
||
before <fn> parameter.<br>
|
||
Note: The string/perl expression cannot contain spaces,
|
||
as the part after the space will be considered as the
|
||
next column_spec.<br>
|
||
<b>Keywords</b>
|
||
<li>$val is the current value returned from the Database.</li>
|
||
<li>$ts is the current timestamp returned from the Database.</li>
|
||
<li>This Logentry will not print out if $val contains th keyword "hide".</li>
|
||
<li>This Logentry will not print out and not used in the following processing
|
||
if $val contains th keyword "ignore".</li>
|
||
</li>
|
||
</ul></li>
|
||
</ul>
|
||
<br><br>
|
||
Examples:
|
||
<ul>
|
||
<li><code>get myDbLog - - 2012-11-10 2012-11-20 KS300:temperature</code></li>
|
||
<li><code>get myDbLog current ALL - - %:temperature</code></li><br>
|
||
you will get all actual readings "temperature" from all logged devices.
|
||
Be carful by using "history" as inputfile because a long execution time will be expected!
|
||
<li><code>get myDbLog - - 2012-11-10_10 2012-11-10_20 KS300:temperature::int1</code><br>
|
||
like from 10am until 08pm at 10.11.2012</li>
|
||
<li><code>get myDbLog - all 2012-11-10 2012-11-20 KS300:temperature</code></li>
|
||
<li><code>get myDbLog - - 2012-11-10 2012-11-20 KS300:temperature KS300:rain::delta-h KS300:rain::delta-d</code></li>
|
||
<li><code>get myDbLog - - 2012-11-10 2012-11-20 MyFS20:data:::$val=~s/(on|off).*/$1eq"on"?1:0/eg</code><br>
|
||
return 1 for all occurance of on* (on|on-for-timer etc) and 0 for all off*</li>
|
||
<li><code>get myDbLog - - 2012-11-10 2012-11-20 Bodenfeuchte:data:::$val=~s/.*B:\s([-\.\d]+).*/$1/eg</code><br>
|
||
Example of OWAD: value like this: <code>"A: 49.527 % B: 66.647 % C: 9.797 % D: 0.097 V"</code><br>
|
||
and output for port B is like this: <code>2012-11-20_10:23:54 66.647</code></li>
|
||
<li><code>get DbLog - - 2013-05-26 2013-05-28 Pumpe:data::delta-ts:$val=~s/on/hide/</code><br>
|
||
Setting up a "Counter of Uptime". The function delta-ts gets the seconds between the last and the
|
||
actual logentry. The keyword "hide" will hide the logentry of "on" because this time
|
||
is a "counter of Downtime"</li>
|
||
|
||
</ul>
|
||
<br><br>
|
||
</ul>
|
||
|
||
<b>Get</b> when used for webcharts
|
||
<ul>
|
||
<code>get <name> <infile> <outfile> <from>
|
||
<to> <device> <querytype> <xaxis> <yaxis> <savename> </code>
|
||
<br><br>
|
||
Query the Database to retrieve JSON-Formatted Data, which is used by the charting frontend.
|
||
<br>
|
||
|
||
<ul>
|
||
<li><name><br>
|
||
The name of the defined DbLog, like it is given in fhem.cfg.</li>
|
||
<li><in><br>
|
||
A dummy parameter for FileLog compatibility. Always set to <code>-</code></li>
|
||
<li><out><br>
|
||
A dummy parameter for FileLog compatibility. Set it to <code>webchart</code>
|
||
to use the charting related get function.
|
||
</li>
|
||
<li><from> / <to><br>
|
||
Used to select the data. Please use the following timeformat:<br>
|
||
<ul><code>YYYY-MM-DD_HH24:MI:SS</code></ul></li>
|
||
<li><device><br>
|
||
A string which represents the device to query.</li>
|
||
<li><querytype><br>
|
||
A string which represents the method the query should use. Actually supported values are: <br>
|
||
<code>getreadings</code> to retrieve the possible readings for a given device<br>
|
||
<code>getdevices</code> to retrieve all available devices<br>
|
||
<code>timerange</code> to retrieve charting data, which requires a given xaxis, yaxis, device, to and from<br>
|
||
<code>savechart</code> to save a chart configuration in the database. Requires a given xaxis, yaxis, device, to and from, and a 'savename' used to save the chart<br>
|
||
<code>deletechart</code> to delete a saved chart. Requires a given id which was set on save of the chart<br>
|
||
<code>getcharts</code> to get a list of all saved charts.<br>
|
||
<code>getTableData</code> to get jsonformatted data from the database. Uses paging Parameters like start and limit.<br>
|
||
<code>hourstats</code> to get statistics for a given value (yaxis) for an hour.<br>
|
||
<code>daystats</code> to get statistics for a given value (yaxis) for a day.<br>
|
||
<code>weekstats</code> to get statistics for a given value (yaxis) for a week.<br>
|
||
<code>monthstats</code> to get statistics for a given value (yaxis) for a month.<br>
|
||
<code>yearstats</code> to get statistics for a given value (yaxis) for a year.<br>
|
||
</li>
|
||
<li><xaxis><br>
|
||
A string which represents the xaxis</li>
|
||
<li><yaxis><br>
|
||
A string which represents the yaxis</li>
|
||
<li><savename><br>
|
||
A string which represents the name a chart will be saved with</li>
|
||
<li><chartconfig><br>
|
||
A jsonstring which represents the chart to save</li>
|
||
<li><pagingstart><br>
|
||
An integer used to determine the start for the sql used for query 'getTableData'</li>
|
||
<li><paginglimit><br>
|
||
An integer used to set the limit for the sql used for query 'getTableData'</li>
|
||
</ul>
|
||
<br><br>
|
||
Examples:
|
||
<ul>
|
||
<li><code>get logdb - webchart "" "" "" getcharts</code><br>
|
||
Retrieves all saved charts from the Database</li>
|
||
<li><code>get logdb - webchart "" "" "" getdevices</code><br>
|
||
Retrieves all available devices from the Database</li>
|
||
<li><code>get logdb - webchart "" "" ESA2000_LED_011e getreadings</code><br>
|
||
Retrieves all available Readings for a given device from the Database</li>
|
||
<li><code>get logdb - webchart 2013-02-11_00:00:00 2013-02-12_00:00:00 ESA2000_LED_011e timerange TIMESTAMP day_kwh</code><br>
|
||
Retrieves charting data, which requires a given xaxis, yaxis, device, to and from<br>
|
||
Will ouput a JSON like this: <code>[{'TIMESTAMP':'2013-02-11 00:10:10','VALUE':'0.22431388090756'},{'TIMESTAMP'.....}]</code></li>
|
||
<li><code>get logdb - webchart 2013-02-11_00:00:00 2013-02-12_00:00:00 ESA2000_LED_011e savechart TIMESTAMP day_kwh tageskwh</code><br>
|
||
Will save a chart in the database with the given name and the chart configuration parameters</li>
|
||
<li><code>get logdb - webchart "" "" "" deletechart "" "" 7</code><br>
|
||
Will delete a chart from the database with the given id</li>
|
||
</ul>
|
||
<br><br>
|
||
</ul>
|
||
<a name="DbLogattr"></a>
|
||
<b>Attributes</b>
|
||
<ul><b>shutdownWait</b>
|
||
<ul><code>attr <device> shutdownWait <n></code><br/>
|
||
causes fhem shutdown to wait n seconds for pending database commit<br/>
|
||
</ul>
|
||
</ul><br/>
|
||
<ul><b>DbLogExclude</b>
|
||
<br>
|
||
<ul>
|
||
<code>
|
||
set <device> DbLogExclude regex:MinInterval [regex:MinInterval] ...
|
||
</code>
|
||
</ul>
|
||
A new Attribute DbLogExclude will be propagated
|
||
to all Devices if DBLog is used. DbLogExclude will work as regexp to exclude
|
||
defined readings to log. Each individual regexp-group are separated by comma.
|
||
If a MinInterval is set, the logentry is dropped if the
|
||
defined interval is not reached and value vs. lastvalue is eqal .
|
||
<br>
|
||
<b>Example</b>
|
||
<ul>
|
||
<code>attr MyDevice1 DbLogExclude .*</code>
|
||
<code>attr MyDevice2 DbLogExclude state,(floorplantext|MyUserReading):300,battery:3600</code>
|
||
</ul>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="ECMD"></a>
|
||
<h3>ECMD</h3>
|
||
<ul>
|
||
Any physical device with request/response-like communication capabilities
|
||
over a TCP connection can be defined as ECMD device. A practical example
|
||
of such a device is the AVR microcontroller board AVR-NET-IO from
|
||
<a href="http://www.pollin.de">Pollin</a> with
|
||
<a href="http://www.ethersex.de/index.php/ECMD">ECMD</a>-enabled
|
||
<a href="http://www.ethersex.de">Ethersex</a> firmware.<p>
|
||
|
||
A physical ECMD device can host any number of logical ECMD devices. Logical
|
||
devices are defined as <a href="#ECMDDevice">ECMDDevice</a>s in fhem.
|
||
ADC 0 to 3 and I/O port 0 to 3 of the above mentioned board
|
||
are examples of such logical devices. ADC 0 to 3 all belong to the same
|
||
device class ADC (analog/digital converter). I/O port 0 to 3 belong to the device
|
||
class I/O port. By means of extension boards you can make your physical
|
||
device drive as many logical devices as you can imagine, e.g. IR receivers,
|
||
LC displays, RF receivers/transmitters, 1-wire devices, etc.<p>
|
||
|
||
Defining one fhem module for any device class would create an unmanageable
|
||
number of modules. Thus, an abstraction layer is used. You create a device class
|
||
on the fly and assign it to a logical ECMD device. The
|
||
<a href="#ECMDClassdef">class definition</a>
|
||
names the parameters of the logical device, e.g. a placeholder for the number
|
||
of the ADC or port, as well as the get and set capabilities. Worked examples
|
||
are to be found in the documentation of the <a href="#ECMDDevice">ECMDDevice</a> device.
|
||
<br><br>
|
||
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module
|
||
if the module is connected via serial Port or USB.
|
||
<br><br>
|
||
|
||
<a name="ECMDdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ECMD telnet <IPAddress:Port></code><br><br>
|
||
or<br><br>
|
||
<code>define <name> ECMD serial <SerialDevice>[<@BaudRate>]</code>
|
||
<br><br>
|
||
|
||
Defines a physical ECMD device. The keywords <code>telnet</code> or
|
||
<code>serial</code> are fixed.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define AVRNETIO ECMD telnet 192.168.0.91:2701</code><br>
|
||
<code>define AVRNETIO ECMD serial /dev/ttyS0</code><br>
|
||
<code>define AVRNETIO ECMD serial /sev/ttyUSB0@38400</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="ECMDset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> classdef <classname> <filename></code>
|
||
<br><br>
|
||
Creates a new device class <code><classname></code> for logical devices.
|
||
The class definition is in the file <code><filename></code>. You must
|
||
create the device class before you create a logical device that adheres to
|
||
that definition.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>define AVRNETIO classdef /etc/fhem/ADC.classdef</code><br>
|
||
</ul>
|
||
<br>
|
||
<code>set <name> reopen</code>
|
||
<br><br>
|
||
Closes and reopens the device. Could be handy if connection is lost and cannot be
|
||
reestablished automatically.
|
||
<br><br>
|
||
</ul>
|
||
|
||
|
||
<a name="ECMDget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> raw <command></code>
|
||
<br><br>
|
||
Sends the command <code><command></code> to the physical ECMD device
|
||
<code><name></code> and reads the response.
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="ECMDattr"></a>
|
||
<b>Attributes</b>
|
||
<br><br>
|
||
<ul>
|
||
<li>classdefs<br>A colon-separated list of <classname>=<filename>.
|
||
The list is automatically updated if a class definition is added. You can
|
||
directly set the attribute.</li>
|
||
<li>nonl<br>A newline (\n) is automatically appended to every command string sent to the device
|
||
unless this attribute is set. Please note that newlines (\n) in a command string are interpreted
|
||
as separators to split the command string into several commands and are never literally sent.</li>
|
||
</ul>
|
||
<br><br>
|
||
|
||
|
||
<a name="ECMDClassdef"></a>
|
||
<b>Class definition</b>
|
||
<br><br>
|
||
<ul>
|
||
|
||
The class definition for a logical ECMD device class is contained in a text file.
|
||
The text file is made up of single lines. Empty lines and text beginning with #
|
||
(hash) are ignored. Therefore make sure not to use hashes in commands.<br>
|
||
|
||
The following commands are recognized in the device class definition:<br><br>
|
||
<ul>
|
||
<li><code>params <parameter1> [<parameter2> [<parameter3> ... ]]</code><br><br>
|
||
Declares the names of the named parameters that must be present in the
|
||
<a href="#ECMDDevicedefine">definition of the logical ECMD device</a>.
|
||
<br><br>
|
||
</li>
|
||
|
||
<li><code>set <commandname> cmd { <a href="#perl"><perl special></a> }</code>
|
||
<br><br>
|
||
Declares a new set command <code><commandname></code>.
|
||
<br><br>
|
||
</li>
|
||
|
||
<li><code>get <commandname> cmd { <a href="#perl"><perl special></a> }</code>
|
||
<br><br>
|
||
Declares a new get command <code><commandname></code>.
|
||
<br><br>
|
||
</li>
|
||
|
||
<li>
|
||
<code>set <commandname> postproc { <perl command> }</code><br>
|
||
<code>get <commandname> postproc { <perl command> }</code>
|
||
<br><br>
|
||
Declares a postprocessor for the command <code><commandname></code>.
|
||
<br><br>
|
||
</li>
|
||
|
||
|
||
<li>
|
||
<code>set <commandname> params <parameter1> [<parameter2> [<parameter3> ... ]]</code><br>
|
||
<code>get <commandname> params <parameter1> [<parameter2> [<parameter3> ... ]]</code>
|
||
<br><br>
|
||
Declares the names of the named parameters that must be present in the
|
||
set or get command <code><commandname></code></a>. Be careful not to use a parameter name that
|
||
is already used in the device definition (see <code>params</code> above).
|
||
<br><br>
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
The perl specials in the definitions of the set and get commands can
|
||
contain macros. Apart from the rules outlined in the <a
|
||
href="#perl">documentation of perl specials</a> in fhem, the following
|
||
rules apply:<br><br>
|
||
<ul>
|
||
<li>The character @ will be replaced with the device
|
||
name. To use @ in the text itself, use the double mode (@@).</li>
|
||
|
||
<li>The macro <code>%NAME</code> will expand to the device name (same
|
||
as <code>@</code>).</li>
|
||
|
||
<li>The macro <code>%<parameter></code> will expand to the
|
||
current value of the named parameter. This can be either a parameter
|
||
from the device definition or a parameter from the set or get
|
||
command.</li>
|
||
|
||
<li>The macro substitution occurs before perl evaluates the
|
||
expression. It is a plain text substitution.</li>
|
||
|
||
<li>If in doubt what happens, run the commands with loglevel 5 and
|
||
observe the log file.</li>
|
||
</ul><br><br>
|
||
|
||
<!--Neither apply the rules outlined in the <a href="#perl">documentation of perl specials</a>
|
||
for the <code><perl command></code> in the postprocessor definitions nor can it contain macros.
|
||
This is to avoid undesired side effects from e.g. doubling of semicolons.<br><br>-->
|
||
The rules outlined in the <a href="#perl">documentation of perl specials</a>
|
||
for the <code><perl command></code> in the postprocessor definitions apply.
|
||
<b>Note:</b> Beware of undesired side effects from e.g. doubling of semicolons!
|
||
|
||
The <code>perl command</code> acts on <code>$_</code>. The result of the perl command is the
|
||
final result of the get or set command.
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="ECMDDevice"></a>
|
||
<h3>ECMDDevice</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="ECMDDevicedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ECMDDevice <classname> [<parameter1> [<parameter2> [<parameter3> ... ]]]</code>
|
||
<br><br>
|
||
|
||
Defines a logical ECMD device. The number of given parameters must match those given in
|
||
the <a href="#ECMDClassdef">class definition</a> of the device class <code><classname></code>.
|
||
<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define myADC ECMDDevice ADC</code><br>
|
||
<code>define myRelais1 ECMDDevice relais 8</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="ECMDDeviceset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <commandname> [<parameter1> [<parameter2> [<parameter3> ... ]]]</code>
|
||
<br><br>
|
||
The number of given parameters must match those given for the set command <code><commandname></code> definition in
|
||
the <a href="#ECMDClassdef">class definition</a>.<br><br>
|
||
If <code>set <commandname></code> is invoked the perl special in curly brackets from the command definition
|
||
is evaluated and the result is sent to the physical ECMD device.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>set myRelais1 on</code><br>
|
||
<code>set myDisplay text This\x20text\x20has\x20blanks!</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="ECMDDeviceget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <commandname> [<parameter1> [<parameter2> [<parameter3> ... ]]]</code>
|
||
<br><br>
|
||
The number of given parameters must match those given for the get command <code><commandname></code> definition in
|
||
the <a href="#ECMDClassdef">class definition</a>.<br><br>
|
||
If <code>get <commandname></code> is invoked the perl special in curly brackets from the command definition
|
||
is evaluated and the result is sent to the physical ECMD device. The response from the physical ECMD device is returned
|
||
and the state of the logical ECMD device is updated accordingly.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>get myADC value 3</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="ECMDDeviceattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br><br>
|
||
|
||
|
||
<b>Example 1</b>
|
||
<br><br>
|
||
<ul>
|
||
The following example shows how to access the ADC of the AVR-NET-IO board from
|
||
<a href="http://www.pollin.de">Pollin</a> with
|
||
<a href="http://www.ethersex.de/index.php/ECMD">ECMD</a>-enabled
|
||
<a href="http://www.ethersex.de">Ethersex</a> firmware.<br><br>
|
||
|
||
The class definition file <code>/etc/fhem/ADC.classdef</code> looks as follows:<br><br>
|
||
<code>
|
||
get value cmd {"adc get %channel"} <br>
|
||
get value params channel<br>
|
||
</code>
|
||
<br>
|
||
In the fhem configuration file or on the fhem command line we do the following:<br><br>
|
||
<code>
|
||
define AVRNETIO ECMD telnet 192.168.0.91:2701 # define the physical device<br>
|
||
set AVRNETIO classdef ADC /etc/fhem/ADC.classdef # define the device class ADC<br>
|
||
define myADC ECDMDevice ADC # define the logical device myADC with device class ADC<br>
|
||
get myADC value 1 # retrieve the value of analog/digital converter number 1<br>
|
||
</code>
|
||
<br>
|
||
The get command is evaluated as follows: <code>get value</code> has one named parameter
|
||
<code>channel</code>. In the example the literal <code>1</code> is given and thus <code>%channel</code>
|
||
is replaced by <code>1</code> to yield <code>"adc get 1"</code> after macro substitution. Perl
|
||
evaluates this to a literal string which is send as a plain ethersex command to the AVR-NET-IO. The
|
||
board returns something like <code>024</code> for the current value of analog/digital converter number 1.
|
||
<br><br>
|
||
|
||
</ul>
|
||
|
||
|
||
<b>Example 2</b>
|
||
<br><br>
|
||
<ul>
|
||
The following example shows how to switch a relais driven by pin 3 (bit mask 0x08) of I/O port 2 on for
|
||
one second and then off again.<br><br>
|
||
|
||
The class definition file <code>/etc/fhem/relais.classdef</code> looks as follows:<br><br>
|
||
<code>
|
||
params pinmask<br>
|
||
set on cmd {"io set ddr 2 ff\nioset port 2 0%pinmask\nwait 1000\nio set port 2 00"}<br>
|
||
set on postproc {s/^OK\nOK\nOK\nOK$/success/; "$_" eq "success" ? "ok" : "error"; }<br>
|
||
</code>
|
||
<br>
|
||
In the fhem configuration file or on the fhem command line we do the following:<br><br>
|
||
<code>
|
||
define AVRNETIO ECMD telnet 192.168.0.91:2701 # define the physical device<br>
|
||
set AVRNETIO classdef relais /etc/fhem/relais.classdef # define the device class relais<br>
|
||
define myRelais ECMDDevice 8 # define the logical device myRelais with pin mask 8<br>
|
||
set myRelais on # execute the "on" command<br>
|
||
</code>
|
||
<br>
|
||
The set command is evaluated as follows: <code>%pinmask</code>
|
||
is replaced by <code>8</code> to yield
|
||
<code>"io set ddr 2 ff\nioset port 2 08\nwait 1000\nio set port 2 00"</code> after macro substitution. Perl
|
||
evaluates this to a literal string. This string is split into lines (without trailing newline characters)
|
||
<code>
|
||
<ul>
|
||
<li>io set ddr 2 ff</li>
|
||
<li>ioset port 2 08</li>
|
||
<li>wait 1000</li>
|
||
<li>io set port 2 00</li>
|
||
</ul>
|
||
</code>
|
||
These lines are sent as a plain ethersex commands to the AVR-NET-IO one by one. Each line is terminated with
|
||
a newline character unless <a href="#ECMDattr">the <code>nonl</code> attribute of the ECMDDevice</a> is set. After
|
||
each line the answer from the ECMDDevice is read back. They are concatenated with newlines and returned
|
||
for further processing, e.g. by the <code>postproc</code> command.
|
||
For any of the four plain ethersex commands, the AVR-NET-IO returns the string <code>OK</code>. They are
|
||
concatenated and separated by line breaks (\n). The postprocessor takes the result from <code>$_</code>,
|
||
substitutes it by the string <code>success</code> if it is <code>OK\nOK\nOK\nOK</code>, and then either
|
||
returns the string <code>ok</code> or the string <code>error</code>.
|
||
|
||
</ul>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
<a name="EGPM"></a>
|
||
<h3>EGPM Socket</h3>
|
||
<ul>
|
||
|
||
Defines a Socket from EGPM2LAN Module. If the global Module AUTOCREATE is enabled,
|
||
this device will be created automatically. For manual Setup, pls. see the description of <a href="#EGPM2LAN">EGPM2LAN</a>.
|
||
<br><br>
|
||
|
||
<a name="EGPMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EGPM <device> <socket-nr></code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EGPMset"></a>
|
||
<b>Set</b>
|
||
<ul><code>set <name> <[on|off|toggle]></code><br>
|
||
Switches the socket on or of.
|
||
</ul>
|
||
<ul><code>set <name> <[on-for-timer|off-for-timer|on-till|off-till|blink|intervals]></code><br>
|
||
Switches the socket for a specified time+duration or n-times. For Details see <a href="#setExtensions">set extensions</a>
|
||
</ul><br>
|
||
Example:
|
||
<ul>
|
||
<code>define lamp1 EGPM mainswitch 1</code><br>
|
||
<code>set lamp1 on</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EGPMget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="EGPMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
<a name="EGPM2LANevents"></a>
|
||
<b>Generated events</b>
|
||
<ul>
|
||
<li>EGPM <name> <[on|off]></li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="EGPM2LAN"></a>
|
||
<h3>EGPM2LAN</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="EGPM2LANdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EGPM2LAN <IP-Address> [<Password>]</code><br>
|
||
<br>
|
||
Creates a Gembird ® <a href="http://energenie.com/item.aspx?id=7557" >Energenie EG-PM2-LAN</a> device to switch up to 4 sockets over the network.
|
||
If you have more than one device, it is helpful to connect and set names for your sockets over the web-interface first.
|
||
The name settings will be adopted to FHEM and helps you to identify the sockets. Please make sure that you´re logged off from the Energenie web-interface otherwise you can´t control it with FHEM at the same time.<br>
|
||
<b>EG-PMS2-LAN with surge protector feature was not tested until now.</b>
|
||
</ul><br>
|
||
<a name="EGPM2LANset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <[on|off|toggle]> <socketnr.></code><br>
|
||
Switch the socket on or off.<br>
|
||
<br>
|
||
<code>set <name> <[on|off]> <all></code><br>
|
||
Switch all available sockets on or off.<br>
|
||
<br>
|
||
<code>set <name> <staterequest></code><br>
|
||
Update the device information and the state of all sockets.<br>
|
||
If <a href="#autocreate">autocreate</a> is enabled, an <a href="#EGPM">EGPM</a> device will be created for each socket.<br>
|
||
<br>
|
||
<code>set <name> <clearreadings></code><br>
|
||
Removes all readings from the list to get rid of old socketnames.
|
||
</ul>
|
||
<br>
|
||
<a name="EGPM2LANget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="EGPM2LANattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>stateDisplay</li>
|
||
Default: <b>socketNumer</b> changes between <b>socketNumer</b> and <b>socketName</b> in front of the current state. Call <b>set statusrequest</b> to update all states.
|
||
<li>autocreate</li>
|
||
Default: <b>on</b> <a href="#EGPM">EGPM</a>-devices will be created automatically with a <b>set</b>-command.
|
||
Change this attribute to value <b>off</b> to avoid that mechanism.
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define mainswitch EGPM2LAN 10.192.192.20 SecretGarden</code><br>
|
||
<code>set mainswitch on 1</code><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="EIB"></a>
|
||
<h3>EIB / KNX</h3>
|
||
<ul>
|
||
EIB/KNX is a standard for building automation / home automation.
|
||
It is mainly based on a twisted pair wiring, but also other mediums (ip, wireless) are specified.
|
||
|
||
While the module <a href="#TUL">TUL</a> represents the connection to the EIB network,
|
||
the EIB modules represent individual EIB devices. This module provides a basic set of operations (on, off, on-till, etc.)
|
||
to switch on/off EIB devices. Sophisticated setups can be achieved by combining a number of
|
||
EIB module instances or by sending raw hex values to the network (set <devname> raw <hexval>).
|
||
|
||
EIB/KNX defines a series of Datapoint Type as standard data types used
|
||
to allow general interpretation of values of devices manufactured by diferent companies.
|
||
This datatypes are used to interpret the status of a device, so the state in FHEM will then
|
||
show the correct value.
|
||
|
||
<br><br>
|
||
<a name="EIBdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EIB <main group> [<additional group> ..]</code>
|
||
<br><br>
|
||
|
||
Define an EIB device, connected via a <a href="#TUL">TUL</a>. The
|
||
<group> parameters are either a group name notation (0-15/0-15/0-255) or the hex representation of the value (0-f0-f0-ff).
|
||
The <main group> is used for sending of commands to the EIB network.
|
||
The state of the instance will be updated when a new state is received from the network for any of the given groups.
|
||
This is usefull for example for toggle switches where a on command is send to one group and the real state (on or off) is
|
||
responded back on a second group.
|
||
|
||
For actors and sensors the
|
||
<a href="#autocreate">autocreate</a> module may help.<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define lamp1 EIB 0/10/12</code><br>
|
||
<code>define lamp1 EIB 0/10/12 0/0/5</code><br>
|
||
<code>define lamp1 EIB 0A0C</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EIBset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <value> [<time> g<groupnr>]</code><br>
|
||
where value one of:
|
||
<li><b>on</b> switch on device</li>
|
||
<li><b>off</b> switch off device</li>
|
||
<li><b>on-for-timer</b> <secs> switch on the device for the given time. After the specified seconds a switch off command is sent.</li>
|
||
<li><b>on-till</b> <time spec> switches the device on. The device will be switched off at the given time.</li>
|
||
<li><b>raw</b> <hexvalue> sends the given value as raw data to the device.</li>
|
||
<li><b>value</b> <decimal value> transforms the value according to the chosen model and send the result to the device.</li>
|
||
|
||
<br>Example:
|
||
<ul><code>
|
||
set lamp1 on<br>
|
||
set lamp1 off<br>
|
||
set lamp1 on-for-timer 10<br>
|
||
set lamp1 on-till 13:15:00<br>
|
||
set lamp1 raw 234578<br>
|
||
set lamp1 value 23.44<br>
|
||
</code></ul>
|
||
|
||
When as last argument a g<groupnr> is present, the command will be sent
|
||
to the EIB group indexed by the groupnr (starting by 1, in the order as given in Define).
|
||
<br>Example:
|
||
<ul><code>
|
||
define lamp1 EIB 0/10/01 0/10/02<br>
|
||
set lamp1 on g2 (will send "on" to 0/10/02)
|
||
</code></ul>
|
||
|
||
A dimmer can be used with a slider as shown in following example:
|
||
<br><ul><code>
|
||
define dim1 EIB 0/0/5
|
||
attr dim1 model percent
|
||
attr dim1 webCmd value
|
||
</code></ul>
|
||
|
||
The current date and time can be sent to the bus by the following settings:
|
||
<br><ul><code>
|
||
|
||
define timedev EIB 0/0/7
|
||
attr timedev model dpt10
|
||
attr timedev eventMap /value now:now/
|
||
attr timedev webCmd now
|
||
|
||
define datedev EIB 0/0/8
|
||
attr datedev model dpt11
|
||
attr datedev eventMap /value now:now/
|
||
attr datedev webCmd now
|
||
|
||
# send every midnight the new date
|
||
define dateset at *00:00:00 set datedev value now
|
||
|
||
# send every hour the current time
|
||
define timeset at +*01:00:00 set timedev value now
|
||
</code></ul>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EIBattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#webCmd">webCmd</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a>
|
||
set the model according to the datapoint types defined by the (<a href="http://www.sti.uniurb.it/romanell/110504-Lez10a-KNX-Datapoint%20Types%20v1.5.00%20AS.pdf" target="_blank">EIB / KNX specifications</a>).<br>
|
||
The device state in FHEM is interpreted and shown according to the specification.
|
||
<ul>
|
||
<li>dpt5</li>
|
||
<li>dpt5.003</li>
|
||
<li>angle</li>
|
||
<li>percent</li>
|
||
<li>dpt5.004</li>
|
||
<li>percent255</li>
|
||
<li>dpt7</li>
|
||
<li>length-mm</li>
|
||
<li>current-mA</li>
|
||
<li>brightness</li>
|
||
<li>timeperiod-ms</li>
|
||
<li>timeperiod-min</li>
|
||
<li>timeperiod-h</li>
|
||
<li>dpt9</li>
|
||
<li>tempsensor</li>
|
||
<li>lightsensor</li>
|
||
<li>speedsensor</li>
|
||
<li>speedsensor-km/h</li>
|
||
<li>pressuresensor</li>
|
||
<li>rainsensor</li>
|
||
<li>time1sensor</li>
|
||
<li>time2sensor</li>
|
||
<li>humiditysensor</li>
|
||
<li>airqualitysensor</li>
|
||
<li>voltage-mV</li>
|
||
<li>current-mA2</li>
|
||
<li>current-mA2</li>
|
||
<li>power</li>
|
||
<li>powerdensity</li>
|
||
<li>dpt10</li>
|
||
<li>time</li>
|
||
<li>dpt11</li>
|
||
<li>date</li>
|
||
<li>dpt12</li>
|
||
<li>dpt14</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="EM"></a>
|
||
<h3>EM</h3>
|
||
<ul>
|
||
<a name="EMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EM <em1010pc-device></code>
|
||
<br><br>
|
||
|
||
Define a EM1010PC USB device. As the EM1010PC was not designed to be used
|
||
with a PC attached to it all the time, it won't transmit received signals
|
||
automatically, fhem has to poll it every 5 minutes.<br>
|
||
|
||
Currently there is no way to read the internal log of the EM1010PC with
|
||
fhem, use the program em1010.pl in the contrib directory for this
|
||
purpose.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define em EM /dev/elv_em1010pc</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set EM <value></code>
|
||
<br><br>
|
||
where <code>value</code> is either time or reset.<br>
|
||
If time has arguments of the form YYYY-MM-DD HH:MM:SS, then the specified
|
||
time will be set, else the time from the host.<br>
|
||
Note: after reset you should set the time.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get EM <value></code>
|
||
<br><br>
|
||
where <code>value</code> is either version or time.
|
||
</ul>
|
||
|
||
<a name="EMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (em1010pc)</li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="EMEM"></a>
|
||
<h3>EMEM</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="EMEMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EMEM <device-number></code>
|
||
<br><br>
|
||
|
||
Define up to 4 EM1000EM attached to the EM1010PC. The device number must
|
||
be between 5 and 8.
|
||
Defining an EMEM will schedule an internal task, which reads the
|
||
status of the device every 5 minutes, and triggers notify/filelog commands.
|
||
<br>Note: Currently this device does not support a "set" function.
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define emem EMEM 5</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
|
||
<a name="EMEMget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get EMEM status</code>
|
||
<br><br>
|
||
This is the same command which is scheduled every 5 minutes internally.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMEMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (EM1000EM)</li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="EMGZ"></a>
|
||
<h3>EMGZ</h3>
|
||
<ul>
|
||
<a name="EMGZdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EMGZ <device-number></code>
|
||
<br><br>
|
||
|
||
Define up to 4 EM1000GZ attached to the EM1010PC. The device number must
|
||
be between 9 and 12.
|
||
Defining an EMGZ will schedule an internal task, which reads the
|
||
status of the device every 5 minutes, and triggers notify/filelog commands.
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define emgz EMGZ 9</code><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="EMGZset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set EMGZdevice <param> <value></code><br><br>
|
||
where param is:
|
||
<ul>
|
||
<li>price<br>
|
||
The price of one KW in EURO (use e.g. 0.20 for 20 Cents). It is used
|
||
only on the EM1010PC display, it is of no interest for FHEM.</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMGZget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get EMGZ status</code>
|
||
<br><br>
|
||
This is the same command which is scheduled every 5 minutes internally.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMGZattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (EM1000GZ)</li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="EMWZ"></a>
|
||
<h3>EMWZ</h3>
|
||
<ul>
|
||
<a name="EMWZdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EMWZ <device-number></code>
|
||
<br><br>
|
||
|
||
Define up to 4 EM1000WZ attached to the EM1010PC. The device number must
|
||
be between 1 and 4. Defining an EMWZ will schedule an internal task, which
|
||
reads the status of the device every 5 minutes, and triggers notify/filelog
|
||
commands. <br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define emwz EMWZ 1</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMWZset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set EMWZdevice <param> <value></code><br><br>
|
||
where param is one of:
|
||
<ul>
|
||
<li>rperkw<br>
|
||
Number of rotations for a KiloWatt of the EM1000WZ device (actually
|
||
of the device where the EM1000WZ is attached to). Without setting
|
||
this correctly, all other readings will be incorrect.</li>
|
||
<li>alarm<br>
|
||
Alarm in WATT. if you forget to set it, the default value is
|
||
rediculously low (random), and if a value above this threshold is
|
||
received, the EM1010PC will start beeping once every minute. It can
|
||
be very annoying.</li>
|
||
<li>price<br>
|
||
The price of one KW in EURO (use e.g. 0.20 for 20 Cents). It is used
|
||
only on the EM1010PC display, it is of no interest for FHEM.</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="EMWZget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get EMWZ status</code>
|
||
<br><br>
|
||
This is the same command which is scheduled every 5 minutes internally.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EMWZattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (EM1000WZ)</li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="ENECSYSGW"></a>
|
||
<h3>ENECSYSGW</h3>
|
||
<ul>
|
||
Module to access the ENECSYS gateway (http://www.ENECSYS.com/products/gateway/).<br /><br />
|
||
|
||
The actual micro-inverter devices are defined as <a href="#ENECSYSINV">ENECSYSINV</a> devices.
|
||
|
||
<br /><br />
|
||
All newly found inverter devices are autocreated and added to the room ENECSYSINV.
|
||
|
||
|
||
<br /><br />
|
||
<a name="ENECSYSGW_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ENECSYSGW [<host>] [<interval>]</code><br />
|
||
<br />
|
||
|
||
Defines an ENECSYSGW device with address <host>.<br /><br />
|
||
|
||
The gateway will be polled every <interval> seconds. The default is 10 and minimum is 5.<br /><br />
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define gateway ENECSYSGW 10.0.1.1</code><br />
|
||
</ul>
|
||
</ul><br />
|
||
</ul><br />
|
||
|
||
<a name="ENECSYSINV"></a>
|
||
<h3>ENECSYSINV</h3>
|
||
<ul>
|
||
<br />
|
||
<a name="ENECSYSINV_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ENECSYSINV <id> [<interval>]</code><br />
|
||
<br />
|
||
|
||
Defines an micro-inverter device connected to an <a href="#ENECSYSGW">ENECSYSGW</a>.<br /><br />
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define SolarPanel1 ENECSYSINV 100123456</code><br />
|
||
</ul>
|
||
</ul><br />
|
||
|
||
<a name="ENECSYSINV_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>acfrequency<br />
|
||
the alternating current frequency reported from the device. Should be around 50 Hz in Europe.</li>
|
||
<li>acpower<br />
|
||
the alternating current power</li>
|
||
<li>acvolt<br />
|
||
the alternating current voltage</li>
|
||
<li>dccurrent<br />
|
||
the direct current</li>
|
||
<li>dcpower<br />
|
||
the direct current power</li>
|
||
<li>dcvolt<br />
|
||
the direct current voltage</li>
|
||
<li>efficiency<br />
|
||
the efficiency of the inverter</li>
|
||
<li>lifetime<br />
|
||
the sum of collected energy of the inverter</li>
|
||
<li>temperature<br />
|
||
the temperature of the inverter</li>
|
||
<li>state<br />
|
||
the current state (equal to dcpower) </li>
|
||
</ul><br />
|
||
|
||
|
||
</ul><br />
|
||
|
||
<p>
|
||
<a name="ENIGMA2" id="ENIGMA2"></a>
|
||
</p>
|
||
<h3>
|
||
ENIGMA2
|
||
</h3>
|
||
<div style="margin-left: 2em">
|
||
<a name="ENIGMA2define" id="ENIGMA2define"></a> <b>Define</b>
|
||
<div style="margin-left: 2em">
|
||
<code>define <name> ENIGMA2 <ip-address-or-hostname> [<port>] [<poll-interval>] [<http-user>] [<http-password>]</code><br>
|
||
<br>
|
||
This module controls ENIGMA2 based devices like Dreambox or VUplus via network connection.<br>
|
||
<br>
|
||
Defining an ENIGMA2 device will schedule an internal task (interval can be set with optional parameter <poll-interval> in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
|
||
<br>
|
||
Example:<br>
|
||
<div style="margin-left: 2em">
|
||
<code>define SATReceiver ENIGMA2 192.168.0.10<br>
|
||
<br>
|
||
# With custom port<br>
|
||
define SATReceiver ENIGMA2 192.168.0.10 8080<br>
|
||
<br>
|
||
# With custom interval of 20 seconds<br>
|
||
define SATReceiver ENIGMA2 192.168.0.10 80 20<br>
|
||
<br>
|
||
# With HTTP user credentials<br>
|
||
define SATReceiver ENIGMA2 192.168.0.10 80 20 root secret</code>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="ENIGMA2set" id="ENIGMA2set"></a> <b>Set</b>
|
||
<div style="margin-left: 2em">
|
||
<code>set <name> <command> [<parameter>]</code><br>
|
||
<br>
|
||
Currently, the following commands are defined.<br>
|
||
<ul>
|
||
<li>
|
||
<b>on</b> - powers on the device and send a WoL magic package if needed
|
||
</li>
|
||
<li>
|
||
<b>off</b> - turns the device in standby mode
|
||
</li>
|
||
<li>
|
||
<b>toggle</b> - switch between on and off
|
||
</li>
|
||
<li>
|
||
<b>shutdown</b> - turns the device in deepstandby mode
|
||
</li>
|
||
<li>
|
||
<b>reboot</b> - reboots the device
|
||
</li>
|
||
<li>
|
||
<b>restartGui</b> - restarts the GUI / ENIGMA2 process
|
||
</li>
|
||
<li>
|
||
<b>channel</b> channel,0...999,sRef - zap to specific channel or service reference
|
||
</li>
|
||
<li>
|
||
<b>channelUp</b> - zap to next channel
|
||
</li>
|
||
<li>
|
||
<b>channelDown</b> - zap to previous channel
|
||
</li>
|
||
<li>
|
||
<b>volume</b> 0...100 - set the volume level in percentage
|
||
</li>
|
||
<li>
|
||
<b>volumeUp</b> - increases the volume level
|
||
</li>
|
||
<li>
|
||
<b>volumeDown</b> - decreases the volume level
|
||
</li>
|
||
<li>
|
||
<b>mute</b> on,off,toggle - controls volume mute
|
||
</li>
|
||
<li>
|
||
<b>play</b> on,off - starts/resumes playback
|
||
</li>
|
||
<li>
|
||
<b>pause</b> on,off - pauses current playback or enables timeshift
|
||
</li>
|
||
<li>
|
||
<b>stop</b> on,off - stops current playback
|
||
</li>
|
||
<li>
|
||
<b>input</b> tv,radio - switches between tv and radio mode
|
||
</li>
|
||
<li>
|
||
<b>statusRequest</b> - requests the current status of the device
|
||
</li>
|
||
<li>
|
||
<b>remoteControl</b> UP,DOWN,... - sends remote control commands; see remoteControl help
|
||
</li>
|
||
<li>
|
||
<b>showText</b> text - sends info message to screen to be displayed for 8 seconds
|
||
</li>
|
||
<li>
|
||
<b>msg</b> yesno,info... - allows more complex messages as showText, see commands as listed below
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Messaging</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
showText has predefined settings. If you would like to send more individual messages to your TV screen, the function msg can be used. For this application the following commands are available:<br>
|
||
<br>
|
||
<u>Type Selection:</u><br>
|
||
<div style="margin-left: 2em">
|
||
<code>msg yesno<br>
|
||
msg info<br>
|
||
msg message<br>
|
||
msg attention<br></code>
|
||
</div><br>
|
||
<br>
|
||
The following parameter are essentially needed after type specification:
|
||
<div style="margin-left: 2em">
|
||
<code>msg <TYPE> <TIMEOUT> <YOUR MESSAGETEXT><br></code>
|
||
</div>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="ENIGMA2get" id="ENIGMA2get"></a> <b>Get</b>
|
||
<div style="margin-left: 2em">
|
||
<code>get <name> <what></code><br>
|
||
<br>
|
||
Currently, the following commands are defined:<br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<code>channel<br>
|
||
currentMedia<br>
|
||
currentTitle<br>
|
||
mute<br>
|
||
nextTitle<br>
|
||
power<br>
|
||
providername<br>
|
||
servicevideosize<br>
|
||
input<br>
|
||
streamUrl<br>
|
||
volume<br></code>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="ENIGMA2attr" id="ENIGMA2attr"></a> <b>Attributes</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>bouquet-tv</b> - service reference address where the favorite television bouquet can be found (initially set automatically during define)
|
||
</li>
|
||
<li>
|
||
<b>bouquet-radio</b> - service reference address where the favorite radio bouquet can be found (initially set automatically during define)
|
||
</li>
|
||
<li>
|
||
<b>disable</b> - Disable polling (true/false)
|
||
</li>
|
||
<li>
|
||
<b>http-method</b> - HTTP access method to be used; e.g. a FritzBox might need to use POST instead of GET (GET/POST)
|
||
</li>
|
||
<li>
|
||
<b>https</b> - Access box via secure HTTP (true/false)
|
||
</li>
|
||
<li>
|
||
<b>timeout</b> - Set different polling timeout in seconds (default=6)
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>acg</b> - Shows Automatic Gain Control value in percent; reflects overall signal quality strength
|
||
</li>
|
||
<li>
|
||
<b>apid</b> - Shows the audio process ID for current channel
|
||
</li>
|
||
<li>
|
||
<b>ber</b> - Shows Bit Error Rate for current channel
|
||
</li>
|
||
<li>
|
||
<b>channel</b> - Shows the service name of current channel or media file name; part of FHEM-4-AV-Devices compatibility
|
||
</li>
|
||
<li>
|
||
<b>currentMedia</b> - The service reference ID of current channel; part of FHEM-4-AV-Devices compatibility
|
||
</li>
|
||
<li>
|
||
<b>currentTitle</b> - Shows the title of the running event; part of FHEM-4-AV-Devices compatibility
|
||
</li>
|
||
<li>
|
||
<b>enigmaversion</b> - Shows the installed version of ENIGMA2
|
||
</li>
|
||
<li>
|
||
<b>eventcurrenttime</b> - Shows the current time of running event as UNIX timestamp
|
||
</li>
|
||
<li>
|
||
<b>eventcurrenttime_hr</b> - Shows the current time of running event in human-readable format
|
||
</li>
|
||
<li>
|
||
<b>eventcurrenttime_next</b> - Shows the current time of next event as UNIX timestamp
|
||
</li>
|
||
<li>
|
||
<b>eventcurrenttime_next_hr</b> - Shows the current time of next event in human-readable format
|
||
</li>
|
||
<li>
|
||
<b>eventdescription</b> - Shows the description of running event
|
||
</li>
|
||
<li>
|
||
<b>eventdescription_next</b> - Shows the description of next event
|
||
</li>
|
||
<li>
|
||
<b>evenduration</b> - Shows the total duration time of running event in seconds
|
||
</li>
|
||
<li>
|
||
<b>evenduration_hr</b> - Shows the total duration time of running event in human-readable format
|
||
</li>
|
||
<li>
|
||
<b>evenduration_next</b> - Shows the total duration time of next event in seconds
|
||
</li>
|
||
<li>
|
||
<b>evenduration_next_hr</b> - Shows the total duration time of next event in human-readable format
|
||
</li>
|
||
<li>
|
||
<b>eventname</b> - Shows the name of running event
|
||
</li>
|
||
<li>
|
||
<b>eventname_next</b> - Shows the name of next event
|
||
</li>
|
||
<li>
|
||
<b>eventremaining</b> - Shows the remaining duration time of running event in seconds
|
||
</li>
|
||
<li>
|
||
<b>eventremaining_hr</b> - Shows the remaining duration time of running event in human-readable format
|
||
</li>
|
||
<li>
|
||
<b>eventremaining_next</b> - Shows the remaining duration time of next event in seconds
|
||
</li>
|
||
<li>
|
||
<b>eventremaining_next_hr</b> - Shows the remaining duration time of next event in human-readable format
|
||
</li>
|
||
<li>
|
||
<b>eventstart</b> - Shows the starting time of running event as UNIX timestamp
|
||
</li>
|
||
<li>
|
||
<b>eventstart_hr</b> - Shows the starting time of running event in human readable format
|
||
</li>
|
||
<li>
|
||
<b>eventstart_next</b> - Shows the starting time of next event as UNIX timestamp
|
||
</li>
|
||
<li>
|
||
<b>eventstart_next_hr</b> - Shows the starting time of next event in human readable format
|
||
</li>
|
||
<li>
|
||
<b>eventtitle</b> - Shows the title of the running event
|
||
</li>
|
||
<li>
|
||
<b>eventtitle_next</b> - Shows the title of the next event
|
||
</li>
|
||
<li>
|
||
<b>fpversion</b> - Shows the firmware version for the front processor
|
||
</li>
|
||
<li>
|
||
<b>hddX_capacity</b> - Shows the total capacity of the installed hard drive in GB
|
||
</li>
|
||
<li>
|
||
<b>hddX_free</b> - Shows the free capacity of the installed hard drive in GB
|
||
</li>
|
||
<li>
|
||
<b>hddX_model</b> - Shows hardware details for the installed hard drive
|
||
</li>
|
||
<li>
|
||
<b>imageversion</b> - Shows the version for the installed software image
|
||
</li>
|
||
<li>
|
||
<b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
|
||
</li>
|
||
<li>
|
||
<b>iswidescreen</b> - Indicates widescreen format - 0=off 1=on
|
||
</li>
|
||
<li>
|
||
<b>lanmac</b> - Shows the device MAC address
|
||
</li>
|
||
<li>
|
||
<b>model</b> - Shows details about the device hardware
|
||
</li>
|
||
<li>
|
||
<b>mute</b> - Reports the mute status of the device (can be "on" or "off")
|
||
</li>
|
||
<li>
|
||
<b>nextTitle</b> - Shows the title of the next event; part of FHEM-4-AV-Devices compatibility
|
||
</li>
|
||
<li>
|
||
<b>onid</b> - The ON ID
|
||
</li>
|
||
<li>
|
||
<b>pcrpid</b> - The PCR process ID
|
||
</li>
|
||
<li>
|
||
<b>pmtpid</b> - The PMT process ID
|
||
</li>
|
||
<li>
|
||
<b>power</b> - Reports the power status of the device (can be "on" or "off")
|
||
</li>
|
||
<li>
|
||
<b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is basically limited to turn it on again. This will only work if the device supports Wake-On-LAN packages, otherwise command "on" will have no effect.
|
||
</li>
|
||
<li>
|
||
<b>providername</b> - Service provider of current channel
|
||
</li>
|
||
<li>
|
||
<b>recordings</b> - Number of active recordings
|
||
</li>
|
||
<li>
|
||
<b>servicename</b> - Name for current channel
|
||
</li>
|
||
<li>
|
||
<b>servicereference</b> - The service reference ID of current channel
|
||
</li>
|
||
<li>
|
||
<b>servicevideosize</b> - Video resolution for current channel
|
||
</li>
|
||
<li>
|
||
<b>sid</b> - The S-ID
|
||
</li>
|
||
<li>
|
||
<b>snr</b> - Shows Signal to Noise for current channel in percent
|
||
</li>
|
||
<li>
|
||
<b>snrdb</b> - Shows Signal to Noise in dB
|
||
</li>
|
||
<li>
|
||
<b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")
|
||
</li>
|
||
<li>
|
||
<b>tsid</b> - The TS ID
|
||
</li>
|
||
<li>
|
||
<b>tuner_X</b> - Details about the used tuner hardware
|
||
</li>
|
||
<li>
|
||
<b>txtpid</b> - The TXT process ID
|
||
</li>
|
||
<li>
|
||
<b>videoheight</b> - Height of the video resolution for current channel
|
||
</li>
|
||
<li>
|
||
<b>videowidth</b> - Width of the video resolution for current channel
|
||
</li>
|
||
<li>
|
||
<b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
|
||
</li>
|
||
<li>
|
||
<b>vpid</b> - The Video process ID
|
||
</li>
|
||
<li>
|
||
<b>webifversion</b> - Type and version of the used web interface
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<a name="ESA2000"></a>
|
||
<h3>ESA2000</h3>
|
||
<ul>
|
||
The ESA2000 module interprets ESA1000 or ESA2000 type of messages received by the CUL.
|
||
<br><br>
|
||
|
||
<a name="ESA2000define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ESA2000 <code>
|
||
[base1 base2]</code> <br>
|
||
<br>
|
||
<code> is the 4 digit HEX code identifying the devices.<br><br>
|
||
|
||
<b>base1/2</b> is added to the total kwh as a base (Hoch- und Niedertarifzählerstand).
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ESA2000set"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="ESA2000get"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="ESA2000attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#model">model</a> (esa2000-led, esa2000-wz, esa2000-s0, esa1000wz-ir, esa1000wz-s0, esa1000wz-led, esa1000gas)</li><br>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="EnOcean"></a>
|
||
<h3>EnOcean</h3>
|
||
<ul>
|
||
EnOcean devices are sold by numerous hardware vendors (e.g. Eltako, Peha, etc),
|
||
using the RF Protocol provided by the EnOcean Alliance. Depending on the
|
||
function of the device an specific device profile is used, called EnOcean
|
||
Equipment Profile (EEP). Basically three profiles will be differed, e. g.
|
||
switches, contacts, sensors. Some manufacturers use additional proprietary
|
||
extensions. Further technical information can be found at the
|
||
<a href="http://www.enocean-alliance.org/de/enocean_standard/">EnOcean Alliance</a>,
|
||
see in particular the
|
||
<a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>
|
||
<br><br>
|
||
Fhem recognizes a number of devices automatically. In order to teach-in, for
|
||
some devices the sending of confirmation telegrams has to be turned on.
|
||
Some equipment types and/or device models must be manually specified.
|
||
Do so using the <a href="#EnOceanattr">attributes</a>
|
||
<a href="#subType">subType</a> and <a href="#model">model</a>, see chapter
|
||
<a href="#EnOceanset">Set</a> and
|
||
<a href="#EnOceanevents">Generated events</a>. With the help of additional
|
||
<a href="#EnOceanattr">attributes</a>, the behavior of the devices can be
|
||
changed separately.
|
||
<br><br>
|
||
The teach-in procedure depends on the type of the devices. Switches (EEP RPS)
|
||
and contacts (EEP 1BS) are recognized when receiving the first message.
|
||
Contacts can also send a teach-in telegram. Fhem not need this telegram.
|
||
Sensors (EEP 4BS) has to send a teach-in telegram. The profile-less
|
||
4BS teach-in procedure transfers no EEP profile identifier and no manufacturer
|
||
ID. In this case Fhem does not recognize the device automatically. The proper
|
||
device type must be set manually, use the <a href="#EnOceanattr">attributes</a>
|
||
<a href="#subType">subType</a>, <a href="#manufID">manufID</a> and/or
|
||
<a href="#model">model</a>. If the EEP profile identifier and the manufacturer
|
||
ID are sent the device is clearly identifiable. Fhem automatically assigns
|
||
these devices to the correct profile. Some 4BS, VLD or MSC devices must be paired
|
||
bidirectional, see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.<br><br>
|
||
Fhem supports many of most common EnOcean profiles and manufacturer-specific
|
||
devices. Additional profiles and devices can be added if required.
|
||
<br><br>
|
||
In order to enable communication with EnOcean remote stations a
|
||
<a href="#TCM">TCM</a> module is necessary.
|
||
<br><br>
|
||
Please note that EnOcean repeaters also send Fhem data telegrams again.
|
||
Use the TCM <code>attr <name> <a href="#blockSenderID">blockSenderID</a> own</code>
|
||
to block receiving telegrams with a TCM SenderIDs.
|
||
<br><br>
|
||
|
||
<a name="EnOceandefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> EnOcean <def></code>
|
||
<br><br>
|
||
|
||
Define an EnOcean device, connected via a <a href="#TCM">TCM</a> modul. The
|
||
<def> is the SenderID/DestinationID of the device (8 digit hex number).
|
||
The <a href="#autocreate">autocreate</a> module may help you.<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define switch1 EnOcean ffc54500</code><br>
|
||
</ul><br>
|
||
In order to control devices, you cannot reuse the SenderIDs/
|
||
DestinationID of other devices (like remotes), instead you have to create
|
||
your own, which must be in the allowed SenderID range of the underlying Fhem
|
||
IO device, see <a href="#TCM">TCM</a> BaseID, LastID. For this first query the
|
||
<a href="#TCM">TCM</a> with the <code>get <tcm> baseID</code> command
|
||
for the BaseID. You can use up to 127 IDs starting with the BaseID + 1 shown there.
|
||
The BaseID is used for 4BS devices with a bidectional teach-in only. If you
|
||
are using an Fhem SenderID outside of the allowed range, you will see an
|
||
ERR_ID_RANGE message in the Fhem log.<br>
|
||
Fhem communicates unicast with the ChipID or BaseID, if the 4BS devices are teached-in with the
|
||
<a href="#EnOcean_teach-in"> Bidirectional Teach-In / Teach-Out</a> procedure. In this case
|
||
Fhem send telegrams with its SenderID (ChipID or BaseID) and the DestinationID of the
|
||
device.<br>
|
||
Newer devices send acknowledge telegrams. In order to control this devices (switches, actors) with
|
||
additional SenderIDs you can use the attributes <a href="#subDef">subDef</a>,
|
||
<a href="#subDef0">subDef0</a> and <a href="#subDefI">subDefI</a>.<br><br>
|
||
</ul>
|
||
|
||
<a name="EnOceaninternals"></a>
|
||
<b>Internals</b>
|
||
<ul>
|
||
<li><IODev>_DestinationID: 0000000 ... FFFFFFFF<br>
|
||
Received destination address, Broadcast radio: FFFFFFFF<br>
|
||
</li>
|
||
<li><IODev>_RSSI: LP/dBm<br>
|
||
Received signal strength indication (best value of all received subtelegrams)<br>
|
||
</li>
|
||
<li><IODev>_ReceivingQuality: excellent|good|bad<br>
|
||
excellent: RSSI >= -76 dBm (internal standard antenna sufficiently)<br>
|
||
good: RSSI < -76 dBm and RSSI >= -87 dBm (good antenna necessary)<br>
|
||
bad: RSSI < -87 dBm (repeater required)<br>
|
||
</li>
|
||
<li><IODev>_RepeatingCounter: 0...2<br>
|
||
Number of forwardings by repeaters<br>
|
||
</li>
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="EnOceanset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><a name="EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>
|
||
<ul>
|
||
<code>set <name> teach <t/s></code>
|
||
<br><br>
|
||
Set the EnOcean Transceiver module (TCM Modul) in the pairing mode.
|
||
A device, which is then also put in this state is to paired with
|
||
Fhem. Pearing is used for some 4BS, VLD and MSC devices,
|
||
e. g. EEP 4BS, RORG A5-20-01 (Battery Powered Actuator).<br>
|
||
Bidirectional 4BS Teach-In and UTE - Universal Uni- and Bidirectional
|
||
Teach-In are supported.
|
||
<br>
|
||
<code>name</code> is the name of the TCM Module . <code>t/s</code> is the
|
||
time for the teach-in period.
|
||
<br><br>
|
||
Example:
|
||
<ul><code>set TCM_0 teach 600</code>
|
||
<br><br>
|
||
</ul>
|
||
</ul>
|
||
</li>
|
||
|
||
<li>Switch, Pushbutton Switch, Bidirectional Actor (EEP F6-02-01 ... F6-03-02)<br>
|
||
[Default subType]
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of A0, AI, B0, BI, C0, CI, D0, DI,
|
||
combinations of these and released. First and second action can be sent
|
||
simultaneously. Separate first and second action with a comma.<br>
|
||
In fact we are trying to emulate a PT200 type remote.<br>
|
||
If you define an <a href="#eventMap">eventMap</a> attribute with on/off,
|
||
then you will be able to easily set the device from the <a
|
||
href="#FHEMWEB">WEB</a> frontend.<br>
|
||
<a href="#setExtensions">set extensions</a> are supported, if the corresponding
|
||
<a href="#eventMap">eventMap</a> specifies the <code>on</code> and <code>off</code>
|
||
mappings.<br>
|
||
With the help of additional <a href="#EnOceanattr">attributes</a>, the
|
||
behavior of the devices can be adapt.
|
||
<br><br>
|
||
Example:
|
||
<ul><code>
|
||
set switch1 BI<br>
|
||
set switch1 B0,CI<br>
|
||
attr eventMap BI:on B0:off<br>
|
||
set switch1 on<br>
|
||
</code></ul><br>
|
||
</ul>
|
||
</li>
|
||
|
||
<li>Staircase off-delay timer (EEP F6-02-01 ... F6-02-02)<br>
|
||
[Eltako FTN14, tested with Eltako FTN14 only]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>on<br>
|
||
issue switch on command</li>
|
||
<li>released<br>
|
||
start timer</li>
|
||
</ul><br>
|
||
Set attr eventMap to B0:on BI:off, attr subType to switch, attr
|
||
webCmd to on:released and if needed attr switchMode to pushbutton manually.<br>
|
||
Use the sensor type "Schalter" for Eltako devices. The Staircase
|
||
off-delay timer is switched on when pressing "on" and the time will be started
|
||
when pressing "released". "released" immediately after "on" is sent if
|
||
the attr switchMode is set to "pushbutton".
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Single Input Contact, Door/Window Contact<br>
|
||
1BS Telegram (EEP D5-00-01)<br>
|
||
[tested with Eltako FSR14]
|
||
<ul>
|
||
<li>closed<br>
|
||
issue closed command</li>
|
||
<li>open<br>
|
||
issue open command</li>
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
</ul></li>
|
||
The attr subType must be contact. The attribute must be set manually.
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-02)<br>
|
||
[Thermokon SR04 PTS]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in</li>
|
||
<li>setpoint [0 ... 255]<br>
|
||
Set the actuator to the specifed setpoint.</li>
|
||
<li>setpointScaled [<floating-point number>]<br>
|
||
Set the actuator to the scaled setpoint.</li>
|
||
<li>fanStage [auto|0|1|2|3]<br>
|
||
Set fan stage</li>
|
||
<li>switch [on|off]<br>
|
||
Set switch</li>
|
||
</ul><br>
|
||
The actual temperature will be taken from the temperature reported by
|
||
a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
|
||
primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
|
||
The scaling of the setpoint adjustment is device- and vendor-specific. Set the
|
||
attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
|
||
<a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
|
||
setpointScaled.<br>
|
||
The attr subType must be roomSensorControl.05. The attribute must be set manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (A5-10-06 plus night reduction)<br>
|
||
[Eltako FVS]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in</li>
|
||
<li>desired-temp [t/°C [lock|unlock]]<br>
|
||
Set the desired temperature.</li>
|
||
<li>nightReduction [t/K [lock|unlock]]<br>
|
||
Set night reduction</li>
|
||
<li>setpointTemp [t/°C [lock|unlock]]<br>
|
||
Set the desired temperature</li>
|
||
</ul><br>
|
||
The actual temperature will be taken from the temperature reported by
|
||
a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
|
||
primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
|
||
This profil can be used with a further Room Sensor and Control Unit Eltako FTR55*
|
||
to control a heating/cooling relay FHK12, FHK14 or FHK61. If Fhem and FTR55*
|
||
is teached in, the temperature control of the FTR55* can be either blocked
|
||
or to a setpoint deviation of +/- 3 K be limited. For this use the optional parameter
|
||
[block] = lock|unlock, unlock is default.<br>
|
||
The attr subType must be roomSensorControl.05 and attr manufID must be 00D.
|
||
The attributes must be set manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Battery Powered Actuator (EEP A5-20-01)<br>
|
||
[Kieback&Peter MD15-FTL-xx]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>actuator setpoint/%<br>
|
||
Set the actuator to the specifed setpoint (0-100)</li>
|
||
<li>desired-temp <value><br>
|
||
Use the builtin PI regulator, and set the desired temperature to the
|
||
specified degree. The actual value will be taken from the temperature
|
||
reported by the MD15 or from the attribute actualTemp if it is set.</li>
|
||
<li>runInit<br>
|
||
Maintenance Mode (service on): Run init sequence.</li>
|
||
<li>liftSet<br>
|
||
Maintenance Mode (service on): Lift set</li>
|
||
<li>valveOpen<br>
|
||
Maintenance Mode (service on): Valve open</li>
|
||
<li>valveClosed<br>
|
||
Maintenance Mode (service on): Valve closed</li>
|
||
<li>unattended<br>
|
||
Do not regulate the actuator.</li>
|
||
</ul><br>
|
||
The attr subType must be hvac.01. This is done if the device was
|
||
created by autocreate. To control the device, it must be bidirectional paired,
|
||
see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.<br>
|
||
The command is not sent until the device wakes up and sends a mesage, usually
|
||
every 10 minutes.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li><a name="Gateway">Gateway</a> (EEP A5-38-08)<br>
|
||
The Gateway profile include 7 different commands (Switching, Dimming,
|
||
Setpoint Shift, Basic Setpoint, Control variable, Fan stage, Blind Central Command).
|
||
The commands can be selected by the attribute gwCmd or command line. The attribute
|
||
entry has priority.<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li><gwCmd> <cmd> [subCmd]<br>
|
||
initiate Gateway commands by command line</li>
|
||
<li><cmd> [subCmd]<br>
|
||
initiate Gateway commands if attribute gwCmd is set.</li>
|
||
</ul><br>
|
||
The attr subType must be gateway. Attribute gwCmd can also be set to
|
||
switching|dimming|setpointShift|setpointBasic|controlVar|fanStage|blindCmd.<br>
|
||
This is done if the device was created by autocreate.<br>
|
||
For Eltako devices attributes must be set manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Switching<br>
|
||
[Eltako FLC61, FSA12, FSR14]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>on [lock|unlock]<br>
|
||
issue switch on command</li>
|
||
<li>off [lock|unlock]<br>
|
||
issue switch off command</li>
|
||
<li><a href="#setExtensions">set extensions</a> are supported.</li>
|
||
</ul><br>
|
||
The attr subType must be gateway and gwCmd must be switching. This is done if the device was
|
||
created by autocreate.<br>
|
||
For Eltako devices attributes must be set manually. For Eltako FSA12 attribute model must be set
|
||
to FSA12.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Dimming<br>
|
||
[Eltako FUD12, FUD14, FUD61, FUD70, FSG14, ...]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>on [lock|unlock]<br>
|
||
issue switch on command</li>
|
||
<li>off [lock|unlock]<br>
|
||
issue switch off command</li>
|
||
<li>dim dim/% [rampTime/s [lock|unlock]]<br>
|
||
issue dim command</li>
|
||
<li>dimup dim/% [rampTime/s [lock|unlock]]<br>
|
||
issue dim command</li>
|
||
<li>dimdown dim/% [rampTime/s [lock|unlock]]<br>
|
||
issue dim command</li>
|
||
<li><a href="#setExtensions">set extensions</a> are supported.</li>
|
||
</ul><br>
|
||
rampTime Range: t = 1 s ... 255 s or 0 if no time specified,
|
||
for Eltako: t = 1 = fast dimming ... 255 = slow dimming or 0 = dimming speed on the dimmer used<br>
|
||
The attr subType must be gateway and gwCmd must be dimming. This is done if the device was
|
||
created by autocreate.<br>
|
||
For Eltako devices attributes must be set manually. Use the sensor type "PC/FVS" for Eltako devices.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Dimming of fluorescent lamps<br>
|
||
[Eltako FSG70, tested with Eltako FSG70 only]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>on<br>
|
||
issue switch on command</li>
|
||
<li>off<br>
|
||
issue switch off command</li>
|
||
<li><a href="#setExtensions">set extensions</a> are supported.</li>
|
||
</ul><br>
|
||
The attr subType must be gateway and gwCmd must be dimming. Set attr eventMap to B0:on BI:off,
|
||
attr subTypeSet to switch and attr switchMode to pushbutton manually.<br>
|
||
Use the sensor type "Richtungstaster" for Eltako devices.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Setpoint shift<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>shift 1/K <br>
|
||
issue Setpoint shift</li>
|
||
</ul><br>
|
||
Shift Range: T = -12.7 K ... 12.8 K<br>
|
||
The attr subType must be gateway and gwCmd must be setpointShift.
|
||
This is done if the device was created by autocreate.<br>
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Basic Setpoint<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>basic t/°C<br>
|
||
issue Basic Setpoint</li>
|
||
</ul><br>
|
||
Setpoint Range: t = 0 °C ... 51.2 °C<br>
|
||
The attr subType must be gateway and gwCmd must be setpointBasic.
|
||
This is done if the device was created by autocreate.<br>
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Control variable<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>presence present|absent|standby<br>
|
||
issue Room occupancy</li>
|
||
<li>energyHoldOff normal|holdoff<br>
|
||
issue Energy hold off</li>
|
||
<li>controllerMode auto|heating|cooling|off<br>
|
||
issue Controller mode</li>
|
||
<li>controllerState auto|override <0 ... 100> <br>
|
||
issue Control variable override</li>
|
||
</ul><br>
|
||
Override Range: cvov = 0 % ... 100 %<br>
|
||
The attr subType must be gateway and gwCmd must be controlVar.
|
||
This is done if the device was created by autocreate.<br>
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Fan stage<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>stage 0 ... 3|auto<br>
|
||
issue Fan Stage override</li>
|
||
</ul><br>
|
||
The attr subType must be gateway and gwCmd must be fanStage.
|
||
This is done if the device was created by autocreate.<br>
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
<a name="Blind Command Central">Blind Command Central</a><br>
|
||
[untested, experimental status]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>status<br>
|
||
Status request</li>
|
||
<li>opens<br>
|
||
issue blinds opens command</li>
|
||
<li>up tu/s ta/s<br>
|
||
issue roll up command</li>
|
||
<li>closes<br>
|
||
issue blinds closes command</li>
|
||
<li>down td/s ta/s<br>
|
||
issue roll down command</li>
|
||
<li>position position/% α/°<br>
|
||
drive blinds to position with angle value</li>
|
||
<li>stop<br>
|
||
issue blinds stops command</li>
|
||
<li>runtimeSet tu/s td/s<br>
|
||
set runtime parameter</li>
|
||
<li>angleSet ta/s<br>
|
||
set angle configuration</li>
|
||
<li>positionMinMax positionMin/% positionMax/%<br>
|
||
set min, max values for position</li>
|
||
<li>angleMinMax αo/° αs/°<br>
|
||
set slat angle for open and shut position</li>
|
||
<li>positionLogic normal|inverse<br>
|
||
set position logic</li>
|
||
</ul><br>
|
||
Runtime Range: tu|td = 0 s ... 255 s<br>
|
||
Select a runtime up and a runtime down that is at least as long as the
|
||
shading element or roller shutter needs to move from its end position to
|
||
the other position.<br>
|
||
Position Range: position = 0 % ... 100 %<br>
|
||
Angle Time Range: ta = 0 s ... 25.5 s<br>
|
||
Runtime value for the sunblind reversion time. Select the time to revolve
|
||
the sunblind from one slat angle end position to the other end position.<br>
|
||
Slat Angle: α|αo|αs = -180 ° ... 180 °<br>
|
||
Position Logic, normal: Blinds fully opens corresponds to Position = 0 %<br>
|
||
Position Logic, inverse: Blinds fully opens corresponds to Position = 100 %<br>
|
||
The attr subType must be gateway and gwCmd must be blindCmd. The profile
|
||
is linked with controller profile, see <a href="#Blind Status">Blind Status</a>.<br>
|
||
</li>
|
||
<br><br>
|
||
|
||
<li><a name="Manufacturer Specific Applications">Manufacturer Specific Applications</a> (EEP A5-3F-7F)<br>
|
||
Shutter<br>
|
||
[Eltako FSB12, FSB14, FSB61, FSB70, tested with Eltako devices only]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>teach<br>
|
||
initiate teach-in mode</li>
|
||
<li>opens<br>
|
||
issue blinds opens command</li>
|
||
<li>up tu/s<br>
|
||
issue roll up command</li>
|
||
<li>closes<br>
|
||
issue blinds closes command</li>
|
||
<li>down td/s<br>
|
||
issue roll down command</li>
|
||
<li>position position/% [α/°]<br>
|
||
drive blinds to position with angle value</li>
|
||
<li>stop<br>
|
||
issue stop command</li>
|
||
</ul><br>
|
||
Runtime Range: tu|td = 1 s ... 255 s<br>
|
||
Position Range: position = 0 % ... 100 %<br>
|
||
Slat Angle Range: α = -180 ° ... 180 °<br>
|
||
Angle Time Range: ta = 0 s ... 6 s<br>
|
||
The devive can only fully controlled if the attributes <a href="#angleMax">angleMax</a>,
|
||
<a href="#angleMin">angleMin</a>, <a href="#angleTime">angleTime</a>,
|
||
<a href="#shutTime">shutTime</a> and <a href="#shutTimeCloses">shutTimeCloses</a>,
|
||
are set correctly.
|
||
Set attr subType to manufProfile, manufID to 00D and attr model to
|
||
FSB14|FSB61|FSB70 manually.<br>
|
||
Use the sensor type "Szenentaster/PC" for Eltako devices.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-11)<br>
|
||
[Telefunken Funktionsstecker]<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>on [<channel>]<br>
|
||
issue switch on command</li>
|
||
<li>off [<channel>]<br>
|
||
issue switch off command</li>
|
||
<li>dim dim/% [<channel> [<rampTime>]]<br>
|
||
issue dimming command</li>
|
||
<li>local dayNight day|night, day is default<br>
|
||
set the user interface indication</li>
|
||
<li>local defaultState on|off|last, off is default<br>
|
||
set the default setting of the output channels when switch on</li>
|
||
<li>local localControl enabled|disabled, disabled is default<br>
|
||
enable the local control of the device</li>
|
||
<li>local overCurrentShutdown off|restart, off is default<br>
|
||
set the behavior after a shutdown due to an overcurrent</li>
|
||
<li>local overCurrentShutdownReset not_active|trigger, not_active is default<br>
|
||
trigger a reset after an overcurrent</li>
|
||
<li>local rampTime<1...3> 0/s, 0.5/s ... 7/s, 7.5/s, 0 is default<br>
|
||
set the dimming time of timer 1 ... 3</li>
|
||
<li>local teachInDev enabled|disabled, disabled is default<br>
|
||
enable the taught-in devices with different EEP</li>
|
||
<li>measurement delta 0/s ... 4095/s, 0 is deflaut<br>
|
||
define the difference between two displayed measurements </li>
|
||
<li>measurement mode energy|power, energy is default<br>
|
||
define the measurand</li>
|
||
<li>measurement report query|auto, query is default<br>
|
||
specify the measurement method</li>
|
||
<li>measurement reset not_active|trigger, not_active is default<br>
|
||
resetting the measured values</li>
|
||
<li>measurement responseTimeMax 10/s ... 2550/s, 10 is default<br>
|
||
set the maximum time between two outputs of measured values</li>
|
||
<li>measurement responseTimeMin 0/s ... 255/s, 0 is default<br>
|
||
set the minimum time between two outputs of measured values</li>
|
||
<li>measurement unit Ws|Wh|KWh|W|KW, Ws is default<br>
|
||
specify the measurement unit</li>
|
||
</ul><br>
|
||
[channel] = 0...29|all|input, all is default<br>
|
||
[rampTime] = 1..3|switch|stop, switch is default<br>
|
||
The attr subType must be actuator.01. This is done if the device was
|
||
created by autocreate. To control the device, it must be bidirectional paired,
|
||
see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li><a name="RAW Command">RAW Command</a><br>
|
||
<br>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>1BS|4BS|MSC|RPS|UTE|VLD data [status]<br>
|
||
sent data telegram</li>
|
||
</ul><br>
|
||
[data] = <1-byte hex ... 28-byte hex><br>
|
||
[status] = 0x00 ... 0xFF<br>
|
||
With the help of this command data messages in hexadecimal format can be sent.
|
||
Telegram types (RORG) 1BS, 4BS, RPS, MSC, UTE and VLD are supported. For further information,
|
||
see <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>.
|
||
</li>
|
||
<br><br>
|
||
</ul></ul>
|
||
|
||
<a name="EnOceanget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-11)<br>
|
||
[Telefunken Funktionsstecker]<br>
|
||
<ul>
|
||
<code>get <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is
|
||
<li>state [<channel>]<br>
|
||
</li>
|
||
<li>measurement <channel> energy|power<br>
|
||
</li>
|
||
</ul><br>
|
||
<br>
|
||
The attr subType must be actuator.01. This is done if the device was
|
||
created by autocreate. To control the device, it must be bidirectional paired,
|
||
see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
|
||
</li>
|
||
<br><br>
|
||
|
||
</ul><br>
|
||
|
||
<a name="EnOceanattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<ul>
|
||
<li><a name="actualTemp">actualTemp</a> t/°C<br>
|
||
The value of the actual temperature, used by a Room Sensor and Control Unit
|
||
or when controlling HVAC components e. g. Battery Powered Actuators (MD15 devices). Should by
|
||
filled via a notify from a distinct temperature sensor.<br>
|
||
If absent, the reported temperature from the HVAC components is used.
|
||
</li>
|
||
<li><a name="angleMax">angleMax</a> αs/°, [αs] = -180 ... 180, 90 is default.<br>
|
||
Slat angle end position maximum.<br>
|
||
angleMax is supported for shutter.
|
||
</li>
|
||
<li><a name="angleMin">angleMin</a> αo/°, [αo] = -180 ... 180, -90 is default.<br>
|
||
Slat angle end position minimum.<br>
|
||
angleMin is supported for shutter.
|
||
</li>
|
||
<li><a name="angleTime">angleTime</a> t/s, [angleTime] = 0 ... 6, 0 is default.<br>
|
||
Runtime value for the sunblind reversion time. Select the time to revolve
|
||
the sunblind from one slat angle end position to the other end position.<br>
|
||
angleTime is supported for shutter.
|
||
</li>
|
||
<li><a name="comMode">comMode</a> biDir|uniDir, [comMode] = uniDir is default.<br>
|
||
Communication Mode between an enabled EnOcean device and Fhem.<br>
|
||
Unidirectional communication means a point-to-multipoint communication
|
||
relationship. The EnOcean device e. g. sensors does not know the unique
|
||
Fhem SenderID.<br>
|
||
Bidirectional communication means a point-to-point communication
|
||
relationship between an enabled EnOcean device and Fhem. It requires all parties
|
||
involved to know the unique Sender ID of their partners. Bidirectional communication
|
||
needs a teach-in / teach-out process, see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
|
||
</li>
|
||
<li><a name="devChannel">devChannel</a> 00 ... FF, [devChannel] = FF is default<br>
|
||
Number of the individual device channel, FF = all channels supported by the device
|
||
</li>
|
||
<li><a name="destinationID">destinationID</a> multicast|unicast|00000001 ... FFFFFFFF,
|
||
[destinationID] = multicast is default<br>
|
||
Destination ID, special values: multicast = FFFFFFFF, unicast = [DEF]
|
||
</li>
|
||
<li><a href="#devStateIcon">devStateIcon</a></li>
|
||
<li><a name="dimValueOn">dimValueOn</a> dim/%|last|stored,
|
||
[dimValueOn] = 100 is default.<br>
|
||
Dim value for the command "on".<br>
|
||
The dimmer switched on with the value 1 % ... 100 % if [dimValueOn] =
|
||
1 ... 100.<br>
|
||
The dimmer switched to the last dim value received from the
|
||
bidirectional dimmer if [dimValueOn] = last.<br>
|
||
The dimmer switched to the last Fhem dim value if [dimValueOn] =
|
||
stored.<br>
|
||
dimValueOn is supported for dimmer.
|
||
</li>
|
||
<li><a href="#EnOcean_disable">disable</a> 0|1<br>
|
||
If applied set commands will not be executed.
|
||
</li>
|
||
<li><a href="#EnOcean_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
|
||
Space separated list of HH:MM tupels. If the current time is between
|
||
the two time specifications, set commands will not be executed. Instead of
|
||
HH:MM you can also specify HH or HH:MM:SS. To specify an interval
|
||
spawning midnight, you have to specify two intervals, e.g.:
|
||
<ul>
|
||
23:00-24:00 00:00-01:00
|
||
</ul>
|
||
</li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a name="gwCmd">gwCmd</a> switching|dimming|setpointShift|setpointBasic|controlVar|fanStage|blindCmd<br>
|
||
Gateway Command Type, see <a href="#Gateway">Gateway</a> profile
|
||
</li>
|
||
<li><a name="humidityRefDev">humidityRefDev</a> <name><br>
|
||
Name of the device whose reference value is read. The reference values is
|
||
the reading humidity.
|
||
</li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#model">model</a></li>
|
||
<li><a name="rampTime">rampTime</a> t/s or relative, [rampTime] = 1 is default.<br>
|
||
No ramping or for Eltako dimming speed set on the dimmer if [rampTime] = 0.<br>
|
||
Ramping time 1 s to 255 s or relative fast to low dimming speed if [rampTime] = 1 ... 255.<br>
|
||
rampTime is supported for gateway, command dimming.
|
||
</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li><a name="repeatingAllowed">repeatingAllowed</a> yes|no,
|
||
[repeatingAllowed] = yes is default.<br>
|
||
EnOcean Repeater in the transmission range of Fhem may forward data messages
|
||
of the device, if the attribute is set to yes.
|
||
</li>
|
||
<li><a name="scaleDecimals">scaleDecimals</a> 0 ... 9<br>
|
||
Decimal rounding with x digits of the scaled reading setpoint
|
||
</li>
|
||
<li><a name="scaleMax">scaleMax</a> <floating-point number><br>
|
||
Scaled maximum value of the reading setpoint
|
||
</li>
|
||
<li><a name="scaleMin">scaleMin</a> <floating-point number><br>
|
||
Scaled minimum value of the reading setpoint
|
||
</li>
|
||
<li><a name="securityLevel">securityLevel</a> unencrypted, [securityLevel] = unencrypted is default<br>
|
||
Type of Encryption
|
||
</li>
|
||
<li><a name="sensorMode">switchMode</a> switch|pushbutton,
|
||
[sensorMode] = switch is default.<br>
|
||
The status "released" will be shown in the reading state if the
|
||
attribute is set to "pushbutton".
|
||
</li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a name="shutTime">shutTime</a> t/s, [shutTime] = 1 ... 255, 255 is default.<br>
|
||
Use the attr shutTime to set the time delay to the position "Halt" in
|
||
seconds. Select a delay time that is at least as long as the shading element
|
||
or roller shutter needs to move from its end position to the other position.<br>
|
||
shutTime is supported for shutter.
|
||
</li>
|
||
<li><a name="shutTimeCloses">shutTimeCloses</a> t/s, [shutTimeCloses] = 1 ... 255,
|
||
[shutTimeCloses] = [shutTime] is default.<br>
|
||
Set the attr shutTimeCloses to define the runtime used by the commands opens and closes.
|
||
Select a runtime that is at least as long as the value set by the delay switch of the actuator.
|
||
<br>
|
||
shutTimeCloses is supported for shutter.
|
||
</li>
|
||
<li><a name="subDef">subDef</a> <EnOcean SenderID>,
|
||
[subDef] = [def] is default.<br>
|
||
SenderID (<a href="#TCM">TCM</a> BaseID + offset) to control a bidirectional switch or actor.<br>
|
||
In order to control devices that send acknowledge telegrams, you cannot reuse the ID of this
|
||
devices, instead you have to create your own, which must be in the
|
||
allowed ID-Range of the underlying IO device. For this first query the
|
||
<a href="#TCM">TCM</a> with the "<code>get <tcm> idbase</code>" command. You can use
|
||
up to 128 IDs starting with the base shown there.
|
||
</li>
|
||
<li><a name="subDef0">subDef0</a> <EnOcean SenderID>,
|
||
[subDef0] = [def] is default.<br>
|
||
SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = A0|B0|C0|D0|released<br>
|
||
Used with switch type "central". Set attr switchType to central.<br>
|
||
Use the sensor type "zentral aus/ein" for Eltako devices.<br>
|
||
subDef0 is supported for switches.<br>
|
||
Second action is not sent.
|
||
</li>
|
||
<li><a name="subDefI">subDefI</a> <EnOcean SenderID>,
|
||
[subDefI] = [def] is default.<br>
|
||
SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = AI|BI|CI|DI<br>
|
||
Used with switch type "central". Set attr switchType to central.<br>
|
||
Use the sensor type "zentral aus/ein" for Eltako devices.<br>
|
||
subDefI is supported for switches.<br>
|
||
Second action is not sent.
|
||
</li>
|
||
<li><a href="#subType">subType</a></li>
|
||
<li><a name="subTypeSet">subTypeSet</a> <type of device>, [subTypeSet] = [subType] is default.<br>
|
||
Type of device (EEP Profile) used for sending commands. Set the Attribute manually.
|
||
The profile has to fit their basic profile. More information can be found in the basic profiles.
|
||
</li>
|
||
<li><a name="switchMode">switchMode</a> switch|pushbutton,
|
||
[SwitchMode] = switch is default.<br>
|
||
The set command "released" immediately after <value> is sent if the
|
||
attribute is set to "pushbutton".
|
||
</li>
|
||
<li><a name="switchType">switchType</a> direction|universal|central,
|
||
[SwitchType] = direction is default.<br>
|
||
EnOcean Devices support different types of sensors, e. g. direction
|
||
switch, universal switch or pushbutton, central on/off.<br>
|
||
For Eltako devices these are the sensor types "Richtungstaster",
|
||
"Universalschalter" or "Universaltaster", "Zentral aus/ein".<br>
|
||
With the sensor type <code>direction</code> switch on/off commands are
|
||
accepted, e. g. B0, BI, released. Fhem can control an device with this
|
||
sensor type unique. This is the default function and should be
|
||
preferred.<br>
|
||
Some devices only support the sensor type <code>universal switch
|
||
</code> or <code>pushbutton</code>. With a Fhem command, for example,
|
||
B0 or BI is switched between two states. In this case Fhem cannot
|
||
control this device unique. But if the Attribute <code>switchType
|
||
</code> is set to <code>universal</code> Fhem synchronized with
|
||
a bidirectional device and normal on/off commands can be used.
|
||
If the bidirectional device response with the channel B
|
||
confirmation telegrams also B0 and BI commands are to be sent,
|
||
e g. channel A with A0 and AI. Also note that confirmation telegrams
|
||
needs to be sent.<br>
|
||
Partly for the sensor type <code>central</code> two different SenderID
|
||
are required. In this case set the Attribute <code>switchType</code> to
|
||
<code>central</code> and define the Attributes
|
||
<a href="#subDef0">subDef0</a> and <a href="#subDefI">subDefI</a>.
|
||
</li>
|
||
<li><a name="temperatureRefDev">temperatureRefDev</a> <name><br>
|
||
Name of the device whose reference value is read. The reference values is
|
||
the reading temperature.
|
||
</li>
|
||
<li><a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="EnOceanevents"></a>
|
||
<b>Generated events</b>
|
||
<ul>
|
||
<ul>
|
||
<li>Switch / Bidirectional Actor (EEP F6-02-01 ... F6-03-02)<br>
|
||
<ul>
|
||
<li>A0</li>
|
||
<li>AI</li>
|
||
<li>B0</li>
|
||
<li>BI</li>
|
||
<li>C0</li>
|
||
<li>CI</li>
|
||
<li>D0</li>
|
||
<li>DI</li>
|
||
<li><BtnX,BtnY> First and second action where BtnX and BtnY is
|
||
one of the above, e.g. A0,BI or D0,CI</li>
|
||
<li>buttons: pressed|released</li>
|
||
<li>state: <BtnX> released</li>
|
||
</ul><br>
|
||
Switches (remote controls) or actors with more than one
|
||
(pair) keys may have multiple channels e. g. B0/BI, A0/AI with one
|
||
SenderID or with separate addresses.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Pushbutton Switch, Pushbutton Input Module (EEP F6-02-01 ... F6-02-02)<br>
|
||
[Eltako FT55, FSM12, FSM61, FTS12]<br>
|
||
<ul>
|
||
<li>A0</li>
|
||
<li>AI</li>
|
||
<li>B0</li>
|
||
<li>BI</li>
|
||
<li>released</li>
|
||
<li>buttons: pressed|released</li>
|
||
<li>state: A0|AI|B0|BI|released</li>
|
||
</ul><br>
|
||
The status of the device may become "released", this
|
||
is not the case for a normal switch.<br>
|
||
Set attr model to FT55|FSM12|FSM61|FTS12 manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Smoke Detector (EEP F6-02-01 ... F6-02-02)<br>
|
||
[Eltako FRW]<br>
|
||
<ul>
|
||
<li>smoke-alarm</li>
|
||
<li>off</li>
|
||
<li>alarm: smoke-alarm|off</li>
|
||
<li>battery: low|ok</li>
|
||
<li>buttons: pressed|released</li>
|
||
<li>state: smoke-alarm|off</li>
|
||
</ul><br>
|
||
Set attr subType to FRW manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Heating/Cooling Relay (EEP F6-02-01 ... F6-02-02)<br>
|
||
[Eltako FAE14, FHK14, untested]<br>
|
||
<ul>
|
||
<li>controllerMode: auto|off</li>
|
||
<li>energyHoldOff: normal|holdoff</li>
|
||
<li>buttons: pressed|released</li>
|
||
</ul><br>
|
||
Set attr subType to switch and model to FAE14|FHK14 manually. In addition
|
||
every telegram received from a teached-in temperature sensor (e.g. FTR55H)
|
||
is repeated as a confirmation telegram from the Heating/Cooling Relay
|
||
FAE14, FHK14. In this case set attr subType to e. g. roomSensorControl.05
|
||
and attr manufID to 00D.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Key Card Activated Switch (EEP F6-04-01)<br>
|
||
[Eltako FKC, FKF, FZS, untested]<br>
|
||
<ul>
|
||
<li>keycard inserted</li>
|
||
<li>keycard removed</li>
|
||
<li>buttons: pressed|released</li>
|
||
<li>state: keycard inserted|keycard removed</li>
|
||
</ul><br>
|
||
Set attr subType to keycard manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Window Handle (EEP F6-10-00)<br>
|
||
[HOPPE SecuSignal, Eltako FHF, Eltako FTKE]<br>
|
||
<ul>
|
||
<li>closed</li>
|
||
<li>open</li>
|
||
<li>tilted</li>
|
||
<li>open from tilted</li>
|
||
<li>buttons: pressed|released</li>
|
||
<li>state: closed|open|tilted|open from tilted</li>
|
||
</ul><br>
|
||
The device windowHandle should be created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Single Input Contact, Door/Window Contact<br>
|
||
1BS Telegram (EEP D5-00-01)<br>
|
||
[EnOcean STM 320, STM 329, STM 250, Eltako FTK, Peha D 450 FU, STM-250, BSC ?]
|
||
<ul>
|
||
<li>closed</li>
|
||
<li>open</li>
|
||
<li>learnBtn: on</li>
|
||
<li>state: open|closed</li>
|
||
</ul></li>
|
||
The device should be created by autocreate.
|
||
<br><br>
|
||
|
||
<li>Temperature Sensors with with different ranges (EEP A5-02-01 ... A5-02-30)<br>
|
||
[EnOcean STM 330, Eltako FTF55, Thermokon SR65 ...]<br>
|
||
<ul>
|
||
<li>t/°C</li>
|
||
<li>temperature: t/°C (Sensor Range: t = <t min> °C ... <t max> °C)</li>
|
||
<li>state: t/°C</li>
|
||
</ul><br>
|
||
The attr subType must be tempSensor.01 ... tempSensor.30. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Temperatur and Humidity Sensor (EEP A5-04-02)<br>
|
||
[Eltako FAFT60, FIFT63AP]<br>
|
||
<ul>
|
||
<li>T: t/°C H: rH/% B: unknown|low|ok</li>
|
||
<li>battery: unknown|low|ok</li>
|
||
<li>energyStorage: unknown|empty|charged|full</li>
|
||
<li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = -20 °C ... 60 °C)</li>
|
||
<li>voltage: U/V</li> (Sensor Range: U = 0 V ... 6.6 V)
|
||
<li>state: T: t/°C H: rH/% B: unknown|low|ok</li>
|
||
</ul><br>
|
||
The attr subType must be tempHumiSensor.02 and attr
|
||
manufID must be 00D for Eltako Devices. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Light Sensor (EEP A5-06-01)<br>
|
||
[Eltako FAH60, FAH63, FIH63, Thermokon SR65 LI]<br>
|
||
<ul>
|
||
<li>E/lx</li>
|
||
<li>brightness: E/lx (Sensor Range: 300 lx ... 30 klx, 600 lx ... 60 klx
|
||
, Sensor Range for Eltako: E = 0 lx ... 100 lx, 300 lx ... 30 klx)</li>
|
||
<li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
|
||
<li>state: E/lx</li>
|
||
</ul><br>
|
||
Eltako devices only support Brightness.<br>
|
||
The attr subType must be lightSensor.01 and attr manufID must be 00D
|
||
for Eltako Devices. This is done if the device was created by
|
||
autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Light Sensor (EEP A5-06-02)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>E/lx</li>
|
||
<li>brightness: E/lx (Sensor Range: 0 lx ... 1020 lx</li>
|
||
<li>voltage: U/V (Sensor Range: U = 0 V ... 5.1 V)</li>
|
||
<li>state: E/lx</li>
|
||
</ul><br>
|
||
The attr subType must be lightSensor.02. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Light Sensor (EEP A5-06-03)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>E/lx</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>errorCode: 251 ... 255</li>
|
||
<li>state: E/lx</li>
|
||
</ul><br>
|
||
The attr subType must be lightSensor.03. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Occupancy Sensor (EEP A5-07-01, A5-07-02)<br>
|
||
[EnOcean EOSW]<br>
|
||
<ul>
|
||
<li>on|off</li>
|
||
<li>current: I/µA (Sensor Range: I = 0 V ... 127.0 µA)</li>
|
||
<li>errorCode: 251 ... 255</li>
|
||
<li>motion: on|off</li>
|
||
<li>sensorType: ceiling|wall</li>
|
||
<li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
|
||
<li>state: on|off</li>
|
||
</ul><br>
|
||
The attr subType must be occupSensor.<01|02>. This is done if the device was
|
||
created by autocreate. Current is the solar panel current. Some values are
|
||
displayed only for certain types of devices.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Occupancy Sensor (EEP A5-07-03)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>M: on|off E: E/lx U: U/V</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>errorCode: 251 ... 255</li>
|
||
<li>motion: on|off</li>
|
||
<li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
|
||
<li>state: M: on|off E: E/lx U: U/V</li>
|
||
</ul><br>
|
||
The attr subType must be occupSensor.03. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Light, Temperatur and Occupancy Sensor (EEP A5-08-01 ... A5-08-03)<br>
|
||
[Eltako FABH63, FBH55, FBH63, FIBH63, Thermokon SR-MDS, PEHA 482 FU-BM DE]<br>
|
||
<ul>
|
||
<li>M: on|off E: E/lx P: absent|present T: t/°C U: U/V</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 510, 1020, 1530 or 2048 lx)</li>
|
||
<li>motion: on|off</li>
|
||
<li>presence: absent|present</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 51 °C or -30 °C ... 50 °C)</li>
|
||
<li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
|
||
<li>state: M: on|off E: E/lx P: absent|present T: t/°C U: U/V</li>
|
||
</ul><br>
|
||
Eltako and PEHA devices only support Brightness and Motion.<br>
|
||
The attr subType must be lightTempOccupSensor.<01|02|03> and attr
|
||
manufID must be 00D for Eltako Devices. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gas Sensor, CO Sensor (EEP A5-09-01)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>CO: c/ppm (Sensor Range: c = 0 ppm ... 255 ppm)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 255 °C)</li>
|
||
<li>state: c/ppm</li>
|
||
</ul><br>
|
||
The attr subType must be COSensor.01. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gas Sensor, CO Sensor (EEP A5-09-02)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>CO: c/ppm (Sensor Range: c = 0 ppm ... 1020 ppm)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 51.0 °C)</li>
|
||
<li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
|
||
<li>state: c/ppm</li>
|
||
</ul><br>
|
||
The attr subType must be COSensor.02. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gas Sensor, CO2 Sensor (EEP A5-09-04)<br>
|
||
[Thermokon SR04 CO2 *, Eltako FCOTF63, untested]<br>
|
||
<ul>
|
||
<li>airQuality: high|mean|moderate|low (Air Quality Classes DIN EN 13779)</li>
|
||
<li>CO2: c/ppm (Sensor Range: c = 0 ppm ... 2550 ppm)</li>
|
||
<li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 51 °C)</li>
|
||
<li>state: CO2: c/ppm AQ: high|mean|moderate|low T: t/°C H: rH/%</li>
|
||
</ul><br>
|
||
The attr subType must be tempHumiCO2Sensor.01. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gas Sensor, Volatile organic compounds (VOC) Sensor (EEP A5-09-05)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>concentration: c/ppb (Sensor Range: c = 0 ppb ... 655350 ppb)</li>
|
||
<li>vocName: Name of last measured VOC</li>
|
||
<li>state: c/ppb</li>
|
||
</ul><br>
|
||
The attr subType must be vocSensor.01. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gas Sensor, Radon Sensor (EEP A5-09-06)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>Rn: A m3/Bq (Sensor Range: A = 0 Bq/m3 ... 1023 Bq/m3)</li>
|
||
<li>state: A m3/Bq</li>
|
||
</ul><br>
|
||
The attr subType must be radonSensor.01. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gas Sensor, Particles Sensor (EEP A5-09-07)<br>
|
||
[untested]<br>
|
||
Three channels with particle sizes of up to 10 μm, 2.5 μm and 1 μm are supported<br>.
|
||
<ul>
|
||
<li>particles_10: p m3/μg | inactive (Sensor Range: p = 0 μg/m3 ... 511 μg/m3)</li>
|
||
<li>particles_2_5: p m3/μg | inactive (Sensor Range: p = 0 μg/m3 ... 511 μg/m3)</li>
|
||
<li>particles_1: p m3/μg | inactive (Sensor Range: p = 0 μg/m3 ... 511 μg/m3)</li>
|
||
<li>state: PM10: p m3/μg PM2_5: p m3/μg PM1: p m3/μg</li>
|
||
</ul><br>
|
||
The attr subType must be particlesSensor.01. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-01 ... A5-10-0D)<br>
|
||
[Eltako FTR55*, Thermokon SR04 *, Thanos SR *]<br>
|
||
<ul>
|
||
<li>T: t/°C SP: 0 ... 255 F: 0|1|2|3|auto SW: 0|1</li>
|
||
<li>fanStage: 0|1|2|3|auto</li>
|
||
<li>switch: 0|1</li>
|
||
<li>setpoint: 0 ... 255</li>
|
||
<li>setpointScaled: <floating-point number></li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C SP: 0 ... 255 F: 0|1|2|3|auto SW: 0|1</li><br>
|
||
Alternatively for Eltako devices
|
||
<li>T: t/°C SPT: t/°C NR: t/°C</li>
|
||
<li>block: lock|unlock</li>
|
||
<li>nightReduction: t/K</li>
|
||
<li>setpointTemp: t/°C</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C SPT: t/°C NR: t/K</li><br>
|
||
</ul><br>
|
||
The scaling of the setpoint adjustment is device- and vendor-specific. Set the
|
||
attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
|
||
<a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
|
||
setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
|
||
adjust the scaling alternatively.<br>
|
||
The attr subType must be roomSensorControl.05 and attr
|
||
manufID must be 00D for Eltako Devices. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-04-01, A5-10-10 ... A5-10-14)<br>
|
||
[Thermokon SR04 * rH, Thanos SR *, untested]<br>
|
||
<ul>
|
||
<li>T: t/°C H: rH/% SP: 0 ... 255 SW: 0|1</li>
|
||
<li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
|
||
<li>switch: 0|1</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>setpoint: 0 ... 255</li>
|
||
<li>setpointScaled: <floating-point number></li>
|
||
<li>state: T: t/°C H: rH/% SP: 0 ... 255 SW: 0|1</li>
|
||
</ul><br>
|
||
The scaling of the setpoint adjustment is device- and vendor-specific. Set the
|
||
attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
|
||
<a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
|
||
setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
|
||
adjust the scaling alternatively.<br>
|
||
The attr subType must be roomSensorControl.01. This is
|
||
done if the device was created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-15 ... A5-10-17)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C SP: 0 ... 63 P: absent|present</li>
|
||
<li>presence: absent|present</li>
|
||
<li>temperature: t/°C (Sensor Range: t = -10 °C ... 41.2 °C)</li>
|
||
<li>setpoint: 0 ... 63</li>
|
||
<li>setpointScaled: <floating-point number></li>
|
||
<li>state: T: t/°C SP: 0 ... 63 P: absent|present</li>
|
||
</ul><br>
|
||
The scaling of the setpoint adjustment is device- and vendor-specific. Set the
|
||
attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
|
||
<a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
|
||
setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
|
||
adjust the scaling alternatively.<br>
|
||
The attr subType must be roomSensorControl.02. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-18)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>fan: 0|1|2|3|4|5|auto|off</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>setpoint: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
|
||
</ul><br>
|
||
The attr subType must be roomSensorControl.18. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-19)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
|
||
<li>fan: 0|1|2|3|4|5|auto|off</li>
|
||
<li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>setpoint: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
|
||
</ul><br>
|
||
The attr subType must be roomSensorControl.19. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-1A)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled U: U/V</li>
|
||
<li>errorCode: 251 ... 255</li>
|
||
<li>fan: 0|1|2|3|4|5|auto|off</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>setpoint: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
|
||
<li>state: T: t/°C F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled U: U/V</li>
|
||
</ul><br>
|
||
The attr subType must be roomSensorControl.1A. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-1B, A5-10-1D)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off P: absent|present|disabled U: U/V</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>errorCode: 251 ... 255</li>
|
||
<li>fan: 0|1|2|3|4|5|auto|off</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
|
||
<li>state: T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off P: absent|present|disabled U: U/V</li>
|
||
</ul><br>
|
||
The attr subType must be roomSensorControl.1B. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
<li>Room Sensor and Control Unit (EEP A5-10-1C)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: E/lx P: absent|present|disabled</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>fan: 0|1|2|3|4|5|auto|off</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>setpoint: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: E/lx P: absent|present|disabled</li>
|
||
</ul><br>
|
||
The attr subType must be roomSensorControl.1C. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-1D)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: rH/% P: absent|present|disabled</li>
|
||
<li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
|
||
<li>fan: 0|1|2|3|4|5|auto|off</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>setpoint: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: rH/% P: absent|present|disabled</li>
|
||
</ul><br>
|
||
The attr subType must be roomSensorControl.1D. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Room Sensor and Control Unit (EEP A5-10-1F)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>T: t/°C F: 0|1|2|3|auto SP: 0 ... 255 P: absent|present|disabled</li>
|
||
<li>fan: 0|1|2|3|auto</li>
|
||
<li>presence: absent|present|disabled</li>
|
||
<li>setpoint: 0 ... 255</li>
|
||
<li>setpointScaled: <floating-point number></li>
|
||
<li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
|
||
<li>state: T: t/°C F: 0|1|2|3|auto SP: 0 ... 255 P: absent|present|disabled</li>
|
||
</ul><br>
|
||
The scaling of the setpoint adjustment is device- and vendor-specific. Set the
|
||
attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
|
||
<a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
|
||
setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
|
||
adjust the scaling alternatively.<br>
|
||
The attr subType must be roomSensorControl.1F. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Lighting Controller State (EEP A5-11-01)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>on|off</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 510 lx)</li>
|
||
<li>contact: open|closed</li>
|
||
<li>daylightHarvesting: enabled|disabled</li>
|
||
<li>dim: 0 ... 255</li>
|
||
<li>presence: absent|present</li>
|
||
<li>illum: 0 ... 255</li>
|
||
<li>mode: switching|dimming</li>
|
||
<li>powerRelayTimer: enabled|disabled</li>
|
||
<li>powerSwitch: on|off</li>
|
||
<li>repeater: enabled|disabled</li>
|
||
<li>state: on|off</li>
|
||
</ul><br>
|
||
The attr subType must be lightCtrlState.01 This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Temperature Controller Output (EEP A5-11-02)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>t/°C</li>
|
||
<li>alarm: on|off</li>
|
||
<li>controlVar: cvar (Sensor Range: cvar = 0 % ... 100 %)</li>
|
||
<li>controllerMode: auto|heating|cooling|off</li>
|
||
<li>controllerState: auto|override</li>
|
||
<li>energyHoldOff: normal|holdoff</li>
|
||
<li>fan: 0 ... 3|auto</li>
|
||
<li>presence: present|absent|standby|frost</li>
|
||
<li>setpointTemp: t/°C (Sensor Range: t = 0 °C ... 51.2 °C)</li>
|
||
<li>state: t/°C</li>
|
||
</ul><br>
|
||
The attr subType must be tempCtrlState.01 This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li><a name="Blind Status">Blind Status</a> (EEP A5-11-03)<br>
|
||
[untested, experimental status]<br>
|
||
<ul>
|
||
<li>open|closed|not_reached|not_available</li>
|
||
<li>alarm: on|off|no endpoints defined|not used</li>
|
||
<li>anglePos: α/° (Sensor Range: α = -360 ° ... 360 °)</li>
|
||
<li>endPosition: open|closed|not_reached|not_available</li>
|
||
<li>position: pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
|
||
<li>positionMode: normal|inverse</li>
|
||
<li>serviceOn: yes|no</li>
|
||
<li>shutterState: opens|closes|stopped|not_available</li>
|
||
<li>state: open|closed|not_reached|not_available</li>
|
||
</ul><br>
|
||
The attr subType must be shutterCtrlState.01 This is done if the device was
|
||
created by autocreate.<br>
|
||
The profile is linked with <a href="#Blind Command Central">Blind Command Central</a>.
|
||
The profile <a href="#Blind Command Central">Blind Command Central</a>
|
||
controls the devices centrally. For that the attributes subDef, subTypeSet
|
||
and gwCmd have to be set manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Extended Lighting Status (EEP A5-11-04)<br>
|
||
[untested, experimental status]<br>
|
||
<ul>
|
||
<li>on|off</li>
|
||
<li>alarm: off|lamp failure|internal failure|external periphery failure</li>
|
||
<li>dim: 0 ... 255</li>
|
||
<li>measuredValue: <formula symbol>/<unit> (Sensor range: <formula symbol> = 0 ... 65535 <unit></li>
|
||
<li>measureUnit: mW|W|kW|MW|Wh|kWh|MWh|GWh|mA|1/10 A|mV|1/10 V</li>
|
||
<li>lampOpHours: t/h |unknown (Sensor range: t = 0 h ... 65535 h)</li>
|
||
<li>powerSwitch: on|off</li>
|
||
<li>RGB: R G B (RGB color component values: 0 ... 255)</li>
|
||
<li>serviceOn: yes|no</li>
|
||
<li>state: on|off</li>
|
||
</ul><br>
|
||
The attr subType must be lightCtrlState.02 This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Automated meter reading (AMR), Counter (EEP A5-12-00)<br>
|
||
[Thermokon SR-MI-HS, untested]<br>
|
||
<ul>
|
||
<li>1/s</li>
|
||
<li>currentValue: 1/s</li>
|
||
<li>counter<0 ... 15>: 0 ... 16777215</li>
|
||
<li>channel: 0 ... 15</li>
|
||
<li>state: 1/s</li>
|
||
</ul><br>
|
||
The attr subType must be autoMeterReading.00. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Automated meter reading (AMR), Electricity (EEP A5-12-01)<br>
|
||
[Eltako FSS12, DSZ14DRS, DSZ14WDRS, Thermokon SR-MI-HS, untested]<br>
|
||
[Eltako FWZ12-16A tested]<br>
|
||
<ul>
|
||
<li>P/W</li>
|
||
<li>power: P/W</li>
|
||
<li>energy<0 ... 15>: E/kWh</li>
|
||
<li>currentTariff: 0 ... 15</li>
|
||
<li>serialNumber: S-<nnnnnn></li>
|
||
<li>state: P/W</li>
|
||
</ul><br>
|
||
The attr subType must be autoMeterReading.01 and attr
|
||
manufID must be 00D for Eltako Devices. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Automated meter reading (AMR), Gas, Water (EEP A5-12-02, A5-12-03)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>Vs/l</li>
|
||
<li>flowrate: Vs/l</li>
|
||
<li>consumption<0 ... 15>: V/m3</li>
|
||
<li>currentTariff: 0 ... 15</li>
|
||
<li>state: Vs/l</li>
|
||
</ul><br>
|
||
The attr subType must be autoMeterReading.02|autoMeterReading.02.
|
||
This is done if the device was created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Environmental Applications<br>
|
||
Weather Station (EEP A5-13-01)<br>
|
||
Sun Intensity (EEP A5-13-02)<br>
|
||
[Eltako FWS61, untested]<br>
|
||
<ul>
|
||
<li>T: t/°C B: E/lx W: Vs/m IR: yes|no</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 999 lx)</li>
|
||
<li>dayNight: day|night</li>
|
||
<li>hemisphere: north|south</li>
|
||
<li>isRaining: yes|no</li>
|
||
<li>sunEast: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
|
||
<li>sunSouth: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
|
||
<li>sunWest: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
|
||
<li>temperature: t/°C (Sensor Range: t = -40 °C ... 80 °C)</li>
|
||
<li>windSpeed: Vs/m (Sensor Range: V = 0 m/s ... 70 m/s)</li>
|
||
<li>state:T: t/°C B: E/lx W: Vs/m IR: yes|no</li>
|
||
</ul><br>
|
||
Brightness is the strength of the dawn light. SunEast,
|
||
sunSouth and sunWest are the solar radiation from the respective
|
||
compass direction. IsRaining is the rain indicator.<br>
|
||
The attr subType must be environmentApp and attr manufID must be 00D
|
||
for Eltako Devices. This is done if the device was created by
|
||
autocreate.<br>
|
||
The Eltako Weather Station FWS61 supports not the day/night indicator
|
||
(dayNight).<br>
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Environmental Applications<br>
|
||
EEP A5-13-03 ... EEP A5-13-06 are not implemented.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Environmental Applications<br>
|
||
Sun Position and Radiation (EEP A5-13-10)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>SRA: E m2/W SNA: α/° SNE: β/°</li>
|
||
<li>dayNight: day|night</li>
|
||
<li>solarRadiation: E m2/W (Sensor Range: E = 0 W/m2 ... 2000 W/m2)</li>
|
||
<li>sunAzimuth: α/° (Sensor Range: α = -90 ° ... 90 °)</li>
|
||
<li>sunElevation: β/° (Sensor Range: β = 0 ° ... 90 °)</li>
|
||
<li>state:SRA: E m2/W SNA: α/° SNE: β/°</li>
|
||
</ul><br>
|
||
The attr subType must be environmentApp. This is done if the device was created by
|
||
autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Multi-Func Sensor (EEP A5-14-01 ... A5-14-06)<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>C: open|closed V: on|off E: E/lx U: U/V</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
|
||
<li>contact: open|closed</li>
|
||
<li>errorCode: 251 ... 255</li>
|
||
<li>vibration: on|off</li>
|
||
<li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
|
||
<li>state: C: open|closed V: on|off E: E/lx U: U/V</li>
|
||
</ul><br>
|
||
The attr subType must be multiFuncSensor. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Battery Powered Actuator (EEP A5-20-01)<br>
|
||
[Kieback&Peter MD15-FTL-xx]<br>
|
||
<ul>
|
||
<li>Actuator/%</li>
|
||
<li>actuator: ok|obstructed</li>
|
||
<li>battery: ok|low</li>
|
||
<li>currentValue: Actuator/%</li>
|
||
<li>cover: open|closed</li>
|
||
<li>energyInput: enabled|disabled</li>
|
||
<li>energyStorage: charged|empty</li>
|
||
<li>selfCtl: on|off</li>
|
||
<li>serviceOn: yes|no</li>
|
||
<li>temperature: t/°C</li>
|
||
<li>tempSensor: failed|ok</li>
|
||
<li>window: open|closed</li>
|
||
<li>state: Actuator/%</li>
|
||
</ul><br>
|
||
The attr subType must be hvac.01. This is done if the device was created by
|
||
autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Digital Input (EEP A5-30-01, A5-30-02)<br>
|
||
[Thermokon SR65 DI, untested]<br>
|
||
<ul>
|
||
<li>open|closed</li>
|
||
<li>battery: ok|low (only EEP A5-30-01)</li>
|
||
<li>contact: open|closed</li>
|
||
<li>state: open|closed</li>
|
||
</ul><br>
|
||
The attr subType must be digitalInput.01 or digitalInput.02. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Switching<br>
|
||
[Eltako FLC61, FSA12, FSR14]<br>
|
||
<ul>
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>executeTime: t/s (Sensor Range: t = 0.1 s ... 6553.5 s or 0 if no time specified)</li>
|
||
<li>executeType: duration|delay</li>
|
||
<li>block: lock|unlock</li>
|
||
<li>state: on|off</li>
|
||
</ul><br>
|
||
The attr subType must be gateway and gwCmd must be switching. This is done if the device was
|
||
created by autocreate.<br>
|
||
For Eltako devices attributes must be set manually. Eltako devices only send on/off.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Dimming<br>
|
||
[Eltako FUD14, FUD61, FUD70, FSG14, ...]<br>
|
||
<ul>
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>block: lock|unlock</li>
|
||
<li>dim: dim/% (Sensor Range: dim = 0 % ... 100 %)</li>
|
||
<li>dimValueLast: dim/%<br>
|
||
Last value received from the bidirectional dimmer.</li>
|
||
<li>dimValueStored: dim/%<br>
|
||
Last value saved by <code>set <name> dim <value></code>.</li>
|
||
<li>rampTime: t/s (Sensor Range: t = 1 s ... 255 s or 0 if no time specified,
|
||
for Eltako: t = 1 = fast dimming ... 255 = slow dimming or 0 = dimming speed on the dimmer used)</li>
|
||
<li>state: on|off</li>
|
||
</ul><br>
|
||
The attr subType must be gateway, gwCmd must be dimming and attr manufID must be 00D
|
||
for Eltako Devices. This is done if the device was created by autocreate.<br>
|
||
For Eltako devices attributes must be set manually. Eltako devices only send on/off and dim.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Setpoint shift<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>1/K</li>
|
||
<li>setpointShift: 1/K (Sensor Range: T = -12.7 K ... 12.8 K)</li>
|
||
<li>state: 1/K</li>
|
||
</ul><br>
|
||
The attr subType must be gateway, gwCmd must be setpointShift.
|
||
This is done if the device was created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Basic Setpoint<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>t/°C</li>
|
||
<li>setpoint: t/°C (Sensor Range: t = 0 °C ... 51.2 °C)</li>
|
||
<li>state: t/°C</li>
|
||
</ul><br>
|
||
The attr subType must be gateway, gwCmd must be setpointBasic.
|
||
This is done if the device was created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Control variable<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>auto|heating|cooling|off</li>
|
||
<li>controlVar: cvov (Sensor Range: cvov = 0 % ... 100 %)</li>
|
||
<li>controllerMode: auto|heating|cooling|off</li>
|
||
<li>controllerState: auto|override</li>
|
||
<li>energyHoldOff: normal|holdoff</li>
|
||
<li>presence: present|absent|standby</li>
|
||
<li>state: auto|heating|cooling|off</li>
|
||
</ul><br>
|
||
The attr subType must be gateway, gwCmd must be controlVar.
|
||
This is done if the device was created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Gateway (EEP A5-38-08)<br>
|
||
Fan stage<br>
|
||
[untested]<br>
|
||
<ul>
|
||
<li>0 ... 3|auto</li>
|
||
<li>state: 0 ... 3|auto</li>
|
||
</ul><br>
|
||
The attr subType must be gateway, gwCmd must be fanStage.
|
||
This is done if the device was created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
|
||
Wireless Analog Input Module<br>
|
||
[Thermokon SR65 3AI, untested]<br>
|
||
<ul>
|
||
<li>I1: U/V I2: U/V I3: U/V</li>
|
||
<li>input1: U/V (Sensor Range: U = 0 V ... 10 V)</li>
|
||
<li>input2: U/V (Sensor Range: U = 0 V ... 10 V)</li>
|
||
<li>input3: U/V (Sensor Range: U = 0 V ... 10 V)</li>
|
||
<li>state: I1: U/V I2: U/V I3: U/V</li>
|
||
</ul><br>
|
||
The attr subType must be manufProfile and attr manufID must be 002
|
||
for Thermokon Devices. This is done if the device was
|
||
created by autocreate.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
|
||
Shutter (EEP F6-02-01 ... F6-02-02)<br>
|
||
[Eltako FSB12, FSB14, FSB61, FSB70]<br>
|
||
<ul>
|
||
<li>teach<br>
|
||
Teach-In is sent</li>
|
||
<li>open|open_ack<br>
|
||
The status of the device will become "open" after the TOP endpoint is
|
||
reached, or it has finished an "opens" or "position 0" command.</li>
|
||
<li>closed<br>
|
||
The status of the device will become "closed" if the BOTTOM endpoint is
|
||
reached</li>
|
||
<li>stop<br>
|
||
The status of the device become "stop" if stop command is sent.</li>
|
||
<li>not_reached<br>
|
||
The status of the device become "not_reached" between one of the endpoints.</li>
|
||
<li>anglePos: α/° (Sensor Range: α = -180 ° ... 180 °)</li>
|
||
<li>buttons: pressed|released</li>
|
||
<li>endPosition: open|open_ack|closed|not_reached|not_available</li>
|
||
<li>position: pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
|
||
<li>state: open|open_ack|closed|not_reached|stop|teach</li>
|
||
</ul><br>
|
||
The values of the reading position and anglePos are updated automatically,
|
||
if the command position is sent or the reading state was changed
|
||
manually to open or closed.<br>
|
||
Set attr subType to manufProfile, attr manufID to 00D and attr model to
|
||
FSB14|FSB61|FSB70 manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-11)<br>
|
||
[Telefunken Funktionsstecker]<br>
|
||
<ul>
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>channel<0...29|All|Input>: on|off</li>
|
||
<li>dayNight: day|night</li>
|
||
<li>defaultState: on|off|last</li>
|
||
<li>dim<0...29|Input>: dim/% (Sensor Range: dim = 0 % ... 100 %)</li>
|
||
<li>energy<channel>: 1/[Ws|Wh|KWh]</li>
|
||
<li>energyUnit<channel>: Ws|Wh|KWh</li>
|
||
<li>error<channel>: ok|warning|failure</li>
|
||
<li>localControl<channel>: enabled|disabled</li>
|
||
<li>measurementMode: energy|power</li>
|
||
<li>measurementReport: auto|query</li>
|
||
<li>measurementReset: not_active|trigger</li>
|
||
<li>measurementDelta: 1/[Ws|Wh|KWh|W|KW]</li>
|
||
<li>measurementUnit: Ws|Wh|KWh|W|KW</li>
|
||
<li>overCurrentOff<channel>: executed|ready</li>
|
||
<li>overCurrentShutdown<channel>: off|restart</li>
|
||
<li>overCurrentShutdownReset<channel>: not_active|trigger</li>
|
||
<li>power<channel>: 1/[W|KW]</li>
|
||
<li>powerFailure<channel>: enabled|disabled</li>
|
||
<li>powerFailureDetection<channel>: detected|not_detected</li>
|
||
<li>powerUnit<channel>: W|KW</li>
|
||
<li>rampTime<1...3l>: 1/s</li>
|
||
<li>responseTimeMax: 1/s</li>
|
||
<li>responseTimeMin: 1/s</li>
|
||
<li>teachInDev: enabled|disabled</li>
|
||
|
||
<li>state: on|off</li>
|
||
</ul><br>
|
||
<br>
|
||
The attr subType must be actuator.01. This is done if the device was
|
||
created by autocreate. To control the device, it must be bidirectional paired,
|
||
see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li><a name="RAW Command">RAW Command</a><br>
|
||
<br>
|
||
<ul>
|
||
<li>RORG: 1BS|4BS|MCS|RPS|UTE|VLD</li>
|
||
<li>dataSent: data (Range: 1-byte hex ... 28-byte hex)</li>
|
||
<li>statusSent: status (Range: 0x00 ... 0xFF)</li>
|
||
<li>state: RORG: rorg DATA: data STATUS: status ODATA: odata</li>
|
||
</ul><br>
|
||
With the help of this command data messages in hexadecimal format can be sent and received.
|
||
The telegram types (RORG) 1BS and RPS are always received protocol-specific.
|
||
For further information, see
|
||
<a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>.
|
||
<br>
|
||
Set attr subType to raw manually.
|
||
</li>
|
||
<br><br>
|
||
|
||
<li>Light and Presence Sensor<br>
|
||
[Omnio Ratio eagle-PM101]<br>
|
||
<ul>
|
||
<li>yes</li>
|
||
<li>no</li>
|
||
<li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx)</li>
|
||
<li>channel1: yes|no<br>
|
||
Motion message in depending on the brightness threshold</li>
|
||
<li>channel2: yes|no<br>
|
||
Motion message</li>
|
||
<li>motion: yes|no<br>
|
||
Channel 2</li>
|
||
<li>state: yes|no<br>
|
||
Channel 2</li>
|
||
</ul><br>
|
||
The sensor also sends switching commands (RORG F6) with the SenderID-1.<br>
|
||
Set attr subType to PM101 manually. Automatic teach-in is not possible,
|
||
since no EEP and manufacturer ID are sent.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="FBAHA"></a>
|
||
<h3>FBAHA</h3>
|
||
<ul>
|
||
This module connects to the AHA server (AVM Home Automation) on a FRITZ!Box.
|
||
It serves as the "physical" counterpart to the <a href="#FBDECT">FBDECT</a>
|
||
devices. Note: you have to enable the access to this feature in the FRITZ!Box
|
||
frontend first.
|
||
<br><br>
|
||
<a name="FBAHAdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FBAHA <device></code>
|
||
<br>
|
||
<br>
|
||
<device> is either a <host>:<port> combination, where
|
||
<host> is normally the address of the FRITZ!Box running the AHA server
|
||
(fritz.box or localhost), and <port> 2002, or
|
||
UNIX:SEQPACKET:/var/tmp/me_avm_home_external.ctl, the latter only works on
|
||
the fritz.box. With FRITZ!OS 5.50 the network port is available, on some
|
||
Labor variants only the UNIX socket is available.
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define fb1 FBAHA fritz.box:2002</code><br>
|
||
<code>define fb1 FBAHA UNIX:SEQPACKET:/var/tmp/me_avm_home_external.ctl</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBAHAset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>createDevs<br>
|
||
create a FHEM device for each DECT device found on the AHA-Host, see also
|
||
get devList.
|
||
</li>
|
||
<li>reopen<br>
|
||
close and reopen the connection to the AHA server. Debugging only.
|
||
</li>
|
||
<li>reregister<br>
|
||
release existing registration handle, and get a new one. Debugging only.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBAHAget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>devList<br>
|
||
return a list of devices with short info.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBAHAattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBAHAevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>UNDEFINED FBDECT_$ahaName_${NR} FBDECT $id"
|
||
</li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="FBDECT"></a>
|
||
<h3>FBDECT</h3>
|
||
<ul>
|
||
This module is used to control AVM FRITZ!DECT devices via FHEM, see also the
|
||
<a href="#FBAHA">FBAHA</a> module for the base.
|
||
<br><br>
|
||
<a name="FBDECTdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FBDECT <homeId> <id> [classes]</code>
|
||
<br>
|
||
<br>
|
||
<id> is the id of the device, the classes argument ist ignored for now.
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define lamp FBDECT 16 switch,powerMeter</code><br>
|
||
</ul>
|
||
<b>Note:</b>Usually the device is created via
|
||
<a href="#autocreate">autocreate</a>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
|
||
<a name="FBDECTset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>on/off<br>
|
||
set the device on or off.</li>
|
||
<li>
|
||
<a href="#setExtensions">set extensions</a> are supported.</li>
|
||
<li>msgInterval <sec><br>
|
||
Number of seconds between the sensor messages.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBDECTget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>devInfo<br>
|
||
report device information</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBDECTattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FBDECTevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>set_on</li>
|
||
<li>set_off</li>
|
||
<li>current: $v A</li>
|
||
<li>voltage: $v V</li>
|
||
<li>power: $v W</li>
|
||
<li>energy: $v Wh</li>
|
||
<li>powerFactor: $v"</li>
|
||
<li>temperature: $v C</li>
|
||
<li>options: uninitialized</li>
|
||
<li>options: powerOnState:[on|off|last],lock:[none,webUi,remoteFb,button]</li>
|
||
<li>control: disabled</li>
|
||
<li>control: on power < $v delay:$d sec do:state [on|off]</li>
|
||
<li>relaytimes: disabled</li>
|
||
<li>relaytimes: HEX</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="FB_CALLMONITOR"></a>
|
||
<h3>FB_CALLMONITOR</h3>
|
||
<ul>
|
||
<tr><td>
|
||
The FB_CALLMONITOR module connects to a AVM FritzBox Fon and listens for telephone
|
||
<a href="#FB_CALLMONITORevents">events</a> (Receiving incoming call, Making a call)
|
||
<br><br>
|
||
In order to use this module with fhem you <b>must</b> enable the CallMonitor feature via
|
||
telephone shortcode.<br><br>
|
||
<ul>
|
||
<code>#96*5* - for activating<br>#96*4* - for deactivating</code>
|
||
</ul>
|
||
|
||
<br>
|
||
Just dial the shortcode for activating on one of your phones, after 3 seconds just hang up. The feature is now activated.
|
||
<br>
|
||
After activating the CallMonitor-Support in your FritzBox, this module is able to
|
||
generate an event for each call.
|
||
<br><br>
|
||
This module work with any FritzBox Fon model.
|
||
<br><br>
|
||
|
||
<a name="FB_CALLMONITORdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FB_CALLMONITOR <ip-address>[:port]</code><br>
|
||
<br>
|
||
port is 1012 by default.
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
<a name="FB_CALLMONITORset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><b>rereadPhonebook</b> - Reloads the FritzBox phonebook (from given file or directly if available)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FB_CALLMONITORget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li><b>search <telephone-number></b> - returns the name of the given number via reverse-search (internal phonebook, cache or internet research)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FB_CALLMONITORattr"></a>
|
||
<b>Attributes</b><br><br>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||
<li><a name="disable">disable</a></li>
|
||
Optional attribute to disable the Callmonitor. When disabled, no phone events can be detected.
|
||
<br><br>
|
||
Possible values: 0 => Callmonitor is activated, 1 => Callmonitor is deactivated.<br>
|
||
Default Value is 0 (activated)<br><br>
|
||
<li><a name="reverse-search">reverse-search</a> (all|internal|klicktel.de|dasoertliche.de|search.ch|dasschnelle.at|none)</li>
|
||
Activate the reverse searching of the external number (at dial and call receiving).
|
||
It is possible to select a specific web service, which should be used for reverse searching.
|
||
If the attribute is set to "all", the reverse search will use the internal phonebook (if running FHEM on a FritzBox) or reverse search on all websites (execept search.ch and dasschnelle.at) until a valid answer is found on of them
|
||
If is set to "none", then no reverse searching will be used.<br><br>Default value is "none".<br><br>
|
||
<li><a name="reverse-search-cache">reverse-search-cache</a></li>
|
||
If this attribute is activated each reverse-search result is saved in an internal cache
|
||
and will be used instead of reverse searching again the same number.<br><br>
|
||
Possible values: 0 => off , 1 => on<br>
|
||
Default Value is 0 (off)<br><br>
|
||
<li><a name="reverse-search-cache-file">reverse-search-cache-file</a> <file></li>
|
||
Write the internal reverse-search-cache to the given file and use it next time FHEM starts.
|
||
So all reverse search results are persistent written to disk and will be used instantly after FHEM starts.<br><br>
|
||
<li><a name="reverse-search-phonebook-file">reverse-search-phonebook-file</a> <file></li>
|
||
This attribute can be used to specify the (full) path to a phonebook file in FritzBox format (XML structure). Using this option it is possible to use the phonebook of a FritzBox even without FHEM running on a Fritzbox.
|
||
The phonebook file can be obtained by an export via FritzBox web UI<br><br>
|
||
Default value is /var/flash/phonebook (phonebook filepath on FritzBox)<br><br>
|
||
<li><a name="remove-leading-zero">remove-leading-zero</a></li>
|
||
If this attribute is activated, a leading zero will be removed from the external_number (e.g. in telefon systems).<br><br>
|
||
Possible values: 0 => off , 1 => on<br>
|
||
Default Value is 0 (off)<br><br>
|
||
<li><a name="unique-call-ids">unique-call-ids</a></li>
|
||
If this attribute is activated, each call will use a biunique call id. So each call can be separated from previous calls in the past.<br><br>
|
||
Possible values: 0 => off , 1 => on<br>
|
||
Default Value is 0 (off)<br><br>
|
||
<li><a name="local-area-code">local-area-code</a></li>
|
||
Use the given local area code for reverse search in case of a local call (e.g. 0228 for Bonn, Germany)<br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FB_CALLMONITORevents"></a>
|
||
<b>Generated Events:</b><br><br>
|
||
<ul>
|
||
<li><b>event</b>: (call|ring|connect|disconnect) - which event in detail was triggerd</li>
|
||
<li><b>external_number</b>: - The participants number which is calling (event: ring) or beeing called (event: call)</li>
|
||
<li><b>external_name</b>: - The result of the reverse lookup of the external_number via internet. Is only available if reverse-search is activated. Special values are "unknown" (no search results found) and "timeout" (got timeout while search request). In case of an timeout and activated caching, the number will be searched again next time a call occurs with the same number</li>
|
||
<li><b>internal_number</b>: - The internal number (fixed line, VoIP number, ...) on which the participant is calling (event: ring) or is used for calling (event: call)</li>
|
||
<li><b>internal_connection</b>: - The internal connection (FON1, FON2, ISDN, DECT, ...) which is used to take the call</li>
|
||
<li><b>external_connection</b>: - The external connection (fixed line, VoIP account) which is used to take the call</li>
|
||
<li><b>call_duration</b>: - The call duration in seconds. Is only generated at a disconnect event. The value 0 means, the call was not taken by anybody.</li>
|
||
<li><b>call_id</b>: - The call identification number to separate events of two or more different calls at the same time. This id number is equal for all events relating to one specific call.</li>
|
||
<li><b>missed_call</b> $number - This event will be raised in case of a missing incoming call. If available, also the name of the calling number will be displayed.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="FHEM2FHEM"></a>
|
||
<h3>FHEM2FHEM</h3>
|
||
<ul>
|
||
FHEM2FHEM is a helper module to connect separate FHEM installations.
|
||
<br><br>
|
||
<a name="FHEM2FHEMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FHEM2FHEM <host>[:<portnr>][:SSL] [LOG:regexp|RAW:devicename] {portpassword}
|
||
</code>
|
||
<br>
|
||
<br>
|
||
Connect to the <i>remote</i> FHEM on <host>. <portnr> is a telnet
|
||
port on the remote FHEM, defaults to 7072. The optional :SSL suffix is
|
||
needed, if the remote FHEM configured SSL for this telnet port. In this case
|
||
the IO::Socket::SSL perl module must be installed for the local host too.<br>
|
||
|
||
Note: if the remote FHEM is on a separate host, the telnet port on the remote
|
||
FHEM musst be specified with the global option.<br>
|
||
|
||
The next parameter specifies the connection
|
||
type:
|
||
<ul>
|
||
<li>LOG<br>
|
||
Using this type you will receive all events generated by the remote FHEM,
|
||
just like when using the <a href="#inform">inform on</a> command, and you
|
||
can use these events just like any local event for <a
|
||
href="#FileLog">FileLog </a> or <a href="#notify">notify</a>.
|
||
The regexp will prefilter the events distributed locally, for the syntax
|
||
see the notify definition.<br>
|
||
Drawbacks: the remote devices wont be created locally, so list wont
|
||
show them and it is not possible to manipulate them from the local
|
||
FHEM. It is possible to create a device with the same name on both FHEM
|
||
instances, but if both of them receive the same event (e.g. because both
|
||
of them have a CUL attached), then all associated FileLogs/notifys will be
|
||
triggered twice. </li>
|
||
|
||
<li>RAW<br>
|
||
By using this type the local FHEM will receive raw events from the remote
|
||
FHEM device <i>devicename</i>, just like if it would be attached to the
|
||
local FHEM.
|
||
Drawback: only devices using the Dispatch function (CUL, FHZ, CM11,
|
||
SISPM, RFXCOM, TCM, TRX, TUL) generate raw messages, and you must create a
|
||
FHEM2FHEM instance for each remote device.<br>
|
||
<i>devicename</i> must exist on the local
|
||
FHEM server too with the same name and same type as the remote device, but
|
||
with the device-node "none", so it is only a dummy device.
|
||
All necessary attributes (e.g. <a href="#rfmode">rfmode</a> if the remote
|
||
CUL is in HomeMatic mode) must also be set for the local device.
|
||
Do not reuse a real local device, else duplicate filtering (see dupTimeout)
|
||
won't work correctly.
|
||
</li>
|
||
</ul>
|
||
The last parameter specifies an optional portpassword, if the remote server
|
||
activated <a href="#portpassword">portpassword</a>.
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>define ds1 FHEM2FHEM 192.168.178.22:7072 LOG:.*</code><br>
|
||
<br>
|
||
<code>define RpiCUL CUL none 0000</code><br>
|
||
<code>define ds2 FHEM2FHEM 192.168.178.22:7072 RAW:RpiCUL</code><br>
|
||
and on the RPi (192.168.178.22):<br>
|
||
<code>rename CUL_0 RpiCUL</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHEM2FHEMset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="FHEM2FHEMget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="FHEM2FHEMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="FHEMWEB"></a>
|
||
<h3>FHEMWEB</h3>
|
||
<ul>
|
||
FHEMWEB is the builtin web-frontend, it also implements a simple web
|
||
server (optionally with Basic-Auth and HTTPS).
|
||
<br> <br>
|
||
|
||
<a name="FHEMWEBdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FHEMWEB <tcp-portnr> [global]</code>
|
||
<br><br>
|
||
Enable the webfrontend on port <tcp-portnr>. If global is specified,
|
||
then requests from all interfaces (not only localhost / 127.0.0.1) are
|
||
serviced.<br>
|
||
To enable listening on IPV6 see the comments <a href="#telnet">here</a>.
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHEMWEBset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>rereadicons<br>
|
||
reads the names of the icons from the icon path. Use after adding or
|
||
deleting icons.
|
||
</li>
|
||
<li>clearSvgCache<br>
|
||
delete all files found in the www/SVGcache directory, which is used to
|
||
cache SVG data, if the SVGcache attribute is set.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHEMWEBget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>icon <logical icon><br>
|
||
returns the absolute path to the logical icon. Example:
|
||
<ul>
|
||
<code>get myFHEMWEB icon FS20.on<br>
|
||
/data/Homeautomation/fhem/FHEM/FS20.on.png
|
||
</code>
|
||
</ul>
|
||
</li>
|
||
<li>pathlist<br>
|
||
return FHEMWEB specific directories, where files for given types are
|
||
located
|
||
<br><br>
|
||
|
||
</ul>
|
||
|
||
<a name="FHEMWEBattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="webname"></a>
|
||
<li>webname<br>
|
||
Path after the http://hostname:port/ specification. Defaults to fhem,
|
||
i.e the default http address is http://localhost:8083/fhem
|
||
</li><br>
|
||
|
||
<a name="refresh"></a>
|
||
<li>refresh<br>
|
||
If set, a http-equiv="refresh" entry will be genererated with the given
|
||
argument (i.e. the browser will reload the page after the given
|
||
seconds).
|
||
</li><br>
|
||
|
||
<a name="plotmode"></a>
|
||
<li>plotmode<br>
|
||
Specifies how to generate the plots:
|
||
<ul>
|
||
<li>SVG<br>
|
||
The plots are created with the <a href="#SVG">SVG</a> module.
|
||
This is the default.</li>
|
||
|
||
<li>gnuplot<br>
|
||
The plots are created with the gnuplot program. Note: this mode
|
||
ist only available due to historic reasons.</li>
|
||
|
||
<li>gnuplot-scroll<br>
|
||
Like the gnuplot-mode, but scrolling to historical values is alos
|
||
possible, just like with SVG.</li>
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="plotsize"></a>
|
||
<li>plotsize<br>
|
||
the default size of the plot, in pixels, separated by comma:
|
||
width,height. You can set individual sizes by setting the plotsize of
|
||
the SVG. Default is 800,160 for desktop, and 480,160 for
|
||
smallscreen.
|
||
</li><br>
|
||
|
||
<a name="nrAxis"></a>
|
||
<li>nrAxis<br>
|
||
the number of axis for which space should be reserved on the left and
|
||
right sides of a plot and optionaly how many axes should realy be used
|
||
on each side, separated by comma: left,right[,useLeft,useRight]. You
|
||
can set individual numbers by setting the nrAxis of the SVG. Default is
|
||
1,1.
|
||
</li><br>
|
||
|
||
<a name="SVGcache"></a>
|
||
<li>SVGcache<br>
|
||
if set, cache plots which won't change any more (the end-date is prior
|
||
to the current timestamp). The files are written to the www/SVGcache
|
||
directory. Default is off.<br>
|
||
See also the clearSvgCache command for clearing the cache.
|
||
</li><br>
|
||
|
||
<a name="endPlotToday"></a>
|
||
<li>endPlotToday<br>
|
||
If this FHEMWEB attribute is set to 1, then week and month plots will
|
||
end today. Else the current week (starting at Sunday) or the current
|
||
month will be shown.<br>
|
||
</li><br>
|
||
|
||
<a name="endPlotNow"></a>
|
||
<li>endPlotNow<br>
|
||
If this FHEMWEB attribute is set to 1, then day and hour plots will
|
||
end at current time. Else the whole day, the 6 hour period starting at
|
||
0, 6, 12 or 18 hour or the whole hour will be shown. This attribute
|
||
is not used if the SVG has the attribute startDate defined.<br>
|
||
</li><br>
|
||
|
||
<a name="ploteditor"></a>
|
||
<li>ploteditor<br>
|
||
Configures if the <a href="#plotEditor">Plot editor</a> should be shown
|
||
in the SVG detail view.
|
||
Can be set to always, onClick or never. Default is always.
|
||
</li><br>
|
||
|
||
<a name="plotfork"></a>
|
||
<li>plotfork<br>
|
||
If set, generate the logs in a parallel process. Note: do not use it
|
||
on Windows and on systems with small memory foorprint.
|
||
</li><br>
|
||
|
||
<a name="basicAuth"></a>
|
||
<li>basicAuth, basicAuthMsg<br>
|
||
request a username/password authentication for access. You have to set
|
||
the basicAuth attribute to the Base64 encoded value of
|
||
<user>:<password>, e.g.:<ul>
|
||
# Calculate first the encoded string with the commandline program<br>
|
||
$ echo -n fhemuser:secret | base64<br>
|
||
ZmhlbXVzZXI6c2VjcmV0<br>
|
||
fhem.cfg:<br>
|
||
attr WEB basicAuth ZmhlbXVzZXI6c2VjcmV0
|
||
</ul>
|
||
You can of course use other means of base64 encoding, e.g. online
|
||
Base64 encoders. If basicAuthMsg is set, it will be displayed in the
|
||
popup window when requesting the username/password.<br>
|
||
<br>
|
||
If the argument of basicAuth is enclosed in {}, then it will be
|
||
evaluated, and the $user and $password variable will be set to the
|
||
values entered. If the return value is true, then the password will be
|
||
accepted.
|
||
Example:<br>
|
||
<code>
|
||
attr WEB basicAuth { "$user:$password" eq "admin:secret" }<br>
|
||
</code>
|
||
</li><br>
|
||
|
||
<a name="HTTPS"></a>
|
||
<li>HTTPS<br>
|
||
Enable HTTPS connections. This feature requires the perl module
|
||
IO::Socket::SSL, to be installed with cpan -i IO::Socket::SSL or
|
||
apt-get install libio-socket-ssl-perl; OSX and the FritzBox-7390
|
||
already have this module.<br>
|
||
|
||
A local certificate has to be generated into a directory called certs,
|
||
this directory <b>must</b> be in the <a href="#modpath">modpath</a>
|
||
directory, at the same level as the FHEM directory.
|
||
<ul>
|
||
mkdir certs<br>
|
||
cd certs<br>
|
||
openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout server-key.pem
|
||
</ul>
|
||
<br>
|
||
</li>
|
||
|
||
<a name="allowedCommands"></a>
|
||
<li>allowedCommands<br>
|
||
A comma separated list of commands allowed from this FHEMWEB
|
||
instance.<br> If set to an empty list <code>, (i.e. comma only)</code>
|
||
then this FHEMWEB instance will be read-only.<br> If set to
|
||
<code>get,set</code>, then this FHEMWEB instance will only allow
|
||
regular usage of the frontend by clicking the icons/buttons/sliders but
|
||
not changing any configuration.<br>
|
||
|
||
|
||
This attribute intended to be used together with hiddenroom/hiddengroup
|
||
<br>
|
||
|
||
<b>Note:</b>allowedCommands should work as intended, but no guarantee
|
||
can be given that there is no way to circumvent it. If a command is
|
||
allowed it can be issued by URL manipulation also for devices that are
|
||
hidden.</li><br>
|
||
|
||
<li><a href="#allowfrom">allowfrom</a></li>
|
||
</li><br>
|
||
|
||
<a name="stylesheetPrefix"></a>
|
||
<li>stylesheetPrefix<br>
|
||
prefix for the files style.css, svg_style.css and svg_defs.svg. If the
|
||
file with the prefix is missing, the default file (without prefix) will
|
||
be used. These files have to be placed into the FHEM directory, and can
|
||
be selected directly from the "Select style" FHEMWEB menu entry. Example:
|
||
<ul>
|
||
attr WEB stylesheetPrefix dark<br>
|
||
<br>
|
||
Referenced files:<br>
|
||
<ul>
|
||
darksvg_defs.svg<br>
|
||
darksvg_style.css<br>
|
||
darkstyle.css<br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<b>Note:</b>if the argument contains the string smallscreen or touchpad,
|
||
then FHEMWEB will optimize the layout/access for small screen size (i.e.
|
||
smartphones) or touchpad devices (i.e. tablets)<br>
|
||
|
||
The default configuration installs 3 FHEMWEB instances: port 8083 for
|
||
desktop browsers, port 8084 for smallscreen, and 8085 for touchpad.<br>
|
||
|
||
If touchpad or smallscreen is specified, then WebApp support is
|
||
activated: After viewing the site on the iPhone or iPad in Safari, you
|
||
can add a link to the home-screen to get full-screen support. Links are
|
||
rendered differently in this mode to avoid switching back to the "normal"
|
||
browser.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="iconPath"></a>
|
||
<li>iconPath<br>
|
||
colon separated list of directories where the icons are read from.
|
||
The directories start in the fhem/www/images directory. The default is
|
||
$styleSheetPrefix:default:fhemSVG:openautomation<br>
|
||
Set it to fhemSVG:openautomation to get only SVG images.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="hiddenroom"></a>
|
||
<li>hiddenroom<br>
|
||
Comma separated list of rooms to "hide", i.e. not to show. Special
|
||
values are input, detail and save, in which case the input areas, link
|
||
to the detailed views or save button is hidden (although each aspect
|
||
still can be addressed through URL manipulation).<br>
|
||
The list can also contain values from the additional "Howto/Wiki/FAQ"
|
||
block.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="hiddengroup"></a>
|
||
<li>hiddengroup<br>
|
||
Comma separated list of groups to "hide", i.e. not to show in any room
|
||
of this FHEMWEB instance.<br>
|
||
Example: attr WEBtablet hiddengroup FileLog,dummy,at,notify
|
||
</li>
|
||
<br>
|
||
|
||
<a name="menuEntries"></a>
|
||
<li>menuEntries<br>
|
||
Comma separated list of name,html-link pairs to display in the
|
||
left-side list. Example:<br>
|
||
attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de<br>
|
||
attr WEB menuEntries AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on<br>
|
||
</li>
|
||
<br>
|
||
|
||
<a name="longpoll"></a>
|
||
<li>longpoll<br>
|
||
Affects devices states in the room overview only.<br>
|
||
In this mode status update is refreshed more or less instantaneously,
|
||
and state change (on/off only) is done without requesting a complete
|
||
refresh from the server.
|
||
Default is on.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="longpollSVG"></a>
|
||
<li>longpollSVG<br>
|
||
Reloads an SVG weblink, if an event should modify its content. Since
|
||
an exact determination of the affected events is too complicated, we
|
||
need some help from the #FileLog definition in the .gplot file: the
|
||
filter used there (second parameter) must either contain only the
|
||
deviceName or have the form deviceName.event or deviceName.*. This is
|
||
always the case when using the <a href="#plotEditor">Plot
|
||
editor</a>. The SVG will be reloaded for <b>any</b> event triggered by
|
||
this deviceName.
|
||
Default is off.
|
||
</li>
|
||
<br>
|
||
|
||
|
||
<a name="redirectCmds"></a>
|
||
<li>redirectCmds<br>
|
||
Clear the browser URL window after issuing the command by redirecting
|
||
the browser, as a reload for the same site might have unintended
|
||
side-effects. Default is 1 (enabled). Disable it by setting this
|
||
attribute to 0 if you want to study the command syntax, in order to
|
||
communicate with FHEMWEB.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="fwcompress"></a>
|
||
<li>fwcompress<br>
|
||
Enable compressing the HTML data (default is 1, i.e. yes, use 0 to switch it off).
|
||
</li>
|
||
<br>
|
||
|
||
<a name="reverseLogs"></a>
|
||
<li>reverseLogs<br>
|
||
Display the lines from the logfile in a reversed order, newest on the
|
||
top, so that you dont have to scroll down to look at the latest entries.
|
||
Note: enabling this attribute will prevent FHEMWEB from streaming
|
||
logfiles, resulting in a considerably increased memory consumption
|
||
(about 6 times the size of the file on the disk).
|
||
</li>
|
||
<br>
|
||
|
||
<a name="CORS"></a>
|
||
<li>CORS<br>
|
||
If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
|
||
header, see the wikipedia for details.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="icon"></a>
|
||
<li>icon<br>
|
||
Set the icon for a device in the room overview. There is an
|
||
icon-chooser in FHEMWEB to ease this task. Setting icons for the room
|
||
itself is indirect: there must exist an icon with the name
|
||
ico<ROOMNAME>.png in the iconPath.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="roomIcons"></a>
|
||
<li>roomIcons<br>
|
||
Space separated list of room:icon pairs, to override the default
|
||
behaviour of showing an icon, if there is one with the name of
|
||
"icoRoomName". This is the correct way to remove the icon for the room
|
||
Everything, or to set one for rooms with / in the name (e.g.
|
||
Anlagen/EDV). The first part is treated as regexp, so space is
|
||
represented by a dot. Example:<br>
|
||
attr WEB roomIcons Anlagen.EDV:icoEverything
|
||
</li>
|
||
<br>
|
||
|
||
<a name="sortRooms"></a>
|
||
<li>sortRooms<br>
|
||
Space separated list of rooms to override the default
|
||
sort order of the room links. Example:<br>
|
||
attr WEB sortRooms DG OG EG Keller
|
||
</li>
|
||
<br>
|
||
|
||
<a name="defaultRoom"></a>
|
||
<li>defaultRoom<br>
|
||
show the specified room if no room selected, e.g. on execution of some
|
||
commands. If set hides the <a href="#motd">motd</a>. Example:<br>
|
||
attr WEB defaultRoom Zentrale
|
||
</li>
|
||
<br>
|
||
|
||
<a name="sortby"></a>
|
||
<li>sortby<br>
|
||
Take the value of this attribute when sorting the devices in the room
|
||
overview instead of the alias, or if that is missing the devicename
|
||
itself.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="devStateIcon"></a>
|
||
<li>devStateIcon<br>
|
||
First form:<br>
|
||
<ul>
|
||
Space separated list of regexp:icon-name:cmd triples, icon-name and cmd
|
||
may be empty.<br>
|
||
If the state of the device matches regexp, then icon-name will be
|
||
displayed as the status icon in the room, and (if specified) clicking
|
||
on the icon executes cmd. If fhem cannot find icon-name, then the
|
||
status text will be displayed.
|
||
Example:<br>
|
||
<ul>
|
||
attr lamp devStateIcon on:closed off:open<br>
|
||
attr lamp devStateIcon on::A0 off::AI<br>
|
||
attr lamp devStateIcon .*:noIcon<br>
|
||
</ul>
|
||
Note: if the image is referencing an SVG icon, then you can use the
|
||
@colorname suffix to color the image. E.g.:<br>
|
||
<ul>
|
||
attr Fax devStateIcon on:control_building_empty@red off:control_building_filled:278727
|
||
</ul>
|
||
|
||
</ul>
|
||
Second form:<br>
|
||
<ul>
|
||
Perl regexp enclosed in {}. If the code returns undef, then the default
|
||
icon is used, if it retuns a string enclosed in <>, then it is
|
||
interpreted as an html string. Else the string is interpreted as a
|
||
devStateIcon of the first fom, see above.
|
||
Example:<br>
|
||
{'<div style="width:32px;height:32px;background-color:green"></div>'}
|
||
</ul>
|
||
</li>
|
||
<br>
|
||
|
||
<a name="devStateStyle"></a>
|
||
<li>devStateStyle<br>
|
||
Specify an HTML style for the given device, e.g.:<br>
|
||
<ul>
|
||
attr sensor devStateStyle style="text-align:left;;font-weight:bold;;"<br>
|
||
</ul>
|
||
</li>
|
||
<br>
|
||
|
||
<a name="webCmd"></a>
|
||
<li>webCmd<br>
|
||
Colon separated list of commands to be shown in the room overview for a
|
||
certain device. Has no effect on smallscreen devices, see the
|
||
devStateIcon command for an alternative.<br>
|
||
Example:
|
||
<ul>
|
||
attr lamp webCmd on:off:on-for-timer 10<br>
|
||
</ul>
|
||
<br>
|
||
|
||
The first specified command is looked up in the "set device ?" list
|
||
(see the <a href="#setList">setList</a> attribute for dummy devices).
|
||
If <b>there</b> it contains some known modifiers (colon, followed
|
||
by a comma separated list), then a different widget will be displayed:
|
||
<ul>
|
||
<li>if the modifier is ":noArg", then no further input field is
|
||
displayed </li>
|
||
<li>if the modifier is ":time", then a javascript driven timepicker is
|
||
displayed.</li>
|
||
<li>if the modifier is ":textField", an input field is displayed.</li>
|
||
<li>if the modifier is of the form
|
||
":slider,<min>,<step>,<max>", then a javascript
|
||
driven slider is displayed</li>
|
||
<li>if the modifier is of the form ":multiple,val1,val2,...", then
|
||
multiple values can be selected, the result is comma separated.</li>
|
||
<li>else a dropdown with all the modifier values is displayed</li>
|
||
</ul>
|
||
If the command is state, then the value will be used as a command.<br>
|
||
Examples for the modifier:
|
||
<ul>
|
||
define d1 dummy<br>
|
||
attr d1 webCmd state<br>
|
||
attr d1 setList state:on,off<br>
|
||
define d2 dummy<br>
|
||
attr d2 webCmd state<br>
|
||
attr d2 setList state:slider,0,1,10<br>
|
||
define d3 dummy<br>
|
||
attr d3 webCmd state<br>
|
||
attr d3 setList state:time<br>
|
||
</ul>
|
||
Note: this is an attribute for the displayed device, not for the FHEMWEB
|
||
instance.
|
||
</li>
|
||
<br>
|
||
|
||
<a name="column"></a>
|
||
<li>column<br>
|
||
Allows to display more than one column per room overview, by specifying
|
||
the groups for the columns. Example:<br>
|
||
<ul><code>
|
||
attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
|
||
</code></ul>
|
||
In this example in the LivingRoom the FS20 and the notify group is in
|
||
the first column, the FHZ and the notify in the second.<br>
|
||
Note: some elements like SVG plots and readingsGroup can only be part of
|
||
a column if they are part of a <a href="#group">group</a>.
|
||
</li>
|
||
|
||
<a name="closeConn"></a>
|
||
<li>closeConn<br>
|
||
If set, a TCP Connection will only serve one HTTP request. Seems to
|
||
solve problems for certain hardware combinations like slow
|
||
FHEM-Server, and iPad/iPhone as Web-client.
|
||
</li><br>
|
||
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="FHT"></a>
|
||
<h3>FHT</h3>
|
||
<ul>
|
||
Fhem can receive FHT radio (868.35 MHz) messages either through an <a
|
||
href="#FHZ">FHZ</a> or an <a href="#CUL">CUL</a> device, so this must be
|
||
defined first.<br><br>
|
||
|
||
<a name="FHTdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FHT <fhtaddress></code>
|
||
<br><br>
|
||
|
||
<code><fhtaddress></code> is a four digit hex number,
|
||
corresponding to the address of the FHT80b device.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define wz FHT 3232</code><br>
|
||
</ul>
|
||
<br>
|
||
See the FHT section in <a href="#set">set</a> for more.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHTset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <valuetype> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul><code>
|
||
desired-temp<br>
|
||
day-temp night-temp<br>
|
||
report1 report2<br>
|
||
refreshvalues<br>
|
||
mode<br>
|
||
holiday1 holiday2 # see mode holiday_short or holiday<br>
|
||
manu-temp # No clue what it does.<br>
|
||
year month day hour minute<br>
|
||
time date<br>
|
||
lowtemp-offset # Alarm-Temp.-Differenz<br>
|
||
windowopen-temp<br>
|
||
mon-from1 mon-to1 mon-from2 mon-to2<br>
|
||
tue-from1 tue-to1 tue-from2 tue-to2<br>
|
||
wed-from1 wed-to1 wed-from2 wed-to2<br>
|
||
thu-from1 thu-to1 thu-from2 thu-to2<br>
|
||
fri-from1 fri-to1 fri-from2 fri-to2<br>
|
||
sat-from1 sat-to1 sat-from2 sat-to2<br>
|
||
sun-from1 sun-to1 sun-from2 sun-to2<br>
|
||
</code></ul>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>set wz desired-temp 22.5</code><br>
|
||
<code>set fl desired-temp 20.5 day-temp 19.0 night-temp 16.0</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>Following events are reported (more or less regularly) by each FHT
|
||
device: <code>measured-temp actuator actuator1...actuator8
|
||
warnings</code><br>
|
||
You can use these strings for <a href="#notify">notify</a> or
|
||
<a href="#FileLog">FileLog</a> definitions.
|
||
<ul>
|
||
<li>warnings can contain following strings:
|
||
none, Battery low,Temperature too low, Window open,
|
||
Fault on window sensor
|
||
</li>
|
||
<li>actuator (without a suffix) stands for all actuators.</li>
|
||
<li>actuator or actuator1..8 can take following values:
|
||
<ul>
|
||
<li><value>%<br>
|
||
This is the normal case, the actuator is instructed to
|
||
open to this value.
|
||
</li>
|
||
<li>offset <value>%<br>
|
||
The actuator is running with this offset.
|
||
</li>
|
||
<li>lime-protection<br>
|
||
The actuator was instructed to execute the lime-protection
|
||
procedure.
|
||
</li>
|
||
<li>synctime<br>
|
||
If you select Sond/Sync on the FHT80B, you'll see a count
|
||
down.
|
||
</li>
|
||
<li>test<br>
|
||
The actuator was instructed by the FHT80b to emit a beep.
|
||
</li>
|
||
<li>pair<br>
|
||
The the FHT80b sent a "you-belong-to-me" to this actuator.
|
||
</li>
|
||
</ul></li>
|
||
</ul></li>
|
||
<br>
|
||
|
||
<li>The FHT is very economical (or lazy), it accepts one message from the
|
||
FHZ1x00 every 115+x seconds, where x depends on the fhtaddress. Don't
|
||
be surprised if your command is only accepted 10 minutes later by the
|
||
device. FHT commands are buffered in the FHZ1x00/CUL till they are
|
||
sent to the FHT, see the related <code>fhtbuf</code> entry in the
|
||
<code><a href="#get">get</a></code> section.<br> You can send up to 8
|
||
commands in one message at once to the FHT if you specify them all as
|
||
arguments to the same set command, see the example above.
|
||
</li>
|
||
<br>
|
||
|
||
<li>time sets hour and minute to local time</li><br>
|
||
|
||
<li>date sets year, month and date to local time</li><br>
|
||
|
||
<li>refreshvalues is an alias for report1 255 report2 255</li><br>
|
||
|
||
<li>All <code>*-temp</code> values need a temperature
|
||
as argument, which will be rounded to 0.5 Celsius.<br>
|
||
Temperature values must between 5.5 and 30.5 Celsius. Value 5.5 sets
|
||
the actuator to OFF, value 30.5 set the actuator to ON</li><br>
|
||
|
||
<li><code>mode</code> is one of <code>auto, manual, holiday or
|
||
holiday_short.</code><br>
|
||
If the mode is holiday, then the mode switches back to either auto or
|
||
manual at 00:00 of the day specified by the following:
|
||
<ul>
|
||
<li>holiday1 sets the end-day of the holiday</li>
|
||
<li>holiday2 sets the end-month of the holiday</li>
|
||
</ul>
|
||
For holiday_short (party mode)
|
||
<ul>
|
||
<li> holiday1 sets the absolute hour to switch back from this
|
||
mode (in 10-minute steps, max 144)</li>
|
||
<li> holiday2 sets the day of month to switch back from this mode
|
||
(can only be today or tomorrow, since holiday1 accepts only 24
|
||
hours).</li>
|
||
Example:
|
||
<ul>
|
||
<li>current date is 29 Jan, time is 18:05</li>
|
||
<li>you want to switch to party mode until tomorrow 1:00</li>
|
||
<li>set holiday1 to 6 (6 x 10min = 1hour) and holiday2 to
|
||
30</li>
|
||
|
||
</ul>
|
||
</ul>
|
||
The temperature for the holiday period is set by the desired-temperature
|
||
parameter. <br> Note that you cannot set holiday mode for days earlier than the
|
||
day after tomorrow, for this you must use holiday_short.<br>
|
||
Note also, you cannot set parameters seperately, you must set them in one command.
|
||
Example:
|
||
<br>
|
||
<code>set FHT1 mode holiday holiday1 24 holiday2 12 desired-temp 14</code>
|
||
</li>
|
||
<br>
|
||
|
||
<li>The <code>*-from1/*-from2/*-to1/*-to2</code> valuetypes need a time
|
||
spec as argument in the HH:MM format. They define the periods, where
|
||
the day-temp is valid. The minute (MM) will be rounded to 10, and
|
||
24:00 means off.</li><br>
|
||
|
||
<li>To synchronize the FHT time and to "wake" muted FHTs it is adviseable
|
||
to schedule following command:<br>
|
||
<code>define fht_sync at +*3:30 set TYPE=FHT time</code>
|
||
</li>
|
||
<br>
|
||
|
||
<li><code>report1</code> with parameter 255 requests all settings for
|
||
monday till sunday to be sent. The argument is a bitfield, to request
|
||
unique values add up the following:
|
||
<ul>
|
||
<li> 1: monday</li>
|
||
<li> 2: tuesday</li>
|
||
<li> 4: thursday</li>
|
||
<li> 8: wednesday</li>
|
||
<li>16: friday</li>
|
||
<li>32: saturday</li>
|
||
<li>64: sunday</li>
|
||
</ul>
|
||
measured-temp and actuator is sent along if it is considered
|
||
appropriate
|
||
by the FHT.
|
||
<br><br>
|
||
<b>Note:</b> This command generates a lot of RF traffic, which can
|
||
lead to further problems, especially if the reception is not clear.
|
||
</li><br>
|
||
|
||
<li><code>report2</code> with parameter 255 requests the following
|
||
settings to be reported: day-temp night-temp windowopen-temp
|
||
lowtemp-offset desired-temp measured-temp mode warnings.
|
||
The argument is (more or less) a bitfield, to request unique values
|
||
add up the following:
|
||
<ul>
|
||
<li> 1: warnings</li>
|
||
<li> 2: mode</li>
|
||
<li> 4: day-temp, night-temp, windowopen-temp</li>
|
||
<li>64: lowtemp-offset</li>
|
||
</ul>
|
||
measured-temp and actuator is sent along if it is considered
|
||
appropriate by the FHT.</li>
|
||
<br>
|
||
|
||
<li><code>lowtemp-offset</code> needs a temperature as argument, valid
|
||
values must be between 1.0 and 5.0 Celsius.<br> It will trigger a
|
||
warning if <code>desired-temp - measured-temp >
|
||
lowtemp-offset</code> in a room for at least 1.5 hours after the last
|
||
desired-temp change.</li>
|
||
<br>
|
||
|
||
<li>FHEM optionally has an internal software buffer for FHT devices.
|
||
This buffer should prevent transmission errors. If there is no
|
||
confirmation for a given period, FHEM resends the command. You can
|
||
see the queued commands with <a href="#list">list</a>
|
||
<fht-device>.
|
||
See the <a href="#fhtsoftbuffer">fhtsoftbuffer</a>,
|
||
<a href="#retrycount">retrycount</a> and
|
||
<a href="#minfhtbuffer">minfhtbuffer</a> attributes for details.
|
||
</li>
|
||
<br>
|
||
|
||
<li>If a buffer is still in the softbuffer, it will be sent in the
|
||
following order:<br> <code>desired-temp,mode,report1,report2,
|
||
holiday1,holiday2,day-temp,night-temp, [all other commands]</code>
|
||
</li>
|
||
<br>
|
||
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="FHTattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a><br>
|
||
<b>Note:</b>It makes sense to define an FHT device even for an FHT8b,
|
||
else you will receive "unknown FHT device, please define one" message
|
||
for each FHT8b as the CUL is reporting the 8b valve messages. But you
|
||
should set the dummy attribute for these devices, else the internal FHT
|
||
buffer of the CUL will be filled with data for the 8b's which is never
|
||
consumed. If the buffer is full, you'll get "EOB" messages from the CUL,
|
||
and you cannot transmit any data to the 80b's</li><br>
|
||
|
||
<a name="retrycount"></a>
|
||
<li>retrycount<br>
|
||
If the <a href="#fhtsoftbuffer">fhtsoftbuffer</a> attribute is set, then
|
||
resend commands <code>retrycount</code> times if after 240 seconds
|
||
no confirmation message is received from the corresponding FHT
|
||
device.<br>
|
||
Default is 1.</li><br>
|
||
|
||
<a name="minfhtbuffer"></a>
|
||
<li>minfhtbuffer<br>
|
||
FHEM won't send commands to the FHZ if its fhtbuffer is below
|
||
this value, default is 0. If this value is low, then the ordering of
|
||
fht commands (see the note in the FHT section of <a href="#set">set</a>)
|
||
has little effect, as only commands in the softbuffer can be
|
||
prioritized. The maximum value should be 7 below the hardware maximum
|
||
(see fhtbuf).
|
||
</li><br>
|
||
|
||
<a name="lazy"></a>
|
||
<li>lazy<br>
|
||
If the lazy attribute is set, FHEM won't send commands to the FHT if
|
||
the current reading and the value to be set are already identical. This
|
||
may help avoiding conflicts with the max-1%-time-on-air rule in large
|
||
installations. Not set per default.
|
||
</li><br>
|
||
|
||
<a name="tmpcorr"></a>
|
||
<li>tmpcorr<br>
|
||
Correct the temperature reported by the FHT by the value specified.
|
||
Note: only the measured-temp value reported by FHEM (used for logging)
|
||
will be modified.
|
||
</li><br>
|
||
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#model">model</a> (fht80b)</li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHTevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>actuator</li>
|
||
<li>actuator1 actuator2 actuator3 actuator4<br>
|
||
actuator5 actuator6 actuator7 actuator8<br>
|
||
(sent if you configured an offset for the associated valve)</li>
|
||
<li>mon-from1 mon-to1 mon-from2 mon-to2</li>
|
||
<li>tue-from1 tue-to1 tue-from2 tue-to2</li>
|
||
<li>wed-from1 wed-to1 wed-from2 wed-to2</li>
|
||
<li>thu-from1 thu-to1 thu-from2 thu-to2</li>
|
||
<li>fri-from1 fri-to1 fri-from2 fri-to2</li>
|
||
<li>sat-from1 sat-to1 sat-from2 sat-to2</li>
|
||
<li>sun-from1 sun-to1 sun-from2 sun-to2</li>
|
||
<li>mode</li>
|
||
<li>holiday1 holiday2</li>
|
||
<li>desired-temp</li>
|
||
<li>measured-temp measured-low measured-high</li>
|
||
<li>warnings</li>
|
||
<li>manu-temp</li>
|
||
<li>year month day hour minute</li>
|
||
<li>day-temp night-temp lowtemp-offset windowopen-temp</li>
|
||
<li>ack can-xmit can-rcv ack2 start-xmit end-xmit
|
||
(only if the CUL is configured to transmit FHT protocol data)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="FHT8V"></a>
|
||
<h3>FHT8V</h3>
|
||
<ul>
|
||
Fhem can directly control FHT8V type valves via a <a href="#CUL">CUL</a>
|
||
device without an intermediate FHT. This paragraph documents one of the
|
||
building blocks, the other is the <a href="#PID">PID</a> device.
|
||
<br>
|
||
<br>
|
||
|
||
<a name="FHT8Vdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FHT8V <housecode> [IODev|FHTID]</code>
|
||
<br><br>
|
||
|
||
<code><housecode></code> is a four digit hex number,
|
||
and must have the following relation to the housecode of the corresponding CUL
|
||
device:
|
||
<ul>given the CUL housecode as AABB, then this housecode must be
|
||
of the form CCBB, where CC is greater or equal to AA, but less then AA+8.
|
||
</ul>
|
||
This form is chosen so that the CUL can update all FHT8V valve states
|
||
within 2 minutes.
|
||
<br>
|
||
<br>
|
||
<code><IODev></code> must be specified if the last defined CUL device
|
||
is not the one to use. Usually this is done voa the <a
|
||
href="#IODev">IODev</a> attribute, but as the address checked is performed
|
||
at the definition, we must use an exception here.<br>
|
||
|
||
As an alternative you can specify the FHTID of the assigned IODev device
|
||
(instead of the IODev itself), this method is needed if you are using FHT8V
|
||
through FHEM2FHEM.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define wz FHT8V 3232</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHT8Vset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li>set <name> valve <value;><br>
|
||
Set the valve to the given value (in percent, from 0 to 100).
|
||
</li>
|
||
<li>set <name> pair<br>
|
||
Pair the valve with the CUL.
|
||
</li>
|
||
<li>set <name> decalc<br>
|
||
Start a decalcifying cycle on the given valve
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHT8Vget"></a>
|
||
<b>Get </b>
|
||
<ul>
|
||
<li>get <name> valve<br>
|
||
Read back the valve position from the CUL FHT buffer, and convert it to percent (from 0 to 100).
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHT8Vattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="FHZ"></a>
|
||
<h3>FHZ</h3>
|
||
<ul>
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module
|
||
if the devices is connected via USB or a serial port.
|
||
<br><br>
|
||
|
||
<a name="FHZdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FHZ <serial-device></code> <br>
|
||
<br>
|
||
Specifies the serial port to communicate with the FHZ1000PC or FHZ1300PC.
|
||
The name(s) of the serial-device(s) depends on your distribution. <br>
|
||
|
||
If the serial-device is called none, then no device will be opened, so you
|
||
can experiment without hardware attached.<br>
|
||
|
||
The program can service multiple devices, FS20 and FHT device commands will
|
||
be sent out through the last FHZ device defined before the definition of
|
||
the FS20/FHT device. To change the association, use the IODev attribute.<br>
|
||
<br>
|
||
|
||
For GNU/Linux you may want to read our <a href="linux.html">hints for
|
||
GNU/Linux</a> about <a href="linux.html#multipledevices">multiple USB
|
||
devices</a>.<br>
|
||
|
||
<b>Note:</b>The firmware of the FHZ1x00 will drop commands if the airtime
|
||
for the last hour would exceed 1% (which corresponds roughly to 163
|
||
commands). For this purpose there is a command counter for the last hour
|
||
(see list FHZDEVICE), which triggers with "TRANSMIT LIMIT EXCEEDED" if
|
||
there were more than 163 commands in the last hour.<br><br>
|
||
|
||
If you experience problems (for verbose 4 you get a lot of "Bad CRC
|
||
message" in the log), then try to define your device as <br> <code>define
|
||
<name> FHZ <serial-device> strangetty</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHZset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set FHZ <variable> [<value>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul>
|
||
FHTcode<br>
|
||
initFS20<br>
|
||
initHMS<br>
|
||
stopHMS<br>
|
||
initfull<br>
|
||
raw<br>
|
||
open<br>
|
||
reopen<br>
|
||
close<br>
|
||
time<br>
|
||
</ul>
|
||
Notes:
|
||
<ul>
|
||
<li>raw is used to send out "raw" FS20/FHT messages ("setters" only - no query messages!).
|
||
See message byte streams in FHEM/00_FHZ.pm and the doc directory for some examples.</li>
|
||
<li>In order to set the time of your FHT's, schedule this command every
|
||
minute:<br>
|
||
<code>define fhz_timer at +*00:01:00 set FHZ time</code><br>
|
||
See the <a href="#verbose">verbose</a> to prevent logging of
|
||
this command.
|
||
</li>
|
||
<li>FHTcode is a two digit hex number (from 00 to 63?) and sets the
|
||
central FHT code, which is used by the FHT devices. After changing
|
||
it, you <b>must</b> reprogram each FHT80b with: PROG (until Sond
|
||
appears), then select CEnt, Prog, Select nA.</li>
|
||
<li>If the FHT ceases to work for FHT devices whereas other devices
|
||
(e.g. HMS, KS300) continue to work, a<ul>
|
||
<code>set FHZ initfull</code></ul> command could help. Try<ul>
|
||
<code>set FHZ reopen</code></ul> if the FHZ
|
||
ceases to work completely. If all else fails, shutdown fhem, unplug
|
||
and replug the FHZ device. Problems with FHZ may also be related to
|
||
long USB cables or insufficient power on the USB - use a powered hub
|
||
to improve this particular part of such issues.
|
||
See <a href="http://www.fhem.de/USB.html">our USB page</a>
|
||
for detailed USB / electromag. interference troubleshooting.</li>
|
||
<li><code>initfull</code> issues the initialization sequence for the FHZ
|
||
device:<br>
|
||
<ul><code>
|
||
get FHZ init2<br>
|
||
get FHZ serial<br>
|
||
set FHZ initHMS<br>
|
||
set FHZ initFS20<br>
|
||
set FHZ time<br>
|
||
set FHZ raw 04 01010100010000<br>
|
||
</code></ul></li>
|
||
<li><code>reopen</code> closes and reopens the serial device port. This
|
||
implicitly initializes the FHZ and issues the
|
||
<code>initfull</code> command sequence.</li>
|
||
<li><code>stopHMS</code> probably is the inverse of <code>initHMS</code>
|
||
(I don't have authoritative info on what exactly it does).</li>
|
||
<li><code>close</code> closes and frees the serial device port until you open
|
||
it again with <code>open</code>, e.g. useful if you need to temporarily
|
||
unload the ftdi_sio kernel module to use the <a href="http://www.ftdichip.com/Support/Documents/AppNotes/AN232B-01_BitBang.pdf" target="_blank">bit-bang mode</a>.</li>
|
||
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHZget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get FHZ <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul>
|
||
init1<br>
|
||
init2<br>
|
||
init3<br>
|
||
serial<br>
|
||
fhtbuf<br>
|
||
</ul>
|
||
Notes:
|
||
<ul>
|
||
<li>The mentioned codes are needed for initializing the FHZ1X00</li>
|
||
<li>The answer for a command is also displayed by <code>list FHZ</code>
|
||
</li>
|
||
<li>
|
||
The FHZ1x00PC has a message buffer for the FHT (see the FHT entry in
|
||
the <a href="#set">set</a> section). If the buffer is full, then newly
|
||
issued commands will be dropped, if the attribute <a
|
||
href="#fhtsoftbuffer">fhtsoftbuffer</a> is not set.
|
||
<code>fhtbuf</code> returns the free memory in this buffer (in hex),
|
||
an empty buffer in the FHZ1000 is 2c (42 bytes), in the FHZ1300 is 4a
|
||
(74 bytes). A message occupies 3 + 2x(number of FHT commands) bytes,
|
||
this is the second reason why sending multiple FHT commands with one
|
||
<a href="#set"> set</a> is a good idea. The first reason is, that
|
||
these FHT commands are sent at once to the FHT.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FHZattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="do_not_notify"></a>
|
||
<li>do_not_notify<br>
|
||
Disable FileLog/notify/inform notification for a device. This affects
|
||
the received signal, the set and trigger commands.</li><br>
|
||
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
|
||
<a name="loglevel"></a>
|
||
<li>loglevel<br>
|
||
<b>Note:</b>Deprecated! The module maintainer is encouraged to replace it
|
||
with verbose.<br><br>
|
||
|
||
Set the device loglevel to e.g. 6 if you do not wish messages from a
|
||
given device to appear in the global logfile (FHZ/FS20/FHT). E.g. to
|
||
set the FHT time, you should schedule "set FHZ time" every minute, but
|
||
this in turn makes your logfile unreadable. These messages will not be
|
||
generated if the FHZ attribute loglevel is set to 6.<br>
|
||
On the other hand, if you have to debug a given device, setting its
|
||
loglevel to a smaller value than the value of the global verbose attribute,
|
||
it will output its messages normally seen only with higher global verbose
|
||
levels.
|
||
</li> <br>
|
||
|
||
<li><a href="#model">model</a> (fhz1000,fhz1300)</li><br>
|
||
|
||
<a name="fhtsoftbuffer"></a>
|
||
<li>fhtsoftbuffer<br>
|
||
As the FHZ command buffer for FHT devices is limited (see fhtbuf),
|
||
and commands are only sent to the FHT device every 120 seconds,
|
||
the hardware buffer may overflow and FHT commands get lost.
|
||
Setting this attribute implements an "unlimited" software buffer.<br>
|
||
Default is disabled (i.e. not set or set to 0).</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
|
||
<a name="FLOORPLAN"></a>
|
||
<h3>FLOORPLAN</h3>
|
||
<ul>
|
||
Implements an additional entry "Floorplans" to your fhem menu, leading to a userinterface without fhem-menu, rooms or devicelists.
|
||
Devices can be displayed at a defined coordinate on the screen, usually with a clickable icon allowing to switch
|
||
the device on or off by clicking on it. A background-picture can be used - use e.g. a floorplan of your house, or any picture.
|
||
Use floorplanstyle.css to adapt the representation.<br>
|
||
Step-by-step setup guides are available in
|
||
<a href="http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/docs/fhem-floorplan-installation-guide.pdf?format=raw">english</a> and
|
||
<a href="http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/docs/fhem-floorplan-installation-guide_de.pdf?format=raw">german</a>. <br>
|
||
<br>
|
||
|
||
<a name="FLOORPLANdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FLOORPLAN </code>
|
||
<br><br>
|
||
|
||
<b>Hint:</b> Store fp_<name>.png in your image folder (www/images/default , www/pgm2 or FHEM) to use it as background picture.<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>
|
||
define Groundfloor FLOORPLAN<br>
|
||
fp_Groundfloor.png
|
||
</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FLOORPLANset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li>N/A</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FLOORPLANget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> config</code>
|
||
<br>
|
||
Displays the configuration of the floorplan <name> with all attributes. Can be used in an include-file.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FLOORPLANattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a name="fp_fpname">userattr fp_<name> <top>,<left>[,<style>[,<description>]]</a><br><br>
|
||
A <a href="#userattr">userattr</a> fp_<name> will be created automatically if it does not exist yet.<br>
|
||
<ul>
|
||
<li>top = screen-position, pixels from top of screen</li>
|
||
<li>left = screen-position, pixels from left of screen</li>
|
||
<li>style =
|
||
<ul>
|
||
<li>0 icon/state only</li>
|
||
<li>1 devicename and icon/state</li>
|
||
<li>2 devicename, icon/state and commands</li>
|
||
<li>3 device-reading and optional description</li>
|
||
<li>4 S300TH-specific, displays temperature above humidity</li>
|
||
<li>5 icon/state and commands</li>
|
||
<li>6 device-reading, reading-timestamp and optional description</li>
|
||
</ul>
|
||
</li>
|
||
<li>description will be displayed instead of the original devicename</li>
|
||
</ul></li><br>
|
||
Examples:<br>
|
||
<ul>
|
||
<table>
|
||
<tr><td><code>attr lamp1 fp_Groundfloor 100,100</code></td><td><code>#display lamp1 with icon only at screenposition 100,100</code></td></tr>
|
||
<tr><td><code>attr lamp2 fp_Groundfloor 100,140,1,Art-Deco</code></td><td><code>#display lamp2 with description 'Art-Deco-Light' at 100,140</code></td></tr>
|
||
<tr><td><code>attr lamp2 fp_FirstFloor 130,100,1</code></td><td><code>#display the same device at different positions on other floorplans</code></td></tr>
|
||
<tr><td><code>attr myFHT fp_Groundfloor 300,20,10,Temperature</code></td><td><code>#display given Text + FHT-temperature</code></td></tr>
|
||
</table>
|
||
</ul>
|
||
<b>Hint:</b> no blanks between parameters<br><br>
|
||
|
||
|
||
<li><a name="fp_arrange">fp_arrange</a><br>
|
||
Activates the "arrange mode" which shows an additional menu on the screen,
|
||
allowing to place devices easily on the screen.<br>
|
||
Example:
|
||
<ul>
|
||
<code>attr Groundfloor fp_arrange 1</code><br>
|
||
<code>attr Groundfloor fp_arrange detail #displays the devices with infos room, type, alias</code><br>
|
||
<code>attr Groundfloor fp_arrange WEB #activates arrange mode for frontend-device WEB only</code><br><br>
|
||
</ul>
|
||
</li>
|
||
<li><a name="stylesheet">stylesheet</a><br>
|
||
Explicitely sets your personal stylesheet for the floorplan. This overrides the standard stylesheet.
|
||
The standard stylesheet for floorplans is <code>floorplanstyle.css</code>. If the <a href="#stylesheetPrefix">stylesheetPrefix</a> is set for the corresponding FHEMWEB instance, this same
|
||
<code>stylesheetPrefix</code> is also prepended to the stylesheet for floorplans.<br>
|
||
All stylesheets must be stored in the stylesheet subfolder of the fhem filesystem hierarchy. Store your personal
|
||
stylesheet along with <code>floorplanstyle.css</code> in the same folder.<br>
|
||
Example:
|
||
<ul>
|
||
<code>attr Groundfloor stylesheet myfloorplanstyle.css</code><br><br>
|
||
</ul>
|
||
</li>
|
||
|
||
<li><a name="fp_default">fp_default</a><br>
|
||
The floorplan startscreen is skipped if this attribute is assigned to one of the floorplans in your installation.
|
||
</li>
|
||
Example:
|
||
<ul>
|
||
<code>attr Groundfloor fp_default 1</code><br><br>
|
||
</ul>
|
||
|
||
<li><a name="fp_noMenu">fp_noMenu</a><br>
|
||
Suppresses the menu which usually shows the links to all your floorplans.
|
||
</li>
|
||
Example:
|
||
<ul>
|
||
<code>attr Groundfloor fp_noMenu 1</code><br><br>
|
||
</ul>
|
||
|
||
<li><a name="commandfield">commandfield</a><br>
|
||
Adds a fhem-commandfield to the floorplan screen.
|
||
</li>
|
||
Example:
|
||
<ul>
|
||
<code>attr Groundfloor commandfield 1</code><br><br>
|
||
</ul>
|
||
|
||
<li><a name="fp_backgroundimg">fp_backgroundimg</a><br>
|
||
Allows to choose a background-picture independent of the floorplan-name.
|
||
</li>
|
||
Example:
|
||
<ul>
|
||
<code>attr Groundfloor fp_backgroundimg foobar.png</code><br><br>
|
||
</ul>
|
||
|
||
<li><a name="fp_viewport">fp_viewport</a><br>
|
||
Allows usage of a user-defined viewport-value for touchpad.<br>
|
||
Default-viewport-value is "width=768".
|
||
</li>
|
||
|
||
<a name="fp_roomIcons"></a>
|
||
<li>fp_roomIcons<br>
|
||
Space separated list of floorplan:icon pairs, to assign icons
|
||
to the floorplan-menu, just like the functionality for rooms
|
||
in FHEMWEB. Example:<br>
|
||
attr Grundriss fp_roomIcons Grundriss:control_building_empty Media:audio_eq
|
||
</li>
|
||
|
||
<li><a name="fp_inherited">Inherited from FHEMWEB</a><br>
|
||
The following attributes are inherited from the underlying <a href="#FHEMWEB">FHEMWEB</a> instance:<br>
|
||
<ul>
|
||
<a href="#smallscreen">smallscreen</a><br>
|
||
<a href="#touchpad">touchpad</a><br>
|
||
<a href="#refresh">refresh</a><br>
|
||
<a href="#plotmode">plotmode</a><br>
|
||
<a href="#plotsize">plotsize</a><br>
|
||
<a href="#webname">webname</a><br>
|
||
<a href="#redirectCmds">redirectCmds</a><br>
|
||
<a href="#longpoll">longpoll</a><br>
|
||
<a href="#allowedCommands">allowedCommands</a><br>
|
||
</ul>
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
|
||
<a name="FRM"></a>
|
||
<h3>FRM</h3>
|
||
<ul>
|
||
connects fhem to <a href="http://www.arduino.cc">Arduino</a> using
|
||
the <a href="http://www.firmata.org">Firmata</a> protocol.
|
||
<br><br>
|
||
A single FRM device can serve multiple FRM-clients.<br><br>
|
||
Clients of FRM are:<br><br>
|
||
<a href="#FRM_IN">FRM_IN</a> for digital input<br>
|
||
<a href="#FRM_OUT">FRM_OUT</a> for digital out<br>
|
||
<a href="#FRM_AD">FRM_AD</a> for analog input<br>
|
||
<a href="#FRM_PWM">FRM_PWM</a> for analog output (pulse_width_modulated)<br>
|
||
<a href="#FRM_RGB">FRM_RGB</a> control multichannel/RGB-LEDs by pwm<br>
|
||
<a href="#FRM_SERVO">FRM_SERVO</a> for pwm-controled servos as being used in modelmaking<br>
|
||
<a href="#FRM_LCD">FRM_LCD</a> output text to LCD attached via I2C<br>
|
||
<a href="#FRM_I2C">FRM_I2C</a> to read data from integrated circutes attached
|
||
to Arduino supporting the <a href="http://en.wikipedia.org/wiki/I%C2%B2C">
|
||
i2c-protocol</a>.<br>
|
||
<a href="#OWX">OWX</a> to read/write sensors and actors on 1-Wire bus.<br><br>
|
||
|
||
Each client stands for a Pin of the Arduino configured for a specific use
|
||
(digital/analog in/out) or an integrated circuit connected to Arduino by i2c.<br><br>
|
||
|
||
Note: this module is based on <a href="https://github.com/ntruchsess/perl-firmata">Device::Firmata</a> module (perl-firmata).
|
||
perl-firmata is included in FHEM-distributions lib-directory. You can download the latest version <a href="https://github.com/amimoto/perl-firmata/archive/master.zip">as a single zip</a> file from github.<br><br>
|
||
|
||
Note: this module may require the Device::SerialPort or Win32::SerialPort
|
||
module if you attach the device via USB and the OS sets strange default
|
||
parameters for serial devices.<br><br>
|
||
|
||
<a name="FRMdefine"></a>
|
||
<b>Define</b><br>
|
||
<ul><br>
|
||
<code>define <name> FRM {<device> | <port> [global]}</code> <br>
|
||
Specifies the FRM device.<br>
|
||
<br>
|
||
<li>USB-connected devices:<br><br>
|
||
<code><device></code> specifies the serial port to communicate with the Arduino.
|
||
The name of the serial-device depends on your distribution, under
|
||
linux the cdc_acm kernel module is responsible, and usually a
|
||
/dev/ttyACM0 device will be created. If your distribution does not have a
|
||
cdc_acm module, you can force usbserial to handle the Arduino by the
|
||
following command:<br>
|
||
<code>modprobe usbserial vendor=0x03eb product=0x204b</code></br>
|
||
In this case the device is most probably /dev/ttyUSB0.<br><br>
|
||
|
||
You can also specify a baudrate if the device name contains the @
|
||
character, e.g.: /dev/ttyACM0@38400<br><br>
|
||
|
||
If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
|
||
perl module Device::SerialPort is not needed, and fhem opens the device
|
||
with simple file io. This might work if the operating system uses sane
|
||
defaults for the serial parameters, e.g. some Linux distributions and
|
||
OSX. <br><br>
|
||
|
||
The Arduino has to run either 'StandardFirmata' or 'ConfigurableFirmata'.
|
||
StandardFirmata supports Digital and Analog-I/O, Servo and I2C. In addition
|
||
to that ConfigurableFirmata supports 1-Wire, Stepper-motors and allows to
|
||
connect via ethernet in client mode. <br><br>
|
||
|
||
You can find StandardFirmata in the Arduino-IDE under 'Examples->Firmata->StandardFirmata<br><br>
|
||
ConfigurableFirmata has to be installed manualy. See <a href="https://github.com/firmata/arduino/tree/configurable/examples/ConfigurableFirmata">
|
||
ConfigurableFirmata</a> on GitHub or <a href="http://www.fhemwiki.de/wiki/Arduino_Firmata#Installation_ConfigurableFirmata">FHEM-Wiki</a><br>
|
||
</li>
|
||
<br>
|
||
<li>Network-connected devices:<br><br>
|
||
<code><port></code> specifies the port the FRM device listens on. If <code>global</code> is
|
||
specified the socket is bound to all local ip-addresses, otherwise to localhost
|
||
only.<br>
|
||
The Arduino must ConfigurableFirmata. The connection is initiated by the arduino
|
||
in client-mode. Therefor the ip-address and port of the fhem-server has to be
|
||
configured an the arduino, so it knows where to connect to.<br>
|
||
As of now only a single Arduino per FRM-device configured is supported. Multiple
|
||
Arduinos may connect to different FRM-devices configured for different ports.<br>
|
||
ConfigurableFirmata has to be installed manualy. See <a href="https://github.com/firmata/arduino/tree/configurable/examples/ConfigurableFirmata">
|
||
ConfigurableFirmata</a> on GitHub or <a href="http://www.fhemwiki.de/wiki/Arduino_Firmata#Installation_ConfigurableFirmata">FHEM-Wiki</a><br>
|
||
</li>
|
||
<br>
|
||
<li>
|
||
If the device is called none, then no device will be opened, so you
|
||
can experiment without hardware attached.<br>
|
||
</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRMset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>
|
||
<code>set <name> init</code><br>
|
||
reinitializes the FRM-Client-devices configured for this Arduino
|
||
</li><br>
|
||
<li>
|
||
<code>set <name> reset</code><br>
|
||
does a complete reset of FRM by disconnecting from, reconnecting to and reinitializing the Arduino and FRM internals and all attached FRM-client-devices
|
||
</li>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="FRMattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>i2c-config<br>
|
||
Configure the arduino for ic2 communication. This will enable i2c on the
|
||
i2c_pins received by the capability-query issued during initialization of FRM.<br>
|
||
As of Firmata 2.3 you can set a delay-time (in microseconds) that will be inserted into i2c
|
||
protocol when switching from write to read.<br>
|
||
See: <a href="http://www.firmata.org/wiki/Protocol#I2C">Firmata Protocol details about I2C</a><br>
|
||
</li><br>
|
||
<li>sampling-interval<br>
|
||
Configure the interval Firmata reports data to FRM. Unit is milliseconds.<br>
|
||
See: <a href="http://www.firmata.org/wiki/Protocol#Sampling_Interval">Firmata Protocol details about Sampling Interval</a></br>
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_AD"></a>
|
||
<h3>FRM_AD</h3>
|
||
<ul>
|
||
represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||
configured for analog input.<br>
|
||
The value read is stored in reading 'state'. Range is from 0 to 1023 (10 Bit)<br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_ADdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_AD <pin></code> <br>
|
||
Defines the FRM_AD device. <pin> is the arduino-pin to use.
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_ADset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
N/A<br>
|
||
</ul><br>
|
||
<a name="FRM_ADget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
<li>reading<br>
|
||
returns the voltage-level read on the arduino-pin. Values range from 0 to 1023.</li>
|
||
<li>alarm-upper-threshold<br>
|
||
returns the current state of 'alarm-upper-threshold'. Values are 'on' and 'off' (Defaults to 'off')<br>
|
||
'alarm-upper-threshold' turns 'on' whenever the 'reading' is higher than the attribute 'upper-threshold'<br>
|
||
it turns 'off' again as soon 'reading' falls below 'alarm-upper-threshold'</li>
|
||
<li>alarm-lower-threshold<br>
|
||
returns the current state of 'alarm-lower-threshold'. Values are 'on' and 'off' (Defaults to 'off')<br>
|
||
'alarm-lower-threshold' turns 'on' whenever the 'reading' is lower than the attribute 'lower-threshold'<br>
|
||
it turns 'off' again as soon 'reading rises above 'alarm-lower-threshold'</li>
|
||
<li>state<br>
|
||
returns the 'state' reading</li>
|
||
</ul><br>
|
||
<a name="FRM_ADattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>upper-threshold<br>
|
||
sets the 'upper-threshold'. Whenever the 'reading' exceeds this value 'alarm-upper-threshold' is set to 'on'<br>
|
||
As soon 'reading' falls below the 'upper-threshold' 'alarm-upper-threshold' turns 'off' again<br>
|
||
Defaults to 1024.</li>
|
||
<li>lower-threshold<br>
|
||
sets the 'lower-threshold'. Whenever the 'reading' falls below this value 'alarm-lower-threshold' is set to 'on'<br>
|
||
As soon 'reading' rises above the 'lower-threshold' 'alarm-lower-threshold' turns 'off' again<br>
|
||
Defaults to -1.</li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_I2C"></a>
|
||
<h3>FRM_I2C</h3>
|
||
<ul>
|
||
represents an integrated curcuit connected to the i2c-pins of an <a href="http://www.arduino.cc">Arduino</a>
|
||
running <a href="http://www.firmata.org">Firmata</a><br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br>
|
||
this FRM-device has to be configures for i2c by setting attr 'i2c-config' on the FRM-device<br>
|
||
it reads out the ic-internal storage in intervals of 'sampling-interval' as set on the FRM-device<br><br>
|
||
|
||
<a name="FRM_I2Cdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_I2C <i2c-address> <register> <bytes-to-read></code> <br>
|
||
Specifies the FRM_I2C device.<br>
|
||
<li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
|
||
<li>register is the (device-internal) address to start reading bytes from.</li>
|
||
<li>bytes-to-read is the number of bytes read from the ic</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_I2Cset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
N/A<br>
|
||
</ul>
|
||
<a name="FRM_I2Cget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A<br>
|
||
</ul><br>
|
||
<a name="FRM_I2Cattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_IN"></a>
|
||
<h3>FRM_IN</h3>
|
||
<ul>
|
||
represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||
configured for digital input.<br>
|
||
The current state of the arduino-pin is stored in reading 'state'. Values are 'on' and 'off'.<br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_INdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_IN <pin></code> <br>
|
||
Defines the FRM_IN device. <pin>> is the arduino-pin to use.
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_INset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<li>alarm on|off<br>
|
||
set the alarm to on or off. Used to clear the alarm.<br>
|
||
The alarm is set to 'on' whenever the count reaches the threshold and doesn't clear itself.</li>
|
||
</ul>
|
||
<a name="FRM_INget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>reading<br>
|
||
returns the logical state of the arduino-pin. Values are 'on' and 'off'.<br></li>
|
||
<li>count<br>
|
||
returns the current count. Contains the number of toggles of the arduino-pin.<br>
|
||
Depending on the attribute 'count-mode' every rising or falling edge (or both) is counted.</li>
|
||
<li>alarm<br>
|
||
returns the current state of 'alarm'. Values are 'on' and 'off' (Defaults to 'off')<br>
|
||
'alarm' doesn't clear itself, has to be set to 'off' eplicitly.</li>
|
||
<li>state<br>
|
||
returns the 'state' reading</li>
|
||
</ul><br>
|
||
<a name="FRM_INattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>activeLow <yes|no></li>
|
||
<li>count-mode none|rising|falling|both<br>
|
||
Determines whether 'rising' (transitions from 'off' to 'on') of falling (transitions from 'on' to 'off')<br>
|
||
edges (or 'both') are counted. Defaults to 'none'</li>
|
||
<li>count-threshold <number><br>
|
||
sets the theshold-value for the counter. Whenever 'count' reaches the 'count-threshold' 'alarm' is<br>
|
||
set to 'on'. Use 'set alarm off' to clear the alarm.</li>
|
||
<li>reset-on-threshold-reached yes|no<br>
|
||
if set to 'yes' reset the counter to 0 when the threshold is reached (defaults to 'no').
|
||
</li>
|
||
<li>internal-pullup on|off<br>
|
||
allows to switch the internal pullup resistor of arduino to be en-/disabled. Defaults to off.
|
||
</li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_LCD"></a>
|
||
<h3>FRM_LCD</h3>
|
||
<ul>
|
||
deprecated, use <a href="#I2C_LCD">I2C_LCD</a>
|
||
</ul>
|
||
<a name="FRM_OUT"></a>
|
||
<h3>FRM_OUT</h3>
|
||
<ul>
|
||
represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||
configured for digital output.<br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_OUTdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_OUT <pin></code> <br>
|
||
Defines the FRM_OUT device. <pin>> is the arduino-pin to use.
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_OUTset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<code>set <name> on|off</code><br><br>
|
||
</ul>
|
||
<ul>
|
||
<a href="#setExtensions">set extensions</a> are supported<br>
|
||
</ul>
|
||
<a name="FRM_OUTget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A
|
||
</ul><br>
|
||
<a name="FRM_OUTattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>restoreOnStartup <on|off></li>
|
||
<li>restoreOnReconnect <on|off></li>
|
||
<li>activeLow <yes|no></li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_PWM"></a>
|
||
<h3>FRM_PWM</h3>
|
||
<ul>
|
||
represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||
configured for analog output.<br>
|
||
The value set will be output by the specified pin as a pulse-width-modulated signal.<br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_PWMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_PWM <pin></code> <br>
|
||
Defines the FRM_PWM device. <pin>> is the arduino-pin to use.
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_PWMset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<code>set <name> on</code><br>
|
||
sets the pulse-width to 100%<br>
|
||
</ul>
|
||
<ul>
|
||
<code>set <name> off</code><br>
|
||
sets the pulse-width to 0%<br>
|
||
</ul>
|
||
<ul>
|
||
<a href="#setExtensions">set extensions</a> are supported<br>
|
||
</ul>
|
||
<ul>
|
||
<code>set <name> toggle</code><br>
|
||
toggles the pulse-width in between to the last value set by 'value' or 'dim' and 0 respectivly 100%<br>
|
||
</ul>
|
||
<ul>
|
||
<code>set <name> value <value></code><br>
|
||
sets the pulse-width to the value specified<br>
|
||
Range is from 0 to 255 (for 8-bit resolution) (see <a href="http://arduino.cc/en/Reference/AnalogWrite">analogWrite()</a> for details)<br>
|
||
</ul>
|
||
<ul>
|
||
<code>set <name> dim <value></code><br>
|
||
sets the pulse-width to the value specified in percent<br>
|
||
Range is from 0 to 100<br>
|
||
</ul>
|
||
<ul>
|
||
<code>set <name> dimUp</code><br>
|
||
increases the pulse-width by 10%<br>
|
||
</ul>
|
||
<ul>
|
||
<code>set <name> dimDown</code><br>
|
||
decreases the pulse-width by 10%<br>
|
||
</ul>
|
||
<a name="FRM_PWMget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A
|
||
</ul><br>
|
||
<a name="FRM_PWMattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>restoreOnStartup <on|off></li>
|
||
<li>restoreOnReconnect <on|off></li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_RGB"></a>
|
||
<h3>FRM_RGB</h3>
|
||
<ul>
|
||
allows to drive LED-controllers and other multichannel-devices that use PWM as input by an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||
<br>
|
||
The value set will be output by the specified pins as pulse-width-modulated signals.<br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_RGBdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_RGB <pin> <pin> <pin> [pin...]</code> <br>
|
||
Defines the FRM_RGB device. <pin>> are the arduino-pin to use.<br>
|
||
For rgb-controlled devices first pin drives red, second pin green and third pin blue.
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_RGBset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<code>set <name> on</code><br>
|
||
sets the pulse-width of all configured pins to 100%</ul><br>
|
||
<ul>
|
||
<code>set <name> off</code><br>
|
||
sets the pulse-width of all configured pins to 0%</ul><br>
|
||
<ul>
|
||
<a href="#setExtensions">set extensions</a> are supported</ul><br>
|
||
<ul>
|
||
<code>set <name> toggle</code><br>
|
||
toggles in between the last dimmed value, 0% and 100%. If no dimmed value was set before defaults to pulsewidth 50% on all channels</ul><br>
|
||
<ul>
|
||
<code>set <name> rgb <value></code><br>
|
||
sets the pulse-width of all channels at once. Also sets the value toggle can switch to<br>
|
||
Value is encoded as hex-string, 2-digigs per channel (e.g. FFFFFF for reguler rgb)</ul><br>
|
||
<ul>
|
||
<code>set <name> pct <value></code><br>
|
||
dims all channels at once while leving the ratio in between the channels unaltered.<br>
|
||
Range is 0-100 ('pct' stands for 'percent')</ul><br>
|
||
<ul>
|
||
<code>set <name> dimUp</code><br>
|
||
dims up by 10%</ul><br>
|
||
<ul>
|
||
<code>set <name> dimDown</code><br>
|
||
dims down by 10%</ul><br>
|
||
<a name="FRM_RGBget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
<code>get <name> rgb</code><br>
|
||
returns the values set for all channels. Format is hex, 2 nybbles per channel.
|
||
</ul><br>
|
||
<ul>
|
||
<code>get <name> RGB</code><br>
|
||
returns the values set for all channels in normalized format. Format is hex, 2 nybbles per channel.
|
||
Values are scaled such that the channel with the highest value is set to FF. The real values are calculated
|
||
by multipying each byte with the value of 'pct'.
|
||
</ul><br>
|
||
<ul>
|
||
<code>get <name> pct</code><br>
|
||
returns the value of the channel with the highest value scaled to the range of 0-100 (percent).
|
||
</ul><br>
|
||
<a name="FRM_RGBattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>restoreOnStartup <on|off></li>
|
||
<li>restoreOnReconnect <on|off></li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_ROTENC"></a>
|
||
<h3>FRM_ROTENC</h3>
|
||
<ul>
|
||
represents a rotary-encoder attached to two pins of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a><br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_ROTENCdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_ROTENC <pinA> <pinB> [id]</code> <br>
|
||
Defines the FRM_ROTENC device. <pinA>> and <pinA>> are the arduino-pins to use.<br>
|
||
[id] is the instance-id of the encoder. Must be a unique number per FRM-device (rages from 0-4 depending on Firmata being used, optional if a single encoder is attached to the arduino).<br>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_ROTENCset"></a>
|
||
<b>Set</b><br>
|
||
<li>reset<br>
|
||
resets to value of 'position' to 0<br></li>
|
||
<a name="FRM_ROTENCget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>position<br>
|
||
returns the position of the rotary-encoder attached to pinA and pinB of the arduino<br></li>
|
||
</ul><br>
|
||
<a name="FRM_ROTENCattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_SERVO"></a>
|
||
<h3>FRM_SERVO</h3>
|
||
<ul>
|
||
represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
|
||
configured to drive a pwm-controlled servo-motor.<br>
|
||
The value set will be drive the shaft of the servo to the specified angle. see <a href="http://arduino.cc/en/Reference/ServoWrite">Servo.write</a> for values and range<br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_SERVOdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_SERVO <pin></code> <br>
|
||
Defines the FRM_SERVO device. <pin>> is the arduino-pin to use.
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_SERVOset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<code>set <name> angle <value></code><br>sets the angle of the servo-motors shaft to the value specified (in degrees).<br>
|
||
</ul>
|
||
<a name="FRM_SERVOget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A
|
||
</ul><br>
|
||
<a name="FRM_SERVOattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li>min-pulse<br>
|
||
sets the minimum puls-width to use. Defaults to 544. For most servos this translates into a rotation of 180° counterclockwise.</li>
|
||
<li>max-pulse<br>
|
||
sets the maximum puls-width to use. Defaults to 2400. For most servos this translates into a rotation of 180° clockwise</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FRM_STEPPER"></a>
|
||
<h3>FRM_STEPPER</h3>
|
||
<ul>
|
||
represents a stepper-motor attached to digital-i/o pins of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a><br>
|
||
Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
|
||
|
||
<a name="FRM_STEPPERdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FRM_STEPPER [DRIVER|TWO_WIRE|FOUR_WIRE] <directionPin> <stepPin> [motorPin3 motorPin4] stepsPerRev [stepper-id]</code><br>
|
||
Defines the FRM_STEPPER device.
|
||
<li>[DRIVER|TWO_WIRE|FOUR_WIRE] defines the control-sequence being used to drive the motor.
|
||
<ul>
|
||
<li>DRIVER: motor is attached via a smart circuit that is controlled via two lines: 1 line defines the direction to turn, the other triggers one step per impluse.</li>
|
||
<li>FOUR_WIRE: motor is attached via four wires each driving one coil individually.</li>
|
||
<li>TWO_WIRE: motor is attached via two wires. This mode makes use of the fact that at any time two of the four motor
|
||
coils are the inverse of the other two so by using an inverting circuit to drive the motor the number of control connections can be reduced from 4 to 2.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<ul>
|
||
<li>The sequence of control signals for 4 control wires is as follows:<br>
|
||
<br>
|
||
<code>
|
||
Step C0 C1 C2 C3<br>
|
||
1 1 0 1 0<br>
|
||
2 0 1 1 0<br>
|
||
3 0 1 0 1<br>
|
||
4 1 0 0 1<br>
|
||
</code>
|
||
</li>
|
||
<li>The sequence of controls signals for 2 control wires is as follows:<br>
|
||
(columns C1 and C2 from above):<br>
|
||
<br>
|
||
<code>
|
||
Step C0 C1<br>
|
||
1 0 1<br>
|
||
2 1 1<br>
|
||
3 1 0<br>
|
||
4 0 0<br>
|
||
</code>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
If your stepper-motor does not move or does move but only in a single direction you will have to rearrage the pin-numbers to match the control sequence.<br>
|
||
that can be archived either by rearranging the physical connections, or by mapping the connection to the pin-definitions in FRM_STEPPERS define:<br>
|
||
e.g. the widely used cheap 28byj-48 you can get for few EUR on eBay including a simple ULN2003 driver interface may be defined by<br>
|
||
<code>define stepper FRM_STEPPER FOUR_WIRE 7 5 6 8 64 0</code><br>
|
||
when being connected to the arduio with:<br>
|
||
<code>motor pin1 <-> arduino pin5<br>
|
||
motor pin2 <-> arduino pin6<br>
|
||
motor pin3 <-> arduino pin7<br>
|
||
motor pin4 <-> arduino pin8<br>
|
||
motor pin5 <-> ground</code><br>
|
||
</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="FRM_STEPPERset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<code>set <name> reset</code>
|
||
<li>resets the reading 'position' to 0 without moving the motor</li>
|
||
<br>
|
||
<code>set <name> position <position> [speed] [acceleration] [deceleration]</code>
|
||
<li>moves the motor to the absolute position specified. positive or negative integer<br>
|
||
speed (10 * revolutions per minute, optional), defaults to 30, higher numbers are faster) At 2048 steps per revolution (28byj-48) a speed of 30 results in 3 rev/min<br>
|
||
acceleration and deceleration are optional.<br>
|
||
</li>
|
||
<br>
|
||
<code>set <name> step <stepstomove> [speed] [accel] [decel]</code>
|
||
<li>moves the motor the number of steps specified. positive or negative integer<br>
|
||
speed, accelleration and deceleration are optional.<br>
|
||
</li>
|
||
</ul>
|
||
<a name="FRM_STEPPERget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A
|
||
</ul><br>
|
||
<a name="FRM_STEPPERattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>restoreOnStartup <on|off></li>
|
||
<li>restoreOnReconnect <on|off></li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
|
||
than one FRM-device defined.)
|
||
</li>
|
||
<li>>speed (same meaning as in 'set position')</li>
|
||
<li>acceleration (same meaning as in 'set position')</li>
|
||
<li>deceleration (same meaning as in 'set position')</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FS20"></a>
|
||
<h3>FS20</h3>
|
||
<ul>
|
||
The FS20 protocol is used by a wide range of devices, which are either of
|
||
the sender/sensor category or the receiver/actuator category. The radio
|
||
(868.35 MHz) messages are either received through an <a href="#FHZ">FHZ</a>
|
||
or an <a href="#CUL">CUL</a> device, so this must be defined first.
|
||
|
||
<br><br>
|
||
|
||
<a name="FS20define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FS20 <housecode> <button>
|
||
[fg <fgaddr>] [lm <lmaddr>] [gm FF] </code>
|
||
<br><br>
|
||
|
||
The values of housecode, button, fg, lm, and gm can be either defined as
|
||
hexadecimal value or as ELV-like "quad-decimal" value with digits 1-4. We
|
||
will reference this ELV-like notation as ELV4 later in this document. You
|
||
may even mix both hexadecimal and ELV4 notations, because FHEM can detect
|
||
the used notation automatically by counting the digits.<br>
|
||
|
||
<ul>
|
||
<li><code><housecode></code> is a 4 digit hex or 8 digit ELV4 number,
|
||
corresponding to the housecode address.</li>
|
||
<li><code><button></code> is a 2 digit hex or 4 digit ELV4 number,
|
||
corresponding to a button of the transmitter.</li>
|
||
<li>The optional <code><fgaddr></code> specifies the function group.
|
||
It is a 2 digit hex or 4 digit ELV address. The first digit of the hex
|
||
address must be F or the first 2 digits of the ELV4 address must be
|
||
44.</li>
|
||
<li>The optional <code><lmaddr></code> specifies the local
|
||
master. It is a 2 digit hex or 4 digit ELV address. The last digit of the
|
||
hex address must be F or the last 2 digits of the ELV4 address must be
|
||
44.</li>
|
||
<li>The optional gm specifies the global master, the address must be FF if
|
||
defined as hex value or 4444 if defined as ELV4 value.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define lamp FS20 7777 00 fg F1 gm F</code><br>
|
||
<code>define roll1 FS20 7777 01</code><br>
|
||
<code>define otherlamp FS20 24242424 1111 fg 4412 gm 4444</code><br>
|
||
<code>define otherroll1 FS20 24242424 1114</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FS20set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> [<time>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul><code>
|
||
dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%<br>
|
||
dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br>
|
||
dimdown<br>
|
||
dimup<br>
|
||
dimupdown<br>
|
||
off<br>
|
||
off-for-timer<br>
|
||
on # dimmer: set to value before switching it off<br>
|
||
on-for-timer # see the note<br>
|
||
on-old-for-timer # set to previous (before switching it on)<br>
|
||
ramp-on-time # time to reach the desired dim value on dimmers<br>
|
||
ramp-off-time # time to reach the off state on dimmers<br>
|
||
reset<br>
|
||
sendstate<br>
|
||
timer<br>
|
||
toggle # between off and previous dim val<br>
|
||
on-till # Special, see the note<br>
|
||
</code></ul>
|
||
The <a href="#setExtensions"> set extensions</a> are also supported.<br>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>set lamp on</code><br>
|
||
<code>set lamp1,lamp2,lamp3 on</code><br>
|
||
<code>set lamp1-lamp3 on</code><br>
|
||
<code>set lamp on-for-timer 12</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>Use reset with care: the device forgets even the housecode.
|
||
</li>
|
||
<li>As the FS20 protocol needs about 0.22 seconds to transmit a
|
||
sequence, a pause of 0.22 seconds is inserted after each command.
|
||
</li>
|
||
<li>The FS20ST switches on for dim*%, dimup. It does not respond to
|
||
sendstate.</li>
|
||
<li>If the timer is set (i.e. it is not 0) then on, dim*,
|
||
and *-for-timer will take it into account (at least by the FS20ST).
|
||
</li>
|
||
<li>The <code>time</code> argument ranges from 0.25sec to 4 hours and 16
|
||
minutes. As the time is encoded in one byte there are only 112
|
||
distinct values, the resolution gets coarse with larger values. The
|
||
program will report the used timeout if the specified one cannot be
|
||
set exactly. The resolution is 0.25 sec from 0 to 4 sec, 0.5 sec
|
||
from 4 to 8 sec, 1 sec from 8 to 16 sec and so on. If you need better
|
||
precision for large values, use <a href="#at">at</a> which has a 1
|
||
sec resolution.</li>
|
||
<li>on-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
|
||
or { <perl code> }, where the perl-code returns a time
|
||
specification).
|
||
If the current time is greater than the specified time, then the
|
||
command is ignored, else an "on" command is generated, and for the
|
||
given "till-time" an off command is scheduleld via the at command.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="FS20attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="IODev"></a>
|
||
<li>IODev<br>
|
||
Set the IO or physical device which should be used for sending signals
|
||
for this "logical" device. An example for the physical device is an FHZ
|
||
or a CUL. Note: Upon startup FHEM assigns each logical device
|
||
(FS20/HMS/KS300/etc) the last physical device which can receive data
|
||
for this type of device. The attribute IODev needs to be used only if
|
||
you attached more than one physical device capable of receiving signals
|
||
for this logical device.</li><br>
|
||
|
||
<a name="eventMap"></a>
|
||
<li>eventMap<br>
|
||
Replace event names and set arguments. The value of this attribute
|
||
consists of a list of space separated values, each value is a colon
|
||
separated pair. The first part specifies the "old" value, the second
|
||
the new/desired value. If the first character is slash(/) or komma(,)
|
||
then split not by space but by this character, enabling to embed spaces.
|
||
Examples:<ul><code>
|
||
attr store eventMap on:open off:closed<br>
|
||
attr store eventMap /on-for-timer 10:open/off:closed/<br>
|
||
set store open
|
||
</code></ul>
|
||
</li><br>
|
||
|
||
<a name="attrdummy"></a>
|
||
<li>dummy<br>
|
||
Set the device attribute dummy to define devices which should not
|
||
output any radio signals. Associated notifys will be executed if
|
||
the signal is received. Used e.g. to react to a code from a sender, but
|
||
it will not emit radio signal if triggered in the web frontend.
|
||
</li><br>
|
||
|
||
<a name="follow-on-for-timer"></a>
|
||
<li>follow-on-for-timer<br>
|
||
schedule a "setstate off;trigger off" for the time specified as argument to
|
||
the on-for-timer command. Or the same with on, if the command is
|
||
off-for-timer.
|
||
</li><br>
|
||
|
||
<a name="follow-on-timer"></a>
|
||
<li>follow-on-timer<br>
|
||
Like with follow-on-for-timer schedule a "setstate off;trigger off", but
|
||
this time for the time specified as argument in seconds to this attribute.
|
||
This is used to follow the pre-programmed timer, which was set previously
|
||
with the timer command or manually by pressing the button on the device,
|
||
see your manual for details.
|
||
</li><br>
|
||
|
||
|
||
<a name="model"></a>
|
||
<li>model<br>
|
||
The model attribute denotes the model type of the device.
|
||
The attributes will (currently) not be used by the fhem.pl directly.
|
||
It can be used by e.g. external programs or web interfaces to
|
||
distinguish classes of devices and send the appropriate commands
|
||
(e.g. "on" or "off" to a fs20st, "dim..%" to fs20du etc.).
|
||
The spelling of the model names are as quoted on the printed
|
||
documentation which comes which each device. This name is used
|
||
without blanks in all lower-case letters. Valid characters should be
|
||
<code>a-z 0-9</code> and <code>-</code> (dash),
|
||
other characters should be ommited. Here is a list of "official"
|
||
devices:<br><br>
|
||
<b>Sender/Sensor</b>: fs20fms fs20hgs fs20irl fs20kse fs20ls
|
||
fs20pira fs20piri fs20piru fs20s16 fs20s20 fs20s4 fs20s4a fs20s4m
|
||
fs20s4u fs20s4ub fs20s8 fs20s8m fs20sd fs20sn fs20sr fs20ss
|
||
fs20str fs20tc1 fs20tc6 fs20tfk fs20tk fs20uts fs20ze fs20bf fs20si3<br><br>
|
||
|
||
<b>Dimmer</b>: fs20di fs20di10 fs20du<br><br>
|
||
|
||
<b>Receiver/Actor</b>: fs20as1 fs20as4 fs20ms2 fs20rgbsa fs20rst
|
||
fs20rsu fs20sa fs20sig fs20sm4 fs20sm8 fs20st fs20su fs20sv fs20ue1
|
||
fs20usr fs20ws1
|
||
</li><br>
|
||
|
||
|
||
<a name="ignore"></a>
|
||
<li>ignore<br>
|
||
Ignore this device, e.g. if it belongs to your neighbour. The device
|
||
won't trigger any FileLogs/notifys, issued commands will silently
|
||
ignored (no RF signal will be sent out, just like for the <a
|
||
href="#attrdummy">dummy</a> attribute). The device won't appear in the
|
||
list command (only if it is explicitely asked for it), nor will it
|
||
appear in commands which use some wildcard/attribute as name specifiers
|
||
(see <a href="#devspec">devspec</a>). You still get them with the
|
||
"ignored=1" special devspec.
|
||
</li><br>
|
||
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="FS20events"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
From an FS20 device you can receive one of the following events.
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>toggle</li>
|
||
<li>dimdown</li>
|
||
<li>dimup</li>
|
||
<li>dimupdown</li>
|
||
<li>on-for-timer</li>
|
||
Which event is sent is device dependent and can sometimes configured on
|
||
the device.
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="FileLog"></a>
|
||
<h3>FileLog</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="FileLogdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> FileLog <filename> <regexp></code>
|
||
<br><br>
|
||
|
||
Log events to <code><filename></code>. The log format is
|
||
<ul><code><br>
|
||
YYYY-MM-DD_HH:MM:SS <device> <event><br>
|
||
<br></code></ul>
|
||
The regexp will be checked against the device name
|
||
devicename:event or timestamp:devicename:event combination.
|
||
The regexp must match the complete string, not just a part of it.
|
||
<br>
|
||
<code><filename></code> may contain %-wildcards of the
|
||
POSIX strftime function of the underlying OS (see your strftime manual).
|
||
Common used wildcards are:
|
||
<ul>
|
||
<li><code>%d</code> day of month (01..31)</li>
|
||
<li><code>%m</code> month (01..12)</li>
|
||
<li><code>%Y</code> year (1970...)</li>
|
||
<li><code>%w</code> day of week (0..6); 0 represents Sunday</li>
|
||
<li><code>%j</code> day of year (001..366)</li>
|
||
<li><code>%U</code> week number of year with Sunday as first day of week (00..53)</li>
|
||
<li><code>%W</code> week number of year with Monday as first day of week (00..53)</li>
|
||
</ul>
|
||
FHEM also replaces <code>%L</code> by the value of the global logdir attribute.<br>
|
||
Before using <code>%V</code> for ISO 8601 week numbers check if it is
|
||
correctly supported by your system (%V may not be replaced, replaced by an
|
||
empty string or by an incorrect ISO-8601 week number, especially
|
||
at the beginning of the year)
|
||
If you use <code>%V</code> you will also have to use %G
|
||
instead of %Y for the year!<br>
|
||
Examples:
|
||
<ul>
|
||
<code>define lamplog FileLog %L/lamp.log lamp</code><br>
|
||
<code>define wzlog FileLog ./log/wz-%Y-%U.log
|
||
wz:(measured-temp|actuator).*</code><br>
|
||
With ISO 8601 week numbers, if supported:<br>
|
||
<code>define wzlog FileLog ./log/wz-%G-%V.log
|
||
wz:(measured-temp|actuator).*</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="FileLogset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li>reopen
|
||
<ul>
|
||
Reopen a FileLog after making some manual changes to the
|
||
logfile.
|
||
</ul>
|
||
</li>
|
||
<li>addRegexpPart <device> <regexp>
|
||
<ul>
|
||
add a regexp part, which is constructed as device:regexp. The parts
|
||
are separated by |. Note: as the regexp parts are resorted, manually
|
||
constructed regexps may become invalid.
|
||
</ul>
|
||
</li>
|
||
<li>removeRegexpPart <re>
|
||
<ul>
|
||
remove a regexp part. Note: as the regexp parts are resorted, manually
|
||
constructed regexps may become invalid.<br>
|
||
The inconsistency in addRegexpPart/removeRegexPart arguments originates
|
||
from the reusage of javascript functions.
|
||
</ul>
|
||
</li>
|
||
<li>absorb secondFileLog
|
||
<ul>
|
||
merge the current and secondFileLog into one file, add the regexp of the
|
||
secondFileLog to the current one, and delete secondFileLog.<br>
|
||
This command is needed to create combined plots (weblinks).<br>
|
||
<b>Notes:</b>
|
||
<ul>
|
||
<li>secondFileLog will be deleted (i.e. the FHEM definition).</li>
|
||
<li>only the current files will be merged.</li>
|
||
<li>weblinks using secondFilelog will become broken, they have to be
|
||
adopted to the new logfile or deleted.</li>
|
||
</ul>
|
||
</ul>
|
||
</li>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="FileLogget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <infile> <outfile> <from>
|
||
<to> <column_spec> </code>
|
||
<br><br>
|
||
Read data from the logfile, used by frontends to plot data without direct
|
||
access to the file.<br>
|
||
|
||
<ul>
|
||
<li><infile><br>
|
||
Name of the logfile to grep. "-" is the current logfile, or you can
|
||
specify an older file (or a file from the archive).</li>
|
||
<li><outfile><br>
|
||
If it is "-", you get the data back on the current connection, else it
|
||
is the prefix for the output file. If more than one file is specified,
|
||
the data is separated by a comment line for "-", else it is written in
|
||
separate files, numerated from 0.
|
||
</li>
|
||
<li><from> <to><br>
|
||
Used to grep the data. The elements should correspond to the
|
||
timeformat or be an initial substring of it.</li>
|
||
<li><column_spec><br>
|
||
For each column_spec return a set of data in a separate file or
|
||
separated by a comment line on the current connection.<br>
|
||
Syntax: <col>:<regexp>:<default>:<fn><br>
|
||
<ul>
|
||
<li><col>
|
||
The column number to return, starting at 1 with the date.
|
||
If the column is enclosed in double quotes, then it is a fix text,
|
||
not a column number.</li>
|
||
<li><regexp>
|
||
If present, return only lines containing the regexp. Case sensitive.
|
||
</li>
|
||
<li><default><br>
|
||
If no values were found and the default value is set, then return
|
||
one line containing the from value and this default. We need this
|
||
feature as gnuplot aborts if a dataset has no value at all.
|
||
</li>
|
||
<li><fn>
|
||
One of the following:
|
||
<ul>
|
||
<li>int<br>
|
||
Extract the integer at the beginning og the string. Used e.g.
|
||
for constructs like 10%</li>
|
||
<li>delta-h or delta-d<br>
|
||
Return the delta of the values for a given hour or a given day.
|
||
Used if the column contains a counter, as is the case for the
|
||
KS300 rain column.</li>
|
||
<li>everything else<br>
|
||
The string is evaluated as a perl expression. @fld is the
|
||
current line splitted by spaces. Note: The string/perl
|
||
expression cannot contain spaces, as the part after the space
|
||
will be considered as the next column_spec.</li>
|
||
</ul></li>
|
||
</ul></li>
|
||
</ul>
|
||
<br><br>
|
||
Example:
|
||
<ul><code><br>
|
||
get outlog out-2008.log - 2008-01-01 2008-01-08 4:IR:int: 9:IR::
|
||
</code></ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="FileLogattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="archivedir"></a>
|
||
<a name="archivecmd"></a>
|
||
<a name="nrarchive"></a>
|
||
<li>archivecmd / archivedir / nrarchive<br>
|
||
When a new FileLog file is opened, the FileLog archiver wil be called.
|
||
This happens only, if the name of the logfile has changed (due to
|
||
time-specific wildcards, see the <a href="#FileLog">FileLog</a>
|
||
section), and there is a new entry to be written into the file.
|
||
<br>
|
||
|
||
If the attribute archivecmd is specified, then it will be started as a
|
||
shell command (no enclosing " is needed), and each % in the command
|
||
will be replaced with the name of the old logfile.<br>
|
||
|
||
If this attribute is not set, but nrarchive and/or archivecmd are set,
|
||
then nrarchive old logfiles are kept along the current one while older
|
||
ones are moved to archivedir (or deleted if archivedir is not set).
|
||
<br>
|
||
Note: setting these attributes for the global instance will effect the
|
||
<a href="#logfile">FHEM logfile</a> only.
|
||
</li><br>
|
||
|
||
<li><a href="#disable">disable</a></li>
|
||
|
||
<a name="logtype"></a>
|
||
<li>logtype<br>
|
||
Used by the pgm2 webfrontend to offer gnuplot/SVG images made from the
|
||
logs. The string is made up of tokens separated by comma (,), each
|
||
token specifies a different gnuplot program. The token may contain a
|
||
colon (:), the part before the colon defines the name of the program,
|
||
the part after is the string displayed in the web frontend. Currently
|
||
following types of gnuplot programs are implemented:<br>
|
||
<ul>
|
||
<li>fs20<br>
|
||
Plots on as 1 and off as 0. The corresponding filelog definition
|
||
for the device fs20dev is:<br>
|
||
define fslog FileLog log/fs20dev-%Y-%U.log fs20dev
|
||
</li>
|
||
<li>fht<br>
|
||
Plots the measured-temp/desired-temp/actuator lines. The
|
||
corresponding filelog definitions (for the FHT device named
|
||
fht1) looks like:<br>
|
||
<code>define fhtlog1 FileLog log/fht1-%Y-%U.log fht1:.*(temp|actuator).*</code>
|
||
|
||
</li>
|
||
<li>temp4rain10<br>
|
||
Plots the temperature and rain (per hour and per day) of a
|
||
ks300. The corresponding filelog definitions (for the KS300
|
||
device named ks300) looks like:<br>
|
||
define ks300log FileLog log/fht1-%Y-%U.log ks300:.*H:.*
|
||
</li>
|
||
<li>hum6wind8<br>
|
||
Plots the humidity and wind values of a
|
||
ks300. The corresponding filelog definition is the same as
|
||
above, both programs evaluate the same log.
|
||
</li>
|
||
<li>text<br>
|
||
Shows the logfile as it is (plain text). Not gnuplot definition
|
||
is needed.
|
||
</li>
|
||
</ul>
|
||
Example:<br>
|
||
attr ks300log1 logtype temp4rain10:Temp/Rain,hum6wind8:Hum/Wind,text:Raw-data
|
||
</li><br>
|
||
|
||
|
||
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="GDS"></a>
|
||
<h3>GDS</h3>
|
||
<ul>
|
||
|
||
<b>Prerequesits</b>
|
||
<ul>
|
||
|
||
<br/>
|
||
Module uses following additional Perl modules:<br/><br/>
|
||
<code>Net::FTP, List::MoreUtils, XML::Simple, Text::CSV</code><br/><br/>
|
||
If not already installed in your environment, please install them using appropriate commands from your environment.
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="GDSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>define <name> GDS <username> <password></code>
|
||
<br/><br/>
|
||
This module provides connection to <a href="http://www.dwd.de/grundversorgung">GDS service</a> generated by <a href="http://www.dwd.de">DWD</a><br/>
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="GDSset"></a>
|
||
<b>Set-Commands</b><br/>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>set <name> clear </code>
|
||
<br/><br/>
|
||
<ul>Delete all a_*, c_* and g_* readings</ul>
|
||
<br/>
|
||
|
||
<code>set <name> conditions <stationName></code>
|
||
<br/><br/>
|
||
<ul>Retrieve current conditions at selected station. Data will be updated periodically.</ul>
|
||
<br/>
|
||
|
||
<code>set <name> help</code>
|
||
<br/><br/>
|
||
<ul>Show a help text with available commands</ul>
|
||
<br/>
|
||
|
||
<code>set <name> rereadcfg</code>
|
||
<br/><br/>
|
||
<ul>Reread all required data from DWD Server manually: station list and CAP data</ul>
|
||
<br/>
|
||
|
||
<code>set <name> update</code>
|
||
<br/><br/>
|
||
<ul>Update conditions readings at selected station and restart update-timer</ul>
|
||
<br/>
|
||
|
||
<li>condition readings generated by SET use prefix "c_"</li>
|
||
<li>readings generated by SET will be updated automatically every 60 minutes</li>
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="GDSget"></a>
|
||
<b>Get-Commands</b><br/>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>get <name> alerts <region></code>
|
||
<br/><br/>
|
||
<ul>Retrieve alert message for selected region from DWD server</ul>
|
||
<br/>
|
||
|
||
<code>get <name> conditions <stationName></code>
|
||
<br/><br/>
|
||
<ul>Retrieve current conditions at selected station</ul>
|
||
<br/>
|
||
|
||
<code>get <name> conditionsmap <region></code>
|
||
<br/><br/>
|
||
<ul>Retrieve map (imagefile) showing current conditions at selected station</ul>
|
||
<br/>
|
||
|
||
<code>get <name> forecastsmap <stationName></code>
|
||
<br/><br/>
|
||
<ul>Retrieve map (imagefile) showing forecasts for selected region</ul>
|
||
<br/>
|
||
|
||
<code>get <name> help</code>
|
||
<br/><br/>
|
||
<ul>Show a help text with available commands</ul>
|
||
<br/>
|
||
|
||
<code>get <name> list capstationlist|data|stations</code>
|
||
<br/><br/>
|
||
<ul>
|
||
<li><b>capstationlist:</b> Retrieve list showing all defined warning regions. You can find your WARNCELLID with this list.</li>
|
||
<li><b>data:</b> List current conditions for all available stations in one single table</li>
|
||
<li><b>stations:</b> List all available stations that provide conditions data</li>
|
||
</ul>
|
||
<br/>
|
||
|
||
<code>get <name> radarmap <region></code>
|
||
<br/><br/>
|
||
<ul>Retrieve map (imagefile) containig radar view from selected region</ul>
|
||
<br/>
|
||
|
||
<code>get <name> rereadcfg</code>
|
||
<br/><br/>
|
||
<ul>Reread all required data from DWD Server manually: station list and CAP data</ul>
|
||
<br/>
|
||
|
||
<code>get <name> warnings <region></code>
|
||
<br/><br/>
|
||
<ul>Retrieve current warnings report for selected region
|
||
<ul>
|
||
<br/>
|
||
<li>report type VHDL30 = regular report, issued daily</li>
|
||
<li>report type VHDL31 = regular report, issued before weekend or national holiday</li>
|
||
<li>report type VHDL32 = preliminary report, issued on special conditions</li>
|
||
<li>report type VHDL33 = cancel report, issued if necessary to cancel VHDL32</li>
|
||
</ul>
|
||
</ul>
|
||
<br/>
|
||
|
||
<code>get <name> warningssmap <region></code>
|
||
<br/><br/>
|
||
<ul>Retrieve map (imagefile) containig current warnings for selected region marked with symbols</ul>
|
||
<br/><br/>
|
||
<b>All downloaded mapfiles</b> can be found inside "GDS Files" area in left navigation bar.
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="GDSattr"></a>
|
||
<b>Attributes</b><br/><br/>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<br/>
|
||
<li><b>gdsAll</b> - defines filter for "all data" from alert message</li>
|
||
<li><b>gdsDebug</b> - defines filter for debug informations</li>
|
||
<li><b>gdsSetCond</b> - defines conditions area to be used after system restart</li>
|
||
<li><b>gdsLong</b> - show long text fields "description" and "instruction" from alert message in readings</li>
|
||
<li><b>gdsPolygon</b> - show polygon data from alert message in a reading</li>
|
||
<br/>
|
||
<li><b>gdsPassiveFtp</b> - set to 1 to use passive FTP transfer</li>
|
||
<li><b>gdsFwName</b> - define firewall hostname in format <hostname>:<port></li>
|
||
<li><b>gdsFwType</b> - define firewall type in a value 0..7 please refer to <a href="http://search.cpan.org/~gbarr/libnet-1.22/Net/Config.pm#NetConfig_VALUES">cpan documentation</a> for further informations regarding firewall settings.</li>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Generated Readings/Events:</b>
|
||
<br/><br/>
|
||
<ul>
|
||
<li><b>_<readingName></b> - debug informations</li>
|
||
<li><b>a_<readingName></b> - weather data from CAP alert messages. Readings will NOT be updated automatically</li>
|
||
<li><b>c_<readingName></b> - weather data from SET weather conditions. Readings will be updated every 60 minutes</li>
|
||
<li><b>g_<readingName></b> - weather data from GET weather conditions. Readings will NOT be updated automatically</li>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Author's notes</b><br/><br/>
|
||
<ul>
|
||
|
||
<li>Module uses following additional Perl modules:<br/><br/>
|
||
<code>Net::FTP, List::MoreUtils, XML::Simple, Text::CSV</code><br/><br/>
|
||
If not already installed in your environment, please install them using appropriate commands from your environment.</li>
|
||
<br/><br/>
|
||
<li>Have fun!</li><br/>
|
||
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<p>
|
||
<a name="GEOFANCY" id="GEOFANCY"></a>
|
||
</p>
|
||
<h3>
|
||
GEOFANCY
|
||
</h3>
|
||
<ul>
|
||
<li>Provides webhook receiver for geofencing via the following iOS apps:<br>
|
||
<br>
|
||
</li>
|
||
<li>
|
||
<a href="https://itunes.apple.com/de/app/geofency-time-tracking-automatic/id615538630?l=en&mt=8">Geofency</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://itunes.apple.com/de/app/geofancy/id725198453?l=en&mt=8">Geofancy</a>
|
||
</li>
|
||
<li>
|
||
<p>
|
||
Note: GEOFANCY is an extension to <a href="FHEMWEB">FHEMWEB</a>. You need to install FHEMWEB to use GEOFANCY.
|
||
</p><a name="GEOFANCYdefine" id="GEOFANCYdefine"></a> <b>Define</b>
|
||
<div style="margin-left: 2em">
|
||
<code>define <name> <infix></code><br>
|
||
<br>
|
||
Defines the webhook server. <code><infix></code> is the portion behind the FHEMWEB base URL (usually <code>http://hostname:8083/fhem</code>)<br>
|
||
<br>
|
||
Example:
|
||
<div style="margin-left: 2em">
|
||
<code>define geofancy GEOFANCY geo</code><br>
|
||
</div><br>
|
||
The webhook will be reachable at http://hostname:8083/fhem/geo in that case.<br>
|
||
<br>
|
||
</div><a name="GEOFANCYset" id="GEOFANCYset"></a> <b>Set</b>
|
||
<ul>
|
||
<li>
|
||
<b>clear</b> readings can be used to cleanup auto-created readings from deprecated devices.
|
||
</li>
|
||
</ul><br>
|
||
<br>
|
||
<a name="GEOFANCYattr" id="GEOFANCYattr"></a> <b>Attributes</b><br>
|
||
<br>
|
||
<ul>
|
||
<li>devAlias: can be used to rename device names in the format DEVICEUUID:Aliasname. Separate using blank to rename multiple devices.
|
||
</li>
|
||
</ul><br>
|
||
<br>
|
||
<b>Usage information</b><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Likely your FHEM installation is not reachable directly from the internet (good idea!).<br>
|
||
It is recommended to have a reverse proxy like nginx or Apache in front of FHEM where you can make sure access is only possible to specific subdirectories like /fhem/geo.<br>
|
||
You might also want to think about protecting the access by using HTTP Basic Authentication and encryption via SSL.<br>
|
||
Also the definition of a dedicated FHEMWEB instance for that purpose might help to restrict FHEM's functionality (note that the 'hidden' attributes of FHEMWEB currently do NOT protect from just guessing/knowing the correct URL!)<br>
|
||
<br>
|
||
To make that reverse proxy available from the internet, just forward the appropriate port via your internet router.<br>
|
||
<br>
|
||
The actual solution on how you can securely make your Geofancy webhook available to the internet is not part of this documentation and depends on your own skills.
|
||
</div><br>
|
||
<br>
|
||
<b>Integration with Home Automation</b><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
You might want to have a look to the module family of <a href="#ROOMMATE">ROOMMATE</a>, <a href="#GUEST">GUEST</a> and <a href="#RESIDENTS">RESIDENTS</a> for an easy processing of GEOFANCY events.
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>
|
||
<a name="GUEST" id="GUEST"></a>
|
||
</p>
|
||
<h3>
|
||
GUEST
|
||
</h3>
|
||
<div style="margin-left: 2em">
|
||
<a name="GUESTdefine" id="GUESTdefine"></a> <b>Define</b>
|
||
<div style="margin-left: 2em">
|
||
<code>define <rg_GuestName> GUEST [<device name of resident group>]</code><br>
|
||
<br>
|
||
Provides a special dummy device to represent a guest of your home.<br>
|
||
Based on the current state and other readings, you may trigger other actions within FHEM.<br>
|
||
<br>
|
||
Used by superior module <a href="#RESIDENTS">RESIDENTS</a> but may also be used stand-alone.<br>
|
||
<br>
|
||
Example:<br>
|
||
<div style="margin-left: 2em">
|
||
<code># Standalone<br>
|
||
define rg_Guest GUEST<br>
|
||
<br>
|
||
# Typical group member<br>
|
||
define rg_Guest GUEST rgr_Residents # to be member of resident group rgr_Residents<br>
|
||
<br>
|
||
# Member of multiple groups<br>
|
||
define rg_Guest GUEST rgr_Residents,rgr_Guests # to be member of resident group rgr_Residents and rgr_Guests</code>
|
||
</div>
|
||
</div><br>
|
||
<div style="margin-left: 2em">
|
||
Please note the RESIDENTS group device needs to be existing before a GUEST device can become a member of it.
|
||
</div><br>
|
||
<br>
|
||
<br>
|
||
<a name="GUESTset" id="GUESTset"></a> <b>Set</b>
|
||
<div style="margin-left: 2em">
|
||
<code>set <rg_GuestName> <command> [<parameter>]</code><br>
|
||
<br>
|
||
Currently, the following commands are defined.<br>
|
||
<ul>
|
||
<li>
|
||
<b>location</b> - sets reading 'location'; see attribute rg_locations to adjust list shown in FHEMWEB
|
||
</li>
|
||
<li>
|
||
<b>mood</b> - sets reading 'mood'; see attribute rg_moods to adjust list shown in FHEMWEB
|
||
</li>
|
||
<li>
|
||
<b>state</b> home,gotosleep,asleep,awoken,absent,none switch between states; see attribute rg_states to adjust list shown in FHEMWEB
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Possible states and their meaning</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
This module differs between 6 states:<br>
|
||
<br>
|
||
<ul>
|
||
<li>
|
||
<b>home</b> - individual is present at home and awake
|
||
</li>
|
||
<li>
|
||
<b>gotosleep</b> - individual is on it's way to bed
|
||
</li>
|
||
<li>
|
||
<b>asleep</b> - individual is currently sleeping
|
||
</li>
|
||
<li>
|
||
<b>awoken</b> - individual just woke up from sleep
|
||
</li>
|
||
<li>
|
||
<b>absent</b> - individual is not present at home but will be back shortly
|
||
</li>
|
||
<li>
|
||
<b>none</b> - guest device is disabled
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Presence correlation to location</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Under specific circumstances, changing state will automatically change reading 'location' as well.<br>
|
||
<br>
|
||
Whenever presence state changes from 'absent' to 'present', the location is set to 'home'. If attribute rg_locationHome was defined, first location from it will be used as home location.<br>
|
||
<br>
|
||
Whenever presence state changes from 'present' to 'absent', the location is set to 'underway'. If attribute rg_locationUnderway was defined, first location from it will be used as underway location.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Auto Gone</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Whenever an individual is set to 'absent', a trigger is started to automatically change state to 'gone' after a specific timeframe.<br>
|
||
Default value is 16 hours.<br>
|
||
<br>
|
||
This behaviour can be customized by attribute rg_autoGoneAfter.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Synchronizing presence with other ROOMMATE or GUEST devices</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
If you always leave or arrive at your house together with other roommates or guests, you may enable a synchronization of your presence state for certain individuals.<br>
|
||
By setting attribute rg_passPresenceTo, those individuals will follow your presence state changes to 'home', 'absent' or 'gone' as you do them with your own device.<br>
|
||
<br>
|
||
Please note that individuals with current state 'none' or 'gone' (in case of roommates) will not be touched.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Location correlation to state</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Under specific circumstances, changing location will have an effect on the actual state as well.<br>
|
||
<br>
|
||
Whenever location is set to 'home', the state is set to 'home' if prior presence state was 'absent'. If attribute rg_locationHome was defined, all of those locations will trigger state change to 'home' as well.<br>
|
||
<br>
|
||
Whenever location is set to 'underway', the state is set to 'absent' if prior presence state was 'present'. If attribute rg_locationUnderway was defined, all of those locations will trigger state change to 'absent' as well. Those locations won't appear in reading 'lastLocation'.<br>
|
||
<br>
|
||
Whenever location is set to 'wayhome', the reading 'wayhome' is set to '1' if current presence state is 'absent'. If attribute rg_locationWayhome was defined, LEAVING one of those locations will set reading 'wayhome' to '1' as well. So you actually have implicit and explicit options to trigger wayhome.<br>
|
||
Arriving at home will reset the value of 'wayhome' to '0'.<br>
|
||
<br>
|
||
If you are using the <a href="#GEOFANCY">GEOFANCY</a> module, you can easily have your location updated with GEOFANCY events by defining a simple NOTIFY-trigger like this:<br>
|
||
<br>
|
||
<code>define n_rg_Guest.location notify geofancy:currLoc_Guest.* set rg_Guest location $EVTPART1</code><br>
|
||
<br>
|
||
By defining geofencing zones called 'home' and 'wayhome' in the iOS app, you automatically get all the features of automatic state changes described above.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="GUESTattr" id="GUESTattr"></a> <b>Attributes</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>rg_autoGoneAfter</b> - hours after which state should be auto-set to 'gone' when current state is 'absent'; defaults to 16 hours
|
||
</li>
|
||
<li>
|
||
<b>rg_locationHome</b> - locations matching these will be treated as being at home; first entry reflects default value to be used with state correlation; separate entries by space; defaults to 'home'
|
||
</li>
|
||
<li>
|
||
<b>rg_locationUnderway</b> - locations matching these will be treated as being underway; first entry reflects default value to be used with state correlation; separate entries by comma or space; defaults to "underway"
|
||
</li>
|
||
<li>
|
||
<b>rg_locationWayhome</b> - leaving a location matching these will set reading wayhome to 1; separate entries by space; defaults to "wayhome"
|
||
</li>
|
||
<li>
|
||
<b>rg_locations</b> - list of locations to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
|
||
</li>
|
||
<li>
|
||
<b>rg_moodDefault</b> - the mood that should be set after arriving at home or changing state from awoken to home
|
||
</li>
|
||
<li>
|
||
<b>rg_moodSleepy</b> - the mood that should be set if state was changed to gotosleep or awoken
|
||
</li>
|
||
<li>
|
||
<b>rg_moods</b> - list of moods to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
|
||
</li>
|
||
<li>
|
||
<b>rg_passPresenceTo</b> - synchronize presence state with other GUEST or GUEST devices; separte devices by space
|
||
</li>
|
||
<li>
|
||
<b>rg_realname</b> - whenever GUEST wants to use the realname it uses the value of attribute alias or group; defaults to group
|
||
</li>
|
||
<li>
|
||
<b>rg_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
|
||
</li>
|
||
<li>
|
||
<b>rg_states</b> - list of states to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces; unsupported states will lead to errors though
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>durTimerAbsence</b> - timer to show the duration of absence from home in minutes
|
||
</li>
|
||
<li>
|
||
<b>durTimerPresence</b> - timer to show the duration of presence at home in minutes
|
||
</li>
|
||
<li>
|
||
<b>durTimerSleep</b> - timer to show the duration of sleep in minutes
|
||
</li>
|
||
<li>
|
||
<b>lastArrival</b> - timestamp of last arrival at home
|
||
</li>
|
||
<li>
|
||
<b>lastAwake</b> - timestamp of last sleep cycle end
|
||
</li>
|
||
<li>
|
||
<b>lastDeparture</b> - timestamp of last departure from home
|
||
</li>
|
||
<li>
|
||
<b>lastDurAbsence</b> - duration of last absence from home in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastDurPresence</b> - duration of last presence at home in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastDurSleep</b> - duration of last sleep in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastLocation</b> - the prior location
|
||
</li>
|
||
<li>
|
||
<b>lastMood</b> - the prior mood
|
||
</li>
|
||
<li>
|
||
<b>lastSleep</b> - timestamp of last sleep cycle begin
|
||
</li>
|
||
<li>
|
||
<b>lastState</b> - the prior state
|
||
</li>
|
||
<li>
|
||
<b>location</b> - the current location
|
||
</li>
|
||
<li>
|
||
<b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
|
||
</li>
|
||
<li>
|
||
<b>mood</b> - the current mood
|
||
</li>
|
||
<li>
|
||
<b>state</b> - reflects the current state
|
||
</li>
|
||
<li>
|
||
<b>wayhome</b> - depending on current location, it can become '1' if individual is on his/her way back home
|
||
</li>
|
||
<li>
|
||
<br>
|
||
<br>
|
||
The following readings will be set to '-' if state was changed to 'none':<br>
|
||
lastArrival, lastDurAbsence, lastLocation, lastMood, location, mood
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<a name="HCS"></a>
|
||
<h3>HCS</h3>
|
||
<ul>
|
||
Defines a virtual device for monitoring thermostats (FHT, HM-CC-TC, MAX) to control a central
|
||
heating unit.<br><br>
|
||
|
||
<a name="HCSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> HCS <device></code>
|
||
<br><br>
|
||
|
||
<ul>
|
||
<li><code><device></code> the name of a predefined device to switch.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
The HCS (heating control system) device monitors the state of all detected thermostats
|
||
in a free definable interval (by default: 10 min).
|
||
<br><br>
|
||
|
||
Regulation for heating requirement or suppression of the request can be controlled by
|
||
valve position or measured temperature (default) using also free definable thresholds.
|
||
In doing so, the HCS device also includes the hysteresis between two states.
|
||
<br><br>
|
||
|
||
Example for monitoring measured temperature:
|
||
<ul>
|
||
Threshold temperature for heating requirement: 0.5 (default)<br>
|
||
Threshold temperature for idle: 0.5 (default)<br>
|
||
<br>
|
||
|
||
Heating is required when the measured temperature of a thermostat is lower than
|
||
0.5° Celsius as the desired temperature. HCS then activates the defined device
|
||
until the measured temperature of the thermostat is 0.5° Celsius higher as the
|
||
desired temperature (threshold for idle). In this example, both tresholds are equal.
|
||
</ul>
|
||
<br>
|
||
|
||
Example for monitoring valve position:
|
||
<ul>
|
||
Threshold valve position for heating requirement: 40% (default)<br>
|
||
Threshold valve position for idle: 35% (default)<br>
|
||
<br>
|
||
|
||
Heating is required when the "open" position of a valve is more than 40%. HCS then
|
||
activates the defined device until the "open" position of the valve has lowered to
|
||
35% or less (threshold for idle).
|
||
</ul>
|
||
<br>
|
||
|
||
The HCS device supports an optional eco mode. The threshold oriented regulation by
|
||
measured temperature or valve position can be overridden by setting economic thresholds.
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
Threshold temperature economic mode on: 15° Celsius<br>
|
||
Threshold temperature economic mode off: 25° Celsius<br>
|
||
<br>
|
||
|
||
HCS activates the defined device until the measured temperature of one ore more
|
||
thermostats is lower or equal than 15° Celsius. If a measured temperature of one
|
||
or more thermostats is higher or equal than 25° Celsius, HCS switch of the defined
|
||
device (if none of the measured temperatures of all thermostats is lower or equal as
|
||
15° Celsius).
|
||
</ul>
|
||
<br>
|
||
|
||
In addition, the HCS device supports an optional temp-sensor. The threshold and economic
|
||
oriented regulation can be overriden by the reading of the temp-sensor (overdrive mode).
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
Threshold temperature reading for heating requirement: 10° Celsius<br>
|
||
Threshold temperature reading for idle: 18° Celsius<br>
|
||
<br>
|
||
|
||
Is a measured temperature ore valve position reaching or exceeding the threshold for
|
||
heating requirement, but the temperature reading is more than 18° Celcius, the
|
||
selected device will stay deactivated. The measured temperature or valve-position
|
||
oriented regulation has been overridden by the temperature reading in this example.
|
||
</ul>
|
||
<br>
|
||
|
||
The HCS device automatically detects devices which are ignored. Furthermore, certain
|
||
devices can also be excluded of the monitoring manually.
|
||
<br><br>
|
||
|
||
To reduce the transmission load, use the attribute event-on-change-reading, e.g.
|
||
<code>attr <name> event-on-change-reading state,devicestate,eco,overdrive</code>
|
||
<br><br>
|
||
|
||
To avoid frequent switching "on" and "off" of the device, a timeout (in minutes) can be set
|
||
using the attribute <code>idleperiod</code>.
|
||
<br><br>
|
||
|
||
<a name="HCSget"></a>
|
||
<b>Get </b>
|
||
<ul>
|
||
<li><code>values</code><br>
|
||
returns the actual values of each device
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HCSset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><code>eco <on>|<off></code><br>
|
||
enable (<code>on</code>) or disable (<code>off</code>) the economic mode.
|
||
</li>
|
||
<li><code>interval <value></code><br>
|
||
<code>value</code> modifies the interval of reading the actual valve positions.
|
||
The unit is minutes.
|
||
</li>
|
||
<li><code>mode <thermostat>|<valve></code><br>
|
||
changes the operational mode:<br>
|
||
<code>thermostat</code> controls the heating demand by defined temperature
|
||
thresholds.<br>
|
||
<code>valve</code> controls the heating demand by defined valve position thresholds.
|
||
</li>
|
||
<li><code>on</code><br>
|
||
restarts the monitoring after shutdown by <code>off</code> switch.<br>
|
||
HCS device starts up automatically upon FHEM start or after new device implementation!
|
||
</li>
|
||
<li><code>off</code><br>
|
||
shutdown of monitoring, can be restarted by using the <code>on</code> command.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HCSattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><code>deviceCmdOn</code> (mandatory)<br>
|
||
command to activate the device, e.g. <code>on</code>.
|
||
Default value: <code>on</code>
|
||
</li>
|
||
<li><code>deviceCmdOff</code> (mandatory)<br>
|
||
command to deactivate the device, e.g. <code>off</code>.
|
||
Default value: <code>off</code>
|
||
</li>
|
||
<li><code>ecoTemperatureOn</code> (Required by <code>eco</code> mode)<br>
|
||
defines threshold for measured temperature upon which device is allways switched on
|
||
</li>
|
||
<li><code>ecoTemperatureOff</code> (Required by <code>eco</code> mode)<br>
|
||
defines threshold for measured temperature upon which device is switched off
|
||
</li>
|
||
<li><code>exclude</code> (optional)<br>
|
||
space or comma separated list of devices (FHT or HM-CC-TC) for excluding from
|
||
monitoring
|
||
</li>
|
||
<li><code>idleperiod</code> (mandatory)<br>
|
||
locks the device to be switched for the specified period. The unit is minutes.
|
||
Default value: <code>10</code>
|
||
</li>
|
||
<li><code>mode</code> (mandatory)<br>
|
||
defines the operational mode:<br>
|
||
<code>thermostat</code> controls the heating demand by defined temperature
|
||
thresholds.<br>
|
||
<code>valve</code> controls the heating demand by defined valve position thresholds.<br>
|
||
Default value: <code>thermostat</code>
|
||
</li>
|
||
<li><code>sensor</code> (optional)<br>
|
||
device name of the temp-sensor
|
||
</li>
|
||
<li><code>sensorThresholdOn</code> (Required by <code>sensor</code>)<br>
|
||
threshold for temperature reading activating the defined device
|
||
Must be set if <code>sensor</code> has been defined
|
||
</li>
|
||
<li><code>sensorThresholdOff</code> (Required by <code>sensor</code>)<br>
|
||
threshold for temperature reading deactivating the defined device.
|
||
Must be set if <code>sensor</code> has been defined
|
||
</li>
|
||
<li><code>sensorReading</code> (Required by <code>sensor</code>)<br>
|
||
name which is used for saving the "reading" of the defined temp-sensor.
|
||
</li>
|
||
<li><code>thermostatThresholdOn</code> (Required by operational mode <code>thermostat</code>)<br>
|
||
defines delta threshold between desired and measured temperature upon which device
|
||
is switched on (heating required).<br>
|
||
Default value: <code>0.5</code>
|
||
</li>
|
||
<li><code>thermostatThresholdOff</code> (Required by operational mode <code>thermostat</code>)<br>
|
||
defines delta threshold between desired and measured temperature upon which
|
||
device is switched off (idle).<br>
|
||
Default value: <code>0.5</code>
|
||
</li>
|
||
<li><code>valveThresholdOn</code> (Required by operational mode <code>valve</code>)<br>
|
||
defines threshold of valve-position upon which device is switched on (heating
|
||
required).<br>
|
||
Default value: <code>40</code>
|
||
</li>
|
||
<li><code>valveThresholdOff</code> (Required by operational mode <code>valve</code>)<br>
|
||
defines threshold of valve-position upon which device is switched off (idle).<br>
|
||
Default value: <code>35</code>
|
||
</li>
|
||
<li><a href="#disable"><code>disable</code></a></li>
|
||
<li><a href="#do_not_notify"><code>do_not_notify</code></a></li>
|
||
<li><a href="#event-on-change-reading"><code>event-on-change-reading</code></a><br>
|
||
default value: <code>state,devicestate,eco,overdrive</code>
|
||
</li>
|
||
<li><a href="#event-on-update-reading"><code>event-on-update-reading</code></a></li>
|
||
<li><a href="#loglevel"><code>loglevel</code></a><br>
|
||
loglevel 3 (or lower) shows a complete statistic of scanned devices (FHT or HM-CC-TC).<br>
|
||
loglevel 4 shows a short summary of scanned devices.<br>
|
||
loglevel 5 suppressed the above messages.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="HMLAN"></a>
|
||
<h3>HMLAN</h3>
|
||
<ul>
|
||
The HMLAN is the fhem module for the eQ-3 HomeMatic LAN Configurator.<br>
|
||
A description on how to use <a href="https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb">hmCfgUsb</a> can be found follwing the link.<br/>
|
||
<br/>
|
||
The fhem module will emulate a CUL device, so the <a href="#CUL_HM">CUL_HM</a> module can be used to define HomeMatic devices.<br/>
|
||
<br>
|
||
In order to use it with fhem you <b>must</b> disable the encryption first with the "HomeMatic Lan Interface Configurator"<br>
|
||
(which is part of the supplied Windows software), by selecting the device, "Change IP Settings", and deselect "AES Encrypt Lan Communication".<br/>
|
||
<br/>
|
||
This device can be used in parallel with a CCU and (readonly) with fhem. To do this:
|
||
<ul>
|
||
<li>start the fhem/contrib/tcptee.pl program</li>
|
||
<li>redirect the CCU to the local host</li>
|
||
<li>disable the LAN-Encryption on the CCU for the Lan configurator</li>
|
||
<li>set the dummy attribute for the HMLAN device in fhem</li>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="HMLANdefine"><b>Define</b></a>
|
||
<ul>
|
||
<code>define <name> HMLAN <ip-address>[:port]</code><br>
|
||
<br>
|
||
port is 1000 by default.<br/>
|
||
If the ip-address is called none, then no device will be opened, so you can experiment without hardware attached.
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="HMLANset"><b>Set</b></a>
|
||
<ul>
|
||
<li><a href="#hmPairForSec">hmPairForSec</a></li>
|
||
<li><a href="#hmPairSerial">hmPairSerial</a></li>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="HMLANget"><b>Get</b></a>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="HMLANattr"><b>Attributes</b></a>
|
||
<ul>
|
||
<li><a href="#addvaltrigger">addvaltrigger</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#HMLANlogIDs">logIDs</a><br>
|
||
enables selective logging of HMLAN messages. A list of HMIds or names can be
|
||
entered, comma separated, which shall be logged.<br>
|
||
The attribute only allows device-IDs, not channel IDs.
|
||
Channel-IDs will be modified to device-IDs automatically.
|
||
<b>all</b> will log raw messages for all HMIds<br>
|
||
<b>sys</b> will log system related messages like keep-alive<br>
|
||
in order to enable all messages set "<b>all,sys</b>"<br>
|
||
</li>
|
||
<li><a name="HMLANhmMsgLowLimit">hmMsgLowLimit</a><br>
|
||
max messages level of HMLAN allowed for low-level message queue
|
||
to be executed. Above this level processing will be postponed.<br>
|
||
HMLAN will allow a max of messages per hour, it will block sending otherwise.
|
||
After about 90% messages the low-priority queue (currently only CUL_HM autoReadReg)
|
||
will be delayed until the condition is cleared. <br>
|
||
hmMsgLowLimit allowes to reduce this level further.<br>
|
||
Note that HMLAN transmitt-level calculation is based on some estimations and
|
||
has some tolerance. <br>
|
||
</li>
|
||
<li><a href="#hmId">hmId</a></li>
|
||
<li><a name="HMLANhmKey">hmKey</a></li>
|
||
<li><a name="HMLANhmKey2">hmKey2</a></li>
|
||
<li><a name="HMLANhmKey3">hmKey3</a></li>
|
||
<li><a name="HMLANhmKey4">hmKey4</a></li>
|
||
<li><a name="HMLANhmKey5">hmKey5</a><br>
|
||
AES keys for the HMLAN adapter. <br>
|
||
The key is converted to a hash. If a hash is given directly it is not converted but taken directly.
|
||
Therefore the original key cannot be converted back<br>
|
||
</li>
|
||
<li><a href="#hmProtocolEvents">hmProtocolEvents</a></li><br>
|
||
<li><a name="HMLANrespTime">respTime</a><br>
|
||
Define max response time of the HMLAN adapter in seconds. Default is 1 sec.<br/>
|
||
Longer times may be used as workaround in slow/instable systems or LAN configurations.</li>
|
||
<li><a name="HMLAN#wdTimer">wdTimer</a><br>
|
||
Time in sec to trigger HMLAN. Values between 5 and 25 are allowed, 25 is default.<br>
|
||
It is <B>not recommended</B> to change this timer. If problems are detected with <br>
|
||
HLMLAN disconnection it is advisable to resolve the root-cause of the problem and not symptoms.</li>
|
||
<li><a name="HMLANhmLanQlen">hmLanQlen</a><br>
|
||
defines queuelength of HMLAN interface. This is therefore the number of
|
||
simultanously send messages. increasing values may cause higher transmission speed.
|
||
It may also cause retransmissions up to data loss.<br>
|
||
Effects can be observed by watching protocol events<br>
|
||
1 - is a conservatibe value, and is default<br>
|
||
5 - is critical length, likely cause message loss</li>
|
||
</ul><br>
|
||
<a name="HMLANparameter"><b>parameter</b></a>
|
||
<ul>
|
||
<li><B>assignedIDs</B><br>
|
||
HMIds that are assigned to HMLAN and will be handled. e.g. ACK will be generated internally</li>
|
||
<li><B>assignedIDsCnt</B><br>
|
||
number of IDs that are assigned to HMLAN by FHEM</li>
|
||
<li><B>assignedIDsReport</B><br>
|
||
number of HMIds that HMLAN reports are assigned. This should be identical
|
||
to assignedIDsCnt</li>
|
||
<li><B>msgKeepAlive</B><br>
|
||
performance of keep-alive messages. <br>
|
||
<B>dlyMax</B>: maximum delay of sheduled message-time to actual message send.<br>
|
||
<B>bufferMin</B>: minimal buffer left to before HMLAN would likely disconnect
|
||
due to missing keepAlive message. bufferMin will be reset to 30sec if
|
||
attribut wdTimer is changed.<br>
|
||
if dlyMax is high (several seconds) or bufferMin goes to "0" (normal is 4) the system
|
||
suffers on internal delays. Reasons for the delay might be explored. As a quick solution
|
||
wdTimer could be decreased to trigger HMLAN faster.</li>
|
||
<li><B>msgLoadEst</B><br>
|
||
estimation of load of HMLAN. As HMLAN has a max capacity of message transmit per hour
|
||
FHEM tries to estimate usage - see also
|
||
<a href="#hmMsgLowLimit">hmMsgLowLimit</a><br></li>
|
||
<li><B>msgParseDly</B><br>
|
||
calculates the delay of messages in ms from send in HMLAN until processing in FHEM.
|
||
It therefore gives an indication about FHEM system performance.
|
||
</li>
|
||
</ul><br>
|
||
<a name="HMLANreadings"><b>parameter and readings</b></a>
|
||
<ul>
|
||
<li><B>prot_disconnect</B> <br>recent HMLAN disconnect</li>
|
||
<li><B>prot_init</B> <br>recent HMLAN init</li>
|
||
<li><B>prot_keepAlive</B> <br>HMLAN disconnect likely do to slow keep-alive sending</li>
|
||
<li><B>prot_ok</B> <br>recent HMLAN ok condition</li>
|
||
<li><B>prot_timeout</B> <br>recent HMLAN timeout</li>
|
||
<li><B>prot_Warning-HighLoad</B> <br>high load condition entered - HMLAN has about 10% performance left</li>
|
||
<li><B>prot_ERROR-Overload</B> <br>overload condition - HMLAN will receive bu tno longer transmitt messages</li>
|
||
<li><B>prot_Overload-released</B><br>overload condition released - normal operation possible</li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="HMS"></a>
|
||
<h3>HMS</h3>
|
||
<ul>
|
||
<a name="HMSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> HMS <housecode></code>
|
||
<br><br>
|
||
|
||
<code><housecode></code> is a four digit hex number,
|
||
corresponding to the address of the HMS device.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define temp HMS 1234</code><br>
|
||
</ul>
|
||
Notes:<br>
|
||
<ul>
|
||
<li>Currently supported devices are the HMS100-T HMS100-TF HMS100-WD
|
||
HMS100-MG HMS100-TFK HMS100-CO HMS100-FIT RM100-2 RM100-3</li>
|
||
|
||
<li>The housecode of the HMS devices may change if the battery is renewed.
|
||
In order to make life easier, you can define a "wildcard" device for each
|
||
type of HMS device. First the real device-id will be checked, then the
|
||
wildcard device id. The wildcards are:
|
||
<ul>
|
||
<li>1000 for the HMS100-TF</li>
|
||
<li>1001 for the HMS100-T</li>
|
||
<li>1002 for the HMS100-WD</li>
|
||
<li>1003 for the RM100-2</li>
|
||
<li>1004 for the HMS100-TFK</li>
|
||
<li>1006 for the HMS100-MG</li>
|
||
<li>1008 for the HMS100-CO</li>
|
||
<li>100e for the HMS100-FIT</li>
|
||
</ul>
|
||
</li>
|
||
|
||
<li>Some battery low notifications are not yet implemented (RM100,
|
||
HMS100WD).</li>
|
||
<li>Please test your installation before relying on the
|
||
functionality.</li>
|
||
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HMSset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="HMSget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="HMSattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#model">model</a> (hms100-t hms100-tf hms100-wd hms100-mg
|
||
hms100-co hms100-tfk hms100-fit rm100-2)</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="HMinfo"></a>
|
||
<h3>HMinfo</h3>
|
||
<ul>
|
||
<tr><td>
|
||
HMinfo is a module to support getting an overview of
|
||
eQ-3 HomeMatic devices as defines in <a href="#CUL_HM">CUL_HM</a>. <br><br>
|
||
<B>Status information and counter</B><br>
|
||
HMinfo gives an overview on the CUL_HM installed base including current conditions.
|
||
Readings and counter will not be updated automatically due to performance issues. <br>
|
||
Command <a href="#HMinfoupdate">update</a> must be used to refresh the values.
|
||
<ul><code><br>
|
||
set hm update<br>
|
||
</code></ul><br>
|
||
Webview of HMinfo will provide details, basically counter about how
|
||
many CUL_HM entities experience exceptional conditions. Areas provided are
|
||
<ul>
|
||
<li>Action Detector status</li>
|
||
<li>CUL_HM related IO devices and condition</li>
|
||
<li>Device protocol events which are related to communication errors</li>
|
||
<li>count of certain readings (e.g. batterie) and conditions - <a href="#HMinfoattr">attribut controlled</a></li>
|
||
<li>count of error condition in readings (e.g. overheat, motorError) - <a href="#HMinfoattr">attribut controlled</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
It also allows some HM wide commands such
|
||
as store all collected register settings.<br><br>
|
||
|
||
Commands will be executed on all HM entities of the installation.
|
||
If applicable and evident execution is restricted to related entities.
|
||
In fact, rssi is executed on devices only because channels do not support rssi values.<br><br>
|
||
<a name="HMinfoFilter"><b>Filter</b></a>
|
||
<ul> can be applied as following:<br><br>
|
||
<code>set <name> <cmd> <filter> [<param>]</code><br>
|
||
whereby filter has two segments, typefilter and name filter<br>
|
||
[-dcasev] [-f <filter>]<br><br>
|
||
filter for <b>types</b> <br>
|
||
<ul>
|
||
<li>d - device :include devices</li>
|
||
<li>c - channels :include channels</li>
|
||
<li>v - virtual :supress fhem virtual</li>
|
||
<li>p - physical :supress physical</li>
|
||
<li>a - aktor :supress actor</li>
|
||
<li>s - sensor :supress sensor</li>
|
||
<li>e - empty :include results even if requested fields are empty</li>
|
||
</ul>
|
||
and/or filter for <b>names</b>:<br>
|
||
<ul>
|
||
<li>-f <filter> :regexp to filter entity names </li>
|
||
</ul>
|
||
Example:<br>
|
||
<ul><code>
|
||
set hm param -d -f dim state # display param 'state' for all devices whos name contains dim<br>
|
||
set hm param -c -f ^dimUG$ peerList # display param 'peerList' for all channels whos name is dimUG<br>
|
||
set hm param -dcv expert # get attribut expert for all channels,devices or virtuals<br>
|
||
</code></ul>
|
||
</ul>
|
||
<br>
|
||
<a name="HMinfodefine"><b>Define</b></a>
|
||
<ul>
|
||
<code>define <name> HMinfo</code><br>
|
||
Just one entity needs to be defined without any parameter.<br>
|
||
</ul>
|
||
<br>
|
||
<a name="HMinfoget"><b>Get</b></a>
|
||
<ul>
|
||
<li><a name="#HMinfomodels">models</a><br>
|
||
list all HM models that are supported in FHEM
|
||
</li>
|
||
<li><a name="#HMinfoparam">param</a> <a href="#HMinfoFilter">[filter]</a> <name> <name>...<br>
|
||
returns a table parameter values (attribute, readings,...)
|
||
for all entities as a table
|
||
</li>
|
||
<li><a name="#HMinforegister">register</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
provides a tableview of register of an entity
|
||
</li>
|
||
<li><a name="#HMinforegCheck">regCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
performs a consistency check on register readings for completeness
|
||
</li>
|
||
<li><a name="#HMinfopeerCheck">peerCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
performs a consistency check on peers. If a peer is set in one channel
|
||
this funktion will search wether the peer also exist on the opposit side.
|
||
</li>
|
||
<li><a name="#HMinfopeerXref">peerXref</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
provides a cross-reference on peerings, a kind of who-with-who summary over HM
|
||
</li>
|
||
<li><a name="#HMinfoconfigCheck">configCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
performs a consistency check of HM settings. It includes regCheck and peerCheck
|
||
</li>
|
||
<li><a name="#HMinfotemplateList">templateList [<name>]</a><br>
|
||
list defined templates. If no name is given all templates will be listed<br>
|
||
</li>
|
||
|
||
<li><a name="#HMinfomsgStat">msgStat</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
statistic about message transferes over a week<br>
|
||
</li>
|
||
<li><a name="#HMinfoprotoEvents">protoEvents </a><a href="#HMinfoFilter">[filter]</a> <br>
|
||
this is likely a very <B>important view</B> for message incidents.
|
||
Information about pending commands and - much more relevant - about failed executions
|
||
is given in a table over all devices.<br>
|
||
Consider to clear this statistic use <a name="#HMinfoclear">clear Protocol</a>.<br>
|
||
</li>
|
||
<li><a name="#HMinforssi">rssi </a><a href="#HMinfoFilter">[filter]</a><br>
|
||
statistic over rssi data for HM entities.<br>
|
||
</li>
|
||
|
||
<li><a name="#HMinfotemplateChk">templateChk <a href="#HMinfoFilter">[filter] <template> <peer:[long|short]> [<param1> ...]</a><br>
|
||
verifies if the register-readings comply to the template <br>
|
||
Parameter are identical to <a href="#HMinfotemplateSet">templateSet</a><br>
|
||
The procedure will check if the register values match the ones provided by the template<br>
|
||
If no peer is necessary use <b>none</b> to skip this entry<br>
|
||
Example to verify settings<br>
|
||
<ul><code>
|
||
set hm templateChk -f RolloNord BlStopUpLg none 1 2 # RolloNord, no peer, parameter 1 and 2 given<br>
|
||
set hm templateChk -f RolloNord BlStopUpLg peerName:long # RolloNord peerName, long only<br>
|
||
set hm templateChk -f RolloNord BlStopUpLg peerName # RolloNord peerName, long and short<br>
|
||
set hm templateChk -f RolloNord BlStopUpLg peerName:all # RolloNord peerName, long and short<br>
|
||
set hm templateChk -f RolloNord BlStopUpLg all:long # RolloNord any peer, long only<br>
|
||
set hm templateChk -f RolloNord BlStopUpLg all # RolloNord any peer,long and short<br>
|
||
set hm templateChk -f Rollo.* BlStopUpLg all # each Rollo* any peer,long and short<br>
|
||
set hm templateChk BlStopUpLg # each entities<br>
|
||
</code></ul>
|
||
</li>
|
||
</ul>
|
||
<a name="HMinfoset"><b>Set</b></a>
|
||
<ul>
|
||
even though the commands are more a get funktion they are implemented
|
||
as set to allow simple web interface usage<br>
|
||
<ul>
|
||
<li><a name="#HMinfoupdate">update</a><br>
|
||
updates HM status counter.
|
||
</li>
|
||
|
||
|
||
<li><a name="#HMinfoautoReadReg">autoReadReg</a> <a href="#HMinfoFilter">[filter]</a><br>
|
||
schedules a read of the configuration for the CUL_HM devices with attribut autoReadReg set to 1 or higher.
|
||
</li>
|
||
<li><a name="#HMinfoclear">clear</a> <a href="#HMinfoFilter">[filter]</a> [Protocol|readings|msgStat|register|rssi]<br>
|
||
executes a set clear ... on all HM entities<br>
|
||
<ul>
|
||
<li>Protocol relates to set clear msgEvents</li>
|
||
<li>readings relates to set clear readings</li>
|
||
<li>rssi clears all rssi counters </li>
|
||
<li>msgStat clear HM general message statistics</li>
|
||
<li>register clears all register-entries in readings</li>
|
||
</ul>
|
||
</li>
|
||
<li><a name="#HMinfosaveConfig">saveConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
|
||
performs a save for all HM register setting and peers. See <a href="#CUL_HMsaveConfig">CUL_HM saveConfig</a>.<br>
|
||
<a ref="#HMinfopurgeConfig">purgeConfig</a> will be executed automatically if the stored filesize exceeds 1MByte.<br>
|
||
</li>
|
||
<li><a name="#HMinfoarchConfig">archConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
|
||
performs <a href="#HMinfosaveConfig">saveConfig</a> for entities that appeare to have achanged configuration.
|
||
It is more conservative that saveConfig since incomplete sets are not stored.<br>
|
||
option -a force an archieve for all devices that have a complete set of data<br>
|
||
</li>
|
||
<li><a name="#HMinfoloadConfig">loadConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
|
||
loads register and peers from a file saved by <a href="#HMinfosaveConfig">saveConfig</a>.<br>
|
||
It should be used carefully since it will add data to FHEM which cannot be verified. No readings will be replaced, only
|
||
missing readings will be added. The command is mainly meant to be fill in readings and register that are
|
||
hard to get. Those from devices which only react to config may not easily be read. <br>
|
||
Therefore it is strictly up to the user to fill valid data. User should consider using autoReadReg for devices
|
||
that can be read.<br>
|
||
The command will update FHEM readings and attributes. It will <B>not</B> reprogramm any device.
|
||
</li>
|
||
<li><a name="#HMinfopurgeConfig">purgeConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
|
||
purge (reduce) the saved config file. Due to the cumulative storage of the register setting
|
||
purge will use the latest stored readings and remove older one.
|
||
See <a href="#CUL_HMsaveConfig">CUL_HM saveConfig</a>.
|
||
</li>
|
||
|
||
<br>
|
||
<li><a name="#HMinfotempList">tempList</a> <a href="#HMinfoFilter">[filter]</a>[save|restore|verify] [<file>]</a><br>
|
||
this function supports handling of tempList for thermstates.
|
||
It allows templists to be saved in a separate file, verify settings against the file
|
||
and write the templist of the file to the devices. <br>
|
||
<li><B>save</B> saves tempList readings of the system to the file. <br>
|
||
Note that templist as available in FHEM is put to the file. It is up to the user to make
|
||
sure the data is actual<br>
|
||
Storage is not cumulative - former content of the file will be removed</li>
|
||
<li><B>restore</B> available templist as defined in the file are written directly
|
||
to the device</li>
|
||
<li><B>verify</B> file data is compared to readings as present in FHEM. It does not
|
||
verify data in the device - user needs to ensure actuallity of present readings</li>
|
||
<br>
|
||
<li><B>filename</B> is the name of the file to be used. Default ist <B>tempList.cfg</B></li>
|
||
File example<br>
|
||
<ul><code>
|
||
entities:HK1_Climate,HK2_Clima<br>
|
||
tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
|
||
tempListMon>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
|
||
tempListSat>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0<br>
|
||
tempListSun>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0<br>
|
||
tempListThu>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
|
||
tempListTue>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0<br>
|
||
tempListWed>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
|
||
entities:hk3_Climate<br>
|
||
tempListFri>06:00 17.0 12:00 21.0 23:00 20.0 24:00 19.5<br>
|
||
tempListMon>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
|
||
tempListSat>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
|
||
tempListSun>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
|
||
tempListThu>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
|
||
tempListTue>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
|
||
tempListWed>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
|
||
</code></ul>
|
||
File keywords<br>
|
||
<li><B>entities</B> comma separated list of entities which refers to the temp lists following.
|
||
The actual entity holding the templist must be given - which is channel 04 for RTs or channel 02 for TCs</li>
|
||
<li><B>tempList...</B> time and temp couples as used in the set tempList commands</li>
|
||
<br>
|
||
</li>
|
||
<li><a name="#HMinfotempListTmpl">tempListTmpl</a> <a href="#HMinfoFilter">[filter]</a>[templateName][verify|restore] [<file>]</a><br>
|
||
program one or more thermostat lists. The list of thermostats is selected by filter.<br>
|
||
<ul>
|
||
<li></B>templateName</B> is the name of the template as being named in the file. The file format ist
|
||
identical to <a ref="#HMinfotempList">tempList</a>. If the entity in the file matches templateName the subsequent
|
||
temp-settings from the file are bing programmed to all Thermostats that match the filter<br></li>
|
||
<li><B>file</B> name of the file to be used. Default: <B>tempList.cfg</B></li>
|
||
</ul>
|
||
</li>
|
||
<br>
|
||
<li><a name="#HMinfocpRegs">cpRegs <src:peer> <dst:peer> </a><br>
|
||
allows to copy register, setting and behavior of a channel to
|
||
another or for peers from the same or different channels. Copy therefore is allowed
|
||
intra/inter device and intra/inter channel. <br>
|
||
<b>src:peer</b> is the source entity. Peer needs to be given if a peer behabior beeds to be copied <br>
|
||
<b>dst:peer</b> is the destination entity.<br>
|
||
Example<br>
|
||
<ul><code>
|
||
set hm cpRegs blindR blindL # will copy all general register (list 1)for this channel from the blindR to the blindL entity.
|
||
This includes items like drive times. It does not include peers related register (list 3/4) <br>
|
||
set hm cpRegs blindR:Btn1 blindL:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindL<br>
|
||
set hm cpRegs blindR:Btn1 blindR:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindR, i.e. inside the same Actor<br>
|
||
</code></ul>
|
||
<br>
|
||
Restrictions:<br>
|
||
<ul>
|
||
cpRegs will <u>not add any peers</u> or read from the devices. It is up to the user to read register in advance<br>
|
||
cpRegs is only allowed between <u>identical models</u><br>
|
||
cpRegs expets that all <u>readings are up-to-date</u>. It is up to the user to ensure data consistency.<br>
|
||
</ul>
|
||
</li>
|
||
<li><a name="#HMinfotemplateDef">templateDef <name> <param> <desc> <reg1:val1> [<reg2:val2>] ...</a><br>
|
||
define a template.<br>
|
||
<b>param</b> gives the names of parameter necesary to execute the template. It is template dependant
|
||
and may be onTime or brightnesslevel. A list of parameter needs to be separated with colon<br>
|
||
param1:param2:param3<br>
|
||
if del is given as parameter the template is removed<br>
|
||
<b>desc</b> shall give a description of the template<br>
|
||
<b>reg:val</b> is the registername to be written and the value it needs to be set to.<br>
|
||
In case the register is from link set and can destinguist between long and short it is necessary to leave the
|
||
leading sh or lg off. <br>
|
||
if parameter are used it is necessary to enter p. as value with p0 first, p1 second parameter
|
||
<br>
|
||
Example<br>
|
||
<ul><code>
|
||
set hm templateDef SwOnCond level:cond "my description" CtValLo:p0 CtDlyOn:p1 CtOn:geLo<br>
|
||
</code></ul>
|
||
</li>
|
||
<li><a name="#HMinfotemplateSet">templateSet <entity> <template> <peer:[long|short]> [<param1> ...]</a><br>
|
||
sets a bunch of register accroding to a given template. Parameter may be added depending on
|
||
the template setup. <br>
|
||
templateSet will collect and accumulate all changes. Finally the results are written streamlined.<br>
|
||
<b>entity:</b> peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied <br>
|
||
<b>template:</b> one of the programmed template<br>
|
||
<b>peer:</b> [long|short]:if necessary a peer needs to be given. If no peer is used enter '0'.
|
||
with a peer it should be given whether it is for long or short keypress<br>
|
||
<b>param:</b> number and meaning of parameter depends on the given template<br>
|
||
Example could be (templates not provided, just theoretical)<br>
|
||
<ul><code>
|
||
set hm templateSet Licht1 staircase FB1:short 20 <br>
|
||
set hm templateSet Licht1 staircase FB1:long 100 <br>
|
||
</code></ul>
|
||
Restrictions:<br>
|
||
<ul>
|
||
User must ensure to read configuration prior to execution.<br>
|
||
templateSet may not setup a complete register block but only a part if it. This is up to template design.<br>
|
||
<br>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HMinfoget"></a>
|
||
<b>Get</b>
|
||
<ul> N/A </ul>
|
||
<br><br>
|
||
|
||
<a name="HMinfoattr"><b>Attributes</b></a>
|
||
<ul>
|
||
<li><a name="#HMinfosumStatus">sumStatus</a><br>
|
||
Warnings: list of readings that shall be screend and counted based on current presence.
|
||
I.e. counter is the number of entities with this reading and the same value.
|
||
Readings to be searched are separated by comma. <br>
|
||
Example:<br>
|
||
<ul><code>
|
||
attr hm sumStatus battery,sabotageError<br>
|
||
</code></ul>
|
||
will cause a reading like<br>
|
||
W_sum_batterie ok:5 low:3<br>
|
||
W_sum_sabotageError on:1<br>
|
||
<br>
|
||
Note: counter with '0' value will not be reported. HMinfo will find all present values autonomously<br>
|
||
Setting is meant to give user a fast overview of parameter that are expected to be system critical<br>
|
||
</li>
|
||
<li><a name="#HMinfosumERROR">sumERROR</a>
|
||
Similar to sumStatus but with a focus on error conditions in the system.
|
||
Here user can add reading<b>values</b> that are <b>not displayed</b>. I.e. the value is the
|
||
good-condition that will not be counted.<br>
|
||
This way user must not know all error values but it is sufficient to supress known non-ciritical ones.
|
||
<br>
|
||
Example:<br>
|
||
<ul><code>
|
||
attr hm sumERROR battery:ok,sabotageError:off,overheat:off,Activity:alive:unknown<br>
|
||
</code></ul>
|
||
will cause a reading like<br>
|
||
<ul><code>
|
||
ERR_batterie low:3<br>
|
||
ERR_sabotageError on:1<br>
|
||
ERR_overheat on:3<br>
|
||
ERR_Activity dead:5<br>
|
||
</code></ul>
|
||
</li>
|
||
<li><a name="#HMinfoautoUpdate">autoUpdate</a>
|
||
retriggers the command update periodically.<br>
|
||
Example:<br>
|
||
<ul><code>
|
||
attr hm autoUpdate 00:10<br>
|
||
</code></ul>
|
||
will trigger the update every 10 min<br>
|
||
</li>
|
||
<li><a name="#HMinfoautoArchive">autoArchive</a>
|
||
if set fhem will update the configFile each time the new data is available.
|
||
The update will happen with <a ref="#HMinfoautoUpdate">autoUpdate</a>. It will not
|
||
work it autoUpdate is not used.<br>
|
||
see also <a ref="#HMinfoarchConfig">archConfig</a>
|
||
<br>
|
||
</li>
|
||
<li><a name="#HMinfohmAutoReadScan">hmAutoReadScan</a>
|
||
defines the time in seconds CUL_HM tries to schedule the next autoRead
|
||
from the queue. Despite this timer FHEM will take care that only one device from the queue will be
|
||
handled at one point in time. With this timer user can stretch timing even further - to up to 300sec
|
||
min delay between execution. <br>
|
||
Setting to 1 still obeys the "only one at a time" prinzip.<br>
|
||
Note that compressing will increase message load while stretch will extent waiting time.<br>
|
||
</li>
|
||
<li><a name="#HMinfohmIoMaxDly">hmIoMaxDly</a>
|
||
max time in seconds CUL_HM stacks messages if the IO device is not ready to send.
|
||
If the IO device will not reappear in time all command will be deleted and IOErr will be reported.<br>
|
||
Note: commands will be executed after the IO device reappears - which could lead to unexpected
|
||
activity long after command issue.<br>
|
||
default is 60sec. max value is 3600sec<br>
|
||
</li>
|
||
<li><a name="#HMinfoconfigDir">configDir</a>
|
||
default directory where to store and load configuration files from.
|
||
This path is used as long as the path is not given in a filename of
|
||
a given command.<br>
|
||
It is used by commands like <a ref="#HMinfotempList">tempList</a> or <a ref="#HMinfosaveConfig">saveConfig</a><br>
|
||
</li>
|
||
<li><a name="#HMinfoconfigFilename">configFilename</a>
|
||
default filename used by
|
||
<a ref="#HMinfosaveConfig">saveConfig</a>,
|
||
<a ref="#HMinfopurgeConfig">purgeConfig</a>,
|
||
<a ref="#HMinfoloadConfig">loadConfig</a><br>
|
||
</li>
|
||
<li><a name="#HMinfohmManualOper">hmManualOper</a>
|
||
set to 1 will prevent any automatic operation, update or default settings
|
||
in CUL_HM.<br>
|
||
</li>
|
||
|
||
</ul>
|
||
<br>
|
||
<a name="HMinfovariables"><b>Variables</b></a>
|
||
<ul>
|
||
<li><b>I_autoReadPend:</b> Info:list of entities which are queued to retrieve config and status.
|
||
This is typically scheduled thru autoReadReg</li>
|
||
<li><b>ERR___rssiCrit:</b> Error:list of devices with RSSI reading n min level </li>
|
||
<li><b>W_unConfRegs:</b> Warning:list of entities with unconfirmed register changes. Execute getConfig to clear this.</li>
|
||
<li><b>I_rssiMinLevel:</b> Info:counts of rssi min readings per device, clustered in blocks</li>
|
||
|
||
<li><b>ERR__protocol:</b> Error:count of non-recoverable protocol events per device.
|
||
Those events are NACK, IOerr, ResendFail, CmdDel, CmdPend.<br>
|
||
Counted are the number of device with those events, not the number of events!</li>
|
||
<li><b>ERR__protoNames:</b> Error:name-list of devices with non-recoverable protocol events</li>
|
||
<li><b>I_HM_IOdevices:</b> Info:list of IO devices used by CUL_HM entities</li>
|
||
<li><b>I_actTotal:</b> Info:action detector state, count of devices with ceratin states</li>
|
||
<li><b>ERRactNames:</b> Error:names of devices that are not alive according to ActionDetector</li>
|
||
<li><b>C_sumDefined:</b> Count:defined entities in CUL_HM. Entites might be count as
|
||
device AND channel if channel funtion is covered by the device itself. Similar to virtual</li>
|
||
<li><b>ERR_<reading>:</b> Error:count of readings as defined in attribut
|
||
<a href="#HMinfosumERROR">sumERROR</a>
|
||
that do not match the good-content. </li>
|
||
<li><b>ERR_names:</b> Error:name-list of entities that are counted in any ERR_<reading>
|
||
W_sum_<reading>: count of readings as defined in attribut
|
||
<a href="#HMinfosumStatus">sumStatus</a>. </li>
|
||
Example:<br>
|
||
<ul><code>
|
||
ERR___rssiCrit LightKittchen,WindowDoor,Remote12<br>
|
||
ERR__protocol NACK:2 ResendFail:5 CmdDel:2 CmdPend:1<br>
|
||
ERR__protoNames LightKittchen,WindowDoor,Remote12,Ligth1,Light5<br>
|
||
ERR_battery: low:2;<br>
|
||
ERR_names: remote1,buttonClara,<br>
|
||
I_rssiMinLevel 99>:3 80<:0 60<:7 59<:4<br>
|
||
W_sum_battery: ok:5;low:2;<br>
|
||
W_sum_overheat: off:7;<br>
|
||
C_sumDefined: entities:23 device:11 channel:16 virtual:5;<br>
|
||
</code></ul>
|
||
</ul>
|
||
</ul>
|
||
<a name="HTTPMOD"></a>
|
||
<h3>HTTPMOD</h3>
|
||
|
||
<ul>
|
||
This module provides a generic way to retrieve information from devices with an HTTP Interface and store them in Readings.
|
||
It queries a given URL with Headers and data defined by attributes.
|
||
From the HTTP Response it extracts Readings named in attributes using Regexes also defined by attributes.
|
||
<br><br>
|
||
<b>Prerequisites</b>
|
||
<ul>
|
||
<br>
|
||
<li>
|
||
This Module uses the non blocking HTTP function HttpUtils_NonblockingGet provided by FHEM's HttpUtils in a new Version published in December 2013.<br>
|
||
If not already installed in your environment, please update FHEM or install it manually using appropriate commands from your environment.<br>
|
||
</li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HTTPMODdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<br>
|
||
<code>define <name> HTTPMOD <URL> <Interval></code>
|
||
<br><br>
|
||
The module connects to the given URL every Interval seconds, sends optional headers and data and then parses the response<br>
|
||
<br>
|
||
Example:<br>
|
||
<br>
|
||
<ul><code>define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60</code></ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HTTPMODconfiguration"></a>
|
||
<b>Configuration of HTTP Devices</b><br><br>
|
||
<ul>
|
||
Specify optional headers as <code>attr requestHeader1</code> to <code>attr requestHeaderX</code>, <br>
|
||
optional POST data as <code>attr requestData</code> and then <br>
|
||
pairs of <code>attr readingNameX</code> and <code>attr readingRegexX</code> to define which readings you want to extract from the HTTP
|
||
response and how to extract them.
|
||
<br><br>
|
||
Example for a PoolManager 5:<br><br>
|
||
<ul><code>
|
||
define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60<br>
|
||
attr PM readingsName1 PH<br>
|
||
attr PM readingsName2 CL<br>
|
||
attr PM readingsName3 TEMP<br>
|
||
attr PM readingsRegex1 34.4001.value":[ \t]+"([\d\.]+)"<br>
|
||
attr PM readingsRegex2 34.4008.value":[ \t]+"([\d\.]+)"<br>
|
||
attr PM readingsRegex3 34.4033.value":[ \t]+"([\d\.]+)"<br>
|
||
attr PM requestData {"get" :["34.4001.value" ,"34.4008.value" ,"34.4033.value", "14.16601.value", "14.16602.value"]}<br>
|
||
attr PM requestHeader1 Content-Type: application/json<br>
|
||
attr PM requestHeader2 Accept: */*<br>
|
||
attr PM stateFormat {sprintf("%.1f Grad, PH %.1f, %.1f mg/l Chlor", ReadingsVal($name,"TEMP",0), ReadingsVal($name,"PH",0), ReadingsVal($name,"CL",0))}<br>
|
||
</code></ul>
|
||
If you need to do some calculation on a raw value before it is used as a reading you can define the attribute <code>readingsExprX</code>
|
||
which can use the raw value from the variable $val
|
||
<br><br>
|
||
Example:<br><br>
|
||
<ul><code>
|
||
attr PM readingsExpr3 $val * 10<br>
|
||
</code></ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="HTTPMODset"></a>
|
||
<b>Set-Commands</b><br>
|
||
<ul>
|
||
none
|
||
</ul>
|
||
<br>
|
||
<a name="HTTPMODget"></a>
|
||
<b>Get-Commands</b><br>
|
||
<ul>
|
||
none
|
||
</ul>
|
||
<br>
|
||
<a name="HTTPMODattr"></a>
|
||
<b>Attributes</b><br><br>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<br>
|
||
<li><b>requestHeader.*</b></li>
|
||
Define an additional HTTP Header to set in the HTTP request <br>
|
||
<li><b>requestData</b></li>
|
||
POST Data to be sent in the request. If not defined, it will be a GET request as defined in HttpUtils used by this module<br>
|
||
<li><b>readingsName.*</b></li>
|
||
the name of a reading to extract with the corresponding readingRegex<br>
|
||
<li><b>readingsRegex.*</b></li>
|
||
defines the regex to be used for extracting the reading. The value to extract should be in a sub expression e.g. ([\d\.]+) in the above example <br>
|
||
<li><b>readingsExpr.*</b></li>
|
||
defines an expression that is used in an eval to compute the readings value. The raw value will be in the variable $val.
|
||
|
||
</ul>
|
||
<br>
|
||
<b>Author's notes</b><br><br>
|
||
<ul>
|
||
<li>If you don't know which URLs, headers or POST data your web GUI uses, you might try a local proxy like <a href=http://portswigger.net/burp/>BurpSuite</a> to track requests and responses </li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="HTTPSRV"></a>
|
||
<h3>HTTPSRV</h3>
|
||
<ul>
|
||
Provides a mini HTTP server plugin for FHEMWEB. It serves files from a given directory.<p>
|
||
|
||
HTTPSRV is an extension to <a href="HTTPSRV">FHEMWEB</a>. You must install FHEMWEB to use HTTPSRV.</p>
|
||
|
||
<a name="HTTPSRVdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> <infix> <directory> <friendlyname></code><br><br>
|
||
|
||
Defines the HTTP server. <code><infix></code> is the portion behind the FHEMWEB base URL (usually
|
||
<code>http://hostname:8083/fhem</code>), <code><directory></code> is the absolute path the
|
||
files are served from, and <code><friendlyname></code> is the name displayed in the side menu of FHEMWEB.<p><p>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define myJSFrontend HTTPSRV jsf /usr/share/jsfrontend My little frontend</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="HTTPSRVset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
n/a
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="HTTPSRVattr"></a>
|
||
<b>Attributes</b>
|
||
<br><br>
|
||
<ul>
|
||
<li>directoryindex: if the request is sent with no filename, i.e. the infix (with or without trailing slash) only, the file given in this attribute is loaded. Defaults to <code>index.html</code>.</li>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<b>Usage information</b>
|
||
<br><br>
|
||
<ul>
|
||
|
||
The above example on <code>http://hostname:8083/fhem</code> will return the file
|
||
<code>/usr/share/jsfrontend/foo.html</code> for <code>http://hostname:8083/fhem/jsf/foo.html</code>.
|
||
If no filename is given, the filename prescribed by the <code>directoryindex</code> attribute is returned.<p>
|
||
|
||
Notice: All links are relative to <code>http://hostname:8083/fhem</code>.
|
||
</ul>
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="HUEBridge"></a>
|
||
<h3>HUEBridge</h3>
|
||
<ul>
|
||
Module to access the bridge of the phillips hue lighting system.<br><br>
|
||
|
||
The actual hue bulbs, living colors or living whites devices are defined as <a href="#HUEDevice">HUEDevice</a> devices.
|
||
|
||
<br><br>
|
||
All newly found devices and groups are autocreated at startup and added to the room HUEDevice.
|
||
|
||
<br><br>
|
||
Notes:
|
||
<ul>
|
||
<li>This module needs <code>JSON</code>.<br>
|
||
Please install with '<code>cpan install JSON</code>' or your method of choice.</li>
|
||
<li>autocreate only works for the first bridge. devices on other bridges have to be manualy defined.</li>
|
||
</ul>
|
||
|
||
|
||
<br><br>
|
||
<a name="HUEBridge_Define_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> HUEBridge [<host>] [<interval>]</code><br>
|
||
<br>
|
||
|
||
Defines a HUEBridge device with address <host>.<br><br>
|
||
|
||
If [<host>] is not given the module will try to autodetect the bridge with the hue portal services.<br><br>
|
||
|
||
The bridge status will be updated every <interval> seconds. The default and minimum is 60.<br><br>
|
||
|
||
After a new bridge is created the pair button on the bridge has to be pressed.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define bridge HUEBridge 10.0.1.1</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="HUEBridge_Get"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>devices<br>
|
||
list the devices known to the bridge.</li>
|
||
<li>groups<br>
|
||
list the groups known to the bridge.</li>
|
||
</ul><br>
|
||
|
||
<a name="HUEBridge_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>statusRequest<br>
|
||
Update bridge status.</li>
|
||
<li>swupdate<br>
|
||
Update bridge firmware. This command is only available if a new firmware is available (indicated by updatestate with a value of 2. The version and release date is shown in the reading swupdate.<br>
|
||
A notify of the form <code>define HUEUpdate notify bridge:swupdate.* {...}</code> can be used to be informed about available firmware updates.<br></li>
|
||
</ul><br>
|
||
</ul><br>
|
||
|
||
<a name="HUEDevice"></a>
|
||
<h3>HUEDevice</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="HUEDevice_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> HUEDevice [group] <id> [<interval>]</code><br>
|
||
<br>
|
||
|
||
Defines a device connected to a <a href="#HUEBridge">HUEBridge</a>.<br><br>
|
||
|
||
This can be a hue bulb, a living colors light or a living whites bulb or dimmer plug.<br><br>
|
||
|
||
The device status will be updated every <interval> seconds. The default and minimum is 60. Groups are updated only on definition and statusRequest<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define bulb HUEDevice 1</code><br>
|
||
<code>define LC HUEDevice 2</code><br>
|
||
<code>define allLights HUEDevice group 0</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="HUEDevice_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>bri<br>
|
||
the brightness reported from the device. the value can be betwen 1 and 254</li>
|
||
<li>colormode<br>
|
||
the current colormode</li>
|
||
<li>ct<br>
|
||
the colortemperature in mireds and kelvin</li>
|
||
<li>hue<br>
|
||
the current hue</li>
|
||
<li>level<br>
|
||
the current brightness in percent</li>
|
||
<li>onoff<br>
|
||
the current on/off state as 0 or 1</li>
|
||
<li>sat<br>
|
||
the current saturation</li>
|
||
<li>xy<br>
|
||
the current xy color coordinates</li>
|
||
<li>state<br>
|
||
the current state</li>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>groups have no readings.</li>
|
||
<li>not all readings show the actual device state. all readings not related to the current colormode have to be ignored.</li>
|
||
<li>the actual state of a device controlled by a living colors or living whites remote can be different and will
|
||
be updated after some time.</li>
|
||
</ul><br>
|
||
</ul><br>
|
||
|
||
<a name="HUEDevice_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>on [<ramp-time>]</li>
|
||
<li>off [<ramp-time>]</li>
|
||
<li>toggle [<ramp-time>]</li>
|
||
<li>statusRequest<br>
|
||
Request device status update.</li>
|
||
<li>pct <value> [<ramp-time>]<br>
|
||
dim to <value><br>
|
||
Note: the FS20 compatible dimXX% commands are also accepted.</li>
|
||
<li>color <value><br>
|
||
set colortemperature to <value> kelvin.</li>
|
||
<li>bri <value> [<ramp-time>]<br>
|
||
set brighness to <value>; range is 1-254.</li>
|
||
<li>dimUp</li>
|
||
<li>dimDown</li>
|
||
<li>ct <value> [<ramp-time>]<br>
|
||
set colortemperature to <value> mireds; range is 154-500.</li>
|
||
<li>hue <value> [<ramp-time>]<br>
|
||
set hue to <value>; range is 0-65535.</li>
|
||
<li>sat <value> [<ramp-time>]<br>
|
||
set saturation to <value>; range is 0-254.</li>
|
||
<li>xy <x>,<y> [<ramp-time>]<br>
|
||
set the xy color coordinates to <x>,<y></li>
|
||
<li>alert [none|select|lselect]</li>
|
||
<li>effect [none|colorloop]</li>
|
||
<li>transitiontime <time><br>
|
||
set the transitiontime to <time> 1/10s</li>
|
||
<li>rgb <rrggbb></li>
|
||
<li>delayedUpdate</li>
|
||
<li>immediateUpdate</li>
|
||
<li><a href="#setExtensions"> set extensions</a> are supported.</li>
|
||
<br>
|
||
Note:
|
||
<ul>
|
||
<li><ramp-time> is given in seconds</li>
|
||
<li>multiple paramters can be set at once separated by <code>:</code><br>
|
||
Examples:<br>
|
||
<code>set LC on : transitiontime 100</code><br>
|
||
<code>set bulb on : bri 100 : color 4000</code><br></li>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="HUEDevice_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>rgb</li>
|
||
<li>RGB</li>
|
||
<li>devStateIcon<br>
|
||
returns html code that can be used to create an icon that represents the device color in the room overview.</li>
|
||
</ul><br>
|
||
|
||
<a name="HUEDevice_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>color-icon<br>
|
||
1 -> use lamp color as icon color and 100% shape as icon shape<br>
|
||
2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
|
||
<li>subType<br>
|
||
colordimmer, dimmer or switch, default is initialized according to device model.</li>
|
||
<li>delayedUpdate<br>
|
||
1 -> the update of the device status after a set command will be delayed for 1 second. usefull if multiple devices will ne switched.
|
||
</li>
|
||
<li>devStateIcon<br>
|
||
will be initialized to <code>{(HUEDevice_devStateIcon($name),"toggle")}</code> to show device color as default in room overview.</li>
|
||
<li>webCmd<br>
|
||
will be initialized to <code>rgb:rgb FF0000:rgb C8FF12:rgb 0000FF:toggle:on:off</code> to show colorpicker and 3 color preset buttons in room overview.</li>
|
||
</ul>
|
||
|
||
</ul><br>
|
||
|
||
<a name="Heating_Control"></a>
|
||
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
|
||
<h3>Heating Control</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="Heating_Controldefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Heating_Control <device> [<language>] <profile> <command>|<condition></code>
|
||
<br><br>
|
||
|
||
to set a weekly profile for <device>, eg. a heating sink.<br>
|
||
You can define different switchingtimes for every day.<br>
|
||
|
||
The new temperature is sent to the <device> automatically with <br><br>
|
||
|
||
<code>set <device> (desired-temp|desiredTemerature) <temp></code><br><br>
|
||
|
||
Because of the fhem-type of structures, a structures of heating sinks is sent "desired-temp":
|
||
Use an explicit command if you have structures of MAX heating thermostats.<br>
|
||
If you have defined a <condition> and this condition is false if the switchingtime has reached, no command will executed.<br>
|
||
A other case is to define an own perl command with <command>.
|
||
<p>
|
||
The following parameter are defined:
|
||
<ul><b>device</b><br>
|
||
The device to switch at the given time.
|
||
</ul>
|
||
<p>
|
||
<ul><b>language</b><br>
|
||
Specifies the language used for definition and profiles.
|
||
de,en,fr are possible. The parameter is optional.
|
||
</ul>
|
||
<p>
|
||
<ul><b>profile</b><br>
|
||
Define the weekly profile. All timings are separated by space. One switchingtime are defined
|
||
by the following example: <br>
|
||
<ul><b>[<weekdays>|]<time>|<parameter></b></ul><br>
|
||
<u>weekdays:</u> optional, if not set every day is using.<br>
|
||
Otherwise you can define one day as number or as shortname.<br>
|
||
<u>time:</u>define the time to switch, format: HH:MM:[SS](HH in 24 hour format) or a Perlfunction like {sunrise_abs()}<br>
|
||
<u>parameter:</u>the temperature to be set, using a float with mask 99.9 or a sybolic value like <b>eco</b> or <b>comfort</b> - whatever your thermostat understands.
|
||
The symbolic value can be added an additional parameter: dayTemp:16 night-temp:15. See examples <br>
|
||
</ul>
|
||
<p>
|
||
<ul><b>command</b><br>
|
||
If no condition is set, all others is interpreted as command. Perl-code is setting up
|
||
by well-known Block with {}.<br>
|
||
Note: if a command is defined only this command are executed. In case of executing
|
||
a "set desired-temp" command, you must define it explicit.<br>
|
||
The following parameter are replaced:<br>
|
||
<ol>
|
||
<li>@ => the device to switch</li>
|
||
<li>% => the new temperature</li>
|
||
</ol>
|
||
</ul>
|
||
<p>
|
||
<ul><b>condition</b><br>
|
||
if a condition is defined you must declare this with () and a valid perl-code.<br>
|
||
The returnvalue must be boolean.<br>
|
||
The parameter @ and % will be interpreted.
|
||
</ul>
|
||
<p>
|
||
<b>Example:</b>
|
||
<ul>
|
||
<code>define HCB Heating_Control Bad_Heizung 12345|05:20|21 12345|05:25|comfort 17:20|21 17:25|eco</code><br>
|
||
Mo-Fr are setting the temperature at 05:20 to 21°C, and at 05:25 to <b>comfort</b>.
|
||
Every day will be set the temperature at 17:20 to 21°C and 17:25 to <b>eco</b>.<p>
|
||
|
||
<code>define HCW Heating_Control WZ_Heizung 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|12
|
||
{fhem("set dummy on"); fhem("set @ desired-temp %");}</code><br>
|
||
At the given times and weekdays only(!) the command will be executed.<p>
|
||
|
||
<code>define HCW Heating_Control WZ_Heizung Sa-Su,We|08:00|21 (ReadingsVal("WeAreThere", "state", "no") eq "yes")</code><br>
|
||
The temperature is only set if the dummy variable WeAreThere is "yes".<p>
|
||
|
||
<code>define HCW Heating_Control WZ_Heizung en Su-Fr|{sunrise_abs()}|21 Mo-Fr|{sunset_abs()}|16</code><br>
|
||
The device is switched at sunrise/sunset. Language: english.
|
||
|
||
<code>define HCW Heating_Control WZ_Heizung en Mo-Fr|{myFunction}|night-temp:18 Mo-Fr|{myFunction()}|dayTemp:16</code><br>
|
||
The is switched at time myFunction(). It is sent the Command "night-temp 18" and "dayTemp 16".
|
||
|
||
If you want to have set all Heating_Controls their current value (after a temperature lowering phase holidays)
|
||
you can call the function <b> Heating_Control_SetAllTemps ()</b>.
|
||
This call can be automatically coupled to a dummy by notify:<3A><><A0><A0><A0><A0><A0>
|
||
<code>define HeizStatus2 notify Heating:. * {Heating_Control_SetAllTemps ()}</code>
|
||
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="Heating_Controlset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="Heating_Controlget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="Heating_ControlLogattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li><a href="#event-on-update-reading">event-on-update-reading</a></li>
|
||
<li><a href="#event-on-change-reading">event-on-change-reading</a></li>
|
||
<li><a href="#stateFormat">stateFormat</a></li>
|
||
<li>windowSensor<br>Defines a list of window sensors. When one of its window state readings is <b>open</b> the aktual switch is delayed.</li> </ul><br>
|
||
</ul>
|
||
|
||
<a name="I2C_BMP180"></a>
|
||
<h3>I2C_BMP180</h3>
|
||
<ul>
|
||
<a name="I2C_BMP180"></a>
|
||
<p>
|
||
With this module you can read values from the digital pressure sensors BMP180 and BMP085
|
||
via the i2c bus on Raspberry Pi.<br><br>
|
||
<b>There are two possibilities connecting to I2C bus:</b><br>
|
||
<ul>
|
||
<li><b>via RPII2C module</b><br>
|
||
The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
|
||
or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
|
||
<b>attribute IODev must be set</b><br><br>
|
||
</li>
|
||
<li><b>via HiPi library</b><br>
|
||
Add these two lines to your <b>/etc/modules</b> file to load the I2C relevant kernel modules
|
||
automaticly during booting your Raspberry Pi.<br>
|
||
<code><pre> i2c-bcm2708
|
||
i2c-dev</pre></code>
|
||
Install HiPi perl modules:<br>
|
||
<code><pre> wget http://raspberry.znix.com/hipifiles/hipi-install
|
||
perl hipi-install</pre></code>
|
||
To change the permissions of the I2C device create file:<br>
|
||
<code><pre> /etc/udev/rules.d/98_i2c.rules</pre></code>
|
||
with this content:<br>
|
||
<code><pre> SUBSYSTEM=="i2c-dev", MODE="0666"</pre></code>
|
||
<b>Reboot</b><br><br>
|
||
|
||
To use the sensor on the second I2C bus at P5 connector
|
||
(only for version 2 of Raspberry Pi) you must add the bold
|
||
line of following code to your FHEM start script:
|
||
<code><pre> case "$1" in
|
||
'start')
|
||
<b>sudo hipi-i2c e 0 1</b>
|
||
...</pre></code>
|
||
</li></ul>
|
||
<p>
|
||
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define BMP180 I2C_BMP180 [<I2C device>]</code><br><br>
|
||
<I2C device> must not be used if you connect via RPII2C module. For HiPi it's mandatory. <br>
|
||
<br>
|
||
Examples:
|
||
<pre>
|
||
define BMP180 I2C_BMP180 /dev/i2c-0
|
||
attr BMP180 oversampling_settings 3
|
||
attr BMP180 poll_interval 5
|
||
</pre>
|
||
<pre>
|
||
define BMP180 I2C_BMP180
|
||
attr BMP180 IODev RPiI2CMod
|
||
attr BMP180 oversampling_settings 3
|
||
attr BMP180 poll_interval 5
|
||
</pre>
|
||
</ul>
|
||
|
||
<a name="I2C_BMP180set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set BMP180 <readValues></code>
|
||
<br><br>
|
||
Reads the current temperature and pressure values from sensor.<br>
|
||
Normaly this execute automaticly at each poll intervall. You can execute
|
||
this manually if you want query the current values.
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="I2C_BMP180get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="I2C_BMP180attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>oversampling_settings<br>
|
||
Controls the oversampling setting of the pressure measurement in the sensor.<br>
|
||
Default: 3, valid values: 0, 1, 2, 3<br><br>
|
||
</li>
|
||
<li>poll_interval<br>
|
||
Set the polling interval in minutes to query the sensor for new measured
|
||
values.<br>
|
||
Default: 5, valid values: 1, 2, 5, 10, 20, 30<br><br>
|
||
</li>
|
||
<li>roundTemperatureDecimal<br>
|
||
Round temperature values to given decimal places.<br>
|
||
Default: 1, valid values: 0, 1, 2<br><br>
|
||
</li>
|
||
<li>roundPressureDecimal<br>
|
||
Round temperature values to given decimal places.<br>
|
||
Default: 1, valid values: 0, 1, 2<br><br>
|
||
</li>
|
||
<li>altitude<br>
|
||
if set, this altitude is used for calculating the pressure related to sea level (nautic null) NN<br><br>
|
||
Note: this is a global attributes, e.g<br>
|
||
<ul>
|
||
attr global altitude 220
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="I2C_DS1307"></a>
|
||
<h3>I2C_DS1307</h3>
|
||
<ul>
|
||
reads a DS1307 real-time clock chip via I2C.
|
||
|
||
Requires a defined <a href="#I2C">I2C</a>-device to work.<br>
|
||
|
||
<a name="I2C_DS1307define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> I2C_DS1307 <i2c-address></code> <br>
|
||
Specifies the I2C_DS1307 device.<br>
|
||
<li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="I2C_DS1307set"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<li><code>set <name> datetime</code>; set DS1307 time. Format is JJJJ-MM-DD HH:MM:SSdisplayed><br></li>
|
||
<li><code>set <name> now</code><br></li>
|
||
</ul>
|
||
|
||
<a name="I2C_I2Cget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A<br>
|
||
</ul><br>
|
||
<a name="I2C_DS1307attr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>poll_interval <seconds></li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#I2C">I2C</a> to use. (Optional, only required if there is more
|
||
than one I2C-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="I2C_LCD"></a>
|
||
<h3>I2C_LCD</h3>
|
||
<ul>
|
||
drives LiquidCrystal Displays (LCD) that are connected to Firmata (via I2C).
|
||
Supported are Displays that use a PCF8574T as I2C Bridge (as found on eBay when searching for
|
||
'LCD' and 'I2C'). Tested is the 1602 type (16 characters, 2 Lines), the 2004 type (and other cheap chinise-made
|
||
I2C-LCDs for Arduino) ship with the same library, so they should work as well.
|
||
See <a name="LiquidCrystal tutorial">http://arduino.cc/en/Tutorial/LiquidCrystal</a> for details about
|
||
how to hook up the LCD to the arduino.
|
||
|
||
Requires a defined <a href="#I2C">I2C</a>-device to work.<br>
|
||
this I2C-device has to be configures for i2c by setting attr 'i2c-config' on the I2C-device<br>
|
||
|
||
<a name="I2C_LCDdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> I2C_LCD <size-x> <size-y> <i2c-address></code> <br>
|
||
Specifies the I2C_LCD device.<br>
|
||
<li>size-x is the number of characters per line</li>
|
||
<li>size-y is the numbers of rows.</li>
|
||
<li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="I2C_LCDset"></a>
|
||
<b>Set</b><br>
|
||
<ul>
|
||
<li><code>set <name> text <text to be displayed></code><br></li>
|
||
<li><code>set <name> home</code><br></li>
|
||
<li><code>set <name> clear</code><br></li>
|
||
<li><code>set <name> display on|off</code><br></li>
|
||
<li><code>set <name> cursor <...></code><br></li>
|
||
<li><code>set <name> scroll left|right</code><br></li>
|
||
<li><code>set <name> backlight on|off</code><br></li>
|
||
<li><code>set <name> reset</code><br></li>
|
||
<li><code>set <name> writeXY x-pos,y-pos,len[,l] <text to be displayed></code><br></li>
|
||
</ul>
|
||
|
||
<a name="I2C_I2Cget"></a>
|
||
<b>Get</b><br>
|
||
<ul>
|
||
N/A<br>
|
||
</ul><br>
|
||
<a name="I2C_LCDattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<li>backLight <on|off></li>
|
||
<li>autoClear <on|off></li>
|
||
<li>autoBreak <on|off></li>
|
||
<li>restoreOnStartup <on|off></li>
|
||
<li>restoreOnReconnect <on|off></li>
|
||
<li><a href="#IODev">IODev</a><br>
|
||
Specify which <a href="#I2C">I2C</a> to use. (Optional, only required if there is more
|
||
than one I2C-device defined.)
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a><br></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="I2C_PCA9532"></a>
|
||
<h3>I2C_PCA9532</h3>
|
||
<ul>
|
||
<a name="I2C_PCA9532"></a>
|
||
Provides an interface to the PCA9532 I2C 16 channel PWM IC.
|
||
The PCA9532 has 2 independent PWM stages and every channel can be attached to on of these stages or directly turned on or off.
|
||
The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
|
||
or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
|
||
<b>attribute IODev must be set</b><br>
|
||
<a name="I2C_PCA9532Define"></a><br>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> I2C_PCA9532 <I2C Address></code><br>
|
||
where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
|
||
</ul>
|
||
|
||
<a name="I2C_PCA9532Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <port> <value></code><br><br>
|
||
<ul>
|
||
<li>if <code><port></code> is one of Port0 to Port15, then <code><value></code> will be one of:<br>
|
||
<ul>
|
||
<code>
|
||
off<br>
|
||
on<br>
|
||
PWM0 (output is switched with PWM0 frequency and duty cycle)<br>
|
||
PWM1 (output is switched with PWM1 frequency and duty cycle)<br>
|
||
</code>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
if <code><port></code> is PWM0 or PWM1, then <code><value></code> is an value between 0 and 255 and stands for the duty cycle of the PWM stage.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>set mod1 Port4 PWM1</code><br>
|
||
<code>set mod1 PWM1 128</code><br>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="I2C_PCA9532Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name></code>
|
||
<br><br>
|
||
refreshes all readings
|
||
</ul><br>
|
||
|
||
<a name="I2C_PCA9532Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>poll_interval<br>
|
||
Set the polling interval in minutes to query the GPIO's level<br>
|
||
Default: -, valid values: decimal number<br><br>
|
||
</li>
|
||
<li>InputPorts<br>
|
||
Space separated list of Portnumers that are used as Inputs<br>
|
||
Ports in this list can't be written<br>
|
||
Default: no, valid values: 0 1 2 .. 15<br><br>
|
||
</li>
|
||
<li>T0/T1<br>
|
||
Sets PWM0/PWM1 to another Frequency. The Formula is: Fx = 152/(Tx + 1) The corresponding frequency value is shown under internals.<br>
|
||
Default: 0 (152Hz), valid values: 0-255<br><br>
|
||
</li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="I2C_PCF8574"></a>
|
||
<h3>I2C_PCF8574</h3>
|
||
<ul>
|
||
<a name="I2C_PCF8574"></a>
|
||
Provides an interface to the PCA9532 8 channel port extender IC. On Raspberry Pi the Interrupt Pin can be connected to an GPIO and <a href="#RPI_GPIO">RPI_GPIO</a> can be used to get the port values if an interrupt occurs.<br>
|
||
The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
|
||
or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
|
||
<b>attribute IODev must be set</b><br>
|
||
<a name="I2C_PCF8574Define"></a><br>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> I2C_PCF8574 <I2C Address></code><br>
|
||
where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
|
||
</ul>
|
||
|
||
<a name="I2C_PCF8574Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <port> <value></code><br><br>
|
||
<ul>
|
||
<li><code><port></code> is one of Port0 to Port7 and <code><value></code> is one of:<br>
|
||
<ul>
|
||
<code>
|
||
off<br>
|
||
on<br>
|
||
</code>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>set mod1 Port4 on</code><br>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="I2C_PCF8574Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name></code>
|
||
<br><br>
|
||
refreshes all readings
|
||
</ul><br>
|
||
|
||
<a name="I2C_PCF8574Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>poll_interval<br>
|
||
Set the polling interval in minutes to query the GPIO's level<br>
|
||
Default: -, valid values: decimal number<br><br>
|
||
</li>
|
||
<li>InputPorts<br>
|
||
Space separated list of Portnumers that are used as Inputs<br>
|
||
Ports in this list can't be written<br>
|
||
Default: no, valid values: 0 1 2 .. 7<br><br>
|
||
</li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="I2C_SHT21"></a>
|
||
<h3>I2C_SHT21</h3>
|
||
<ul>
|
||
<a name="I2C_SHT21"></a>
|
||
Provides an interface to the SHT21 I2C Humidity sensor from <a href="www.sensirion.com">Sensirion</a>.
|
||
The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
|
||
or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
|
||
<b>attribute IODev must be set</b><br>
|
||
<a name="I2C_SHT21Define"></a><br>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> I2C_SHT21 [<I2C Address>]</code><br>
|
||
where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
|
||
</ul>
|
||
<a name="I2C_SHT21Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> readValues</code><br>
|
||
Reads the current temperature and humidity values from sensor.<br><br>
|
||
</ul>
|
||
<a name="I2C_SHT21Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>poll_interval<br>
|
||
Set the polling interval in minutes to query data from sensor<br>
|
||
Default: 5, valid values: 1,2,5,10,20,30<br><br>
|
||
</li>
|
||
<li>roundHumidityDecimal<br>
|
||
Number of decimal places for humidity value<br>
|
||
Default: 1, valid values: 0 1 2<br><br>
|
||
</li>
|
||
<li>roundTemperatureDecimal<br>
|
||
Number of decimal places for temperature value<br>
|
||
Default: 1, valid values: 0,1,2<br><br>
|
||
</li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="IF"></a>
|
||
<h3>IF</h3>
|
||
<ul>
|
||
<code>IF (<condition>) (<FHEM commands1>) ELSE (<FHEM commands2>)</code><br>
|
||
<br>
|
||
Executes <FHEM commands1> if <condition> is true, else <FHEM commands2> are executed.<br>
|
||
<br>
|
||
IF can be used anywhere where FHEM commands can be used.<br>
|
||
<br>
|
||
The ELSE-case is optional.<br>
|
||
<br>
|
||
The <condition> is the same as in perl-if.<br>
|
||
<br>
|
||
In addition, readings can be specified in the form:<br>
|
||
<br>
|
||
[<device>:<reading>:<format>|[<regular expression>]]<br>
|
||
<br>
|
||
In addition, internals can be specified with & in the form:<br>
|
||
<br>
|
||
[<device>:&<internal>:<format>|[<regular expression>]]<br>
|
||
<br>
|
||
<format> and [<regular expression>] are filter options und are optional.<br>
|
||
<br>
|
||
possible <format>:<br>
|
||
<br>
|
||
'd' for decimal number<br>
|
||
<br>
|
||
If only the state of a device is to be used, then only the device can be specified:<br>
|
||
<br>
|
||
<code>[<device>]</code> corresponsed to <code>[<device>:&STATE]</code><br>
|
||
<br>
|
||
<b>Examples:</b><br>
|
||
<br>
|
||
IF in combination with at-module, Reading specified in the condition:<br>
|
||
<br>
|
||
<code>define check at +00:10 IF ([outdoor:humidity] > 70) (set switch1 off) ELSE (set switch1 on)<br></code>
|
||
<br>
|
||
IF state query of the device "outdoor" in the condition:<br>
|
||
<br>
|
||
<code>define check at +00:10 IF ([outdoor] eq "open") (set switch1 on)<br></code>
|
||
<br>
|
||
corresponds with details of the internal:<br>
|
||
<br>
|
||
<code>define check at +00:10 IF ([outdoor:&STATE] eq "open") (set switch1 on)<br></code>
|
||
<br>
|
||
If the reading "state" to be queried, then the name of reading is specified without &:<br>
|
||
<br>
|
||
<code>define check at +00:10 IF ([outdoor:state] eq "open") (set switch1 on)<br></code>
|
||
<br>
|
||
Nested IF commands (It can be entered in the DEF input on multiple lines with indentation for better representation):<br>
|
||
<br>
|
||
<code>define test notify lamp <br>
|
||
IF ([lampe] eq "on") (<br>
|
||
<ol>
|
||
IF ([outdoor:humidity] < 70)<br>
|
||
<ol>(set lamp off)</ol>
|
||
ELSE<br>
|
||
<ol>(set lamp on)</ol>
|
||
</ol>
|
||
) ELSE<br>
|
||
<ol>(set switch on)</ol><br>
|
||
</code>
|
||
Filter by numbers in Reading "temperature":<br>
|
||
<br>
|
||
<code>define settemp at 22:00 IF ([tempsens:temperature:d] >= 10) (set heating on)<br></code>
|
||
<br>
|
||
Filter by "on" and "off" in the status of the device "move":<br>
|
||
<br>
|
||
<code>define activity notify move IF ([move:&STATE:[(on|off)] eq "on" and $we) (set lamp off)<br></code>
|
||
<br>
|
||
Example of the use of Readings in the then-case:<br>
|
||
<br>
|
||
<code>define temp at 18:00 IF ([outdoor:temperature] > 10) (set lampe [dummy])<br></code>
|
||
<br>
|
||
If an expression is to be evaluated first in a FHEM command, then it must be enclosed in braces.<br>
|
||
For example, if at 18:00 clock the outside temperature is higher than 10 degrees, the desired temperature is increased by 1 degree:<br>
|
||
<br>
|
||
<code>define temp at 18:00 IF ([outdoor:temperature] > 10) (set thermostat desired-temp {[thermostat:desired-temp:d]+1})<br></code>
|
||
<br>
|
||
Multiple commands are separated by a comma instead of a semicolon, thus eliminating the doubling, quadrupling, etc. of the semicolon:<br>
|
||
<br>
|
||
<code>define check at +00:10 IF ([outdoor:humidity] > 10) (set switch1 off,set switch2 on) ELSE (set switch1 on,set switch2 off)<br></code>
|
||
<br>
|
||
If a comma in FHEM expression occurs, this must be additionally bracketed so that the comma is not recognized as a delimiter:<br>
|
||
<br>
|
||
<code>define check at +00:10 IF ([outdoor:humidity] > 10) ((set switch1,switch2 off))<br></code>
|
||
<br>
|
||
IF in combination with a define at multiple set commands:<br>
|
||
<br>
|
||
<code>define check at *10:00 IF ([indoor] eq "on") (define a_test at +00:10 set lampe1 on;;set lampe2 off;;set temp desired 20)<br></code>
|
||
<br>
|
||
The comma can be combined as a separator between the FHEM commands with double semicolon, eg:<br>
|
||
<br>
|
||
<code>define check at *10:00 IF ([indoor] eq "on") (set lamp1 on,define a_test at +00:10 set lampe2 on;;set lampe3 off;;set temp desired 20)<br></code>
|
||
<br>
|
||
Time-dependent switch: In the period 20:00 to 22:00 clock the light should go off when it was on and I leave the room:<br>
|
||
<br>
|
||
<code>define n_lamp_off notify sensor IF ($hms gt "20:00" and $hms lt "22:00" and [sensor] eq "absent") (set lamp:FILTER=STATE!=off off)<br></code>
|
||
<br>
|
||
Combination of Perl and FHEM commands ($NAME and $EVENT can also be used):<br>
|
||
<br>
|
||
<code>define mail notify door:open IF ([alarm] eq "on")({system("wmail $NAME:$EVENT")},set alarm_signal on)<br></code>
|
||
</ul>
|
||
|
||
<a name="IPCAM"></a>
|
||
<h3>IPCAM</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name"IPCAMdefine"></a>
|
||
<strong>Define</strong>
|
||
<ul>
|
||
<code>define <name> IPCAM <ip[:port]></code>
|
||
<br>
|
||
<br>
|
||
Defines a network camera device to trigger snapshots on events.
|
||
<br>
|
||
<br>
|
||
Network cameras (IP cameras) usually have a build-in function to create
|
||
snapshot images. This module enables the event- or time-controlled
|
||
recording of these images.
|
||
<br>
|
||
In addition, this module allows the recording of many image formats like
|
||
JPEG, PNG, GIF, TIFF, BMP, ICO, PPM, XPM, XBM and SVG. The only requirement
|
||
is that the recorded image must be accessible via a URL.
|
||
<br>
|
||
So it is also possible to record images of e.g. a public Weather Camera
|
||
from the internet or any picture of a website.
|
||
<br>
|
||
Furthermore, it is possible to control the camera via PTZ-mode or custom commands.
|
||
<br>
|
||
<br>
|
||
Examples:
|
||
<br>
|
||
<br>
|
||
A local ip-cam takes 5 snapshots with 10 seconds delay per call:
|
||
<br>
|
||
<ul>
|
||
<code>define ipcam IPCAM 192.168.1.205</code><br>
|
||
<code>attr ipcam delay 10</code><br>
|
||
<code>attr ipcam path snapshot.cgi?user=foo&pwd=bar</code><br>
|
||
<code>attr ipcam snapshots 5</code><br>
|
||
<code>attr ipcam storage /srv/share/surveillance/snapshots</code><br>
|
||
</ul>
|
||
<br>
|
||
A notify on a motion detection of a specified device:
|
||
<br>
|
||
<ul>
|
||
<code>define MOTION.not.01 notify GH.ga.SEC.MD.01:.*on.* get ipcam image</code><br>
|
||
</ul>
|
||
<br>
|
||
Send an eMail after snapshots are taken:
|
||
<br>
|
||
<ul>
|
||
<code>define MOTION.not.02 notify ipcam:.*snapshots.* { myEmailFunction("%NAME") }</code><br>
|
||
</ul>
|
||
<br>
|
||
A public web-cam takes only 1 snapshot per call:
|
||
<br>
|
||
<ul>
|
||
<code>define schloss IPCAM www2.braunschweig.de</code><br>
|
||
<code>attr schloss path webcam/schloss.jpg</code><br>
|
||
<code>attr schloss storage /srv/share/surveillance/snapshots</code><br>
|
||
</ul>
|
||
<br>
|
||
An at-Job takes every hour a snapshot:
|
||
<br>
|
||
<ul>
|
||
<code>define snapshot_schloss at +*00:01:00 get schloss image</code><br>
|
||
</ul>
|
||
<br>
|
||
Move the camera up:
|
||
<br>
|
||
<ul>
|
||
<code>set ipcam tilt up</code>
|
||
</ul>
|
||
<br>
|
||
Move the camera to a the predefined position 4:
|
||
<br>
|
||
<ul>
|
||
<code>set ipcam pos 4</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
<a name="IPCAMset"></a>
|
||
<strong>Set</strong>
|
||
<ul>
|
||
<code>set <name> <value> <argument></code>
|
||
<br>
|
||
<br>
|
||
where <code>value</code> is one of:
|
||
<br>
|
||
<ul>
|
||
<li><code>cmd 1 .. 15</code><br>
|
||
Sets the camera to a custom defined command. The command must be defined as an
|
||
attribute first.
|
||
<br>
|
||
You can define up to 15 custom commands. The given number always relates to an
|
||
equivalent attribute <code>cmd<number></code>.
|
||
</li>
|
||
<li><code>pan <direction> [steps]</code><br>
|
||
Move the camera to the given <code><direction></code>, where <code><direction></code>
|
||
could be <code>left</code> or <code>right</code>.
|
||
<br>
|
||
The command always relates to an equivalent attribute <code>cmdPan<direction></code>.
|
||
<br>
|
||
Furthermore, a step size can be specified, which relates to the equivalent attribute
|
||
<code>cmdStep</code>.
|
||
</li>
|
||
<li><code>pos 1 .. 15|home</code><br>
|
||
Sets the camera to a custom defined position in PTZ mode. The position must be
|
||
defined as an attribute first.
|
||
<br>
|
||
You can define up to 15 custom positions and a predefined home position. The given
|
||
number always relates to an equivalent attribute <code>cmdPos<number></code>.
|
||
</li>
|
||
<li><code>tilt <direction> [steps]</code><br>
|
||
Move the camera to the given <code><direction></code>, where <code><direction></code>
|
||
could be <code>up</code> or <code>down</code>.
|
||
<br>
|
||
The command always relates to an equivalent attribute <code>cmdPan<direction></code>.
|
||
<br>
|
||
Furthermore, a step size can be specified, which relates to the equivalent attribute
|
||
<code>cmdStep</code>.
|
||
</li>
|
||
<li><code>raw <argument></code><br>
|
||
Sets the camera to a custom defined <code>argument</code>.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
<a name="IPCAMget"></a>
|
||
<strong>Get</strong>
|
||
<ul>
|
||
<code>get <name> <value></code>
|
||
<br>
|
||
<br>
|
||
where <code>value</code> is one of:
|
||
<br>
|
||
<ul>
|
||
<li><code>image</code><br>
|
||
Get one or more images of the defined IP-Cam. The number of images<br>
|
||
and the time interval between images can be specified using the<br>
|
||
attributes <code>snapshots</code> and <code>delay</code>.
|
||
</li>
|
||
<li><code>last</code><br>
|
||
Show the name of the last snapshot.
|
||
</li>
|
||
<li><code>snapshots</code><br>
|
||
Show the total number of a image sequence.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="IPCAMattr"></a>
|
||
<strong>Attributes</strong>
|
||
<ul>
|
||
<li>
|
||
basicauth<br>
|
||
If your camera supports authentication like <code>http://username:password@domain.com/</code>, you
|
||
can store your creditials within the <code>basicauth</code> attribute.<br>
|
||
If you prefer to store the credentials in a file (take a look at the attribute <code>credentials</code>)
|
||
you have to set the placeholder <code>{USERNAME}</code> and <code>{PASSWORD}</code> in the basicauth string.
|
||
These placeholders will be replaced with the values from the credentials file.<br>
|
||
Example:<br> <code>attr ipcam3 basicauth {USERNAME}:{PASSWORD}</code>
|
||
</li>
|
||
<li>
|
||
cmd01, cmd02, cmd03, .. cmd13, cdm14, cdm15<br>
|
||
It is possible to define up to 15 custom commands.<br>
|
||
Examples:<br>
|
||
<code>attr ipcam cmd01 led_mode=0</code><br>
|
||
<code>attr ipcam cmd02 resolution=8</code><br>
|
||
</li>
|
||
<li>
|
||
cmdPanLeft, cmdPanRight, cmdTiltUp, cmdTiltDown, cmdStep<br>
|
||
Depending of the camera model, are different commands necessary.<br>
|
||
Examples:<br>
|
||
<code>attr ipcam cmdTiltUp command=0</code><br>
|
||
<code>attr ipcam cmdTiltDown command=2</code><br>
|
||
<code>attr ipcam cmdPanLeft command=4</code><br>
|
||
<code>attr ipcam cmdPanRight command=6</code><br>
|
||
<code>attr ipcam cmdStep onstep</code><br>
|
||
</li>
|
||
<li>
|
||
cmdPos01, cmdPos02, cmdPos03, .. cmdPos13, cmdPos14, cmdPos15, cmdPosHome
|
||
It is possible to define up to 15 predefined position in PTZ-mode.<br>
|
||
Examples:<br>
|
||
<code>attr ipcam cmdPosHome command=25</code><br>
|
||
<code>attr ipcam cmdPos01 command=31</code><br>
|
||
<code>attr ipcam cmdPos02 command=33</code><br>
|
||
</li>
|
||
<li>
|
||
credentials<br>
|
||
Defines the location of the credentials file.<br>
|
||
If you prefer to store your cam credentials in a file instead be a part of the
|
||
URI (see attributes <code>path</code> and <code>query</code>), set the full path
|
||
with filename on this attribute.<br>
|
||
Example:<br>
|
||
<code>attr ipcam3 credentials /etc/fhem/ipcam.conf</code><br><br>
|
||
|
||
The credentials file has the following structure:<br>
|
||
<pre>
|
||
#
|
||
# Webcam credentials
|
||
#
|
||
$credentials{<name_cam1>}{username} = "<your_username>";
|
||
$credentials{<name_cam1>}{password} = "<your_password>";
|
||
$credentials{<name_cam2>}{username} = "<your_username>";
|
||
$credentials{<name_cam2>}{password} = "<your_password>";
|
||
...
|
||
</pre>
|
||
Replace <code><name_cam1></code> respectively <code><name_cam2></code>
|
||
with the names of your defined ip-cams and <code><your_username></code> respectively
|
||
<code><your_password></code> with your credentials (all without the brackets
|
||
<code><</code> and <code>></code>!).
|
||
</li>
|
||
<li>
|
||
delay<br>
|
||
Defines the time interval between snapshots in seconds.<br>
|
||
If more then one snapshot is taken, then it makes sense to define a short delay
|
||
between the snapshots. On the one hand, the camera is not addressed in short intervals
|
||
and the second may be better represented movements between images.<br>
|
||
Example: <code>attr ipcam3 delay 10</code>
|
||
</li>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li>
|
||
path<br>
|
||
Defines the path and query component of the complete <a href="http://de.wikipedia.org/wiki/Uniform_Resource_Identifier" target="_blank">URI</a> to get a snapshot of the
|
||
camera. Is the full URI of your ip-cam for example <code>http://CAMERA_IP/snapshot.cgi?user=admin&pwd=password</code>,
|
||
then only the path and query part is specified here (without the leading slash (/).<br>
|
||
Example:<br>
|
||
<code>attr ipcam3 path snapshot.cgi?user=admin&pwd=password</code><br><br>
|
||
|
||
If you prefer to store the credentials in a file (take a look at the attribute <code>credentials</code>)
|
||
you have to set the placeholder <code>{USERNAME}</code> and <code>{PASSWORD}</code> in the path string. These placeholders
|
||
will be replaced with the values from the credentials file.<br>
|
||
Example:<br>
|
||
<code>attr ipcam3 path snapshot.cgi?user={USERNAME}&pwd={PASSWORD}</code>
|
||
</li>
|
||
<li>
|
||
pathCmd<br>
|
||
Defines a path for the custom commands, if it is necessary.<br>
|
||
Example:<br>
|
||
<code>attr ipcam3 pathCmd set_misc.cgi</code>
|
||
</li>
|
||
<li>
|
||
pathPanTilt<br>
|
||
Defines a path for the PTZ-mode commands <code>pan</code>, <code>tilt</code> and <code>pos</code>,
|
||
if it is necessary.<br>
|
||
Example:<br>
|
||
<code>attr ipcam3 pathPanTilt decoder_control.cgi?user={USERNAME}&pwd={PASSWORD}</code>
|
||
</li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li>
|
||
snapshots<br>
|
||
Defines the total number of snapshots to be taken with the <code>get <name> image</code> command.
|
||
If this attribute is not defined, then the default value is 1.<br>
|
||
The snapshots are stored in the given path of the attribute <code>storage</code> and are
|
||
numbered sequentially (starts with 1) like <code>snapshot_01</code>, <code>snapshot_02</code>, etc.
|
||
Furthermore, an additional file <code>last</code> will be saved, which is identical with
|
||
the last snapshot-image. The module checks the imagetype and stores all these files with
|
||
the devicename and a correct extension, e.g. <code><devicename>_snapshot_01.jpg</code>.<br>
|
||
If you like a timestamp instead a sequentially number, take a look at the attribute <code>timestamp</code>.<br>
|
||
All files are overwritten on every <code>get <name> image</code> command (except: snapshots
|
||
with a timestamp. So, keep an eye on your diskspace if you use a timestamp extension!).<br>
|
||
Example:<br>
|
||
<code>attr ipcam3 snapshots 5</code>
|
||
</li>
|
||
<li>
|
||
storage<br>
|
||
Defines the location for the file storage of the snapshots.<br>
|
||
Default: <code>$modpath/www/snapshots</code><br>
|
||
Example:<br>
|
||
<code>attr ipcam3 storage /srv/share/surveillance/snapshots</code>
|
||
</li>
|
||
<li>
|
||
timestamp<br>
|
||
If this attribute is unset or set to 0, snapshots are stored with a sequentially number
|
||
like <code><devicename>_snapshot_01.jpg</code>, <code><devicename>_snapshot_02.jpg</code>, etc.<br>
|
||
If you like filenames with a timestamp postfix, e.g. <code><devicename>_20121023_002602.jpg</code>,
|
||
set this attribute to 1.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="IPCAMevents"></a>
|
||
<strong>Generated events</strong>
|
||
<ul>
|
||
<li>last: <name_of_device>_snapshot.<image_extension></li>
|
||
<li>snapshots: <total_number_of_taken_snapshots_at_end></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="IPWE"></a>
|
||
<h3>IPWE</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="IPWEdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> IPWE <hostname> [<delay>]</code>
|
||
<br><br>
|
||
|
||
Define a IPWE network attached weather data receiver device sold by ELV. Details see <a
|
||
href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=21508">here</a>.
|
||
It's intended to receive the same sensors as WS300 (8 T/H-Sensors and one kombi sensor),
|
||
but can be accessed via http and telnet.
|
||
<br>
|
||
For unknown reason, my try to use the telnet interface was not working neither with raw sockets
|
||
nor with Net::Telnet module. Therefore i choosed here the "easy" way
|
||
to simple readout the http page and extract all data from the offered table. For this reason this module doesnt
|
||
contain any option to configure this device.
|
||
<br><br><b>Note:</b> You should give your sensors a name within the web interface, once they a received the first time.
|
||
<br>To extract a single sensor simply match for this name or sensor id<br>
|
||
<br>
|
||
|
||
Attributes:
|
||
<ul>
|
||
<li><code>delay</code>: seconds between read accesses(default 300s)</li>
|
||
|
||
</ul>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define ipwe IPWE ipwe1 120</code><br>
|
||
</ul>
|
||
<ul>
|
||
<code>attr ipwe delay 600</code> : 10min between readouts<br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="IPWEget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> status</code>
|
||
<br><br>
|
||
Gets actual data from device for sensors with data
|
||
<br><br>
|
||
<code>get <name> <sensorname> </code>
|
||
<br><br>
|
||
will grep output from device for this sensorname
|
||
<br><br>
|
||
</ul>
|
||
|
||
|
||
<a name="IPWEattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (ipwe)</li>
|
||
<li>delay</li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
<a name="IT"></a>
|
||
<h3>IT - InterTechno</h3>
|
||
<ul>
|
||
The InterTechno 433MHZ protocol is used by a wide range of devices, which are either of
|
||
the sender/sensor category or the receiver/actuator category. As we right now are only
|
||
able to SEND InterTechno commands, but CAN'T receive them, this module at the moment
|
||
supports just devices like switches, dimmers, etc. through an <a href="#CUL">CUL</a> device, so this must be defined first.
|
||
|
||
<br><br>
|
||
|
||
<a name="ITdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> IT <housecode> <on-code> <off-code>
|
||
[<dimup-code>] [<dimdown-code>] </code>
|
||
<br>or<br>
|
||
<code>define <name> IT <ITRotarySwitches|FLS100RotarySwitches> </code>
|
||
<br><br>
|
||
|
||
The value of housecode is a 10-digit InterTechno Code, consisting of 0/1/F as it is
|
||
defined as a tri-state protocol. These digits depend on your device you are using.
|
||
<br>
|
||
Bit 11/12 are used for switching/dimming. As different manufacturers are using
|
||
different bit-codes you can specifiy here the 2-digit code for off/on/dimup/dimdown
|
||
in the same form: 0/1/F.
|
||
<br>
|
||
The value of ITRotarySwitches consist of the value of the alpha switch A-P and
|
||
the numeric switch 1-16 as set on the intertechno device. E.g. A1 or G12.
|
||
<br>
|
||
The value of FLS100RotarySwitches consist of the value of the I,II,II,IV switch
|
||
and the numeric 1,2,3,4 swicht. E.g. I2 or IV4.
|
||
<br>
|
||
The value of ITRotarySwitches and FLS100RotarySwitches is internaly translated
|
||
into a houscode value.
|
||
<br>
|
||
<ul>
|
||
<li><code><housecode></code> is a 10 digit tri-state number (0/1/F) depending on
|
||
your device setting (see list below).</li>
|
||
<li><code><on-code></code> is a 2 digit tri-state number for switching your device on;
|
||
It is appended to the housecode to build the 12-digits IT-Message.</li>
|
||
<li><code><off-code></code> is a 2 digit tri-state number for switching your device off;
|
||
It is appended to the housecode to build the 12-digits IT-Message.</li>
|
||
<li>The optional <code><dimup-code></code> is a 2 digit tri-state number for dimming your device up;
|
||
It is appended to the housecode to build the 12-digits IT-Message.</li>
|
||
<li>The optional <code><dimdown-code></code> is a 2 digit tri-state number for dimming your device down;
|
||
It is appended to the housecode to build the 12-digits IT-Message.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define lamp IT 01FF010101 11 00 01 10</code><br>
|
||
<code>define roll1 IT 111111111F 11 00 01 10</code><br>
|
||
<code>define otherlamp IT 000000000F 11 10 00 00</code><br>
|
||
<code>define otherroll1 IT FFFFFFF00F 11 10</code><br>
|
||
<code>define itswitch1 IT A1</code><br>
|
||
<code>define lamp IT J10</code><br>
|
||
<code>define flsswitch1 IT IV1</code><br>
|
||
<code>define lamp IT II2</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ITset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> [<time>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
dimdown
|
||
dimup
|
||
off
|
||
on
|
||
on-till # Special, see the note
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set lamp on</code><br>
|
||
<code>set lamp1,lamp2,lamp3 on</code><br>
|
||
<code>set lamp1-lamp3 on</code><br>
|
||
<code>set lamp off</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>on-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
|
||
or { <perl code> }, where the perl-code returns a time
|
||
specification).
|
||
If the current time is greater than the specified time, then the
|
||
command is ignored, else an "on" command is generated, and for the
|
||
given "till-time" an off command is scheduleld via the at command.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="ITattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="IODev"></a>
|
||
<li>IODev<br>
|
||
Set the IO or physical device which should be used for sending signals
|
||
for this "logical" device. An example for the physical device is a CUL.
|
||
Note: Upon startup fhem DOES NOT assigns an InterTechno device an
|
||
IODevice! The attribute IODev needs to be used AT ANY TIME!</li><br>
|
||
|
||
<a name="eventMap"></a>
|
||
<li>eventMap<br>
|
||
Replace event names and set arguments. The value of this attribute
|
||
consists of a list of space separated values, each value is a colon
|
||
separated pair. The first part specifies the "old" value, the second
|
||
the new/desired value. If the first character is slash(/) or komma(,)
|
||
then split not by space but by this character, enabling to embed spaces.
|
||
Examples:<ul><code>
|
||
attr store eventMap on:open off:closed<br>
|
||
attr store eventMap /on-for-timer 10:open/off:closed/<br>
|
||
set store open
|
||
</code></ul>
|
||
</li><br>
|
||
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<a name="attrdummy"></a>
|
||
<li>dummy<br>
|
||
Set the device attribute dummy to define devices which should not
|
||
output any radio signals. Associated notifys will be executed if
|
||
the signal is received. Used e.g. to react to a code from a sender, but
|
||
it will not emit radio signal if triggered in the web frontend.
|
||
</li><br>
|
||
|
||
<li><a href="#loglevel">loglevel</a></li><br>
|
||
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
|
||
<a name="model"></a>
|
||
<li>model<br>
|
||
The model attribute denotes the model type of the device.
|
||
The attributes will (currently) not be used by the fhem.pl directly.
|
||
It can be used by e.g. external programs or web interfaces to
|
||
distinguish classes of devices and send the appropriate commands
|
||
(e.g. "on" or "off" to a switch, "dim..%" to dimmers etc.).
|
||
The spelling of the model names are as quoted on the printed
|
||
documentation which comes which each device. This name is used
|
||
without blanks in all lower-case letters. Valid characters should be
|
||
<code>a-z 0-9</code> and <code>-</code> (dash),
|
||
other characters should be ommited. Here is a list of "official"
|
||
devices:<br>
|
||
<b>Sender/Sensor</b>: itremote<br>
|
||
|
||
<b>Dimmer</b>: itdimmer<br>
|
||
|
||
<b>Receiver/Actor</b>: itswitch
|
||
</li><br>
|
||
|
||
|
||
<a name="ignore"></a>
|
||
<li>ignore<br>
|
||
Ignore this device, e.g. if it belongs to your neighbour. The device
|
||
won't trigger any FileLogs/notifys, issued commands will silently
|
||
ignored (no RF signal will be sent out, just like for the <a
|
||
href="#attrdummy">dummy</a> attribute). The device won't appear in the
|
||
list command (only if it is explicitely asked for it), nor will it
|
||
appear in commands which use some wildcard/attribute as name specifiers
|
||
(see <a href="#devspec">devspec</a>). You still get them with the
|
||
"ignored=1" special devspec.
|
||
</li><br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ITevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
From an IT device you can receive one of the following events.
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>dimdown</li>
|
||
<li>dimup<br></li>
|
||
Which event is sent is device dependent and can sometimes configured on
|
||
the device.
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
|
||
<a name="Itach_Relay"></a>
|
||
<h3>ITACH_RELAY</h3>
|
||
<ul>
|
||
Note: this module needs the Net::Telnet module.
|
||
<br><br>
|
||
<a name="ITACH_RELAYdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ITACH_RELAY <ip-address> <port></code>
|
||
<br><br>
|
||
Defines an Global Cache iTach Relay device (Box with 3 relays) via its ip address. <br><br>
|
||
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define motor1 ITACH_RELAY 192.168.8.200 1</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ITACH_RELAYset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
off
|
||
on
|
||
toggle
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set motor1 on</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="JSONMETER"></a>
|
||
<h3>JSONMETER</h3>
|
||
<ul>
|
||
This module reads data from a measurement unit (so called smart meters for electricity, gas or heat)
|
||
<br>
|
||
that provides OBIS compliant data in JSON format on a webserver or on the FHEM file system.
|
||
<br>
|
||
It assumes normally, that the structur of the JSON data do not change.
|
||
<br>
|
||
|
||
<br>
|
||
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> JSONMETER <deviceType> [<ip address>] [poll-interval]</code>
|
||
<br>
|
||
Example: <code>define powermeter JSONMETER ITF 192.168.178.20 300</code>
|
||
<br>
|
||
<li><code>[poll-interval]</code>
|
||
<br>
|
||
Default is 300 seconds. Smallest possible value is 10. With 0 it will only update on "manual" request.
|
||
</li><br>
|
||
<li><code><deviceType></code>
|
||
<br>
|
||
Used to define the path and port to extract the json file.
|
||
<br>
|
||
The attribute 'pathString' can be used to add login information to the URL path of predefined devices.
|
||
<br>
|
||
<ul>
|
||
<li><b>ITF</b> - FROETEC Simplex ME one tariff electrical meter (N-ENERGY) (<a href="http://www.itf-froeschl.de">ITF Fröschl</a>)</li>
|
||
<li><b>EFR</b> - <a href="http://www.efr.de">EFR</a> Smart Grid Hub for electrical meter (EON, N-ENERGY and EnBW)
|
||
<br>
|
||
use the 'pathstring' attribute to specifiy your login information
|
||
<br>
|
||
<code>attr <device> pathString ?LogName=<i>user</i>&LogPSWD=<i>password</i></code>
|
||
</li>
|
||
<li><b>LS110</b> - <a href="http://www.youless.nl/productdetails/product/ls110.html">YouLess LS110</a> network sensor (counter) for electro mechanical electricity meter</li>
|
||
<li><b>url</b> - use the URL defined via the attributes 'pathString' and 'port'</li>
|
||
<li><b>file</b> - use the file defined via the attribute 'pathString' (positioned in the FHEM file system)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><code>INTERVAL <polling interval></code><br>
|
||
Polling interval in seconds
|
||
</li><br>
|
||
<li><code>statusRequest</code><br>
|
||
Update device information
|
||
</li><br>
|
||
<li><code>restartJsonAnalysis</code><br>
|
||
Restarts the analysis of the json file for known readings (compliant to the OBIS standard).
|
||
<br>
|
||
This analysis happens normally only once if readings have been found.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Get</b>
|
||
<ul>
|
||
<li><code>jsonFile</code>
|
||
<br>
|
||
extracts and shows the json data
|
||
</li><br>
|
||
<li><code>jsonAnalysis</code>
|
||
<br>
|
||
extracts the json data and shows the result of the analysis</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="JSONMETERattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><code>alwaysAnalyse < 0 | 1 ></code>
|
||
<br>
|
||
Repeats by each update the json analysis - use if structure of json data changes
|
||
<br>
|
||
Normally the once analysed structure is saved to reduce CPU load.
|
||
</li><br>
|
||
<li><code>doStatistics < 0 | 1 ></code>
|
||
<br>
|
||
Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
|
||
<br>
|
||
Logging and visualisation of the statistics should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
|
||
</li><br>
|
||
<li><code>pathString <string></code>
|
||
<ul>
|
||
<li>if deviceType = 'file': specifies the local file name and path</li>
|
||
<li>if deviceType = 'url': specifies the url path</li>
|
||
<li>other deviceType: can be used to add login information to the url path of predefined devices</li>
|
||
</ul>
|
||
</li><br>
|
||
<li><code>port <number></code>
|
||
<br>
|
||
Specifies the IP port for the deviceType 'url' (default is 80)
|
||
</li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="JeeLink"></a>
|
||
<h3>JeeLink</h3>
|
||
<ul>
|
||
The JeeLink is a family of RF devices sold by <a href="http://jeelabs.com">jeelabs.com</a>.
|
||
|
||
It is possible to attach more than one device in order to get better
|
||
reception, fhem will filter out duplicate messages.<br><br>
|
||
|
||
This module provides the IODevice for the <a href="#PCA301">PCA301</a> modules that implements the PCA301 protocoll.<br><br>
|
||
In the future other RF devices like the Energy Controll 3000, JeeLabs room nodes, fs20 or kaku devices will be supportet.<br><br>
|
||
|
||
Note: this module may require the Device::SerialPort or Win32::SerialPort
|
||
module if you attach the device via USB and the OS sets strange default
|
||
parameters for serial devices.
|
||
|
||
<br><br>
|
||
|
||
<a name="JeeLink_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> JeeLink <device></code> <br>
|
||
<br>
|
||
USB-connected devices:<br><ul>
|
||
<device> specifies the serial port to communicate with the JeeLink.
|
||
The name of the serial-device depends on your distribution, under
|
||
linux the cdc_acm kernel module is responsible, and usually a
|
||
/dev/ttyACM0 device will be created. If your distribution does not have a
|
||
cdc_acm module, you can force usbserial to handle the JeeLink by the
|
||
following command:<ul>modprobe usbserial vendor=0x0403
|
||
product=0x6001</ul>In this case the device is most probably
|
||
/dev/ttyUSB0.<br><br>
|
||
|
||
You can also specify a baudrate if the device name contains the @
|
||
character, e.g.: /dev/ttyACM0@57600<br><br>
|
||
|
||
If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
|
||
perl module Device::SerialPort is not needed, and fhem opens the device
|
||
with simple file io. This might work if the operating system uses sane
|
||
defaults for the serial parameters, e.g. some Linux distributions and
|
||
OSX. <br><br>
|
||
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="JeeLink_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>raw <datar><br>
|
||
send <data> as a raw message to the JeeLink to be transmitted over the RF link.
|
||
</li><br>
|
||
<li>LaCrossePairForSec <sec> [ignore_battery]<br>
|
||
enable autocreate of new LaCrosse sensors for <sec> seconds. if ignore_battery is not given only sensors
|
||
sending the 'new battery' flag will be created.
|
||
</li>
|
||
</ul>
|
||
|
||
<a name="JeeLink_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
</ul>
|
||
|
||
<a name="JeeLink_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="JsonList"></a>
|
||
<h3>JsonList</h3>
|
||
<ul>
|
||
<b>Note</b>: this command is deprecated, use <a
|
||
href="#JsonList2">jsonlist2</a> instead.<br><br>
|
||
|
||
<code>jsonlist [<devspec>|<typespec>|ROOMS]</code>
|
||
<br><br>
|
||
Returns an JSON tree of all definitions, all notify settings and all at
|
||
entries if no parameter is given. Can also be called via HTTP by
|
||
http://fhemhost:8083/fhem?cmd=jsonlist&XHR=1
|
||
<br><br>
|
||
Example:
|
||
<pre><code> fhem> jsonlist
|
||
{
|
||
"ResultSet": "full",
|
||
"Results": [
|
||
{
|
||
"list": "Global",
|
||
"devices": [
|
||
{
|
||
"DEF": "<no definition>",
|
||
"NAME": "global",
|
||
"NR": "1",
|
||
"STATE": "<no definition>",
|
||
"TYPE": "Global",
|
||
"currentlogfile": "/var/log/fhem/fhem-2011-12.log",
|
||
"logfile": "/var/log/fhem/fhem-%Y-%m.log",
|
||
"ATTR": {
|
||
"configfile": "/etc/fhem/fhem.conf",
|
||
"logfile": "/var/log/fhem/fhem-%Y-%m.log",
|
||
"modpath": "/usr/share/fhem",
|
||
"pidfilename": "/var/run/fhem.pid",
|
||
"port": "7072 global",
|
||
"room": "Server",
|
||
"statefile": "/var/cache/fhem/fhem.save",
|
||
"verbose": "4",
|
||
"version": "=VERS= from =DATE= ($Id: 98_JsonList.pm 5177 2014-03-09 16:16:17Z rudolfkoenig $)"
|
||
},
|
||
"READINGS": []
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"list": "CM11",
|
||
"devices": [
|
||
{
|
||
"DEF": "/dev/cm11",
|
||
"DeviceName": "/dev/cm11",
|
||
"FD": "14",
|
||
"NAME": "CM11",
|
||
"NR": "19",
|
||
"PARTIAL": "null",
|
||
"STATE": "Initialized",
|
||
"TYPE": "CM11",
|
||
"ATTR": {
|
||
"model": "CM11"
|
||
},
|
||
"READINGS": []
|
||
}
|
||
]
|
||
},
|
||
{
|
||
[...placeholder for more entrys...]
|
||
},
|
||
],
|
||
"totalResultsReturned": 235
|
||
}
|
||
</code></pre>
|
||
If specifying <code><devspec></code>, then a detailed status for
|
||
<code><devspec></code> will be displayed, e.g.:
|
||
<pre><code> fhem> jsonlist lamp1
|
||
{
|
||
"ResultSet": {
|
||
"Results": {
|
||
"ATTRIBUTES": {
|
||
"alias": "Lamp on Sideboard",
|
||
"model": "fs20st",
|
||
"room": "Livingroom"
|
||
},
|
||
"BTN": "01",
|
||
"CHANGED": "ARRAY",
|
||
"CHANGETIME": "ARRAY",
|
||
"CODE": {
|
||
"1": "0b0b 01",
|
||
"2": "0b0b 0f",
|
||
"3": "0b0b f0",
|
||
"4": "0b0b ff"
|
||
},
|
||
"DEF": "12341234 1112 lm 1144 fg 4411 gm 4444",
|
||
"IODev": "CUN868",
|
||
"NAME": "lamp1",
|
||
"NR": "155",
|
||
"READINGS": {
|
||
"state": {
|
||
"TIME": "2011-12-01 16:23:01",
|
||
"VAL": "on"
|
||
}
|
||
},
|
||
"STATE": "on",
|
||
"TYPE": "FS20",
|
||
"XMIT": "0b0b"
|
||
}
|
||
}
|
||
}
|
||
</code></pre>
|
||
If specifying <code><typespec></code>, then a list with the status for
|
||
the defined <code><typespec></code> devices will be displayed, e.g.:
|
||
<pre><code> fhem> jsonlist HMS
|
||
{
|
||
"ResultSet": "devices#HMS",
|
||
"Results": [
|
||
{
|
||
"name": "KG.ga.WD.01",
|
||
"state": "Water Detect: off"
|
||
},
|
||
{
|
||
"name": "KG.hz.GD.01",
|
||
"state": "Gas Detect: off"
|
||
},
|
||
{
|
||
"name": "KG.k1.TF.01",
|
||
"state": "T: 16.6 H: 51.2 Bat: ok"
|
||
},
|
||
{
|
||
"name": "NN.xx.RM.xx",
|
||
"state": "smoke_detect: off"
|
||
}
|
||
],
|
||
"totalResultsReturned": 4
|
||
}
|
||
</code></pre>
|
||
If specifying <code>ROOMS</code>, then a list with the defined rooms
|
||
will be displayed, e.g.:
|
||
<pre><code> fhem> jsonlist ROOMS
|
||
{
|
||
"ResultSet": "rooms",
|
||
"Results": [
|
||
"Bathroom",
|
||
"Bedroom",
|
||
"Children",
|
||
"Diningroom",
|
||
"Garden",
|
||
"House",
|
||
"Livingroom",
|
||
"Office",
|
||
"hidden"
|
||
],
|
||
"totalResultsReturned": 15
|
||
}
|
||
</code></pre>
|
||
</ul>
|
||
|
||
<a name="JsonList2"></a>
|
||
<h3>JsonList2</h3>
|
||
<ul>
|
||
<code>jsonlist [<devspec>]</code>
|
||
<br><br>
|
||
This is a command, to be issued on the command line (FHEMWEB or telnet
|
||
interface). Can also be called via HTTP by
|
||
<ul>
|
||
http://fhemhost:8083/fhem?cmd=jsonlist2&XHR=1
|
||
</ul>
|
||
Returns an JSON tree of the internal values, readings and attributes of the
|
||
requested definitions.<br>
|
||
<b>Note</b>: the old command jsonlist (without the 2 as suffix) is deprecated
|
||
and will be removed in the future<br>
|
||
</ul>
|
||
|
||
<a name="KM271"></a>
|
||
<h3>KM271</h3>
|
||
<ul>
|
||
KM271 is the name of the communication device for the Buderus Logamatic 2105
|
||
or 2107 heating controller. It is connected via a serial line to the fhem
|
||
computer. The fhem module sets the communication device into log-mode, which
|
||
then will generate an event on change of the inner parameters. There are
|
||
about 20.000 events a day, the FHEM module ignores about 90% of them, if the
|
||
<a href="#all_km271_events">all_km271_events</a> attribute is not set.<br>
|
||
<br><br>
|
||
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module.
|
||
<br><br>
|
||
|
||
<a name="KM271define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> KM271 <serial-device-name></code>
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>define KM271 KM271 /dev/ttyS0@2400</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="KM271set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set KM271 <param> [<value> [<values>]]</code><br><br>
|
||
where param is one of:
|
||
<ul>
|
||
<li>hk1_tagsoll <temp><br>
|
||
sets the by day temperature for heating circuit 1<br>
|
||
0.5 celsius resolution - temperature between 10 and 30 celsius</li>
|
||
<li>hk2_tagsoll <temp><br>
|
||
sets the by day temperature for heating circuit 2<br>
|
||
(see above)</li>
|
||
<li>hk1_nachtsoll <temp><br>
|
||
sets the by night temperature for heating circuit 1<br>
|
||
(see above)</li>
|
||
<li>hk2_nachtsoll <temp><br>
|
||
sets the by night temperature for heating circuit 2<br>
|
||
(see above)</li>
|
||
<li>hk1_betriebsart [automatik|nacht|tag]<br>
|
||
sets the working mode for heating circuit 1<br>
|
||
<ul>
|
||
<li>automatik: the timer program is active and the summer configuration is in effect</li>
|
||
<li>nacht: manual by night working mode, no timer program is in effect</li>
|
||
<li>tag: manual by day working mode, no timer program is in effect</li>
|
||
</ul></li>
|
||
<li>hk2_betriebsart [automatik|nacht|tag]<br>
|
||
sets the working mode for heating circuit 2<br>
|
||
(see above)</li>
|
||
<li>ww_soll <temp><br>
|
||
sets the hot water temperature<br>
|
||
1.0 celsius resolution - temperature between 30 and 60 celsius</li>
|
||
<li>ww_betriebsart [automatik|nacht|tag]<br>
|
||
sets the working mode for hot water<br>
|
||
<ul>
|
||
<li>automatik: hot water production according to the working modes of both heating circuits</li>
|
||
<li>nacht: no hot water at all</li>
|
||
<li>tag: manual permanent hot water</li>
|
||
</ul></li>
|
||
<li>ww_on-for-timer [period]<br>
|
||
start hot water production for the given period<br>
|
||
period must have the format HH:MM<br>
|
||
ww_betriebsart is set according to the attribut ww_timermode. For switching-off hot water a single one-time at command is automatically generated which will set ww_betriebsart back to nacht</li>
|
||
<li>hk1_programm [eigen|familie|frueh|spaet|vormittag|nachmittag|mittag|single|senior]<br>
|
||
sets the timer program for heating circuit 1<br>
|
||
<ul>
|
||
<li>eigen: the custom program defined by the user (see below) is used</li>
|
||
<li>all others: predefined programs from Buderus for various situations (see Buderus manual for details)</li>
|
||
</ul></li>
|
||
<li>hk2_programm [eigen|familie|frueh|spaet|vormittag|nachmittag|mittag|single|senior]<br>
|
||
sets the timer program for heating circuit 2<br>
|
||
(see above)</li>
|
||
<li>hk1_timer [<position> delete|<position> <on-day> <on-time> <off-day> <off-time>]<br>
|
||
sets (or deactivates) a by day working mode time interval for the custom program of heating circuit 1<br>
|
||
<ul>
|
||
<li>position: addresses a slot of the custom timer program and must be between 1 and 21<br>
|
||
The slot will be set to the interval specified by the following on- and off-timepoints or is deactivated when the next argument is <b>delete</b>.</li>
|
||
<li>on-day: first part of the on-timepoint<br>
|
||
valid arguments are [mo|di|mi|do|fr|sa|so]</li>
|
||
<li>on-time: second part of the on-timepoint<br>
|
||
valid arguments have the format HH:MM (supported resolution: 10 min)</li>
|
||
<li>off-day: first part of the off-timepoint<br>
|
||
(see above)</li>
|
||
<li>off-time: second part of the off-timepoint<br>
|
||
valid arguments have the format HH:MM (supported resolution: 10 min)</li>
|
||
</ul>
|
||
As the on-timepoint is reached, the heating circuit is switched to by day working mode and when the off-timepoint is attained, the circuit falls back to by night working mode.
|
||
A program can be build up by chaining up to 21 of these intervals. They are ordered by the position argument. There's no behind the scene magic that will automatically consolidate the list.
|
||
The consistency of the program is in the responsibility of the user.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>set KM271 hk1_timer 1 mo 06:30 mo 08:20</code><br>
|
||
</ul><br>
|
||
This will toogle the by day working mode every Monday at 6:30 and will fall back to by night working mode at 8:20 the same day.</li>
|
||
<li>hk2_timer [<position> delete|<position> <on-day> <on-time> <off-day> <off-time>]<br>
|
||
sets (or deactivates) a by day working mode time interval for the custom program of heating circuit 2<br>
|
||
(see above)</li>
|
||
<li>logmode<br>set to logmode / request all readings again</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="KM271get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="KM271attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<a name="all_km271_events"></a>
|
||
<li>all_km271_events<br>
|
||
If this attribute is set to 1, do not ignore following events:<br>
|
||
HK1_Vorlaufisttemperatur, HK2_Vorlaufisttemperatur, Kessel_Vorlaufisttemperatur,
|
||
Kessel_Integral, Kessel_Integral1<br>
|
||
These events account for ca. 92% of all events.<br>
|
||
All UNKNOWN events are ignored too, most of them were only seen
|
||
directly after setting the device into logmode.
|
||
</li>
|
||
<a name="ww_timermode"></a>
|
||
<li>ww_timermode [automatik|tag]<br>
|
||
Defines the working mode for the ww_on-for-timer command (default is tag).<br>
|
||
ww_on-for-timer will set the ww_betriebsart of the heater according to this attribute.
|
||
</li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="KM271events"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>Abgastemperatur</li>
|
||
<li>Aussentemperatur</li>
|
||
<li>Aussentemperatur_gedaempft</li>
|
||
<li>Brenner_Ansteuerung</li>
|
||
<li>Brenner_Ausschalttemperatur</li>
|
||
<li>Brenner_Einschalttemperatur</li>
|
||
<li>Brenner_Laufzeit1_Minuten2</li>
|
||
<li>Brenner_Laufzeit1_Minuten1</li>
|
||
<li>Brenner_Laufzeit1_Minuten</li>
|
||
<li>Brenner_Laufzeit2_Minuten2</li>
|
||
<li>Brenner_Laufzeit2_Minuten1</li>
|
||
<li>Brenner_Laufzeit2_Minuten</li>
|
||
<li>Brenner_Mod_Stellglied</li>
|
||
<li>ERR_Fehlerspeicher1</li>
|
||
<li>ERR_Fehlerspeicher2</li>
|
||
<li>ERR_Fehlerspeicher3</li>
|
||
<li>ERR_Fehlerspeicher4</li>
|
||
<li>ERR_Letzter_Fehlerstatus</li>
|
||
<li>HK1_Ausschaltoptimierung</li>
|
||
<li>HK1_Betriebswerte1</li>
|
||
<li>HK1_Betriebswerte2</li>
|
||
<li>HK1_Einschaltoptimierung</li>
|
||
<li>HK1_Heizkennlinie_+10_Grad</li>
|
||
<li>HK1_Heizkennlinie_-10_Grad</li>
|
||
<li>HK1_Heizkennlinie_0_Grad</li>
|
||
<li>HK1_Mischerstellung</li>
|
||
<li>HK1_Pumpe</li>
|
||
<li>HK1_Raumisttemperatur</li>
|
||
<li>HK1_Raumsolltemperatur</li>
|
||
<li>HK1_Vorlaufisttemperatur</li>
|
||
<li>HK1_Vorlaufsolltemperatur</li>
|
||
<li>HK2_Ausschaltoptimierung</li>
|
||
<li>HK2_Betriebswerte1</li>
|
||
<li>HK2_Betriebswerte2</li>
|
||
<li>HK2_Einschaltoptimierung</li>
|
||
<li>HK2_Heizkennlinie_+10_Grad</li>
|
||
<li>HK2_Heizkennlinie_-10_Grad</li>
|
||
<li>HK2_Heizkennlinie_0_Grad</li>
|
||
<li>HK2_Mischerstellung</li>
|
||
<li>HK2_Pumpe</li>
|
||
<li>HK2_Raumisttemperatur</li>
|
||
<li>HK2_Raumsolltemperatur</li>
|
||
<li>HK2_Vorlaufisttemperatur</li>
|
||
<li>HK2_Vorlaufsolltemperatur</li>
|
||
<li>Kessel_Betrieb</li>
|
||
<li>Kessel_Fehler</li>
|
||
<li>Kessel_Integral</li>
|
||
<li>Kessel_Integral1</li>
|
||
<li>Kessel_Vorlaufisttemperatur</li>
|
||
<li>Kessel_Vorlaufsolltemperatur</li>
|
||
<li>Modulkennung</li>
|
||
<li>NoData</li>
|
||
<li>Versionsnummer_NK</li>
|
||
<li>Versionsnummer_VK</li>
|
||
<li>WW_Betriebswerte1</li>
|
||
<li>WW_Betriebswerte2</li>
|
||
<li>WW_Einschaltoptimierung</li>
|
||
<li>WW_Isttemperatur</li>
|
||
<li>WW_Pumpentyp</li>
|
||
<li>WW_Solltemperatur</li>
|
||
</ul>
|
||
<br>
|
||
As I cannot explain all the values, I logged data for a period and plotted
|
||
each received value in the following logs:
|
||
<ul>
|
||
<li><a href="km271/km271_Aussentemperatur.png">Aussentemperatur</a></li>
|
||
<li><a href="km271/km271_Betriebswerte.png">Betriebswerte</a></li>
|
||
<li><a href="km271/km271_Brenneransteuerung.png">Brenneransteuerung</a></li>
|
||
<li><a href="km271/km271_Brennerlaufzeit.png">Brennerlaufzeit</a></li>
|
||
<li><a href="km271/km271_Brennerschalttemperatur.png">Brennerschalttemperatur</a></li>
|
||
<li><a href="km271/km271_Heizkennlinie.png">Heizkennlinie</a></li>
|
||
<li><a href="km271/km271_Kesselbetrieb.png">Kesselbetrieb</a></li>
|
||
<li><a href="km271/km271_Kesselintegral.png">Kesselintegral</a></li>
|
||
<li><a href="km271/km271_Ladepumpe.png">Ladepumpe</a></li>
|
||
<li><a href="km271/km271_Raumsolltemperatur_HK1.png">Raumsolltemperatur_HK1</a></li>
|
||
<li><a href="km271/km271_Vorlauftemperatur.png">Vorlauftemperatur</a></li>
|
||
<li><a href="km271/km271_Warmwasser.png">Warmwasser</a></li>
|
||
</ul>
|
||
All of these events are reported directly after initialization (or after
|
||
requesting logmode), along with some 60 configuration records (6byte long
|
||
each). Most parameters from these records are reverse engeneered, they
|
||
all start with CFG_ for configuration and PRG_ for timer program information.
|
||
</ul>
|
||
|
||
|
||
|
||
<a name="KS300"></a>
|
||
<h3>KS300</h3>
|
||
<ul>
|
||
Fhem can receive the KS300 radio (868.35 MHz) messages through <a
|
||
href="#FHZ">FHZ</a>, <a href="WS300">WS300</a> or an <a href="#CUL">CUL</a>
|
||
device, so one of them must be defined first.<br>
|
||
This module services messages received by the FHZ device, if you use one of
|
||
the other alternetives, see the <a href="#WS300">WS300</a> or <a
|
||
href="#CUL_WS">CUL_WS</a> entries.<br>
|
||
Note: The KS555 is also reported to work.<br>
|
||
<br>
|
||
|
||
<a name="KS300define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> KS300 <housecode> [ml/raincounter [wind-factor]]</code>
|
||
<br><br>
|
||
|
||
<code><housecode></code> is a four digit hex number,
|
||
corresponding to the address of the KS300 device, right now it is ignored.
|
||
The ml/raincounter defaults to 255 ml, but it must be specified if you wish
|
||
to set the wind factor, which defaults to 1.0.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define ks1 KS300 1234</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="KS300set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="KS300get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="KS300attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a> (ks300)</li>
|
||
<li>rainadjustment<br>
|
||
If this attribute is set, fhem automatically accounts for rain counter
|
||
resets after a battery change and random counter switches as experienced
|
||
by some users. The raw rain counter values are adjusted by an offset
|
||
in order to flatten out the sudden large increases and decreases in
|
||
the received rain counter values. Default is off.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="LGTV"></a>
|
||
<h3>LGTV</h3>
|
||
<ul>
|
||
|
||
<a name="LGTVdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> LGTV</code>
|
||
<br><br>
|
||
|
||
This module is expected to work with <a href="#xxLG7000">xxLG7000</a> as it's
|
||
IODev. With LGTV and a compatible hardware module (currently, there's only
|
||
xxLG7000), you are able to power your TV set on and off, query it's power state,
|
||
select the input (AV, RGB, Composites, analogue TV, DVB-T, HDMI) or mute/unmute
|
||
the volume.<br>
|
||
Defining a LGTV device will schedule an internal task, which periodically reads
|
||
the status of the TV set (power state; if power is on, query the selected input)
|
||
and triggers notify/filelog commands.<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define 47LG7000 LGTV</code><br>
|
||
<code>attr 47LG7000 IODev <a href="#xxLG7000">myLG7k</a></code>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="LGTVset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <what> <value></code>
|
||
<br><br>
|
||
Currently, the following commands are defined; not all may be available on a
|
||
given TV set. An error messages should be recorded if e. g. the input in question
|
||
is not usable.
|
||
|
||
<pre>power on
|
||
power off
|
||
input AV1
|
||
input AV2
|
||
input AV3
|
||
input AV3
|
||
input Component
|
||
input RGB
|
||
input HDMI1
|
||
input HDMI2
|
||
input HDMI3
|
||
input HDMI4
|
||
input DVBT
|
||
input PAL
|
||
audio mute
|
||
audio normal</pre>
|
||
</ul>
|
||
|
||
<a name="LGTVget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <what></code>
|
||
<br><br>
|
||
Currently, the following commands are defined; not all may be available on a
|
||
given TV set. An error messages should be recorded if e. g. the input in question
|
||
is not usable.
|
||
<pre>power
|
||
input
|
||
audio</pre>
|
||
</ul>
|
||
|
||
<a name="LGTVattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<!-- <li><a href="#model">model</a> (M232Counter)</li> -->
|
||
</ul>
|
||
<br>
|
||
<b>Implementator's note</b>
|
||
<ul>
|
||
The commands listed above are send 1:1 to the underlying IODev (e. g. xxLG7000); that IODev
|
||
is responsible for translation into <i>whatever means</i> to invoke the function on the TV.
|
||
It is my hope that other's will adopt this idea and write compatible low level drivers for other
|
||
TV sets, to make this module (even ;)) more useful.
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="LINDY_HDMI_SWITCH"></a>
|
||
<h3>LINDY_HDMI_SWITCH</h3>
|
||
<ul>
|
||
Note: this module needs the Net::Telnet module.
|
||
<br><br>
|
||
<a name="LINDY_HDMI_SWITCHdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> LINDY_HDMI_SWITCH <ip-address> <port></code>
|
||
<br><br>
|
||
Defines an Lindy 4:2 HDMI Switch serial connected to a transparent ethernet to serial adapter via the ip address of the adapter. Lindy partnumber: 38054 <br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define livingroom.hdmi LINDY_HDMI_SWITCH 192.168.1.64 4999</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="LINDY_HDMI_SWITCHset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
11
|
||
12
|
||
13
|
||
14
|
||
21
|
||
22
|
||
23
|
||
24
|
||
</pre>
|
||
First digit is the output port, second digit is the input port.
|
||
Example:
|
||
<ul>
|
||
<code>set livingroom.hdmi 12</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="LIRC"></a>
|
||
<h3>LIRC</h3>
|
||
<ul>
|
||
Generate FHEM-events when an LIRC device receives infrared signals.
|
||
<br><br>
|
||
Note: this module needs the Lirc::Client perl module.
|
||
<br><br>
|
||
|
||
<a name="LIRCdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
define <name> LIRC <lircrc_file><br>
|
||
Example:<br>
|
||
<ul>
|
||
define Lirc LIRC /etc/lirc/lircrc
|
||
</ul>
|
||
Note: In the lirc configuration file you have to define each possible event.
|
||
If you have this configuration
|
||
<pre>
|
||
begin
|
||
prog = fhem
|
||
button = pwr
|
||
config = IrPower
|
||
end</pre>
|
||
and you press the pwr button the IrPower toggle event occures at fhem.
|
||
<pre>
|
||
define IrPower01 notify Lirc:IrPower set lamp toggle</pre>
|
||
turns the lamp on and off.
|
||
If you want a faster reaction to keypresses you have to change the
|
||
defaultvalue of readytimeout from 5 seconds to e.g. 1 second in fhem.pl
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="LIRCset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="LIRCget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="LIRCattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="LISTENLIVE"></a>
|
||
<h3>LISTENLIVE</h3>
|
||
<ul>
|
||
|
||
<a name="LISTENLIVEdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> LISTENLIVE <ip-address>[:<port>] [<status_interval>]</code>
|
||
<br/><br/>
|
||
|
||
This module can control all mediaplayers runnng ListenLive Firmware laufen via a network connection.
|
||
It can control power state on/off, volume up/down/mute and can send all remomte-control commands.
|
||
<br/><br/>
|
||
The port value is optional. If not defined, standard port 8080 will be used.
|
||
<br/><br/>
|
||
The status_interval value is optional. If not defined, standard interval 60sec will be used.
|
||
<br/><br/>
|
||
Upon the definition of a new LISTENLIVE-device an internal Loop will be defined which will check and update the device readings
|
||
all <status_interval> seconds to trigger all notify and FileLog entities.
|
||
<br><br>
|
||
|
||
Example:
|
||
<br/><br/>
|
||
<ul><code>
|
||
define llradio LISTENLIVE 192.168.0.10<br><br>
|
||
|
||
define llradio LISTENLIVE 192.168.0.10:8085 120 # with port (8085) und status interval (120 seconds)
|
||
</code></ul><br><br>
|
||
</ul>
|
||
|
||
<a name="LISTENLIVEset"></a>
|
||
<b>Set-Commands </b>
|
||
<ul>
|
||
<code>set <name> <commandGroup> [<command>] [<parameter>]</code>
|
||
<br><br>
|
||
Commands are grouped into commandGroups depending on their functional tasks.
|
||
The following groups and commands are currently available:
|
||
<br><br>
|
||
<ul><code>
|
||
commandGroup power<br>
|
||
power on<br>
|
||
power off<br>
|
||
<br>
|
||
commandGroup audio<br>
|
||
audio mute<br>
|
||
audio unmute<br>
|
||
audio volm<br>
|
||
audio volp<br>
|
||
<br>
|
||
commandGroup cursor<br>
|
||
cursor up<br>
|
||
cursor down<br>
|
||
cursor left<br>
|
||
cursor right<br>
|
||
cursor home<br>
|
||
cursor exit<br>
|
||
cursor enter<br>
|
||
<br>
|
||
commandGroup message<br>
|
||
message [<textMessage>]
|
||
<br>
|
||
commandGroup reset<br>
|
||
reset power<br>
|
||
reset mute<br>
|
||
reset menupos<br>
|
||
<br>
|
||
commandGroup raw<br>
|
||
raw <command><br>
|
||
<br>
|
||
commandGroup user (experimental)<br>
|
||
user <userDefinedFunction><br>
|
||
<br>
|
||
commandGroup help<br>
|
||
help<br>
|
||
<br>
|
||
commandGroup statusRequest<br>
|
||
statusRequest
|
||
</code></ul>
|
||
</ul>
|
||
<br><br>
|
||
<a name="LISTENLIVEget"></a>
|
||
<b>Get-Commands</b>
|
||
<ul>
|
||
<code>get <name> <parameter></code>
|
||
<br><br>
|
||
The following parameters are available:<br><br>
|
||
<ul>
|
||
<li><code>help</code> - show help-text</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<br><br>
|
||
<a name="LISTENLIVEattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br><br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<ul>
|
||
<li><b>listinfo</b> - current selection list on device and position in it</li>
|
||
<li><b>metainfo1-5</b> - metainfo for currently playing stream</li>
|
||
<li><b>mi_info</b> - current menu state</li>
|
||
<li><b>mi_app, mi_mp, mi_ms, mi_state</b> - readings splitted from mi_info, mi_app is derived from numerical mi_state</li>
|
||
<li><b>mute</b> - current mute state ("on" => muted, "off" => unmuted)</li>
|
||
<li><b>power</b> - current power state</li>
|
||
<li><b>state</b> - current device state (online or offline)</li>
|
||
<li><b>volume</b> - current volume level</li>
|
||
</ul>
|
||
<br><br>
|
||
<b>Author's notes</b>
|
||
<ul>
|
||
You need to activate option "remote control settings" -> "network remote control [on]" in your device's settings.
|
||
<br><br>
|
||
Upon the device definion a corresponding PRESENCE-entity will be created to evaluate the device availability.
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="LUXTRONIK2"></a>
|
||
<h3>LUXTRONIK2</h3>
|
||
<ul>
|
||
Luxtronik 2.0 is a heating controller used in <a href="http://www.alpha-innotec.de">Alpha Innotec</a>, Siemens Novelan (WPR NET) and Wolf Heiztechnik (BWL/BWS) heat pumps.
|
||
<br>
|
||
It has a built-in ethernet port, so it can be directly integrated into a local area network (LAN).
|
||
<br>
|
||
<i>The modul is reported to work with firmware: V1.54C, V1.60, V1.69.</i>
|
||
<br>
|
||
More Info on the particular <a href="http://www.fhemwiki.de/wiki/Luxtronik_2.0">page of FHEM-Wiki</a> (in German).
|
||
<br>
|
||
|
||
<br>
|
||
|
||
<a name="LUXTRONIK2define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> LUXTRONIK2 <IP-address> [poll-interval]</code><br>
|
||
If the pool interval is omitted, it is set to 300 (seconds). Smallest possible value is 30.
|
||
<br>
|
||
Example: <code>define Heizung LUXTRONIK2 192.168.0.12 600</code>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="LUXTRONIK2set"></a>
|
||
<b>Set</b>
|
||
<ul>A firmware check assures before each set operation that a heat pump with untested firmware is not damaged accidently.
|
||
<li><code>opModeHotWater <Mode></code><br>
|
||
Operating Mode of domestic hot water boiler (Auto | Party | Off)
|
||
</li><br>
|
||
<li><code>hotWaterTemperatureTarget <temperature></code><br>
|
||
Target temperature of domestic hot water boiler in °C
|
||
</li><br>
|
||
<li><code>INTERVAL <polling interval></code><br>
|
||
Polling interval in seconds
|
||
</li><br>
|
||
<li><code>statusRequest</code><br>
|
||
Update device information
|
||
</li><br>
|
||
<li><code>synchClockHeatPump</code><br>
|
||
Synchronizes controller clock with FHEM time. <b>!! This change is lost in case of controller power off!!</b></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="LUXTRONIK2get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
No get implemented yet ...
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="LUXTRONIK2attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><code>statusHTML</code>
|
||
<br>
|
||
If set, a HTML-formatted reading named "floorplanHTML" is created. It can be used with the <a href="#FLOORPLAN">FLOORPLAN</a> module.
|
||
<br>
|
||
Currently, if the value of this attribute is not NULL, the corresponding reading consists of the current status of the heat pump and the temperature of the water.
|
||
</li><br>
|
||
<li><code>doStatistics < 0 | 1 ></code>
|
||
<br>
|
||
Calculates statistic values: <i>statBoilerGradientHeatUp, statBoilerGradientCoolDown, statBoilerGradientCoolDownMin (boiler heat loss)</i>
|
||
<br>
|
||
Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
|
||
<br>
|
||
Logging and visualisation of the statistic should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
|
||
</li><br>
|
||
<li><code>allowSetParameter < 0 | 1 ></code>
|
||
<br>
|
||
The <a href="#LUXTRONIK2set">parameters</a> of the heat pump controller can only be changed if this attribut is set to 1.
|
||
</li><br>
|
||
<li><code>autoSynchClock <delay></code>
|
||
<br>
|
||
Corrects the clock of the heatpump automatically if a certain <i>delay</i> (10 s - 600 s) against the FHEM time is exeeded. Does a firmware check before.
|
||
<br>
|
||
<i>(A 'delayDeviceTimeCalc' <= 2 s can be caused by the internal calculation interval of the heat pump controller.)</i>
|
||
</li><br>
|
||
<li><code>ignoreFirmwareCheck < 0 | 1 ></code>
|
||
<br>
|
||
A firmware check assures before each set operation that a heatpump controller with untested firmware is not damaged accidently.
|
||
<br>
|
||
If this attribute is set to 1, the firmware check is ignored and new firmware can be tested for compatibility.
|
||
</li><br>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="LaCrosse"></a>
|
||
<h3>LaCrosse</h3>
|
||
<ul>
|
||
|
||
<tr><td>
|
||
FHEM module for LaCrosse Temperature and Humidity sensors.<br><br>
|
||
|
||
It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
|
||
|
||
The JeeNode sketch required for this module can be found in .../contrib/36_LaCrosse-pcaSerial.zip.<br><br>
|
||
|
||
<a name="LaCrosseDefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> LaCrosse <addr></code> <br>
|
||
<br>
|
||
addr is a 2 digit hex number to identify the LaCrosse device.<br><br>
|
||
Note: devices are autocreated only if LaCrossePairForSec is active for the <a href="#JeeLink">JeeLink</a> IODevice device.<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="LaCrosse_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>replaceBatteryForSec <sec> [ignore_battery]<br>
|
||
sets the device for <sec> seconds into replace battery mode. the first unknown address that is
|
||
received will replace the current device address. this can be partly automated with a readings group configured
|
||
to show the battery state of all LaCrosse devices and a link/command to set replaceBatteryForSec on klick.
|
||
</li>
|
||
</ul><br>
|
||
|
||
<a name="LaCrosse_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
</ul><br>
|
||
|
||
<a name="LaCrosse_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>battery[]<br>
|
||
ok or low</li>
|
||
<li>temperature[]<br>
|
||
Notice: see the filterThreshold attribute.</li>
|
||
<li>humidity</li>
|
||
</ul><br>
|
||
|
||
<a name="LaCrosse_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>doAverage<br>
|
||
use an average of the last 4 values for temperature and humidity readings</li>
|
||
<li>doDewpoint<br>
|
||
calculate dewpoint</li>
|
||
<li>filterThreshold<br>
|
||
if the difference between the current and previous temperature is greater than filterThreshold degrees
|
||
the readings for this channel are not updated. the default is 10.</li>
|
||
<li>resolution<br>
|
||
the resolution in 1/10 degree for the temperature reading</li>
|
||
<li>ignore<br>
|
||
1 -> ignore this device.</li>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="LightScene"></a>
|
||
<h3>LightScene</h3>
|
||
<ul>
|
||
Allows to store the state of a group of lights and other devices and recall it later.
|
||
Multiple states for one group can be stored.
|
||
|
||
<br><br>
|
||
<a name="LightScene_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> LightScene [<dev1>] [<dev2>] [<dev3>] ... </code><br>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define light_group LightScene Lampe1 Lampe2 Dimmer1</code><br>
|
||
<code>define kino_group LightScene LampeDecke LampeFernseher Fernseher Verstaerker</code><br>
|
||
<code>define Wohnzimmer LightScene Leinwand Beamer TV Leselampe Deckenlampe</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
The device detail view will show an html overview of the current state of all included devices and all
|
||
configured scenes with the device states for each. The column heading with the device names is clickable
|
||
to go to detail view of this device. The first row that displays the current device state is clickable
|
||
and should react like a click on the device icon in a room overview would. this can be used to interactively
|
||
configure a new scene and save it with the command menu of the detail view. The first column of the table with
|
||
the scene names ic clickable to activate the scene.<br><br>
|
||
|
||
A weblink with a scene overview that can be included in any room or a floorplan can be created with:
|
||
<ul><code>define wlScene weblink htmlCode {LightScene_2html("LightSceneName")}</code></ul>
|
||
|
||
<a name="LightScene_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>save <scene_name><br>
|
||
save current state for alle devices in this LightScene to <scene_name></li>
|
||
<li>scene <scene_name><br>
|
||
shows scene <scene_name> - all devices are switched to the previously saved state</li>
|
||
<li>set <scene_name> <device> [<cmd>]<br>
|
||
set the saved state of <device> in <scene_name> to <cmd></li>
|
||
<li>setcmd <scene_name> <device> [<cmd>]<br>
|
||
set command to be executed for <device> in <scene_name> to <cmd>.
|
||
<cmd> can be any commandline that fhem understands including multiple commands separated by ;;
|
||
<ul>
|
||
<li>set kino_group setcmd allOff LampeDecke sleep 30 ;; set LampeDecke off</li>
|
||
<li>set light_group setcmd test Lampe1 sleep 10 ;; set Lampe1 on ;; sleep 5 ;; set Lampe1 off</li>
|
||
</ul></li>
|
||
<li>remove <scene_name><br>
|
||
remove <scene_name> from list of saved scenes</li>
|
||
</ul><br>
|
||
|
||
<a name="LightScene_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>scenes</li>
|
||
<li>scene <scene_name></li>
|
||
</ul><br>
|
||
|
||
<a name="LightScene_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>lightSceneParamsToSave<br>
|
||
this attribute can be set on the devices to be included in a scene. it is set to a comma separated list of readings
|
||
that will be saved. multiple readings separated by : are collated in to a single set command (this has to be supported
|
||
by the device). each reading can have a perl expression appended with '@' that will be used to alter the $value used for
|
||
the set command. this can for example be used to strip a trailing % from a dimmer state. this perl expression must not contain
|
||
spaces,colons or commas.<br>
|
||
in addition to reading names the list can also contain expressions of the form <code>abc -> xyz</code>
|
||
or <code>get cba -> set uvw</code> to map reading abc to set xyz or get cba to set uvw. the list can be given as a
|
||
string or as a perl expression enclosed in {} that returns this string.<br>
|
||
<code>attr myReceiver lightSceneParamsToSave volume,channel</code></br>
|
||
<code>attr myHueDevice lightSceneParamsToSave {(Value($DEVICE) eq "off")?"state":"bri : xy"}</code></li>
|
||
<code>attr myDimmer lightSceneParamsToSave state@{if($value=~m/(\d+)/){$1}else{$value}}</code></br>
|
||
<li>lightSceneRestoreOnlyIfChanged<br>
|
||
this attribute can be set on the lightscene and/or on the individual devices included in a scene.
|
||
the device settings have precedence over the scene setting.<br>
|
||
1 -> for each device do nothing if current device state is the same as the saved state
|
||
0 -> always set the state even if the current state is the same as the saved state. this is the default</li>
|
||
<li>switchingOrder<br>
|
||
space separated list of <scene>:<deviceList> items that will give a per scene order
|
||
in which the devices should be switched.<br>
|
||
the devices from <deviceList> will come before all other devices of this LightScene;
|
||
if the first character of the <deviceList> ist a ! the devices from the list will come after
|
||
all other devices from this lightScene.<br>
|
||
<scene> and each element of <deviceList> are treated as a regex.<br>
|
||
Example: To switch a master power outlet before every other device at power on and after every device on power off:<br>
|
||
<code>define media LightScene TV,DVD,Amplifier,masterPower<br>
|
||
attr media switchingOrder .*On:masterPower,.* allOff:!.*,masterPower</code>
|
||
</li>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="M232"></a>
|
||
<h3>M232</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="M232define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> M232 <m232-device></code>
|
||
<br><br>
|
||
|
||
Define a M232 device. You can attach as many M232 devices as you like. A
|
||
M232 device provides 6 analog inputs (voltage 0..5V with 10 bit resolution)
|
||
and 8 bidirectional digital ports. The eighth digital port can be used as a
|
||
16 bit counter (maximum frequency 3kHz). The M232 device needs to be
|
||
connected to a 25pin sub-d RS232 serial port. A USB-to-serial converter
|
||
works fine if no serial port is available.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define m232 M232 /dev/ttyUSB2</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="M232set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> stop</code>
|
||
<br><br>
|
||
Stops the counter.
|
||
<br><br>
|
||
<code>set <name> start</code>
|
||
<br><br>
|
||
Resets the counter to zero and starts it.
|
||
<br><br>
|
||
<code>set <name> octet <value></code>
|
||
<br><br>
|
||
Sets the state of all digital ports at once, value is 0..255.
|
||
<br><br>
|
||
<code>set <name> io0..io7 0|1</code>
|
||
<br><br>
|
||
Turns digital port 0..7 off or on.
|
||
<br><br>
|
||
</ul>
|
||
|
||
|
||
<a name="M232get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> [an0..an5]</code>
|
||
<br><br>
|
||
Gets the reading of analog input 0..5 in volts.
|
||
<br><br>
|
||
<code>get <name> [io0..io7]</code>
|
||
<br><br>
|
||
Gets the state of digital ports 0..7, result is 0 or 1.
|
||
<br><br>
|
||
<code>get <name> octet</code>
|
||
<br><br>
|
||
Gets the state of all digital ports at once, result is 0..255.
|
||
<br><br>
|
||
<code>get <name> counter</code>
|
||
<br><br>
|
||
Gets the number of ticks of the counter since the last reset. The counter
|
||
wraps around from 65,535 to 0 and <i>then stops</i>.
|
||
See <a href="#M232Counter">M232Counter</a> for how we care about this.
|
||
<br><br>
|
||
</ul>
|
||
|
||
|
||
<a name="M232attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (m232)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="M232Counter"></a>
|
||
<h3>M232Counter</h3>
|
||
<ul>
|
||
|
||
<a name="M232Counterdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> M232Counter [unit [factor [deltaunit [deltafactor]]]]</code>
|
||
<br><br>
|
||
|
||
Define at most one M232Counter for a M232 device. Defining a M232Counter
|
||
will schedule an internal task, which periodically reads the status of the
|
||
counter, and triggers notify/filelog commands. <code>unit</code> is the unit
|
||
name, <code>factor</code> is used to calculate the reading of the counter
|
||
from the number of ticks. <code>deltaunit</code> is the unit name of the counter
|
||
differential per second, <code>deltafactor</code> is used to calculate the
|
||
counter differential per second from the number of ticks per second.<br><br>
|
||
Default values:
|
||
<ul>
|
||
<li>unit: ticks</li>
|
||
<li>factor: 1.0</li>
|
||
<li>deltaunit: ticks per second</li>
|
||
<li>deltafactor: 1.0</li>
|
||
</ul>
|
||
<br>Note: the parameters in square brackets are optional. If you wish to
|
||
specify an optional parameter, all preceding parameters must be specified
|
||
as well.
|
||
<br><br>Examples:
|
||
<ul>
|
||
<code>define counter M232Counter turns</code><br>
|
||
<code>define counter M232Counter kWh 0.0008 kW 2.88</code>
|
||
(one tick equals 1/1250th kWh)<br>
|
||
</ul>
|
||
<br>
|
||
Do not forget to start the counter (with <code>set .. start</code> for
|
||
M232) or to start the counter and set the reading to a specified value
|
||
(with <code>set ... value</code> for M232Counter).<br><br>
|
||
To avoid issues with the tick count reaching the end point, the device's
|
||
internal counter is automatically reset to 0 when the tick count is 64,000
|
||
or above and the reading <i>basis</i> is adjusted accordingly.
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="M232Counterset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> value <value></code>
|
||
<br><br>
|
||
Sets the reading of the counter to the given value. The counter is reset
|
||
and started and the offset is adjusted to value/unit.
|
||
<br><br>
|
||
<code>set <name> interval <interval></code>
|
||
<br><br>
|
||
Sets the status polling interval in seconds to the given value. The default
|
||
is 60 seconds.
|
||
<br><br>
|
||
</ul>
|
||
|
||
|
||
<a name="M232Counterget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> status</code>
|
||
<br><br>
|
||
Gets the reading of the counter multiplied by the factor from the
|
||
<code>define</code> statement. Wraparounds of the counter are accounted for
|
||
by an offset (see reading <code>basis</code> in the output of the
|
||
<code>list</code> statement for the device).
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="M232Counterattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
<li><a href="#model">model</a> (M232Counter)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="M232Voltage"></a>
|
||
<h3>M232Voltage</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="M232Voltagedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> M232Voltage [an0..an5] [unit [factor]]</code>
|
||
<br><br>
|
||
|
||
Define as many M232Voltages as you like for a M232 device. Defining a
|
||
M232Voltage will schedule an internal task, which reads the status of the
|
||
analog input every minute, and triggers notify/filelog commands.
|
||
<code>unit</code> is the unit name, <code>factor</code> is used to
|
||
calibrate the reading of the analog input.<br><br>
|
||
|
||
Note: the unit defaults to the string "volts", but it must be specified
|
||
if you wish to set the factor, which defaults to 1.0. <br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define volt M232Voltage an0</code><br>
|
||
<code>define brightness M232Voltage an5 lx 200.0</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="M232Voltageget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> status</code>
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="M232Voltageattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
<li><a href="#model">model</a> (M232Voltage)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="MAX"></a>
|
||
<h3>MAX</h3>
|
||
<ul>
|
||
Devices from the eQ-3 MAX! group.<br>
|
||
When heating thermostats show a temperature of zero degrees, they didn't yet send any data to the cube. You can
|
||
force the device to send data to the cube by physically setting a temperature directly at the device (not through fhem).
|
||
<br><br>
|
||
<a name="MAXdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> MAX <type> <addr></code>
|
||
<br><br>
|
||
|
||
Define an MAX device of type <type> and rf address <addr>.
|
||
The <type> is one of HeatingThermostat, HeatingThermostatPlus, WallMountedThermostat, ShutterContact, PushButton.
|
||
The <addr> is a 6 digit hex number.
|
||
You should never need to specify this by yourself, the <a href="#autocreate">autocreate</a> module will do it for you.<br>
|
||
It's advisable to set event-on-change-reading, like
|
||
<code>attr MAX_123456 event-on-change-reading .*</code>
|
||
because the polling mechanism will otherwise create events every 10 seconds.<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define switch1 MAX PushButton ffc545</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="MAXset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>desiredTemperature <value> [until <date>]<br>
|
||
For devices of type HeatingThermostat only. <value> maybe one of
|
||
<ul>
|
||
<li>degree celcius between 3.5 and 30.5 in 0.5 degree steps</li>
|
||
<li>"on" or "off" set the thermostat to full or no heating, respectively</li>
|
||
<li>"eco" or "comfort" using the eco/comfort temperature set on the device (just as the right-most physical button on the device itself does)</li>
|
||
<li>"auto <temperature>". The weekly program saved on the thermostat is processed. If the optional <temperature> is given, it is set as desiredTemperature until the next switch point of the weekly program.</li>
|
||
<li>"boost", activates the boost mode, where for boostDuration minutes the valve is opened up boostValveposition percent.</li>
|
||
</ul>
|
||
All values but "auto" maybe accompanied by the "until" clause, with <data> in format "dd.mm.yyyy HH:MM" (minutes may only be "30" or "00"!)
|
||
to set a temporary temperature until that date/time. Make sure that the cube/device has a correct system time.</li>
|
||
<li>groupid <id><br>
|
||
For devices of type HeatingThermostat only.
|
||
Writes the given group id the device's memory. To sync all devices in one room, set them to the same groupid greater than zero.</li>
|
||
<li>ecoTemperature <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given eco temperature to the device's memory. It can be activated by pressing the rightmost physical button on the device.</li>
|
||
<li>comfortTemperature <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given comfort temperature to the device's memory. It can be activated by pressing the rightmost physical button on the device.</li>
|
||
<li>measurementOffset <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given temperature offset to the device's memory. If the internal temperature sensor is not well calibrated, it may produce a systematic error. Using measurementOffset, this error can be compensated. The reading temperature is equal to the measured temperature at sensor + measurementOffset. Usually, the internally measured temperature is a bit higher than the overall room temperature (due to closeness to the heater), so one uses a small negative offset. Must be between -3.5 and 3.5 degree celsius.</li>
|
||
<li>minimumTemperature <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given minimum temperature to the device's memory. It confines the temperature that can be manually set on the device.</li>
|
||
<li>maximumTemperature <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given maximum temperature to the device's memory. It confines the temperature that can be manually set on the device.</li>
|
||
<li>windowOpenTemperature <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given window open temperature to the device's memory. That is the temperature the heater will temporarily set if an open window is detected. Setting it to 4.5 degree or "off" will turn off reacting on open windows.</li>
|
||
<li>windowOpenDuration <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given window open duration to the device's memory. That is the duration the heater will temporarily set the window open temperature if an open window is detected by a rapid temperature decrease. (Not used if open window is detected by ShutterControl. Must be between 0 and 60 minutes in multiples of 5.</li>
|
||
<li>decalcification <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given decalcification time to the device's memory. Value must be of format "Sat 12:00" with minutes being "00". Once per week during that time, the HeatingThermostat will open the valves shortly for decalcification.</li>
|
||
<li>boostDuration <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given boost duration to the device's memory. Value must be one of 5, 10, 15, 20, 25, 30, 60. It is the duration of the boost function in minutes.</li>
|
||
<li>boostValveposition <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given boost valveposition to the device's memory. It is the valve position in percent during the boost function.</li>
|
||
<li>maxValveSetting <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given maximum valveposition to the device's memory. The heating thermostat will not open the valve more than this value (in percent).</li>
|
||
<li>valveOffset <value><br>
|
||
For devices of type HeatingThermostat only. Writes the given valve offset to the device's memory. The heating thermostat will add this to all computed valvepositions during control.</li>
|
||
<li>factoryReset<br>
|
||
Resets the device to factory values. It has to be paired again afterwards.<br>
|
||
ATTENTION: When using this on a ShutterContact using the MAXLAN backend, the ShutterContact has to be triggered once manually to complete
|
||
the factoryReset.</li>
|
||
<li>associate <value><br>
|
||
Associated one device to another. <value> can be the name of MAX device or its 6-digit hex address.<br>
|
||
Associating a ShutterContact to a {Heating,WallMounted}Thermostat makes it send message to that device to automatically lower temperature to windowOpenTemperature while the shutter is opened. The thermostat must be associated to the ShutterContact, too, to accept those messages.
|
||
<b>!Attention: After sending this associate command to the ShutterContact, you have to press the button on the ShutterContact to wake it up and accept the command. See the log for a message regarding this!</b>
|
||
Associating HeatingThermostat and WallMountedThermostat makes them sync their desiredTemperature and uses the measured temperature of the
|
||
WallMountedThermostat for control.</li>
|
||
<li>deassociate <value><br>
|
||
Removes the association set by associate.</li>
|
||
<li>weekProfile [<day> <temp1>,<until1>,<temp2>,<until2>] [<day> <temp1>,<until1>,<temp2>,<until2>] ...<br>
|
||
Allows setting the week profile. For devices of type HeatingThermostat or WallMountedThermostat only. Example:<br>
|
||
<code>set MAX_12345 weekProfile Fri 24.5,6:00,12,15:00,5 Sat 7,4:30,19,12:55,6</code><br>
|
||
sets the profile <br>
|
||
<code>Friday: 24.5 °C for 0:00 - 6:00, 12 °C for 6:00 - 15:00, 5 °C for 15:00 - 0:00<br>
|
||
Saturday: 7 °C for 0:00 - 4:30, 19 °C for 4:30 - 12:55, 6 °C for 12:55 - 0:00</code><br>
|
||
while keeping the old profile for all other days.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="MAXget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="MAXattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li>keepAuto<br>Default: 0. If set to 1, it will stay in the auto mode when you set a desiredTemperature while the auto (=weekly program) mode is active.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="MAXevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>desiredTemperature<br>Only for HeatingThermostat and WallMountedThermostat</li>
|
||
<li>valveposition<br>Only for HeatingThermostat</li>
|
||
<li>battery</li>
|
||
<li>temperature<br>The measured temperature (= measured temperature at sensor + measurementOffset), only for HeatingThermostat and WallMountedThermostat</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="MAXLAN"></a>
|
||
<h3>MAXLAN</h3>
|
||
<ul>
|
||
<tr><td>
|
||
The MAXLAN is the fhem module for the eQ-3 MAX! Cube LAN Gateway.
|
||
<br><br>
|
||
The fhem module makes the MAX! "bus" accessible to fhem, automatically detecting paired MAX! devices. It also represents properties of the MAX! Cube. The other devices are handled by the <a href="#MAX">MAX</a> module, which uses this module as its backend.<br>
|
||
<br>
|
||
|
||
<a name="MAXLANdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> MAXLAN <ip-address>[:port] [<pollintervall> [ondemand]]</code><br>
|
||
<br>
|
||
port is 62910 by default. (If your Cube listens on port 80, you have to update the firmware with
|
||
the official MAX! software).
|
||
If the ip-address is called none, then no device will be opened, so you
|
||
can experiment without hardware attached.<br>
|
||
The optional parameter <pollintervall> defines the time in seconds between each polling of data from the cube.<br>
|
||
You may provide the option <code>ondemand</code> forcing the MAXLAN module to tear-down the connection as often as possible
|
||
thus making the cube usable by other applications or the web portal.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="MAXLANset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>pairmode [<n>,cancel]<br>
|
||
Sets the cube into pairing mode for <n> seconds (default is 60s ) where it can be paired with other devices (Thermostats, Buttons, etc.). You also have to set the other device into pairing mode manually. (For Thermostats, this is pressing the "Boost" button for 3 seconds, for example).
|
||
Setting pairmode to "cancel" puts the cube out of pairing mode.</li>
|
||
<li>raw <data><br>
|
||
Sends the raw <data> to the cube.</li>
|
||
<li>clock<br>
|
||
Sets the internal clock in the cube to the current system time of fhem's machine (uses timezone attribute if set). You can add<br>
|
||
<code>attr ml set-clock-on-init</code><br>
|
||
to your fhem.cfg to do this automatically on startup.</li>
|
||
<li>factorReset<br>
|
||
Reset the cube to factory defaults.</li>
|
||
<li>reconnect<br>
|
||
FHEM will terminate the current connection to the cube and then reconnect. This allows
|
||
re-reading the configuration data from the cube, as it is only send after establishing a new connection.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="MAXLANget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
|
||
<a name="MAXLANattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>set-clock-on-init<br>
|
||
(Default: 1). Automatically call "set clock" after connecting to the cube.</li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#addvaltrigger">addvaltrigger</a></li>
|
||
<li>timezone<br>
|
||
(Default: CET-CEST). Set MAX Cube timezone (requires "set clock" to take effect).<br>
|
||
<b>NB.</b>Cube time and cubeTimeDifference will not change until Cube next connects.<br>
|
||
<ul>
|
||
<li>GMT-BST - (UTC +0, UTC+1)</li>
|
||
<li>CET-CEST - (UTC +1, UTC+2)</li>
|
||
<li>EET-EEST - (UTC +2, UTC+3)</li>
|
||
<li>FET-FEST - (UTC +3)</li>
|
||
<li>MSK-MSD - (UTC +4)</li>
|
||
</ul>
|
||
The following are settings with no DST (daylight saving time)
|
||
<ul>
|
||
<li>GMT - (UTC +0)</li>
|
||
<li>CET - (UTC +1)</li>
|
||
<li>EET - (UTC +2)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="MPD"></a>
|
||
<h3>MPD</h3>
|
||
FHEM module to control a MPD like the MPC (MPC = Music Player Command, the command line interface to the <a href='http://en.wikipedia.org/wiki/Music_Player_Daemon'>Music Player Daemon</a> )<br>
|
||
To install a MPD on a Raspberry Pi you will find a lot of documentation at the web e.g. http://www.forum-raspberrypi.de/Thread-tutorial-music-player-daemon-mpd-und-mpc-auf-dem-raspberry-pi in german<br>
|
||
FHEM Forum : <a href='http://forum.fhem.de/index.php/topic,18517.0.html'>Modul für MPD</a> ( in german )<br>
|
||
<ul>
|
||
<a name="MPDdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
define <name> MPD <IP MPD Server | default localhost> <Port MPD Server | default 6600><br>
|
||
Example:<br>
|
||
<pre>
|
||
define myMPD MPD 192.168.0.99 7000
|
||
</pre>
|
||
if FHEM and MPD a running on the same device :
|
||
<pre>
|
||
define myMPD MPD
|
||
</pre>
|
||
</ul>
|
||
<br>
|
||
<a name="MPDset"></a>
|
||
<b>Set</b><ul>
|
||
<code>set <name> <what></code>
|
||
<br> <br>
|
||
Currently, the following commands are defined.<br>
|
||
<br>
|
||
play => like MPC play , start playing song in playlist<br>
|
||
clear => like MPC clear , delete MPD playlist<br>
|
||
stop => like MPC stop, stops playing <br>
|
||
pause => like MPC pause<br>
|
||
previous => like MPC previous, play previous song in playlist<br>
|
||
next => like MPC next, play next song in playlist<br>
|
||
random => like MPC random, toggel on/off<br>
|
||
repaet => like MPC repeat, toggel on/off<br>
|
||
updateDb => like MPC update<br>
|
||
volume (%) => like MPC volume %, 0 - 100<br>
|
||
volumeUp => inc volume ( + attr volumeStep size )<br>
|
||
volumeDown => dec volume ( - attr volumeStep size )<br>
|
||
playlist (playlist name) => set playlist on MPD Server<br>
|
||
playfile (file) => create playlist + add file to playlist + start playing<br>
|
||
IdleNow => send Idle command to MPD and wait for events to return<br>
|
||
interval => set polling interval of MPD server, overwrites attr interval temp , use 0 to disable polling<br>
|
||
reset => reset MPD Modul<br>
|
||
mpdCMD => same as GET mpdCMD<br>
|
||
</ul>
|
||
<br>
|
||
<a name="MPDget"></a>
|
||
<b>Get</b><ul>
|
||
<code>get <name> <what></code>
|
||
<br> <br>
|
||
Currently, the following commands are defined.<br>
|
||
music => list all MPD music files in MPD databse<br>
|
||
playlists => list all MPD playlist in MPD databse<br>
|
||
playlistsinfo => show current playlist informations<br>
|
||
webrc => HTML output for a simple Remote Control on FHEM webpage e.g :.<br>
|
||
<pre>
|
||
define <name> weblink htmlCode {fhem("get <name> webrc", 1)}
|
||
attr <name> room MPD
|
||
</pre>
|
||
statusRequest => get MPD status<br>
|
||
mpdCMD (cmd) => send a command to MPD Server ( <a href='http://www.musicpd.org/doc/protocol/'>MPD Command Ref</a> )<br>
|
||
currentsong => get infos from current song in playlist<br>
|
||
outputs => get name,id,status about all MPD output devices in /etc/mpd.conf<br>
|
||
</ul>
|
||
<br>
|
||
<a name="MPDattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>interval = polling interval at MPD server, use 0 to disable polling (default 30)</li>
|
||
<li>password (not ready yet) if password on MPD server is set</li>
|
||
<li>loadMusic 0|1 = load titles from MPD database at startup</li>
|
||
<li>loadPlaylists 0|1 = load playlist names from MPD database at startup</li>
|
||
<li>volumeStep 1|2|5|10 = Step size for Volume +/- (default 5)</li>
|
||
<li>useIdle 0|1 = send Idle command to MPD and wait for MPD events needs MPD Version 0.16.0 or greater</li>
|
||
<li>titleSplit 1|0 = split title to artist and title if no artist is given in songinfo (e.g. radio-stream)</li>
|
||
</ul>
|
||
<br>
|
||
<b>Readings</b>
|
||
<ul>
|
||
all MPD internal values
|
||
</ul>
|
||
</ul>
|
||
<a name="MSG"></a>
|
||
<h3>MSG</h3>
|
||
<ul>
|
||
The MSG device is the backend device for all the message handling (I/O-engine).
|
||
Under normal conditions only one MSG device is needed to serve multiple frontend
|
||
message devices like file or email.
|
||
<br><br>
|
||
<a name="MSGdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> MSG </code><br><br>
|
||
Specifies the MSG device. A single MSG device could serve multiple MSG frontends.
|
||
But, for special conditions there could be defined more than one MSG device.
|
||
</ul>
|
||
<br>
|
||
<a name="MSGset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> send|write <devicename></code><br><br>
|
||
</ul>
|
||
Notes:
|
||
<ul>
|
||
To send the data, both send or write could be used.<br>
|
||
The devicename is the name of a frontenddevice previously
|
||
defined. Based on the type of the frontend device, the MSG device
|
||
will send out the lines of data.
|
||
<br>
|
||
Frontend devices are available for:<br>
|
||
<ul><li><a href="#MSGFile">File</a></li>
|
||
<li><a href="#MSGMail">EMail with SSL Authentification</a></li></ul>
|
||
For details about this devices, please review the device-definitions.<br>
|
||
After sending/writing the data, the data stills exists with the
|
||
frontend device, MSG do not delete/purge any data, this must be done
|
||
by the frontend device.
|
||
<br><br>
|
||
Examples:
|
||
<ul>
|
||
<code>define myMsg MSG</code>
|
||
</ul>
|
||
</ul>
|
||
<a name="MSGVattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#eventMap">eventMap</a></li><br>
|
||
</ul>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<a name="MSGFile"></a>
|
||
<h3>MSGFile</h3>
|
||
<ul>
|
||
The MSGFile device is a frontend device for message handling.
|
||
With a MSGFile device data is written to disk (or other media).
|
||
Multiple MSGFile devices could be defined.
|
||
To write the data to disk, a MSG device is necessary.
|
||
A MSGFile device needs the operating systems rights to write to the filesystem.
|
||
To set the rights for a directory, please use OS related commands.
|
||
<br><br>
|
||
|
||
<a name="MSGFileDefine"></a>
|
||
<b>Define</b>
|
||
<ul><br>
|
||
<code>define <name> MSGFile <filename></code><br><br>
|
||
Specifies the MSGFile device. At definition the message counter is set to 0.
|
||
A filename must be specified at definition.
|
||
</ul>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>define myFile MSGFile</code>
|
||
</ul><br>
|
||
<a name="MSGFileSet"></a>
|
||
|
||
<b>Set</b><br>
|
||
<ul><code>set <name> add|clear|list [text]</code><br>
|
||
Set is used to manipulate the message buffer of the device. The message
|
||
buffer is an array of lines of data, stored serial based on the incoming
|
||
time into the buffer. Lines of data inside the buffer could not be deleted
|
||
anymore, except of flashing the whole buffer.<br>
|
||
<ul><b>add</b><br> to add lines of data to the message buffer. All data behind
|
||
"add" will be interpreted as text message. To add a carriage return to the data,
|
||
please use the CR attribute.
|
||
</ul>
|
||
<ul><b>clear</b><br> to flash the message buffer and set the line counter to 0.
|
||
All the lines of data are deleted and the buffer is flushed.</ul>
|
||
<ul><b>list</b><br> to list the message buffer.</ul><br>
|
||
</ul><br>
|
||
Examples:
|
||
<ul>
|
||
<code>set myFile add Dies ist Textzeile 1</code><br>
|
||
<code>set myFile add Dies ist Textzeile 2</code><br>
|
||
<code>set myFile clear</code><br><br>
|
||
Full working example to write two lines of data to a file:<br>
|
||
<code>define myMsg MSG</code><br>
|
||
<code>define myFile MSGFile /tmp/fhemtest.txt</code><br>
|
||
<code>attr myFile filemode append</code><br>
|
||
<code>set myFile add Textzeile 1</code><br>
|
||
<code>set myFile add Textzeile 2</code><br>
|
||
<code>set myMsg write myFile</code><br>
|
||
<code>set myFile clear</code><br>
|
||
</ul><br>
|
||
|
||
<a name="MSGFileVattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="MSGFilefilename">filename</a><br>
|
||
sets the filename, must be a fully qualified filename.
|
||
FHEM must have the rights to write this file to the directory</li>
|
||
<li><a href="MSGFilefilemode">filemode</a><br>
|
||
sets the filemode, valid are "new" or "append"<br>
|
||
new creates a new, empty file and writes the data to this file. Existing files are cleared, the data is lost!<br>
|
||
append uses, if available, an existing file and writes the
|
||
buffer data to the end of the file. If the file do not exist, it will
|
||
be created</li>
|
||
<li><a href="MSGFilenameCR">CR</a><br>
|
||
set the option to write a carriage return at the end of the line.
|
||
CR could be set to 0 or 1, 1 enables this feature</li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="MSGMail"></a>
|
||
<h3>MSGMail</h3>
|
||
<ul>
|
||
The MSGMail device is a frontend device for mail message handling.
|
||
With a MSGMaildevice data is fowarded to a mail provider and send to a recipent.
|
||
Multiple MSGMail devices could be defined.
|
||
MSGMail supports by the moment only mail provider, which uses SSL secured connection
|
||
like Googlemail, GMX, Yahoo or 1und1 for example.
|
||
To send an email, a MSG device is necessary.<br>
|
||
<b>MAIL::Lite</b> and <b>Net::SMTP::SSL</b> from CPAN is needed to use MSGMail!!
|
||
<br><br>
|
||
|
||
<a name="MSGMailDefine"></a>
|
||
<b>Define</b>
|
||
<ul><br>
|
||
<code>define <name> MSGMail <from> <to> <smtphost> <authfile></code><br><br>
|
||
Specifies the MSGMail device. At definition the message counter is set to 0.
|
||
From, To, SMTPHost and the authfile (see attributes below) need to be defined
|
||
at definition time.
|
||
</ul>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>define myMail MSGMail from@address.com to@address.com smtp.provider.host /etc/msgauthfile</code>
|
||
</ul><br>
|
||
|
||
<a name="MSGMailSet"></a>
|
||
<b>Set</b><br>
|
||
<ul><code>set <name> add|clear|list [text]</code><br>
|
||
Set is used to manipulate the message buffer of the device. The message
|
||
buffer is an array of lines of data, stored serial based on the incoming
|
||
time into the buffer. Lines of data inside the buffer could not be deleted
|
||
anymore, except of flashing the whole buffer.<br>
|
||
<ul><b>add</b><br> to add lines of data to the message buffer. All data behind
|
||
"add" will be interpreted as text message. To add a carriage return to the data,
|
||
please use the CR attribute.
|
||
</ul>
|
||
<ul><b>clear</b><br> to flash the message buffer and set the line counter to 0.
|
||
All the lines of data are deleted and the buffer is flushed.</ul>
|
||
<ul><b>list</b><br> to list the message buffer.<br></ul><br>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>set myMail add Dies ist Textzeile 1</code><br>
|
||
<code>set myMail add Dies ist Textzeile 2</code><br>
|
||
<code>set myMail clear</code><br><br>
|
||
Full working example to send two lines of data to a recipent:<br>
|
||
<code>define myMsg MSG</code><br>
|
||
<code>define myMail MSGMail donald.duck@entenhausen.com dagobert.duck@duck-banking.com smtp.entenhausen.net /etc/fhem/msgmailauth</code><br>
|
||
<code>attr myMail smtpport 9999</code><br>
|
||
<code>attr myMail subject i need more money</code><br>
|
||
<code>attr myMail CR 0</code><br>
|
||
<code>set myMail add Please send me </code><br>
|
||
<code>set myMail add 1.000.000 Taler</code><br>
|
||
<code>set myMsg send myMail</code><br>
|
||
<code>set myMail clear</code><br>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="MSGMailattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
Almost all of these attributes are not optional, most of them could set at definition.<br>
|
||
<li><a href="MSGMailFrom">from</a><br>
|
||
sets the mail address of the sender</li>
|
||
<li><a href="MSGMailTo">to</a><br>
|
||
sets the mail address of the recipent</li>
|
||
<li><a href="MSGMailsmtphost">smtphost</a><br>
|
||
sets the name of the smtphost, for example for GMX
|
||
you could use mail.gmx.net or for Googlemail the smtphost is
|
||
smtp.googlemail.com</li>
|
||
<li><a href="MSGMailsmtphost">smtpport</a> (optional)<br>
|
||
sets the port of the smtphost, for example for GMX
|
||
or for Googlemail the smtport is 465, which is also
|
||
the default and do not need to be set</li>
|
||
<li><a href="MSGMailsubject">subject</a> (optional)<br>
|
||
sets the subject of this email. Per default the subject is set to "FHEM"<br>
|
||
</li>
|
||
<li><a href="MSGMailauthfile">authfile</a><br>
|
||
sets the authfile for the SSL connection to the SMTP host<br>
|
||
the authfile is a simple textfile with the userid in line 1 and
|
||
the password in line 2.<br>
|
||
Example:<br>
|
||
<code>123user45</code><br>
|
||
<code>strenggeheim</code><br>
|
||
It is a good behaviour to protect this data and put the file, for
|
||
example into the /etc directory and set the rights to 440
|
||
(chmod 440 /etc/msgmailauthfile), so that not everyone could see the contents
|
||
of the file. FHEM must have access to this file to read the userid and password.
|
||
<br>
|
||
</li>
|
||
<li><a href="MSGFilenameCR">CR</a><br>
|
||
set the option to write a carriage return at the end of the line.
|
||
CR could be set to 0 or 1, 1 enables this feature.
|
||
Per default this attribute is enabled</li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="NetIO230B"></a>
|
||
<h3>NetIO230B</h3>
|
||
<ul>
|
||
<p>
|
||
fhem-module for NetIO 230B Power Distribution Unit (see: <a
|
||
href="http://www.koukaam.se/showproduct.php?article_id=1502">NetIO 230B
|
||
(koukaam.se)</a>)
|
||
</p>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br />
|
||
Please also note: the PDU must use firmware 3.1 or later and set to unencrypted mode.
|
||
<br /><br />
|
||
<a name="NETIO230Bdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
|
||
<li><code>define <name> NetIO230B <ip-address> <socket number(s)
|
||
> [<user name> <password>]</code></li>
|
||
|
||
<li><code>define <name> NetIO230B <ip-address> <socket number(s)
|
||
> [<config file path>]</code></li>
|
||
|
||
<p>
|
||
Defines a switching device, where sockets can be switched
|
||
</p>
|
||
<ul>
|
||
<li>separately (just use 0-4 as socket number)</li>
|
||
<li>all together (use 1234 as socket number)</li>
|
||
<li>in arbitrary groups (e.g 13 switches socket 1 and 3, 42
|
||
switches socket 2 and 4, etc...), invalid numbers are
|
||
ignored</li>
|
||
</ul>
|
||
<p>
|
||
User name and password are optional. When no user name or
|
||
password is passed, the module looks for a configfile at
|
||
'/var/log/fhem/netio.conf'. If no config file is found, it
|
||
uses 'admin/admin' as user/pass, since this is the default
|
||
configuration for the device.
|
||
<p>
|
||
Alternatively you can pass a path to a configfile instead of
|
||
the user/pass combo. (e.g. /var/tmp/tmp.conf)
|
||
Configfile-Format:<br />
|
||
<ul>
|
||
<code>
|
||
%config= (<br />
|
||
host => "192.168.61.40",<br />
|
||
user => "admin",<br />
|
||
password => "admin"<br />
|
||
);</code>
|
||
<br /><br /><small>(All settings optional)</small>
|
||
</ul>
|
||
</p>
|
||
<p>Examples:</p>
|
||
<ul>
|
||
<li><code>define Socket3 NetIO230B 192.168.178.10 3</code></li>
|
||
<li><code>define Socket1_and_4 NetIO230B 192.168.178.10 14</code></li>
|
||
<li><code>define coffeemaker NetIO230B 192.168.178.10 1 username secretpassword</code></li>
|
||
<li><code>define coffeemaker_and_light NetIO230B 192.168.178.10 23 /var/log/kitchen.conf</code></li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="NETIO230Bget"></a>
|
||
<b>Get </b>
|
||
<ul>
|
||
<code>get <name> state</code>
|
||
<br><br>
|
||
returns the state of the socket(s)<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>get coffeemaker_and_light</code> => <code>on or off</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="NETIO230Bset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
on
|
||
off
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set coffeemaker_and_light on</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<p>
|
||
<a name="ONKYO_AVR" id="ONKYO_AVR"></a>
|
||
</p>
|
||
<h3>
|
||
ONKYO_AVR
|
||
</h3>
|
||
<div style="margin-left: 2em">
|
||
<a name="ONKYO_AVRdefine" id="ONKYO_AVRdefine"></a> <b>Define</b>
|
||
<div style="margin-left: 2em">
|
||
<code>define <name> ONKYO_AVR <ip-address-or-hostname> [<protocol-version>] [<zone>] [<poll-interval>]</code><br>
|
||
<br>
|
||
This module controls ONKYO A/V receivers via network connection.<br>
|
||
<br>
|
||
Defining an ONKYO device will schedule an internal task (interval can be set with optional parameter <poll-interval> in seconds, if not set, the value is 75 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
|
||
<br>
|
||
Example:<br>
|
||
<div style="margin-left: 2em">
|
||
<code>define avr ONKYO_AVR 192.168.0.10<br>
|
||
<br>
|
||
# With explicit protocol version 2013 and later<br>
|
||
define avr ONKYO_AVR 192.168.0.10 2013<br>
|
||
<br>
|
||
# With protocol version prior 2013<br>
|
||
define avr ONKYO_AVR 192.168.0.10 pre2013<br>
|
||
<br>
|
||
# With zone2<br>
|
||
define avr ONKYO_AVR 192.168.0.10 pre2013 zone2<br>
|
||
<br>
|
||
# With custom interval of 60 seconds<br>
|
||
define avr ONKYO_AVR 192.168.0.10 pre2013 main 60<br>
|
||
<br>
|
||
# With zone2 and custom interval of 60 seconds<br>
|
||
define avr ONKYO_AVR 192.168.0.10 pre2013 zone2 60</code>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="ONKYO_AVRset" id="ONKYO_AVRset"></a> <b>Set</b>
|
||
<div style="margin-left: 2em">
|
||
<code>set <name> <command> [<parameter>]</code><br>
|
||
<br>
|
||
Currently, the following commands are defined (may vary depending on zone).<br>
|
||
<ul>
|
||
<li>
|
||
<b>on</b> - powers on the device
|
||
</li>
|
||
<li>
|
||
<b>off</b> - turns the device in standby mode
|
||
</li>
|
||
<li>
|
||
<b>sleep</b> 1..90,off - sets auto-turnoff after X minutes
|
||
</li>
|
||
<li>
|
||
<b>toggle</b> - switch between on and off
|
||
</li>
|
||
<li>
|
||
<b>volume</b> 0...100 - set the volume level in percentage
|
||
</li>
|
||
<li>
|
||
<b>volumeUp</b> - increases the volume level
|
||
</li>
|
||
<li>
|
||
<b>volumeDown</b> - decreases the volume level
|
||
</li>
|
||
<li>
|
||
<b>mute</b> on,off - controls volume mute
|
||
</li>
|
||
<li>
|
||
<b>input</b> - switches between inputs
|
||
</li>
|
||
<li>
|
||
<b>statusRequest</b> - requests the current status of the device
|
||
</li>
|
||
<li>
|
||
<b>remoteControl</b> - sends remote control commands; see remoteControl help
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<a name="ONKYO_AVRget" id="ONKYO_AVRget"></a> <b>Get</b>
|
||
<div style="margin-left: 2em">
|
||
<code>get <name> <what></code><br>
|
||
<br>
|
||
Currently, the following commands are defined (may vary depending on zone):<br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<code>power<br>
|
||
input<br>
|
||
volume<br>
|
||
mute<br>
|
||
sleep<br></code>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<b>Generated Readings/Events (may vary depending on zone):</b><br>
|
||
<ul>
|
||
<li>
|
||
<b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
|
||
</li>
|
||
<li>
|
||
<b>mute</b> - Reports the mute status of the device (can be "on" or "off")
|
||
</li>
|
||
<li>
|
||
<b>power</b> - Reports the power status of the device (can be "on" or "off")
|
||
</li>
|
||
<li>
|
||
<b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is not possible.
|
||
</li>
|
||
<li>
|
||
<b>sleep</b> - Reports current sleep state (can be "off" or shows timer in minutes)
|
||
</li>
|
||
<li>
|
||
<b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")
|
||
</li>
|
||
<li>
|
||
<b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<a name="OREGON"></a>
|
||
<h3>OREGON</h3>
|
||
<ul>
|
||
The OREGON module interprets Oregon sensor messages received by a RFXCOM receiver. You need to define a RFXCOM receiver first.
|
||
See <a href="#RFXCOM">RFXCOM</a>.
|
||
|
||
<br><br>
|
||
|
||
<a name="OREGONdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> OREGON <deviceid></code> <br>
|
||
<br>
|
||
<deviceid> is the device identifier of the Oregon sensor. It consists of the sensors name and a one byte hex string (00-ff) that identifies the sensor. The define statement with the deviceid is generated automatically by autocreate. The following sensor names are used:
|
||
BTHR918, BTHR918N, PCR800 RGR918, RTGR328N, THN132N, THGR228N, THGR328N, THGR918, THR128, THWR288A, THGR810, UV138, UVN800, WGR918, WGR800, WTGR800_A, WTGR800_T.
|
||
<br>
|
||
The one byte hex string is generated by the Oregon sensor when is it powered on. The value seems to be randomly generated. This has the advantage that you may use more than one Oregon sensor of the same type even if it has no switch to set a sensor id. For exampple the author uses three BTHR918 sensors at the same time. All have different deviceids. The drawback is that the deviceid changes after changing batteries.
|
||
<br><br>
|
||
Example: <br>
|
||
<code>define Kaminzimmer OREGON BTHR918N_ab</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="OREGONset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="OREGONget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="OREGONattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="OWAD"></a>
|
||
<h3>OWAD</h3>
|
||
<p>FHEM module to commmunicate with 1-Wire A/D converters<br /><br />
|
||
<br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
|
||
(prerequisite: Add this module's name to the list of clients in OWServer).
|
||
Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br/></p>
|
||
<br /><h4>Example</h4>
|
||
<p>
|
||
<code>define OWX_AD OWAD 724610000000 45</code>
|
||
<br />
|
||
<code>attr OWX_AD DAlarm high</code>
|
||
<br />
|
||
<code>attr OWX_AD DFactor 31.907097</code>
|
||
<br />
|
||
<code>attr OWX_AD DHigh 50.0</code>
|
||
<br />
|
||
<code>attr OWX_AD DName RelHumidity|humidity</code>
|
||
<br />
|
||
<code>attr OWX_AD DOffset -0.8088</code>
|
||
<br />
|
||
<code>attr OWX_AD DUnit percent|%</code>
|
||
<br />
|
||
</p><br />
|
||
<a name="OWADdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWAD [<model>] <id> [<interval>]</code> or <br/>
|
||
<code>define <name> OWAD <fam>.<id> [<interval>]</code>
|
||
<br /><br /> Define a 1-Wire A/D converter.<br /><br /></p>
|
||
<ul>
|
||
<li>
|
||
<code>[<model>]</code><br /> Defines the A/D converter model (and thus 1-Wire
|
||
family id), currently the following values are permitted: <ul>
|
||
<li>model DS2450 with family id 20 (default if the model parameter is
|
||
omitted)</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<code><fam></code>
|
||
<br />2-character unique family id, see above
|
||
</li>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the converter device without family id and CRC
|
||
code </li>
|
||
<li>
|
||
<code><interval></code>
|
||
<br />Measurement interval in seconds. The default is 300 seconds. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWADset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owad_interval">
|
||
<code>set <name> interval <int></code></a><br /> Measurement
|
||
interval in seconds. The default is 300 seconds. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWADget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owad_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owad_present">
|
||
<code>get <name> present</code>
|
||
</a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
<li><a name="owad_interval2">
|
||
<code>get <name> interval</code></a><br />Returns measurement interval in
|
||
seconds. </li>
|
||
<li><a name="owad_reading">
|
||
<code>get <name> reading</code></a><br />Obtain the measuement values. </li>
|
||
<li><a name="owad_alarm">
|
||
<code>get <name> alarm</code></a><br />Obtain the alarm values. </li>
|
||
<li><a name="owad_status">
|
||
<code>get <name> status</code></a><br />Obtain the i/o status values.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWADattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><a name="owad_stateAL0"><code>attr <name> stateAL0 <string></code></a>
|
||
<br />character string for denoting low normal condition, default is empty </li>
|
||
<li><a name="owad_stateAH0"><code>attr <name> stateAH0 <string></code></a>
|
||
<br />character string for denoting high normal condition, default is empty </li>
|
||
<li><a name="owad_stateAL1"><code>attr <name> stateAL1 <string></code></a>
|
||
<br />character string for denoting low alarm condition, default is down triangle,
|
||
e.g. the code &#x25BE; leading to the sign ▾</li>
|
||
<li><a name="owad_stateAH1"><code>attr <name> stateAH1 <string></code></a>
|
||
<br />character string for denoting high alarm condition, default is upward
|
||
triangle, e.g. the code &#x25B4; leading to the sign ▴ </li>
|
||
</ul> For each of the following attributes, the channel identification A,B,C,D may be used. <ul>
|
||
<li><a name="owad_cname"><code>attr <name> <channel>Name
|
||
<string>|<string></code></a>
|
||
<br />name for the channel | a type description for the measured value. </li>
|
||
<li><a name="owad_cunit"><code>attr <name> <channel>Unit
|
||
<string>|<string></code></a>
|
||
<br />unit of measurement for this channel | its abbreviation. </li>
|
||
<li><a name="owad_coffset"><b>deprecated</b>: <code>attr <name> <channel>Offset
|
||
<float></code></a>
|
||
<br />offset added to the reading in this channel. </li>
|
||
<li><a name="owad_cfactor"><b>deprecated</b>: <code>attr <name> <channel>Factor
|
||
<float></code></a>
|
||
<br />factor multiplied to (reading+offset) in this channel. </li>
|
||
<li><a name="owad_cfunction"> <code>attr <name> <channel>Function
|
||
<string></code></a>
|
||
<br />arbitrary functional expression involving the values VA,VB,VC,VD. VA is replaced by
|
||
the measured voltage in channel A, etc. This attribute allows linearization of measurement
|
||
curves as well as the mixing of various channels. <b>Replacement for Offset/Factor !</b></li>
|
||
<li><a name="owad_calarm"><code>attr <name> <channel>Alarm
|
||
<string></code></a>
|
||
<br />alarm setting in this channel, either both, low, high or none (default). </li>
|
||
<li><a name="owad_clow"><code>attr <name> <channel>Low
|
||
<float></code></a>
|
||
<br />measurement value (on the scale determined by offset and factor) for low
|
||
alarm. </li>
|
||
<li><a name="owad_chigh"><code>attr <name> <channel>High
|
||
<float></code></a>
|
||
<br />measurement value (on the scale determined by offset and factor) for high
|
||
alarm. </li>
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#event-on-update-reading">event-on-update-reading</a>, <a
|
||
href="#event-on-change-reading">event-on-change-reading</a>, <a
|
||
href="#stateFormat">stateFormat</a>, <a href="#room"
|
||
>room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
|
||
<a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="OWCOUNT"></a>
|
||
<h3>OWCOUNT</h3>
|
||
<p>FHEM module to commmunicate with 1-Wire Counter/RAM DS2423 or its emulation DS2423emu <br />
|
||
<br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
|
||
(prerequisite: Add this module's name to the list of clients in OWServer).
|
||
Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br/><p/>
|
||
<br /><h4>Example</h4><br />
|
||
<code>define OWC OWCOUNT 1D.CE780F000000 60</code>
|
||
<br />
|
||
<code>attr OWC AName Energie|energy</code>
|
||
<br />
|
||
<code>attr OWC AUnit kWh|kWh</code>
|
||
<br />
|
||
<code>attr OWC APeriod hour</code>
|
||
<br />
|
||
<code>attr OWC ARate Leistung|power</code>
|
||
<br />
|
||
<code>attr OWX_AMode daily</code>
|
||
<br />
|
||
<br />
|
||
<a name="OWCOUNTdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWCOUNT [<model>] <id> [<interval>]</code> or <br/>
|
||
<code>define <name> OWCOUNT <fam>.<id> [<interval>]</code>
|
||
<br /><br /> Define a 1-Wire counter.<br /><br /></p>
|
||
<ul>
|
||
<li>
|
||
<code>[<model>]</code><br /> Defines the counter model (and thus 1-Wire family
|
||
id), currently the following values are permitted: <ul>
|
||
<li>model DS2423 with family id 1D (default if the model parameter is
|
||
omitted)</li>
|
||
<li>model DS2423enew with family id 1D - emulator, works like DS2423</li>
|
||
<li>model DS2423eold with family id 1D - emulator, works like DS2423 except that the internal memory is not present</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<code><fam></code>
|
||
<br />2-character unique family id, see above
|
||
</li>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the converter device without family id and CRC
|
||
code </li>
|
||
<li>
|
||
<code><interval></code>
|
||
<br />Measurement interval in seconds. The default is 300 seconds. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWCOUNTset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owcount_interval">
|
||
<code>set <name> interval <int></code></a><br /> Measurement
|
||
interval in seconds. The default is 300 seconds. </li>
|
||
<li><a name="owcount_memory">
|
||
<code>set <name> memory <page> <string></code></a><br />Write 32 bytes to
|
||
memory page 0..13 </li>
|
||
<li><a name="owcount_midnight">
|
||
<code>set <name> midnight <channel-name> <val></code></a><br />Write the
|
||
day's starting value for counter <channel> (A, B or named channel, see
|
||
below)</li>
|
||
<li><a name="owcount_counter">
|
||
<code>set <name> counter <channel-name> <val></code></a><br />Correct the midnight
|
||
value such that counter <channel> (A, B or named channel, see
|
||
below) displays value <val></li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWCOUNTget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owcount_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owcount_present">
|
||
<code>get <name> present</code>
|
||
</a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
<li><a name="owcount_interval2">
|
||
<code>get <name> interval</code></a><br />Returns measurement interval in
|
||
seconds. </li>
|
||
<li><a name="owcount_memory2">
|
||
<code>get <name> memory <page></code></a><br />Obtain 32 bytes from
|
||
memory page 0..13 </li>
|
||
<li><a name="owcount_midnight2">
|
||
<code>get <name> midnight <channel-name></code></a><br />Obtain the
|
||
day's starting value for counter <channel> (A, B or named channel, see
|
||
below)</li>
|
||
<li><a name="owcount_month">
|
||
<code>get <name> month</code></a><br />Returns cumulated and averaged monthly value if mode=daily, otherwise last day's and averaged value </li>
|
||
<li><a name="owcount_year">
|
||
<code>get <name> year</code></a><br />Returns cumulated and averaged yearly value if mode=daily, otherwise last months's and averaged value </li>
|
||
<li><a name="owcount_raw">
|
||
<code>get <name> raw <channel-name></code></a><br />Obtain the
|
||
current raw value for counter <channel> (A, B or named channel, see below)</li>
|
||
<li><a name="owcount_counters">
|
||
<code>get <name> counters</code></a><br />Obtain the current value both
|
||
counters</li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWCOUNTattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><a name="owcount_logm"><code>attr <name> LogM
|
||
<string></code></a>
|
||
<br />device name (not file name) of monthly log file.</li>
|
||
<li><a name="owcount_logy"><code>attr <name> LogY
|
||
<string></code></a>
|
||
<br />device name (not file name) of yearly log file.</li>
|
||
<li><a name="owcount_interval2">
|
||
<code>attr <name> interval <int></code></a>
|
||
<br /> Measurement
|
||
interval in seconds. The default is 300 seconds. </li>
|
||
<li><a name="owcount_nomemory"><code>attr <name> nomemory
|
||
0|1</code></a>
|
||
<br />when set to 1, midnight values will be stored in files instead of the internal memory.</li>
|
||
</ul>
|
||
<p>For each of the following attributes, the channel identification A,B may be used.</p>
|
||
<ul>
|
||
<li><a name="owcount_cname"><code>attr <name> <channel>Name
|
||
<string>|<string></code></a>
|
||
<br />name for the channel | a type description for the measured value. </li>
|
||
<li><a name="owcount_cunit"><code>attr <name> <channel>Unit
|
||
<string>|<string></code></a>
|
||
<br />unit of measurement for this channel | its abbreviation. </li>
|
||
<li><a name="owcount_crate"><code>attr <name> <channel>Rate
|
||
<string>|<string></code></a>
|
||
<br />name for the channel rate | a type description for the measured value. </li>
|
||
<li><a name="owcount_coffset"><code>attr <name> <channel>Offset
|
||
<float></code></a>
|
||
<br />offset added to the reading in this channel. </li>
|
||
<li><a name="owcount_cfactor"><code>attr <name> <channel>Factor
|
||
<float></code></a>
|
||
<br />factor multiplied to (reading+offset) in this channel. </li>
|
||
<li><a name="owcount_cmode"><code>attr <name> <channel>Mode daily |
|
||
normal</code></a>
|
||
<br />determines whether counter is nulled at start of day or running continuously </li>
|
||
<li><a name="owcount_cperiod"><code>attr <name> <channel>Period hour(default) | minute |
|
||
second</code></a>
|
||
<br />period for rate calculation </li>
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#event-on-update-reading">event-on-update-reading</a>, <a
|
||
href="#event-on-change-reading">event-on-change-reading</a>, <a
|
||
href="#stateFormat">stateFormat</a>, <a href="#room"
|
||
>room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
|
||
<a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="OWDevice"></a>
|
||
<h3>OWDevice</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="OWDevicedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> OWDevice <address> [<interval>]</code>
|
||
<br><br>
|
||
|
||
Defines a 1-wire device. The 1-wire device is identified by its <address>. It is
|
||
served by the most recently defined <a href="#OWServer">OWServer</a>.
|
||
<br><br>
|
||
|
||
If <interval> is given, the OWServer is polled every <interval> seconds for
|
||
a subset of readings.
|
||
<br><br>
|
||
|
||
OWDevice is a generic device. Its characteristics are retrieved at the time of the device's
|
||
definition. The available readings that you can get or set as well as those that are
|
||
regularly retrieved by polling can be seen when issuing the
|
||
<code><a href="#list">list</a> <name></code> command.
|
||
<br><br>
|
||
The following devices are currently supported:
|
||
<ul>
|
||
<li>DS2401 - Silicon Serial Number</li>
|
||
<li>DS1990A - Serial Number iButton</li>
|
||
<li>DS2405 - Addressable Switch</li>
|
||
<li>DS18S20 - High-Precision 1-Wire Digital Thermometer</li>
|
||
<li>DS1920 - iButton version of the thermometer</li>
|
||
<li>DS2406, DS2407 - Dual Addressable Switch with 1kbit Memory</li>
|
||
<li>DS2436 - Battery ID/Monitor Chip</li>
|
||
<li>DS2423 - 4kbit 1-Wire RAM with Counter</li>
|
||
<li>DS2450 - Quad A/D Converter</li>
|
||
<li>DS1822 - Econo 1-Wire Digital Thermometer</li>
|
||
<li>DS2415 - 1-Wire Time Chip</li>
|
||
<li>DS1904 - RTC iButton</li>
|
||
<li>DS2438 - Smart Battery Monitor</li>
|
||
<li>DS2417 - 1-Wire Time Chip with Interrupt</li>
|
||
<li>DS18B20 - Programmable Resolution 1-Wire Digital Thermometer</li>
|
||
<li>DS2408 - 1-Wire 8 Channel Addressable Switch</li>
|
||
<li>DS2413 - Dual Channel Addressable Switch</li>
|
||
<li>DS1825 - Programmable Resolution 1-Wire Digital Thermometer with ID</li>
|
||
<li>EDS0066 - Multisensor for temperature and pressure</li>
|
||
<li>LCD - LCD controller by Louis Swart</li>
|
||
</ul>
|
||
<br><br>
|
||
Adding more devices is simple. Look at the code (subroutine <code>OWDevice_GetDetails</code>).
|
||
<br><br>
|
||
This module is completely unrelated to the 1-wire modules with names all in uppercase.
|
||
<br><br>
|
||
<b>Note:</b>The state reading never triggers events to avoid confusion.<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>
|
||
define myOWServer localhost:4304<br><br>
|
||
get myOWServer devices<br>
|
||
10.487653020800 DS18S20<br><br>
|
||
define myT1 10.487653020800<br><br>
|
||
list myT1 10.487653020800<br>
|
||
Internals:<br>
|
||
...<br>
|
||
Readings:<br>
|
||
2012-12-22 20:30:07 temperature 23.1875<br>
|
||
Fhem:<br>
|
||
...<br>
|
||
getters:<br>
|
||
address<br>
|
||
family<br>
|
||
id<br>
|
||
power<br>
|
||
type<br>
|
||
temperature<br>
|
||
templow<br>
|
||
temphigh<br>
|
||
polls:<br>
|
||
temperature<br>
|
||
setters:<br>
|
||
alias<br>
|
||
templow<br>
|
||
temphigh<br>
|
||
...<br>
|
||
</code>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="OWDeviceset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><code>set <name> interval <value></code>
|
||
<br><br>
|
||
<code>value</code> modifies the interval for polling data. The unit is in seconds.
|
||
</li>
|
||
<li><code>set <name> <reading> <value></code>
|
||
<br><br>
|
||
Sets <reading> to <value> for the 1-wire device <name>. The permitted values are defined by the underlying
|
||
1-wire device type.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>set myT1 templow 5</code><br>
|
||
</ul>
|
||
<br>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
<a name="OWDeviceget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <reading> <value></code>
|
||
<br><br>
|
||
Gets <reading> for the 1-wire device <name>. The permitted values are defined by the underlying
|
||
1-wire device type.
|
||
<br><br>
|
||
Example:
|
||
<ul>
|
||
<code>get myT1 temperature</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="OWDeviceattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="IODev"></a>
|
||
<li>IODev:
|
||
Set the OWServer device which should be used for sending and receiving data
|
||
for this OWDevice. Note: Upon startup fhem assigns each OWDevice
|
||
to the last previously defined OWServer. Thus it is best if you define OWServer
|
||
and OWDevices in blocks: first define the first OWServer and the OWDevices that
|
||
belong to it, then continue with the next OWServer and the attached OWDevices, and so on.
|
||
</li>
|
||
<li>trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).</li>
|
||
<li>polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.</li>
|
||
<li>interfaces: supersedes the interfaces exposed by that device.</li>
|
||
<li>model: preset with device type, e.g. DS18S20.</li>
|
||
<li>resolution: resolution of temperature reading in bits, can be 9, 10, 11 or 12.
|
||
Lower resolutions allow for faster retrieval of values from the bus.
|
||
Particularly reasonable for large 1-wire installations to reduce busy times for FHEM.</li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br><br>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
<a name="OWFS"></a>
|
||
<h3>OWFS</h3>
|
||
<ul>
|
||
OWFS is a suite of programs that designed to make the 1-wire bus and its
|
||
devices easily accessible. The underlying priciple is to create a virtual
|
||
filesystem, with the unique ID being the directory, and the individual
|
||
properties of the device are represented as simple files that can be read
|
||
and written.<br><br>
|
||
|
||
Note: You need the owperl module from
|
||
<a href="http://owfs.org/index.php?page=owperl">http://owfs.org/</a>.
|
||
<br><br>
|
||
|
||
<a name="OWFSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> OWFS <owserver-ip:port> <model> [<id>]</code>
|
||
<br><br>
|
||
|
||
Define a 1-wire device to communicate with an OWFS-Server.<br><br>
|
||
|
||
<code><owserver-ip:port></code>
|
||
<ul>
|
||
IP-address:port from OW-Server.
|
||
</ul>
|
||
<code><model></code>
|
||
<ul>
|
||
Define the <a href="#owfs_type">type</a> of the input device.
|
||
Currently supportet: <code>DS1420, DS9097 (for passive Adapter)</code>
|
||
</ul>
|
||
<code><id></code>
|
||
<ul>
|
||
Corresponding to the <a href="#owfs_id">id</a> of the input device. Only for active Adapter.
|
||
<br><br>
|
||
</ul>
|
||
|
||
Note:<br>
|
||
If the <code>owserver-ip:port</code> is called <code>none</code>, then
|
||
no device will be opened, so you can experiment without hardware attached.<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>#define an active Adapter:<br>
|
||
define DS9490R OWFS 127.0.0.1:4304 DS1420 93302D000000</code><br>
|
||
</ul>
|
||
<br>
|
||
<ul>
|
||
<code>#define a passive Adapter:<br>
|
||
define DS9097 OWFS 127.0.0.1:4304 DS9097</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="OWFSget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of (not supported by passive Devices e.g. DS9097):<br>
|
||
<ul>
|
||
<li><a name="owfs_address"></a>
|
||
<code>address</code> (read-only)<br>
|
||
The entire 64-bit unique ID. address starts with the family code.<br>
|
||
Given as upper case hexidecimal digits (0-9A-F).
|
||
</li>
|
||
<li><a name="owfs_crc8"></a>
|
||
<code>crc8</code> (read-only)<br>
|
||
The 8-bit error correction portion. Uses cyclic redundancy check. Computed
|
||
from the preceeding 56 bits of the unique ID number.<br>
|
||
Given as upper case hexidecimal digits (0-9A-F).
|
||
</li>
|
||
<li><a name="owfs_family"></a>
|
||
<code>family</code> (read-only)<br>
|
||
The 8-bit family code. Unique to each type of device.<br>
|
||
Given as upper case hexidecimal digits (0-9A-F).
|
||
</li>
|
||
<li><a name="owfs_id"></a>
|
||
<code>id</code> (read-only)<br>
|
||
The 48-bit middle portion of the unique ID number. Does not include the
|
||
family code or CRC.<br>
|
||
Given as upper case hexidecimal digits (0-9A-F).
|
||
</li>
|
||
<li><a name="owfs_locator"></a>
|
||
<code>locator</code> (read-only)<br>
|
||
Uses an extension of the 1-wire design from iButtonLink company that
|
||
associated 1-wire physical connections with a unique 1-wire code. If
|
||
the connection is behind a Link Locator the locator will show a unique
|
||
8-byte number (16 character hexidecimal) starting with family code FE.<br>
|
||
If no Link Locator is between the device and the master, the locator
|
||
field will be all FF.
|
||
</li>
|
||
<li><a name="owfs_present"></a>
|
||
<code>present</code> (read-only)<br>
|
||
Is the device currently present on the 1-wire bus?
|
||
</li>
|
||
<li><a name="owfs_type"></a>
|
||
<code>type</code> (read-only)<br>
|
||
Part name assigned by Dallas Semi. E.g. DS2401 Alternative packaging
|
||
(iButton vs chip) will not be distiguished.
|
||
</li>
|
||
<br>
|
||
</ul>
|
||
Examples:
|
||
<ul>
|
||
<code>get DS9490R type</code><br>
|
||
<code>DS9490R type => DS1420</code><br><br>
|
||
<code>get DS9490R address</code><br>
|
||
<code>DS9490R address => 8193302D0000002B</code>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="OWFSattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a name="owfs_temp-scale"></a>
|
||
temp-scale<br>
|
||
Specifies the temperature-scale unit:
|
||
<ul>
|
||
<li><code>C</code><br>
|
||
Celsius. This is the default.</li>
|
||
<li><code>F</code><br>
|
||
Fahrenheit</li>
|
||
<li><code>K</code><br>
|
||
Kelvin</li>
|
||
<li><code>R</code><br>
|
||
Rankine</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="OWID"></a>
|
||
<h3>OWID</h3>
|
||
<p>FHEM module for 1-Wire devices that know only their unique ROM ID<br />
|
||
<br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
|
||
Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br /></p>
|
||
<br /><h4>Example</h4><br />
|
||
<p>
|
||
<code>define ROM1 OWX_ID OWCOUNT 09.CE780F000000 10</code>
|
||
<br />
|
||
</p><br />
|
||
<a name="OWIDdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWID <fam> <id> [<interval>]</code> or <br/>
|
||
<code>define <name> OWID <fam>.<id> [<interval>]</code>
|
||
<br /><br /> Define a 1-Wire device.<br /><br />
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code><fam></code>
|
||
<br />2-character unique family id, see above
|
||
</li>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the converter device without family id and CRC
|
||
code
|
||
</li>
|
||
<li>
|
||
<code><interval></code>
|
||
<br />Interval in seconds for checking the presence of the device. The default is 300 seconds. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWIDset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owid_interval">
|
||
<code>set <name> interval <int></code></a><br />
|
||
Interval in seconds for checking the presence of the device. The default is 300 seconds. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWIDget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owid_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owid_present">
|
||
<code>get <name> present</code>
|
||
</a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
</ul>
|
||
|
||
<a name="OWLCD"></a>
|
||
<h3>OWLCD</h3>
|
||
<p>FHEM module to commmunicate with the <a
|
||
href="http://www.louisswart.co.za/1-Wire_Overview.html">1-Wire LCD controller</a>
|
||
from Louis Swart (1-Wire family id FF). See also the corresponding <a
|
||
href="http://fhemwiki.de/wiki/1-Wire_Textdisplay">Wiki page.</a><br /><br />
|
||
Note:<br /> This 1-Wire module so far works only with the OWX interface module. Please
|
||
define an <a href="#OWX">OWX</a> device first. <br /></p>
|
||
<br /><h4>Example</h4>
|
||
<p>
|
||
<code>define OWX_LCD OWLCD 9F0700000100</code>
|
||
<br />
|
||
</p>
|
||
<br />
|
||
<a name="OWLCDdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWLCD <id></code> or <br/>
|
||
<code>define <name> OWLCD FF.<id></code>
|
||
<br /><br /> Define a 1-Wire LCD device.<br /><br /></p>
|
||
<ul>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the converter device without family id and CRC
|
||
code </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWLCDset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owlcd_icon">
|
||
<code>set <name> icon <int> on|off|blink</code></a><br /> Set one of
|
||
the icons 0..14 on, off or blinking</li>
|
||
<li><a name="owlcd_icon2">
|
||
<code>set <name> icon 15 0..6</code></a><br /> Set icon 15 to one of its
|
||
values</li>
|
||
<li><a name="owlcd_icon3">
|
||
<code>set <name> icon none</code></a><br /> Set all icons off</li>
|
||
<li><a name="owlcd_line">
|
||
<code>set <name> line <int> <string></code></a><br /> Write
|
||
LCD line 0..3 with some content </li>
|
||
<li><a name="owlcd_memory">
|
||
<code>set <name> memory <page> <string></code></a><br />Write
|
||
memory page 0..6</li>
|
||
<li><a name="owlcd_gpio">
|
||
<code>set <name> gpio <value></code></a><br />Write state for all
|
||
three gpio pins (value = 0..7, for each bit 0=ON, 1=OFF)</li>
|
||
<li><a name="owlcd_bl">
|
||
<code>set <name> backlight ON|OFF</code></a><br />Switch backlight on or
|
||
off</li>
|
||
<li><a name="owlcd_lcd">
|
||
<code>set <name> lcd ON|OFF</code></a><br />Switch LCD power on or
|
||
off</li>
|
||
<li><a name="owlcd_gpio">
|
||
<code>set <name> reset</code></a><br />Reset the display</li>
|
||
<li><a name="owlcd_gpio">
|
||
<code>set <name> test</code></a><br />Test the display</li>
|
||
</ul>
|
||
<br />
|
||
<a name="owlcdget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owlcd_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owlcd_present">
|
||
<code>get <name> present</code>
|
||
</a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
<li><a name="owlcd_memory2">
|
||
<code>get <name> memory <page></code></a><br />Read memory page 0..6 </li>
|
||
<li><a name="owlcd_gpio">
|
||
<code>get <name> gpio</code></a><br />Obtain state of all four input
|
||
channels (15 = all off, 0 = all on)</li>
|
||
<li><a name="owlcd_counter">
|
||
<code>get <name> gpio</code></a><br />Obtain state of all four input
|
||
counters (4 x 16 Bit)</li>
|
||
<li><a name="owlcd_version">
|
||
<code>get <name> version</code></a><br />Obtain firmware version of the
|
||
controller</li>
|
||
</ul>
|
||
<br />
|
||
<a name="owlcdattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#room">room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel"
|
||
>loglevel</a>, <a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="OWMULTI"></a>
|
||
<h3>OWMULTI</h3>
|
||
<p>FHEM module to commmunicate with 1-Wire multi-sensors, currently the DS2438 smart battery
|
||
monitor<br /> <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
|
||
(prerequisite: Add this module's name to the list of clients in OWServer).
|
||
Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first.</p>
|
||
<h4>Example</h4>
|
||
<p>
|
||
<code>define OWX_M OWMULTI 7C5034010000 45</code>
|
||
<br />
|
||
<code>attr OWX_M VName relHumidity|humidity</code>
|
||
<br />
|
||
<code>attr OWX_M VUnit percent|%</code>
|
||
<br />
|
||
<code>attr OWX_M VFunction (161.29 * V / VDD - 25.8065)/(1.0546 - 0.00216 * T)</code>
|
||
</p>
|
||
<a name="OWMULTIdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWMULTI [<model>] <id> [<interval>]</code> or <br/>
|
||
<code>define <name> OWMULTI <fam>.<id> [<interval>]</code>
|
||
<br /><br /> Define a 1-Wire multi-sensor</p>
|
||
<ul>
|
||
<li>
|
||
<code>[<model>]</code><br /> Defines the sensor model (and thus 1-Wire family
|
||
id), currently the following values are permitted: <ul>
|
||
<li>model DS2438 with family id 26 (default if the model parameter is omitted).
|
||
Measured is a temperature value, an external voltage and the current supply
|
||
voltage</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<code><fam></code>
|
||
<br />2-character unique family id, see above
|
||
</li>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the converter device without family id and CRC
|
||
code </li>
|
||
<li>
|
||
<code><interval></code>
|
||
<br />Measurement interval in seconds. The default is 300 seconds. </li>
|
||
</ul>
|
||
<a name="OWMULTIset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owmulti_interval">
|
||
<code>set <name> interval <int></code></a><br /> Measurement
|
||
interval in seconds. The default is 300 seconds. </li>
|
||
</ul>
|
||
<a name="OWMULTIget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owmulti_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owmulti_present">
|
||
<code>get <name> present</code>
|
||
</a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
<li><a name="owmulti_interval2">
|
||
<code>get <name> interval</code></a><br />Returns measurement interval in
|
||
seconds. </li>
|
||
<li><a name="owmulti_reading">
|
||
<code>get <name> reading</code></a><br />Obtain the measurement values </li>
|
||
<li><a name="owmulti_vad">
|
||
<code>get <name> VAD</code></a><br />Obtain the measurement value from
|
||
VFunction. </li>
|
||
<li><a name="owmulti_temperature">
|
||
<code>get <name> temperature</code></a><br />Obtain the temperature value. </li>
|
||
<li><a name="owmulti_vdd">
|
||
<code>get <name> VDD</code></a><br />Obtain the current supply voltage. </li>
|
||
<li><a name="owmulti_raw">
|
||
<code>get <name> V</code> or <code>get <name>
|
||
raw</code></a><br />Obtain the raw external voltage measurement. </li>
|
||
</ul>
|
||
<a name="OWMULTIattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><a name="owmulti_vname"><code>attr <name> VName
|
||
<string>|<string></code></a>
|
||
<br />name for the channel | a type description for the measured value. </li>
|
||
<li><a name="owmulti_vunit"><code>attr <name> VUnit
|
||
<string>|<string></code></a>
|
||
<br />unit of measurement for this channel | its abbreviation. </li>
|
||
<li><a name="owmulti_vfunction"><code>attr <name> VFunction
|
||
<string></code></a>
|
||
<br />arbitrary functional expression involving the values VDD, V, T. Example see
|
||
above. <ul>
|
||
<li>VDD is replaced by the measured supply voltage in Volt,</li>
|
||
<li> V by the measured external voltage,</li>
|
||
<li>T by the measured and corrected temperature in its unit</li>
|
||
</ul></li>
|
||
<li><a name="owmulti_tempOffset"><code>attr <name> tempOffset <float></code>
|
||
</a>
|
||
<br />temperature offset in °C added to the raw temperature reading. </li>
|
||
<li><a name="owmulti_tempUnit"><code>attr <name> tempUnit
|
||
Celsius|Kelvin|Fahrenheit</code>
|
||
</a>
|
||
<br />unit of measurement (temperature scale), default is Celsius = °C </li>
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#event-on-update-reading">event-on-update-reading</a>, <a
|
||
href="#event-on-change-reading">event-on-change-reading</a>, <a
|
||
href="#stateFormat">stateFormat</a>, <a href="#room"
|
||
>room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
|
||
<a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="OWSWITCH"></a>
|
||
<h3>OWSWITCH</h3>
|
||
<p>FHEM module to commmunicate with 1-Wire Programmable Switches <br />
|
||
<br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
|
||
(prerequisite: Add this module's name to the list of clients in OWServer).
|
||
Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first.</p>
|
||
<h4>Example</h4>
|
||
<p>
|
||
<code>define OWX_S OWSWITCH DS2413 B5D502000000 60</code>
|
||
<br />
|
||
<code>attr OWX_S AName Lampe|light</code>
|
||
<br />
|
||
<code>attr OWX_S AUnit AN|AUS</code>
|
||
</p>
|
||
<a name="OWSWITCHdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWSWITCH [<model>] <id> [<interval>]</code> or <br/>
|
||
<code>define <name> OWSWITCH <fam>.<id> [<interval>]</code>
|
||
<br /><br /> Define a 1-Wire switch.<br /><br />
|
||
<ul>
|
||
<li>
|
||
<code>[<model>]</code><br /> Defines the switch model (and thus 1-Wire family
|
||
id), currently the following values are permitted: <ul>
|
||
<li>model DS2413 with family id 3A (default if the model parameter is omitted).
|
||
2 Channel switch with onboard memory</li>
|
||
<li>model DS2406 with family id 12. 2 Channel switch </li>
|
||
<li>model DS2408 with family id 29. 8 Channel switch</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<code><fam></code>
|
||
<br />2-character unique family id, see above
|
||
</li>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the device without family id and CRC
|
||
code </li>
|
||
<li>
|
||
<code><interval></code>
|
||
<br />Measurement interval in seconds. The default is 300 seconds. </li>
|
||
</ul>
|
||
<a name="OWSWITCHset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owswitch_interval">
|
||
<code>set <name> interval <int></code></a><br /> Measurement
|
||
interval in seconds. The default is 300 seconds. </li>
|
||
<li><a name="owswitch_output">
|
||
<code>set <name> output <channel-name> on | off | on-for-timer <time> | off-for-timer <time></code>
|
||
</a><br />Set
|
||
value for channel (A,B,... or defined channel name). 1 = off, 0 = on in normal
|
||
usage. See also the note above.<br/>
|
||
on-for-timer/off-for-timer will set the desired value only for the given time,
|
||
either given as hh:mm:ss or as integers seconds
|
||
and then will return to the opposite value.</li>
|
||
<li><a name="owswitch_gpio">
|
||
<code>set <name> gpio <value></code></a><br />Set values for
|
||
channels (For 2 channels: 3 = A and B off, 1 = B on 2 = A on 0 = both on)</li>
|
||
<li><a name="owswitch_init">
|
||
<code>set <name> init yes</code></a><br /> Re-initialize the device</li>
|
||
</ul>
|
||
<a name="OWSWITCHget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owswitch_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owswitch_present">
|
||
<code>get <name> present</code>
|
||
</a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
<li><a name="owswitch_interval2">
|
||
<code>get <name> interval</code></a><br />Returns measurement interval in
|
||
seconds. </li>
|
||
<li><a name="owswitch_input">
|
||
<code>get <name> input <channel-name></code></a><br /> state for
|
||
channel (A,B, ... or defined channel name) This value reflects the measured value,
|
||
not necessarily the one set as output state, because the output transistors are open
|
||
collector switches. A measured state of 1 = OFF therefore corresponds to an output
|
||
state of 1 = OFF, but a measured state of 0 = ON can also be due to an external
|
||
shortening of the output.</li>
|
||
<li><a name="owswitch_gpio">
|
||
<code>get <name> gpio</code></a><br />Obtain state of all channels</li>
|
||
</ul>
|
||
<a name="OWSWITCHattr"></a>
|
||
<h4>Attributes</h4> For each of the following attributes, the channel identification A,B,...
|
||
may be used. <ul>
|
||
<li><a name="owswitch_cname"><code>attr <name> <channel>Name
|
||
<string>|<string></code></a>
|
||
<br />name for the channel | a type description for the measured value. </li>
|
||
<li><a name="owswitch_cunit"><code>attr <name> <channel>Unit
|
||
<string>|<string></code></a>
|
||
<br />display for on | off condition </li>
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#event-on-update-reading">event-on-update-reading</a>, <a
|
||
href="#event-on-change-reading">event-on-change-reading</a>, <a
|
||
href="#stateFormat">stateFormat</a>, <a href="#room"
|
||
>room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
|
||
<a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="OWServer"></a>
|
||
<h3>OWServer</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="OWDevicedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> OWServer <protocol></code>
|
||
<br><br>
|
||
|
||
Defines a logical OWServer device. OWServer is the server component of the
|
||
<a href="http://owfs.org">1-Wire Filesystem</a>. It serves as abstraction layer
|
||
for any 1-wire devices on a host. <protocol> has
|
||
format <hostname>:<port>. For details see
|
||
<a href="http://owfs.org/index.php?page=owserver_protocol">owserver documentation</a>.
|
||
<br><br>
|
||
You need <a href="http://owfs.cvs.sourceforge.net/viewvc/owfs/owfs/module/ownet/perl5/OWNet/lib/OWNet.pm">OWNet.pm from owfs.org</a>, which is normally deployed with FHEM. As at 2012-12-23 the OWNet module
|
||
on CPAN has an issue which renders it useless for remote connections.
|
||
<br><br>
|
||
The actual 1-wire devices are defined as <a href="#OWDevice">OWDevice</a> devices.
|
||
If <a href="#autocreate">autocreate</a> is enabled, all the devices found are created at
|
||
start of FHEM automatically.
|
||
<br><br>
|
||
This module is completely unrelated to the 1-wire modules with names all in uppercase.
|
||
<br><br>
|
||
Examples:
|
||
<ul>
|
||
<code>define myLocalOWServer OWServer localhost:4304</code><br>
|
||
<code>define myRemoteOWServer OWServer raspi:4304</code><br>
|
||
</ul>
|
||
<br><br>
|
||
Notice: if you get no devices add both <code>localhost</code> and the FQDN of your owserver as server directives
|
||
to the owserver configuration file
|
||
on the remote host.
|
||
<br><br>
|
||
|
||
</ul>
|
||
|
||
<a name="OWServerset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of<br><br>
|
||
<li><code>reopen</code><br>
|
||
Reopens the connection to the owserver.
|
||
</li>
|
||
<li>owserver (OWFS) specific settings:
|
||
<ul>
|
||
<li><code>timeout/directory</code></li>
|
||
<li><code>timeout/ftp</code></li>
|
||
<li><code>timeout/ha7</code></li>
|
||
<li><code>timeout/network</code></li>
|
||
<li><code>timeout/presence</code></li>
|
||
<li><code>timeout/serial</code></li>
|
||
<li><code>timeout/server</code></li>
|
||
<li><code>timeout/stable</code></li>
|
||
<li><code>timeout/uncached</code></li>
|
||
<li><code>timeout/usb</code></li>
|
||
<li><code>timeout/volatile</code></li>
|
||
<li><code>timeout/w1</code></li>
|
||
<li><code>units/pressure_scale</code></li>
|
||
<li><code>units/temperature_scale</code></li>
|
||
</ul>
|
||
</li>
|
||
For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
|
||
<br>
|
||
</ul>
|
||
<br><br>
|
||
|
||
|
||
<a name="OWServerget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of<br><br>
|
||
<li><code>devices</code><br>
|
||
Lists the addresses and types of all 1-wire devices provided by the owserver. Also shows
|
||
the corresponding <a href="#OWDevice">OWDevice</a> if one is defined for the respective 1-wire devices.
|
||
</li>
|
||
<li><code>errors</code><br>
|
||
List a view of error statistics.</li>
|
||
<li>owserver (OWFS) specific settings:
|
||
<ul>
|
||
<li><code>/settings/timeout/directory</code></li>
|
||
<li><code>/settings/timeout/ftp</code></li>
|
||
<li><code>/settings/timeout/ha7</code></li>
|
||
<li><code>/settings/timeout/network</code></li>
|
||
<li><code>/settings/timeout/presence</code></li>
|
||
<li><code>/settings/timeout/serial</code></li>
|
||
<li><code>/settings/timeout/server</code></li>
|
||
<li><code>/settings/timeout/stable</code></li>
|
||
<li><code>/settings/timeout/uncached</code></li>
|
||
<li><code>/settings/timeout/usb</code></li>
|
||
<li><code>/settings/timeout/volatile</code></li>
|
||
<li><code>/settings/timeout/w1</code></li>
|
||
<li><code>/settings/units/pressure_scale</code></li>
|
||
<li><code>/settings/units/temperature_scale</code></li>
|
||
</ul>
|
||
</li>
|
||
For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
|
||
<br>
|
||
</ul>
|
||
<br><br>
|
||
|
||
|
||
<a name="OWDeviceattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>nonblocking<br>
|
||
Get all readings (OWServer / <a href="#OWDevice">OWDevice</a>) via a child process. This ensures, that FHEM
|
||
is not blocked during communicating with the owserver.<br>
|
||
Example:<br>
|
||
<code> attr <name> nonblocking 1</code>
|
||
</li>
|
||
<li><a href="#eventMap">eventMap</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br><br>
|
||
Note: unset <code>nonblocking</code> if you experience lockups of FHEM.
|
||
|
||
</ul>
|
||
|
||
<a name="OWTEMP"></a>
|
||
<h3>OWTEMP</h3>
|
||
<ul>
|
||
High-Precision 1-Wire Digital Thermometer.
|
||
<br><br>
|
||
|
||
Note:<br>
|
||
Please define an <a href="#OWFS">OWFS</a> device first.
|
||
<br><br>
|
||
|
||
<a name="OWTEMPdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> OWTEMP <id> [<interval>] [<alarminterval>]</code>
|
||
<br><br>
|
||
|
||
Define a 1-wire Digital Thermometer device.<br><br>
|
||
|
||
<code><id></code>
|
||
<ul>
|
||
Corresponding to the <a href="#owfs_id">id</a> of the input device.<br>
|
||
Set <id> to <code>none</code>for demo mode.
|
||
</ul>
|
||
<code><interval></code>
|
||
<ul>
|
||
Sets the status polling intervall in seconds to the given value. The default is 300 seconds.
|
||
</ul>
|
||
<code><alarminterval></code>
|
||
<ul>
|
||
Sets the alarm polling intervall in seconds to the given value. The default is 300 seconds.
|
||
<br><br>
|
||
</ul>
|
||
|
||
Note:<br>
|
||
Currently supported <a href="#owfs_type">type</a>: <code>DS18S20</code>.<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define KG.hz.TF.01 OWTEMP 14B598010800 300 60</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="OWTEMPset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul>
|
||
<li><a name="owtemp_templow"></a>
|
||
<code>templow</code> (read-write)<br>
|
||
The upper limit for the low temperature alarm state.
|
||
</li>
|
||
<li><a name="owtemp_temphigh"></a>
|
||
<code>temphigh</code> (read-write)<br>
|
||
The lower limit for the high temperature alarm state.
|
||
</li>
|
||
<li><a name="owtemp_ALARMINT"></a>
|
||
<code>ALARMINT</code> (write-only)<br>
|
||
Sets the alarm polling intervall in seconds to the given value.
|
||
</li>
|
||
<li><a name="owtemp_INTERVAL"></a>
|
||
<code>INTERVAL</code> (write-only)<br>
|
||
Sets the status polling intervall in seconds to the given value.
|
||
</li>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="OWTEMPget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul>
|
||
<li><a href="#owfs_address">address</a> (read-only)</li>
|
||
<li><a href="#owfs_crc8">crc8</a> (read-only)</li>
|
||
<li><a href="#owfs_family">family</a> (read-only)</li>
|
||
<li><a href="#owfs_id">id</a> (read-only)</li>
|
||
<li><a href="#owfs_locator">locator</a> (read-only)</li>
|
||
<li><a href="#owfs_present">present</a> (read-only)</li>
|
||
<li><a name="owtemp_temperature"></a>
|
||
<code>temperature</code> (read-only)<br>
|
||
Read by the chip at high resolution (~12 bits). Units are selected from
|
||
the defined OWFS Device. See <a href="#owfs_temp-scale">temp-scale</a> for choices.
|
||
</li>
|
||
<li><a href="#owtemp_templow">templow</a> (read-write)</li>
|
||
<li><a href="#owtemp_temphigh">temphigh</a> (read-write)</li>
|
||
<li><a href="#owfs_type">type</a> (read-only)</li>
|
||
<br>
|
||
</ul>
|
||
Examples:
|
||
<ul>
|
||
<code>get KG.hz.TF.01 type</code><br>
|
||
<code>KG.hz.TF.01 type => DS18S20</code><br><br>
|
||
<code>get KG.hz.TF.01 temperature</code><br>
|
||
<code>KG.hz.TF.01 temperature => 38.2500 (Celsius)</code>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="OWTEMPattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="OWTHERM"></a>
|
||
<h3>OWTHERM</h3>
|
||
<p>FHEM module to commmunicate with 1-Wire bus digital thermometer devices<br />
|
||
<br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
|
||
(prerequisite: Add this module's name to the list of clients in OWServer).
|
||
Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br />
|
||
</p>
|
||
<h4>Example</h4>
|
||
<p>
|
||
<code>define OWX_T OWTHERM DS18B20 E8D09B030000 300</code>
|
||
<br />
|
||
<code>attr OWX_T tempUnit Kelvin</code>
|
||
<br />
|
||
</p><br />
|
||
<a name="OWTHERMdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWTHERM [<model>] <id> [<interval>]</code> or <br/>
|
||
<code>define <name> OWTHERM <fam>.<id> [<interval>]</code>
|
||
<br /><br /> Define a 1-Wire digital thermometer device.</p>
|
||
<ul>
|
||
<li>
|
||
<code>[<model>]</code><br /> Defines the thermometer model (and thus 1-Wire family
|
||
id) currently the following values are permitted: </p>
|
||
<ul>
|
||
<li>model DS1820 with family id 10 (default if the model parameter is omitted)</li>
|
||
<li>model DS1822 with family id 22</li>
|
||
<li>model DS18B20 with family id 28</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<code><fam></code>
|
||
<br />2-character unique family id, see above </li>
|
||
<li>
|
||
<code><id></code>
|
||
<br />12-character unique ROM id of the thermometer device without family id and CRC
|
||
code
|
||
</li>
|
||
<li>
|
||
<code><interval></code>
|
||
<br /> Temperature measurement interval in seconds. The default is 300 seconds.
|
||
</li>
|
||
</ul>
|
||
<a name="OWTHERMset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owtherm_interval">
|
||
<code>set <name> interval <int></code></a><br /> Temperature
|
||
readout interval in seconds. The default is 300 seconds. <b>Attention:</b>This is the
|
||
readout interval. Whether an actual temperature measurement is performed, is determined by the
|
||
tempConv attribute </li>
|
||
<li><a name="owtherm_tempHigh">
|
||
<code>set <name> tempHigh <float></code></a>
|
||
<br /> The high alarm temperature (on the temperature scale chosen by the attribute
|
||
value) </li>
|
||
<li><a name="owtherm_tempLow">
|
||
<code>set <name> tempLow <float></code></a>
|
||
<br /> The low alarm temperature (on the temperature scale chosen by the attribute
|
||
value) </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWTHERMget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owtherm_id">
|
||
<code>get <name> id</code></a>
|
||
<br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
|
||
<li><a name="owtherm_present">
|
||
<code>get <name> present</code></a>
|
||
<br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
|
||
<li><a name="owtherm_interval2">
|
||
<code>get <name> interval</code></a><br />Returns temperature measurement
|
||
interval in seconds.</li>
|
||
<li><a name="owtherm_temperature">
|
||
<code>get <name> temperature</code></a><br />Obtain the temperature. </li>
|
||
<li><a name="owtherm_alarm">
|
||
<code>get <name> alarm</code></a><br />Obtain the alarm temperature
|
||
values. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWTHERMattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><a name="owtherm_stateAL"><code>attr <name> stateAL <string></code>
|
||
</a>
|
||
<br />character string for denoting low alarm condition, default is down triangle,
|
||
e.g. the code &#x25BE; leading to the sign ▾ </li>
|
||
<li><a name="owtherm_stateAH"><code>attr <name> stateAH <string></code>
|
||
</a>
|
||
<br />character string for denoting high alarm condition, default is upward
|
||
triangle, e.g. the code &#x25B4; leading to the sign ▴ </li>
|
||
<li><a name="owtherm_tempConv">
|
||
<code>attr <name> tempConv onkick|onread</code>
|
||
</a>
|
||
<br /> determines, whether a temperature measurement will happen when "kicked"
|
||
through the OWX backend module (all temperature sensors at the same time), or on
|
||
reading the sensor (1 second waiting time, default). </li>
|
||
<li><a name="owtherm_tempOffset"><code>attr <name> tempOffset <float></code>
|
||
</a>
|
||
<br />temperature offset in °C added to the raw temperature reading. </li>
|
||
<li><a name="owtherm_tempUnit"><code>attr <name> tempUnit
|
||
Celsius|Kelvin|Fahrenheit</code>
|
||
</a>
|
||
<br />unit of measurement (temperature scale), default is Celsius = °C </li>
|
||
<li><a name="owtherm_resolution">
|
||
<code>attr <name> resolution 9|10|11|12</code></a><br /> Temperature
|
||
resolution in bit, only relevant for DS18B20 </li>
|
||
<li><a name="owtherm_interval2">
|
||
<code>attr <name> interval <int></code></a><br /> Temperature
|
||
readout interval in seconds. The default is 300 seconds. <b>Attention:</b>This is the
|
||
readout interval. Whether an actual temperature measurement is performed, is determined by the
|
||
tempConv attribute </li>
|
||
<li><a name="owtherm_tempHigh2">
|
||
<code>attr <name> tempHigh <float></code>
|
||
</a>
|
||
<br /> high alarm temperature (on the temperature scale chosen by the attribute
|
||
value). </li>
|
||
<li><a name="owtherm_tempLow2">
|
||
<code>attr <name> tempLow <float></code>
|
||
</a>
|
||
<br /> low alarm temperature (on the temperature scale chosen by the attribute
|
||
value). </li>
|
||
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#event-on-update-reading">event-on-update-reading</a>, <a
|
||
href="#event-on-change-reading">event-on-change-reading</a>, <a
|
||
href="#stateFormat">stateFormat</a>, <a href="#room"
|
||
>room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
|
||
<a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="OWX"></a>
|
||
<h3>OWX</h3>
|
||
<p> FHEM module to commmunicate with 1-Wire bus devices</p>
|
||
<ul>
|
||
<li>via an active DS2480/DS2482/DS2490/DS9097U bus master interface attached to an USB
|
||
port or </li>
|
||
<li>via a passive DS9097 interface attached to an USB port or</li>
|
||
<li>via a network-attached CUNO or through a COC on the RaspBerry Pi</li>
|
||
<li>via an Arduino running OneWireFirmata attached to USB</li>
|
||
</ul> Internally these interfaces are vastly different, read the corresponding <a
|
||
href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire"> Wiki pages </a>
|
||
<br />
|
||
<br />
|
||
<h4>Example</h4><br />
|
||
<p>
|
||
<code>define OWio1 OWX /dev/ttyUSB1</code>
|
||
<br />
|
||
<code>define OWio2 OWX COC</code>
|
||
<br />
|
||
<code>define OWio3 OWX 10</code>
|
||
<br />
|
||
</p>
|
||
<br />
|
||
<a name="OWXdefine"></a>
|
||
<h4>Define</h4>
|
||
<p>
|
||
<code>define <name> OWX <serial-device></code> or <br />
|
||
<code>define <name> OWX <cuno/coc-device></code> or <br />
|
||
<code>define <name> OWX <arduino-pin></code>
|
||
<br /><br /> Define a 1-Wire interface to communicate with a 1-Wire bus.<br />
|
||
<br />
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code><serial-device></code> The serial device (e.g. USB port) to which the
|
||
1-Wire bus is attached.</li>
|
||
<li>
|
||
<code><cuno-device></code> The previously defined CUNO to which the 1-Wire bus
|
||
is attached. </li>
|
||
<li>
|
||
<code><arduino-pin></code> The pin of the previous defined <a href="#FRM">FRM</a>
|
||
to which the 1-Wire bus is attached. If there is more than one FRM device defined
|
||
use <a href="#IODev">IODev</a> attribute to select which FRM device to use.</li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWXset"></a>
|
||
<h4>Set</h4>
|
||
<ul>
|
||
<li><a name="owx_interval">
|
||
<code>set <name> interval <value></code>
|
||
</a>
|
||
<br /><br /> sets the time period in seconds for "kicking" the 1-Wire bus (default
|
||
is 300 seconds). This means: <ul>
|
||
<li>With 1-Wire bus interfaces that do not supply power to the 1-Wire bus (attr
|
||
buspower parasitic), the 1-Wire bus is reset at these intervals. </li>
|
||
<li>With 1-Wire bus interfaces that supply power to the 1-Wire bus (attr
|
||
buspower = real), all temperature measurement devices on the bus receive the
|
||
command to start a temperature conversion (saves a lot of time when reading) </li>
|
||
<li>With 1-Wire bus interfaces that contain a busmaster chip, the response to a
|
||
reset pulse contains information about alarms.</li>
|
||
</ul><br />
|
||
</li>
|
||
<li><a name="owx_followAlarms">
|
||
<code>set <name> followAlarms on|off</code>
|
||
</a>
|
||
<br /><br /> instructs the module to start an alarm search in case a reset pulse
|
||
discovers any 1-Wire device which has the alarm flag set. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWXget"></a>
|
||
<h4>Get</h4>
|
||
<ul>
|
||
<li><a name="owx_alarms"></a>
|
||
<code>get <name> alarms</code>
|
||
<br /><br /> performs an "alarm search" for devices on the 1-Wire bus and, if found,
|
||
generates an event in the log (not with CUNO). </li>
|
||
<li><a name="owx_devices"></a>
|
||
<code>get <name> devices</code>
|
||
<br /><br /> redicovers all devices on the 1-Wire bus. If a device found has a
|
||
previous definition, this is automatically used. If a device is found but has no
|
||
definition, it is autocreated. If a defined device is not on the 1-Wire bus, it is
|
||
autodeleted. </li>
|
||
</ul>
|
||
<br />
|
||
<a name="OWXattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><a name="OWXbuspower"><code>attr <name> buspower real|parasitic</code></a>
|
||
<br />tells FHEM whether power is supplied to the 1-Wire bus or not.</li>
|
||
<li><code>attr <name> IODev <FRM-device></code>
|
||
<br />assignes a specific FRM-device to OWX. Required only if there is more than one FRM defined.</li>
|
||
<li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
|
||
href="#event-on-update-reading">event-on-update-reading</a>, <a
|
||
href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
|
||
>room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
|
||
<a href="#webCmd">webCmd</a></li>
|
||
</ul>
|
||
|
||
<a name="PCA301"></a>
|
||
<h3>PCA301</h3>
|
||
<ul>
|
||
|
||
<tr><td>
|
||
The PCA301 is a RF controlled AC mains plug with integrated power meter functionality from ELV.<br><br>
|
||
|
||
It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
|
||
|
||
The JeeNode sketch required for this module can be found in .../contrib/arduino/36_PCA301-pcaSerial.zip.<br><br>
|
||
|
||
<a name="PCA301Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> PCA301 <addr> <channel></code> <br>
|
||
<br>
|
||
addr is a 6 digit hex number to identify the PCA301 device.
|
||
channel is a 2 digit hex number to identify the PCA301 device.<br><br>
|
||
Note: devices are autocreated on reception of the first message.<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PCA301_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>on</li>
|
||
<li>off</li>
|
||
<li>identify<br>
|
||
Blink the status led for ~5 seconds.</li>
|
||
<li>reset<br>
|
||
Reset consumption counters</li>
|
||
<li>statusRequest<br>
|
||
Request device status update.</li>
|
||
<li><a href="#setExtensions"> set extensions</a> are supported.</li>
|
||
</ul><br>
|
||
|
||
<a name="PCA301_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
</ul><br>
|
||
|
||
<a name="PCA301_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>power</li>
|
||
<li>consumption</li>
|
||
<li>consumptionTotal<br>
|
||
will be created as a default user reading to have a continous consumption value that is not influenced
|
||
by the regualar reset or overflow of the normal consumption reading</li>
|
||
</ul><br>
|
||
|
||
<a name="PCA301_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>readonly<br>
|
||
if set to a value != 0 all switching commands (on, off, toggle, ...) will be disabled.</li>
|
||
<li>forceOn<br>
|
||
try to switch on the device whenever an off status is received.</li>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="PHTV"></a>
|
||
<h3>PHTV</h3>
|
||
<ul>
|
||
|
||
<a name="PHTVdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> PHTV <ip-address-or-hostname> [<poll-interval>]</code>
|
||
<br><br>
|
||
|
||
This module controls Philips TV devices and their Ambilight.<br><br>
|
||
Defining a PHTV device will schedule an internal task (interval can be set
|
||
with optional parameter <poll-interval> in seconds, if not set, the value is 45
|
||
seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br><br>
|
||
|
||
Example:<br>
|
||
<ul><code>
|
||
define PhilipsTV PHTV 192.168.0.10
|
||
<br><br>
|
||
# With custom interval of 20 seconds<br>
|
||
define PhilipsTV PHTV 192.168.0.10 20
|
||
</code></ul>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
|
||
<a name="PHTVset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <command> [<parameter>]</code>
|
||
<br><br>
|
||
Currently, the following commands are defined.<br>
|
||
<ul>
|
||
<li><b>on</b> - powers on the device and send a WoL magic package if needed</li>
|
||
<li><b>off</b> - turns the device in standby mode</li>
|
||
<li><b>toggle</b> - switch between on and off</li>
|
||
<li><b>channel</b> channel,0...999,sRef - zap to specific channel or service reference</li>
|
||
<li><b>channelUp</b> - zap to next channel</li>
|
||
<li><b>channelDown</b> - zap to previous channel</li>
|
||
<li><b>volume</b> 0...100 - set the volume level in percentage</li>
|
||
<li><b>volumeStraight</b> 1...60 - set the volume level in device specific range</li>
|
||
<li><b>volumeUp</b> - increases the volume level</li>
|
||
<li><b>volumeDown</b> - decreases the volume level</li>
|
||
<li><b>mute</b> on,off,toggle - controls volume mute</li>
|
||
<li><b>input</b> ... - switches between inputs</li>
|
||
<li><b>statusRequest</b> - requests the current status of the device</li>
|
||
<li><b>remoteControl</b> UP,DOWN,... - sends remote control commands; see remoteControl help</li>
|
||
<li><b>ambiHue</b> on,off - activates/disables Ambilight+Hue function</li>
|
||
<li><b>ambiMode</b> internal,manual,expert - set source register for Ambilight</li>
|
||
<li><b>ambiPreset</b> - set Ambilight to predefined state</li>
|
||
<li><b>rgb</b> HEX,LED address - set an RGB value for Ambilight</li>
|
||
<li><b>hue</b> 0-65534 - set the color hue value Ambilight</li>
|
||
<li><b>sat</b> 0-255 - set the saturation value for Ambilight</li>
|
||
<li><b>bri</b> 0-255 - set the brightness value for Ambilight</li>
|
||
<li><b>play</b> - starts/resumes playback</li>
|
||
<li><b>pause</b> - starts/resumes playback</li>
|
||
<li><b>stop</b> - stops current playback</li>
|
||
<li><b>record</b> - starts recording of current channel</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
|
||
<div style="margin-left: 2em">
|
||
<u>Advanced Ambilight Control</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
If you would like to specificly control color for individual sides or even individual LEDs, you may use special addressing to be used with set command 'rgb':<br>
|
||
<br><br>
|
||
LED addressing format:<br>
|
||
<code><Layer$gt;<Side$gt;<LED number$gt;</code>
|
||
<br><br>
|
||
<u>Examples:</u><br>
|
||
<div style="margin-left: 2em">
|
||
<code># set LED 0 on left side within layer 1 to color RED<br>
|
||
set PhilipsTV rgb L1L0:FF0000
|
||
<br><br>
|
||
# set LED 0, 2 and 4 on left side within layer 1 to color RED<br>
|
||
set PhilipsTV rgb L1L0:FF0000 L1L2:FF0000 L1L4:FF0000
|
||
<br><br>
|
||
# set complete right side within layer 1 to color GREEN<br>
|
||
set PhilipsTV rgb L1R:00FF00
|
||
<br><br>
|
||
# set complete layer 1 to color BLUE
|
||
set PhilipsTV rgb L1:0000FF</code>
|
||
</div><br>
|
||
</div>
|
||
</div>
|
||
<br>
|
||
<br>
|
||
|
||
<br>
|
||
<br>
|
||
|
||
<div style="margin-left: 2em">
|
||
<u>Advanced Ambilight+HUE Control</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Linking to your HUE devices within attributes ambiHueLeft, ambiHueTop, ambiHueRight and ambiHueBottom uses some defaults to calculate the actual color.<br>
|
||
The following settings can be fine tuned:<br>
|
||
<br>
|
||
<li>LED(s) to be used as color source<br>
|
||
either 1 single LED or a few in a raw like 2-4. Defaults to use the middle LED and it's left and right partners. Counter starts at 1. See readings ambiLED* for how many LED's your TV has.</li>
|
||
<li>saturation in percent of the original value (1-99, default=100)</li>
|
||
<li>brightness in percent of the original value (1-99, default=100)</li>
|
||
<br><br>
|
||
Use the following addressing format for fine tuning:<br>
|
||
<code>devicename:<LEDs$gt;<saturation$gt;<brightness$gt;</code>
|
||
<br><br>
|
||
<u>Examples:</u><br>
|
||
<div style="margin-left: 2em">
|
||
<code># to use only LED 4 from the top as source<br>
|
||
attr PhilipsTV ambiHueTop HUEDevice0:4
|
||
<br><br>
|
||
# to use a combination of LED's 1+2 as source<br>
|
||
attr PhilipsTV ambiHueTop HUEDevice0:1-2
|
||
<br><br>
|
||
# to use LED's 1+2 and only 90% of their saturation<br>
|
||
attr PhilipsTV ambiHueTop HUEDevice0:1-2:90
|
||
<br><br>
|
||
# to use LED's 1+2 and only 50% of their brightness<br>
|
||
attr PhilipsTV ambiHueTop HUEDevice0:1-2::50
|
||
<br><br>
|
||
# to use LED's 1+2, 90% saturation and 50% brightness<br>
|
||
attr PhilipsTV ambiHueTop HUEDevice0:1-2:90:50
|
||
<br><br>
|
||
# to use default LED settings but only adjust their brightness to 50%<br>
|
||
attr PhilipsTV ambiHueTop HUEDevice0:::50</code>
|
||
</div><br>
|
||
</div>
|
||
</div>
|
||
<br>
|
||
<br>
|
||
|
||
<a name="PHTVget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <what></code>
|
||
<br><br>
|
||
Currently, the following commands are defined:<br><br>
|
||
|
||
<ul><code>channel<br>
|
||
mute<br>
|
||
power<br>
|
||
input<br>
|
||
volume<br>
|
||
rgb<br>
|
||
</code></ul>
|
||
</ul>
|
||
<br>
|
||
<br>
|
||
|
||
<a name="PHTVattr"></a>
|
||
<b>Attributes</b><br>
|
||
<ul><ul>
|
||
<li><b>ambiHueLeft</b> - HUE devices that should get the color from left Ambilight.</li>
|
||
<li><b>ambiHueTop</b> - HUE devices that should get the color from top Ambilight.</li>
|
||
<li><b>ambiHueRight</b> - HUE devices that should get the color from right Ambilight.</li>
|
||
<li><b>ambiHueBottom</b> - HUE devices that should get the color from bottom Ambilight.</li>
|
||
<li><b>ambiHueLatency</b> - Controls the update interval for HUE devices in milliseconds; defaults to 200 ms.</li>
|
||
<li><b>disable</b> - Disable polling (true/false)</li>
|
||
<li><b>inputs</b> - Presents the inputs read from device. Inputs can be renamed by adding <code>,NewName</code> right after the original name.</li>
|
||
<li><b>timeout</b> - Set different polling timeout in seconds (default=7)</li>
|
||
</ul></ul>
|
||
<br>
|
||
<br>
|
||
|
||
<br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<ul><ul>
|
||
<li><b>ambiHue</b> - Ambilight+Hue status</li>
|
||
<li><b>ambiLEDBottom</b> - Number of LEDs of bottom Ambilight</li>
|
||
<li><b>ambiLEDLayers</b> - Number of physical LED layers</li>
|
||
<li><b>ambiLEDLeft</b> - Number of LEDs of left Ambilight</li>
|
||
<li><b>ambiLEDRight</b> - Number of LEDs of right Ambilight</li>
|
||
<li><b>ambiLEDTop</b> - Number of LEDs of top Ambilight</li>
|
||
<li><b>ambiMode</b> - current Ambilight color source</li>
|
||
<li><b>channel</b> - Shows the service name of current channel; part of FHEM-4-AV-Devices compatibility</li>
|
||
<li><b>country</b> - Set country</li>
|
||
<li><b>currentMedia</b> - The preset number of this channel; part of FHEM-4-AV-Devices compatibility</li>
|
||
<li><b>frequency</b> - Shows current channels frequency</li>
|
||
<li><b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility</li>
|
||
<li><b>language</b> - Set menu language</li>
|
||
<li><b>model</b> - Device model</li>
|
||
<li><b>mute</b> - Reports the mute status of the device (can be "on" or "off")</li>
|
||
<li><b>onid</b> - The ON ID</li>
|
||
<li><b>power</b> - Reports the power status of the device (can be "on" or "off")</li>
|
||
<li><b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is basically limited to turn it on again. This will only work if the device supports Wake-On-LAN packages, otherwise command "on" will have no effect.</li>
|
||
<li><b>receiveMode</b> - Receiving mode (analog or DVB)</li>
|
||
<li><b>rgb</b> - Current Ambilight color if ambiMode is not set to internal and all LEDs have the same color</li>
|
||
<li><b>rgb_X</b> - Current Ambilight color of a specific LED if ambiMode is not set to internal</li>
|
||
<li><b>serialnumber</b> - Device serial number</li>
|
||
<li><b>servicename</b> - Name for current channel</li>
|
||
<li><b>sid</b> - The S-ID</li>
|
||
<li><b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")</li>
|
||
<li><b>systemname</b> - Device system name</li>
|
||
<li><b>tsid</b> - The TS ID</li>
|
||
<li><b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)</li>
|
||
<li><b>volumeStraight</b> - Reports current volume level of the receiver in device specific range</li>
|
||
</ul></ul>
|
||
|
||
</ul>
|
||
|
||
<a name="PID"></a>
|
||
<h3>PID</h3>
|
||
<ul>
|
||
The PID device is a loop controller, used to set the value e.g of a heating
|
||
valve dependent of the current and desired temperature.
|
||
<br>
|
||
<br>
|
||
|
||
<a name="PIDdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> PID sensor[:reading:regexp] actor[:cmd:min:max] [p i d]</code>
|
||
<br><br>
|
||
|
||
<code>sensor[:reading:regexp]</code> specifies the sensor, which is an
|
||
already defined fhem device, e.g. a S300TH temperature sensor. The reading
|
||
and regexp fields are necessary only for unknown devices (currently <a
|
||
href="#CUL_WS">CUL_WS</a> and <a href="#HMS">HMS</a> devices are "known").
|
||
Reading specifies the READINGS field of the sensor, and the regexp extracts
|
||
the number from this field. E.g. for the complete definition for a CUL_WS
|
||
device is: <code>s300th_dev:temperature:([\d\.]*)</code>
|
||
<br><br>
|
||
|
||
<code>actor[:cmd:min:max]</code> specifies the actor, which is an
|
||
already defined fhem device, e.g. an FHT8V valve. The cmd, min and max
|
||
fields are necessary only for unknown devices (currently <a
|
||
href="#FHT8V">FHT8V</a> is "known"). cmd specifies the command name for the
|
||
actor, min the minimum value and max the maximum value. The complete
|
||
definition for an FHT8V device is:<code>fht8v_dev:valve:0:100</code>
|
||
<br><br>
|
||
|
||
p, i and d are the parameters use to controlling, see also the <a
|
||
href="http://de.wikipedia.org/wiki/Regler">this</a> wikipedia entry.
|
||
The default values are around 25.5, 3 and 5.88, you probably need to tune
|
||
these values. They can be also changed later.
|
||
<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define wz_pid PID wz_th wz_fht8v</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PIDset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li>set <name> factors p i d<br>
|
||
Set the p, i and d factors, as described above.
|
||
</li>
|
||
<li>set <name> desired <value><br>
|
||
Set the desired value (e.g. temperature). Note: until this value is not
|
||
set, no command is issued.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PIDget"></a>
|
||
<b>Get </b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PIDattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<a name="roundValveValue"></a>
|
||
<li>roundValveValue<br>
|
||
round the valve value to an integer, of the attribute is set to 1.
|
||
The valve value is automatically rounded, if the attribtue is not set,
|
||
and the difference between min and max is greater than 100.
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
|
||
<a name="PID20"></a>
|
||
<h3>PID20</h3>
|
||
<ul>
|
||
|
||
<a name="PID20define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<br/>
|
||
<code>define <name> PID20 <sensor[:reading[:regexp]]> <actor:cmd ></code>
|
||
<br/><br/>
|
||
This module provides a PID device, using <sensor> and <actor><br/>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="PID20set"></a>
|
||
<b>Set-Commands</b><br/>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>set <name> desired <value></code>
|
||
<br/><br/>
|
||
<ul>Set desired value for PID</ul>
|
||
<br/>
|
||
|
||
<br/>
|
||
<code>set <name> start</code>
|
||
<br/><br/>
|
||
<ul>Start PID processing again, using frozen values from former stop.</ul>
|
||
<br/>
|
||
|
||
<br/>
|
||
<code>set <name> stop</code>
|
||
<br/><br/>
|
||
<ul>PID stops processing, freezing all values.</ul>
|
||
<br/>
|
||
|
||
<br/>
|
||
<code>set <name> restart <value></code>
|
||
<br/><br/>
|
||
<ul>Same as start, but uses value as start value for actor</ul>
|
||
<br/>
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="PID20get"></a>
|
||
<b>Get-Commands</b><br/>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>get <name> params</code>
|
||
<br/><br/>
|
||
<ul>Get list containing current parameters.</ul>
|
||
<br/>
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="PID20attr"></a>
|
||
<b>Attributes</b><br/><br/>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<br/>
|
||
<li><b>disable</b> - disable the PID device, possible values: 0,1; default: 0</li>
|
||
<li><b>pidActorValueDecPlaces</b> - number of demicals, possible values: 0..5; default: 0</li>
|
||
<li><b>pidActorInterval</b> - number of seconds to wait between to commands sent to actor; default: 180</li>
|
||
<li><b>pidActorTreshold</b> - threshold to be reached before command will be sent to actor; default: 1</li>
|
||
<li><b>pidActorErrorAction</b> - required action on error, possible values: freeze,errorPos; default: freeze</li>
|
||
<li><b>pidActorErrorPos</b> - actor's position to be used in case of error; default: 0</li>
|
||
<li><b>pidActorKeepAlive</b> - number of seconds to force command to be sent to actor; default: 1800</li>
|
||
<li><b>pidActorLimitLower</b> - lower limit for actor; default: 0</li>
|
||
<li><b>pidActorLimitUpper</b> - upper limit for actor; default: 100</li>
|
||
<li><b>pidCalcInterval</b> - interval (seconds) to calculate new pid values; default: 60</li>
|
||
<li><b>pidDeltaTreshold</b> - if delta < delta-threshold the pid will enter idle state; default: 0</li>
|
||
<li><b>pidDesiredName</b> - reading's name for desired value; default: desired</li>
|
||
<li><b>pidFactor_P</b> - P value for PID; default: 25</li>
|
||
<li><b>pidFactor_I</b> - I value for PID; default: 0.25</li>
|
||
<li><b>pidFactor_D</b> - D value for PID; default: 0</li>
|
||
<li><b>pidMeasuredName</b> - reading's name for measured value; default: measured</li>
|
||
<li><b>pidSensorTimeout</b> - number of seconds to wait before sensor will be recognized n/a; default: 3600</li>
|
||
<li><b>pidReverseAction</b> - reverse PID operation mode, possible values: 0,1; default: 0</li>
|
||
<li><b>pidUpdateInterval</b> - number of seconds to wait before an update will be forced for plotting; default: 300</li>
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Generated Readings/Events:</b>
|
||
<br/><br/>
|
||
<ul>
|
||
<li><b>actuation</b> - real actuation set to actor</li>
|
||
<li><b>actuationCalc</b> - internal actuation calculated without limits</li>
|
||
<li><b>delta</b> - current difference desired - measured</li>
|
||
<li><b>desired</b> - desired value</li>
|
||
<li><b>measured</b> - measured value</li>
|
||
<li><b>p_p</b> - p value of pid calculation</li>
|
||
<li><b>p_i</b> - i value of pid calculation</li>
|
||
<li><b>p_d</b> - d value of pid calculation</li>
|
||
<li><b>state</b> - current device state</li>
|
||
<br/>
|
||
Names for desired and measured readings can be changed by corresponding attributes (see above).<br/>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Additional informations</b><br/><br/>
|
||
<ul>
|
||
<li><a href="http://forum.fhem.de/index.php/topic,17067.0.html">Discussion in FHEM forum</a></li><br/>
|
||
<li><a href="http://www.fhemwiki.de/wiki/PID20_-_Der_PID-Regler">WIKI information in FHEM wiki</a></li><br/>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="PIFACE"></a>
|
||
<h3>PIFACE</h3>
|
||
<ul>
|
||
The PIFACE module managed the <a href=http://www.raspberrypi.org/>Raspberry Pi</a> extension board <a href=http://www.piface.org.uk/products/piface_digital/>PiFace Digital</a>.<br>
|
||
PIFACE controls the input ports 0..7 and output ports 0..7.
|
||
<ul>
|
||
<li>The relays 0 and 1 have corresponding output port 0 and 1.</li>
|
||
<li>The switches 0..3 have corresponding input ports 0..3 and must be read with attr portMode<0..7> = up</li>
|
||
</ul>
|
||
The status of the ports can be displayed periodically. The update of the states via interrupt is not supported.<br>
|
||
The module can be periodically monitored by a watchdog function.<br>
|
||
The ports can be read and controlled individually by the function <a href="#readingsProxy">readingsProxy</a>.<br>
|
||
PIFACE is tested with the Raspbian OS.<br><br>
|
||
|
||
<b>Preparatory Work</b><br>
|
||
The use of PIFACE module requires some preparatory work.
|
||
<ul>
|
||
<br>
|
||
<li>Module needs tools from <a href=http://wiringpi.com>Wiring Pi</a>. Install it with<br>
|
||
<code>git clone git://git.drogon.net/wiringPi<br>
|
||
cd wiringPi<br>
|
||
./build</code><br>
|
||
</li>
|
||
<li>PiFace Digital need the SPI pins on the Raspberry Pi to be enabled in order to function.
|
||
Start <code>sudo raspi-config</code>, select <code>Option 8 Advanced Options</code>
|
||
and set the <code>A5 SPI</code> option to "Yes".
|
||
</li>
|
||
<li>The function of the PiFace Digital can be tested at OS command line. For example:<br>
|
||
<code>gpio -p readall</code><br>
|
||
<code>gpio -p read 200</code><br>
|
||
<code>gpio -p write 201 0</code> or <code>gpio -p write 201 1</code><br>
|
||
</li>
|
||
<li>The watchdog function monitors the input port 7 and the output port 7.<br>
|
||
If the watchdog is enabled, this ports can not be used for other tasks.
|
||
In order to monitor the input port 7, it must be connected to the ground!<br>
|
||
The OS command "shutdown" must be enable for fhem if an OS restart is to
|
||
be executed in case of malfunction. For example, with <code>chmod +s /sbin/shutdown</code>
|
||
or <code>sudo chmod +s /sbin/shutdown</code>.<br>
|
||
</li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PIFACEdefine"></a>
|
||
<b>Define</b>
|
||
<ul><br>
|
||
<code>define <name> PIFACE</code><br>
|
||
</ul><br>
|
||
|
||
<a name="PIFACEset"></a>
|
||
<b>Set</b><br/>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>set <name> <port> <value></code>
|
||
<br/><br/>
|
||
<ul>
|
||
<li>set single port n to 1 (on) or 0 (off)<br/><br/>
|
||
Examples:<br/>
|
||
set <name> 3 1 => set port 3 on<br/>
|
||
set <name> 5 0 => set port 5 off<br/></li>
|
||
<br/>
|
||
<li>set all ports in one command by bitmask<br/><br/>
|
||
Example:<br/>
|
||
set <name> all 255 => set all ports on<br/>
|
||
set <name> all 0 => set all ports off<br/>
|
||
set <name> all 170 => bitmask(170) = 10101010 => set ports 1 3 5 7 on, ports 0 2 4 6 off<br/>
|
||
<br/>
|
||
<ul>
|
||
<code>port 76543210<br/>
|
||
bit 10101010</code>
|
||
</ul></li>
|
||
</ul>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PIFACEget"></a>
|
||
<b>Get</b><br/>
|
||
<ul>
|
||
|
||
<br/>
|
||
<code>get <name> <port></code>
|
||
<br/><br/>
|
||
<ul>
|
||
<li>get state of single port<br/><br/>
|
||
Example:<br/>
|
||
get <name> 3 => get state of port 3<br/>
|
||
</li>
|
||
<br/>
|
||
<li>get state of input ports and update changed readings<br/><br/>
|
||
Example:<br/>
|
||
get <name> in => get state of all input ports<br/>
|
||
</li>
|
||
<br/>
|
||
<li>get state of out ports and update changed readings<br/><br/>
|
||
Example:<br/>
|
||
get <name> out => get state of all output ports<br/>
|
||
</li>
|
||
<br/>
|
||
<li>get state of input and out ports and update all readings<br/><br/>
|
||
Example:<br/>
|
||
get <name> all => get state of all ports<br/>
|
||
</li>
|
||
</ul>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PIFACEattr"></a>
|
||
<b>Attributes</b><br/><br/>
|
||
<ul>
|
||
<li><a name="PIFACE_defaultState">defaultState</a> last|off|0|1,
|
||
[defaultState] = off is default.<br>
|
||
Restoration of the status of the output port after a Fhem reboot.
|
||
</li>
|
||
<li><a href="#PIFACE_disable">disable</a> 0|1<br>
|
||
If applied set commands will not be executed.
|
||
</li>
|
||
<li><a href="#PIFACE_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
|
||
Space separated list of HH:MM tupels. If the current time is between
|
||
the two time specifications, set commands will not be executed. Instead of
|
||
HH:MM you can also specify HH or HH:MM:SS. To specify an interval
|
||
spawning midnight, you have to specify two intervals, e.g.:
|
||
<ul>
|
||
23:00-24:00 00:00-01:00
|
||
</ul>
|
||
</li>
|
||
<li><a name="PIFACE_pollInterval">pollInterval</a> off|1,2,...,9,10,
|
||
[pollInterval] = off is default.<br>
|
||
Define the polling interval of the input ports in seconds.
|
||
</li>
|
||
<li><a name="PIFACE_portMode<0..7>">portMode<0..7></a> tri|up,
|
||
[portMode<0..7>] = tri is default.<br>
|
||
This enables (up) or disables (tri) the internal pull-up resistor on the given input port.
|
||
You need to enable the pull-up if you want to read any of the on-board switches on the PiFace board.
|
||
</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li><a name="PIFACE_watchdog">watchdog</a> off|on|silent,
|
||
[watchdog] = off is default.<br>
|
||
The function of the PiFace extension can be monitored periodically.
|
||
The watchdog module checks the function of ports in7 and out7.
|
||
If the watchdog function is to be used, ports in7 and out7 are reserved for this purpose.
|
||
The port 7 must be connected to ground.<br>
|
||
If [watchdog] = on, the result of which is periodically logged and written to the reading watchdog.<br>
|
||
If [watchdog] = silent, FHEM is restarted after the first error detected.
|
||
If the error could not be eliminated, then the Raspberry operating system is restarted.
|
||
If the error is not corrected as well, the monitoring function is disabled and the error is logged.
|
||
</li>
|
||
<li><a name="PIFACE_watchdogInterval">watchdogInterval</a> 10..65535,
|
||
[watchdogInterval] = 60 is default.<br>
|
||
Interval between two monitoring tests in seconds.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Generated Readings/Events:</b>
|
||
<br/><br/>
|
||
<ul>
|
||
<li><out0..out7>: 0|1<br>
|
||
state of output port 0..7</li>
|
||
<li><in0..in7>: 0|1<br>
|
||
state of input port 0..7</li>
|
||
<li>watchdog: off|ok|error|restart|start<br>
|
||
state of the watchdog function</li>
|
||
<li>state: active|error</li><br>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="POKEYS"></a>
|
||
<h3>POKEYS</h3>
|
||
<ul>
|
||
The POKEYS module is used to control the LAN POKEYS device (<a href="http://www.poscope.com/pokeys56e">POKEYS56e</a>) which supports
|
||
up to 56 digital input, analog inputs, counter inputs and digital outputs.
|
||
Each port/pin has to be configured before it can be used.
|
||
|
||
<br>
|
||
<br>
|
||
<a name="POKEYSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> POKEYS <ip-address> <pin> <io-state> [<time in ms>]</code> <br>
|
||
<br>
|
||
<code><ip-address></code> the IP address where the POKEYS device can be accessed<br>
|
||
<code><pin></code> the pin number which should be configured<br>
|
||
<code><io-state></code> the new io state of the pin <code>Obsolete(=undef) DigIn DigOut AdcIn DigInCtRise DigInCtFall ExtDigOut GetBasic </code> <br>
|
||
<code><time in ms></code> optional else 1000ms: cyclic update time for Input pin <br>
|
||
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define PoInfo POKEYS 192.168.178.34 0 GetBasic</code><br>
|
||
# creates a virtual pin for getting infos about the device with the <code>get</code> command<br>
|
||
<code>define Pin44in POKEYS 192.168.178.34 44 DigIn 200</code><br>
|
||
# creates a digitial input port on pin 44<br>
|
||
<code>define Pin25out POKEYS 192.168.178.34 25 DigOut</code><br>
|
||
# creates a digial output port on pin 25<br>
|
||
</ul>
|
||
</ul> <br>
|
||
|
||
<a name="POKEYSset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <state> [<time in ms>]</code> <br>
|
||
<br>
|
||
<code><state></code> can be <code>OFF ON OFF_PULSE ON_PULSE </code><br>
|
||
<code><time in ms></code> optional else 1000ms hold time for the <code>ON_PULSE OFF_PULSE</code> state<br>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>set Pin25out ON</code><br>
|
||
# sets Pin25out to ON (0V)<br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="POKEYSget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <type> </code> <br>
|
||
<br>
|
||
only supported for pins of type <code>GetBasic</code><br>
|
||
<code><type></code> can be <code>Version DevName Serial User CPUload</code><br>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>get PoInfo Version</code><br>
|
||
# gets the version of the POKEYS device<br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="POKEYSattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
todo <br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="PRESENCE"></a>
|
||
<h3>PRESENCE</h3>
|
||
<ul>
|
||
<tr><td>
|
||
The PRESENCE module provides several possibilities to check the presence of mobile phones or similar mobile devices such as tablets.
|
||
<br><br>
|
||
This module provides several operational modes to serve your needs. These are:<br><br>
|
||
<ul>
|
||
<li><b>lan-ping</b> - A presence check of a device via network ping in your LAN/WLAN</li>
|
||
<li><b>fritzbox</b> - A presence check by requesting the device state from the FritzBox internals (only available when running FHEM on a FritzBox!)</li>
|
||
<li><b>local-bluetooth</b> - A presence check by searching directly for a given bluetooth device nearby</li>
|
||
<li><b>function</b> - A presence check by using your own perl function which returns a presence state</li>
|
||
<li><b>shellscript</b> - A presence check by using an self-written script or binary which returns a presence state</li>
|
||
<li><b>lan-bluetooth</b> - A presence check of a bluetooth device via LAN network by connecting to a presenced or collectord instance</li>
|
||
</ul>
|
||
<br>
|
||
Each mode can be optionally configured with a specific check interval and a present check interval.<br><br>
|
||
<ul>
|
||
<li>check-interval - The interval in seconds between each presence check. Default value: 30 seconds</li>
|
||
<li>present-check-interval - The interval in seconds between each presence check in case the device is <i>present</i>. Otherwise the normal check-interval will be used.</li>
|
||
</ul>
|
||
<br><br>
|
||
<a name="PRESENCEdefine"></a>
|
||
<b>Define</b><br><br>
|
||
<ul><b>Mode: lan-ping</b><br><br>
|
||
<code>define <name> PRESENCE lan-ping <ip-address> [ <check-interval> [ <present-check-interval> ] ]</code><br>
|
||
<br>
|
||
Checks for a network device via PING requests and reports its presence state.<br><br>
|
||
<u>Example</u><br><br>
|
||
<code>define iPhone PRESENCE lan-ping 192.168.179.21</code><br>
|
||
<br>
|
||
<b>Mode: fritzbox</b><br><br>
|
||
<code>define <name> PRESENCE fritzbox <device-name> [ <check-interval> [ <present-check-interval> ] ]</code><br>
|
||
<br>
|
||
Checks for a network device by requesting the internal state on a FritzBox via ctlmgr_ctl. The device-name must be the same as shown in the network overview of the FritzBox<br><br>
|
||
<i>This check is only applicaple when FHEM is running on a FritzBox!</i><br><br>
|
||
<u>Example</u><br><br>
|
||
<code>define iPhone PRESENCE fritzbox iPhone-4S</code><br><br>
|
||
<b>Mode: local-bluetooth</b><br><br>
|
||
<code>define <name> PRESENCE local-bluetooth <bluetooth-address> [ <check-interval> [ <present-check-interval> ] ]</code><br>
|
||
<br>
|
||
Checks for a bluetooth device and reports its presence state. For this mode the shell command "hcitool" is required (provided with a <a href="http://www.bluez.org" target="_new">bluez</a> installation under Debian via APT), as well
|
||
as a functional bluetooth device directly attached to your machine.<br><br>
|
||
<u>Example</u><br><br>
|
||
<code>define iPhone PRESENCE local-bluetooth 0a:8d:4f:51:3c:8f</code><br><br>
|
||
<b>Mode: function</b><br><br>
|
||
<code>define <name> PRESENCE function {...} [ <check-interval> [ <present-check-interval> ] ]</code><br>
|
||
<br>
|
||
Checks for a presence state via perl-code. You can use a self-written perl function to obtain the presence state of a specific device (e.g. via SNMP check).<br><br>
|
||
The function must return 0 (absent) or 1 (present). An example can be found in the <a href="http://www.fhemwiki.de/wiki/Anwesenheitserkennung" target="_new">FHEM-Wiki</a>.<br><br>
|
||
<u>Example</u><br><br>
|
||
<code>define iPhone PRESENCE function {snmpCheck("10.0.1.1","0x44d77429f35c")}</code><br><br>
|
||
<b>Mode: shellscript</b><br><br>
|
||
<code>define <name> PRESENCE shellscript "<path> [<arg1>] [<argN>]..." [ <check-interval> [ <present-check-interval> ] ]</code><br>
|
||
<br>
|
||
Checks for a presence state via shell script. You can use a self-written script or binary in any language to obtain the presence state of a specific device (e.g. via SNMP check).<br><br>
|
||
The shell must return 0 (absent) or 1 (present) on <u>console (STDOUT)</u>. Any other values will be treated as an error<br><br>
|
||
<u>Example</u><br><br>
|
||
<code>define iPhone PRESENCE shellscript "/opt/check_device.sh iPhone"</code><br><br>
|
||
<b>Mode: lan-bluetooth</b><br><br>
|
||
Checks for a bluetooth device with the help of presenced or collectord. They can be installed where-ever you like, just must be accessible via network.
|
||
The given device will be checked for presence status.<br>
|
||
<br>
|
||
<code>define <name> PRESENCE lan-bluetooth <bluetooth-address> <ip-address>[:port] [ <check-interval> ]</code><br>
|
||
<br>
|
||
The default port is 5111 (presenced). Alternatly you can use port 5222 (collectord)<br>
|
||
<br>
|
||
<u>Example</u><br><br>
|
||
<code>define iPhone PRESENCE lan-bluetooth 0a:4f:36:d8:f9:89 127.0.0.1:5222</code><br><br>
|
||
<u>presenced</u><br><br>
|
||
<ul>The presence is a perl network daemon, which provides presence checks of multiple bluetooth devices over network.
|
||
It listens on TCP port 5111 for incoming connections from a FHEM PRESENCE instance or a running collectord.<br>
|
||
<PRE>
|
||
Usage:
|
||
presenced -d [-p <port>] [-P <filename>]
|
||
presenced [-h | --help]
|
||
|
||
|
||
Options:
|
||
-p, --port
|
||
TCP Port which should be used (Default: 5111)
|
||
-P, --pid-file
|
||
PID file for storing the local process id (Default: /var/run/presenced.pid)
|
||
-d, --daemon
|
||
detach from terminal and run as background daemon
|
||
-v, --verbose
|
||
Print detailed log output
|
||
-h, --help
|
||
Print detailed help screen
|
||
</PRE>
|
||
|
||
It uses the hcitool command (provided by a <a href="http://www.bluez.org" target="_new">bluez</a> installation)
|
||
to make a paging request to the given bluetooth address (like 01:B4:5E:AD:F6:D3). The devices must not be visible, but
|
||
still activated to receive bluetooth requests.<br><br>
|
||
|
||
If a device is present, this is send to FHEM, as well as the device name as reading.<br><br>
|
||
|
||
The presenced is available as:<br><br>
|
||
<ul>
|
||
<li>direct perl script file: <a href="http://svn.code.sf.net/p/fhem/code/trunk/fhem/contrib/PRESENCE/presenced" target="_new">presenced</a></li>
|
||
<li>.deb package for Debian (noarch): <a href="http://svn.code.sf.net/p/fhem/code/trunk/fhem/contrib/PRESENCE/deb/presenced-1.3.deb" target="_new">presenced-1.3.deb</a></li>
|
||
<li>.deb package for Raspberry Pi (raspbian): <a href="http://svn.code.sf.net/p/fhem/code/trunk/fhem/contrib/PRESENCE/deb/presenced-rpi-1.3.deb" target="_new">presenced-rpi-1.3.deb</a></li>
|
||
</ul>
|
||
</ul><br><br>
|
||
<u>collectord</u><br><br>
|
||
<ul>
|
||
The collectord is a perl network daemon, which handles connections to several presenced installations to search for multiple bluetooth devices over network.<br><br>
|
||
|
||
It listens on TCP port 5222 for incoming connections from a FHEM presence instance.
|
||
<PRE>
|
||
Usage:
|
||
collectord -c <configfile> [-d] [-p <port>] [-P <pidfile>]
|
||
collectord [-h | --help]
|
||
|
||
|
||
Options:
|
||
-c, --configfile <configfile>
|
||
The config file which contains the room and timeout definitions
|
||
-p, --port
|
||
TCP Port which should be used (Default: 5222)
|
||
-P, --pid-file
|
||
PID file for storing the local process id (Default: /var/run/collectord.pid)
|
||
-d, --daemon
|
||
detach from terminal and run as background daemon
|
||
-v, --verbose
|
||
Print detailed log output
|
||
-l, --logfile <logfile>
|
||
log to the given logfile
|
||
-h, --help
|
||
Print detailed help screen
|
||
</PRE>
|
||
Before the collectord can be used, it needs a config file, where all different rooms, which have a presenced detector, will be listed. This config file looks like:
|
||
<br><br>
|
||
<PRE>
|
||
# room definition
|
||
# ===============
|
||
#
|
||
[room-name] # name of the room
|
||
address=192.168.0.10 # ip-address or hostname
|
||
port=5111 # tcp port which should be used (5111 is default)
|
||
presence_timeout=120 # timeout in seconds for each check when devices are present
|
||
absence_timeout=20 # timeout in seconds for each check when devices are absent
|
||
|
||
[living room]
|
||
address=192.168.0.11
|
||
port=5111
|
||
presence_timeout=180
|
||
absence_timeout=20
|
||
</PRE>
|
||
|
||
If a device is present in any of the configured rooms, this is send to FHEM, as well as the device name as reading and the room which has detected the device.<br><br>
|
||
|
||
The collectord is available as:<br><br>
|
||
|
||
<ul>
|
||
<li>direct perl script file: <a href="http://svn.code.sf.net/p/fhem/code/trunk/fhem/contrib/PRESENCE/collectord" target="_new">collectord</a></li>
|
||
<li>.deb package for Debian (noarch): <a href="http://svn.code.sf.net/p/fhem/code/trunk/fhem/contrib/PRESENCE/deb/collectord-1.4.deb" target="_new">collectord-1.4.deb</a></li>
|
||
</ul>
|
||
</ul><br><br>
|
||
|
||
</ul>
|
||
<br>
|
||
<a name="PRESENCEset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><b>statusRequest</b> - Schedules an immediatly check.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PRESENCEget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PRESENCEattr"></a>
|
||
<b>Attributes</b><br><br>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||
<li><a>disable</a></li>
|
||
If this attribute is activated, an active check will be disabled.<br><br>
|
||
Possible values: 0 => not disabled , 1 => disabled<br>
|
||
Default Value is 0 (not disabled)<br><br>
|
||
<li><a>ping_count</a></li> (Only in Mode "ping" on non-Windows machines applicable)<br>
|
||
Changes the count of the used ping packets to recognize a present state. Depending on your network performance sometimes a packet can be lost or blocked.<br><br>
|
||
Default Value is 4 (packets)<br><br>
|
||
<li><a>fritzbox_repeater</a></li> (Only in Mode "fritzbox" applicable)<br>
|
||
If your FritzBox is part of a network using repeaters, than this attribute needs to be enabled to ensure a correct recognition for devices, which are connected via repeater.
|
||
<br><br>
|
||
This attribute is also needed, if your network device has no speed information on the FritzBox website (Home Network).<br><br>
|
||
<b>BE AWARE: The recognition of device going absent in a repeated network can take about 15 - 20 minutes!!</b>
|
||
<br><br>
|
||
Possible values: 0 => Use default recognition, 1 => Use repeater-supported recognition<br>
|
||
Default Value is 0 (Use default recognition)
|
||
|
||
<br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PRESENCEevents"></a>
|
||
<b>Generated Events:</b><br><br>
|
||
<ul>
|
||
<u>General Events:</u><br><br>
|
||
<ul>
|
||
<li><b>state</b>: $state (absent|present|disabled) - The state of the device or "disabled" when the disable attribute is enabled</li>
|
||
</ul><br><br>
|
||
<u>Bluetooth specific events:</u><br><br>
|
||
<ul>
|
||
<li><b>device_name</b>: $name - The name of the Bluetooth device in case it's present</li>
|
||
</ul><br><br>
|
||
<u>presenced/collectord specific events:</u><br><br>
|
||
<ul>
|
||
<li><b>command_accepted</b>: $command_accepted (yes|no) - Was the last command acknowleged and accepted by the presenced or collectord?</li>
|
||
<li><b>room</b>: $room - If the module is connected with a collector daemon this event shows the room, where the device is located (as defined in the collectord config file)</li>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="PachLog"></a>
|
||
<h3>PachLog</h3>
|
||
<ul>
|
||
The PachLog-Module Logs SensorData like (temperature and humidity) to <a href=http://www.pachube.com>www.pachube.com</a>.
|
||
<br><br>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br><br>
|
||
<a name="PachLogdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<br><code>define <name> PachLog <Pachube-API-Key></code> <br>
|
||
<br>
|
||
<Pachube-API-Key>:<br>
|
||
The Pachube-API-Key however is what you need in your code to authenticate your application's access the Pachube service.<br>
|
||
Don't share this with anyone: it's just like any other password.<br>
|
||
<a href=http://www.pachube.com>www.pachube.com</a><br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PachLogset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<br>
|
||
Add a new Device for Logging to www.pachube.com<br><br>
|
||
<code>set <NAME> ADD <FHEM-DEVICENAME> FEED-NR:ID:READING:ID:READING</code><br><br>
|
||
Example: KS300-Weather-Data<br><br>
|
||
READINGS: temperature humidity wind rain<br><br>
|
||
1. Generate Input-Feed on www.pachube.com => Yout get your FEED-NR: 1234<br>
|
||
2. Add Datastreams to the Feed:<br>
|
||
<ul>
|
||
<table>
|
||
<tr><td>ID</td><td>0</td><td>temperature</td></tr>
|
||
<tr><td>ID</td><td>1</td><td>humidity</td></tr>
|
||
<tr><td>ID</td><td>2</td><td>wind</td></tr>
|
||
<tr><td>ID</td><td>3</td><td>rain</td></tr></table><br>
|
||
</ul>
|
||
3. Add the KS300 to your PachLog-Device<br><br>
|
||
<code>set <NAME> ADD <My-KS300> 1234:0temperature:1:humidity:2:wind:3:rain</code><br><br>
|
||
Delete a Device form Logging to www.pachube.com<br><br>
|
||
<code>set <NAME> DEL <FHEM-DEVICENAME></code><br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="PachLogget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="PachLogattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li>disable<br>
|
||
Disables PachLog.
|
||
Nor more Logging to www.pachube.com
|
||
</li>
|
||
</ul><br>
|
||
|
||
|
||
</ul>
|
||
|
||
<a name="Pushover"></a>
|
||
<h3>Pushover</h3>
|
||
<ul>
|
||
Pushover is a service to receive instant push notifications on your
|
||
phone or tablet from a variety of sources.<br>
|
||
You need an account to use this module.<br>
|
||
For further information about the service see <a href="https://pushover.net">pushover.net</a>.<br>
|
||
<br>
|
||
Discuss the module <a href="http://forum.fhem.de/index.php/topic,16215.0.html">here</a>.<br>
|
||
<br>
|
||
<br>
|
||
<a name="PushoverDefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Pushover <token> <user></code><br>
|
||
<br>
|
||
You have to create an account to get the user key.<br>
|
||
And you have to create an application to get the API token.<br>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define Pushover1 Pushover 01234 56789</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<a name="PushoverSet"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> msg <title> <msg> <device> <priority> <sound> [<retry> <expire>]</code>
|
||
<br>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>set Pushover1 msg 'Titel' 'This is a text.' '' 0 ''</code><br>
|
||
<code>set Pushover1 msg 'Emergency' 'Security issue in living room.' '' 2 'siren' 30 3600</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>If device is empty, the message will be sent to all devices.
|
||
</li>
|
||
<li>If sound is empty, the default setting in the app will be used.
|
||
</li>
|
||
<li>If priority is higher or equal 2, retry and expire must be defined.
|
||
</li>
|
||
<li>For further documentation of these parameters have a look at the <a href="https://pushover.net/api">Pushover API</a>.
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
<a name="PushoverAttr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="timestamp"></a>
|
||
<li>timestamp<br>
|
||
Send the unix timestamp with each message.
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
<a name="PushoverEvents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
</ul>
|
||
|
||
<p>
|
||
<a name="RESIDENTS" id="RESIDENTS"></a>
|
||
</p>
|
||
<h3>
|
||
RESIDENTS
|
||
</h3>
|
||
<div style="margin-left: 2em">
|
||
<a name="RESIDENTSdefine" id="RESIDENTSdefine"></a> <b>Define</b>
|
||
<div style="margin-left: 2em">
|
||
<code>define <rgr_ResidentsName> RESIDENTS</code><br>
|
||
<br>
|
||
Provides a special dummy device to represent a group of individuals living at your home.<br>
|
||
It locically combines individual states of <a href="#ROOMMATE">ROOMMATE</a> and <a href="#GUEST">GUEST</a> devices and allows state changes for all members.<br>
|
||
Based on the current state and other readings, you may trigger other actions within FHEM.<br>
|
||
<br>
|
||
Example:<br>
|
||
<div style="margin-left: 2em">
|
||
<code># Standalone<br>
|
||
define rgr_Residents RESIDENTS</code>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="RESIDENTSset" id="RESIDENTSset"></a> <b>Set</b>
|
||
<div style="margin-left: 2em">
|
||
<code>set <rgr_ResidentsName> <command> [<parameter>]</code><br>
|
||
<br>
|
||
Currently, the following commands are defined.<br>
|
||
<ul>
|
||
<li>
|
||
<b>addGuest</b> - creates a new GUEST device and adds it to the current RESIDENTS group. Just enter the dummy name and there you go.
|
||
</li>
|
||
<li>
|
||
<b>addRoommate</b> - creates a new ROOMMATE device and adds it to the current RESIDENTS group. Just enter the first name and there you go.
|
||
</li>
|
||
<li>
|
||
<b>removeGuest</b> - shows all GUEST members and allows to delete their dummy devices easily.
|
||
</li>
|
||
<li>
|
||
<b>removeRoommate</b> - shows all ROOMMATE members and allows to delete their dummy devices easily.
|
||
</li>
|
||
<li>
|
||
<b>state</b> home,gotosleep,asleep,awoken,absent,gone switch between states for all group members at once; see attribute rgr_states to adjust list shown in FHEMWEB
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Possible states and their meaning</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
This module differs between 7 states:<br>
|
||
<br>
|
||
<ul>
|
||
<li>
|
||
<b>home</b> - residents are present at home and at least one of them is not asleep
|
||
</li>
|
||
<li>
|
||
<b>gotosleep</b> - present residents are on their way to bed (if they are not asleep already)
|
||
</li>
|
||
<li>
|
||
<b>asleep</b> - all present residents are currently sleeping
|
||
</li>
|
||
<li>
|
||
<b>awoken</b> - at least one resident just woke up from sleep
|
||
</li>
|
||
<li>
|
||
<b>absent</b> - no resident is currently at home but at least one will be back shortly
|
||
</li>
|
||
<li>
|
||
<b>gone</b> - all residents left home for longer period
|
||
</li>
|
||
<li>
|
||
<b>none</b> - no active member
|
||
</li>
|
||
</ul><br>
|
||
<br>
|
||
Note: State 'none' cannot explicitly be set. Setting state to 'gone' will be handled as 'none' for GUEST member devices.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="RESIDENTSattr" id="RESIDENTSattr"></a> <b>Attributes</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>rgr_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
|
||
</li>
|
||
<li>
|
||
<b>rgr_states</b> - list of states to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces; unsupported states will lead to errors though
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>lastActivity</b> - the last state change of one of the group members
|
||
</li>
|
||
<li>
|
||
<b>lastActivityBy</b> - the realname of the last group member with changed state
|
||
</li>
|
||
<li>
|
||
<b>lastArrival</b> - timestamp of last arrival at home
|
||
</li>
|
||
<li>
|
||
<b>lastAwake</b> - timestamp of last sleep cycle end
|
||
</li>
|
||
<li>
|
||
<b>lastDeparture</b> - timestamp of last departure from home
|
||
</li>
|
||
<li>
|
||
<b>lastDurAbsence</b> - duration of last absence from home in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastDurPresence</b> - duration of last presence at home in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastDurSleep</b> - duration of last sleep in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastSleep</b> - timestamp of last sleep cycle begin
|
||
</li>
|
||
<li>
|
||
<b>lastState</b> - the prior state
|
||
</li>
|
||
<li>
|
||
<b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
|
||
</li>
|
||
<li>
|
||
<b>residentsAbsent</b> - number of residents with state 'absent'
|
||
</li>
|
||
<li>
|
||
<b>residentsAsleep</b> - number of residents with state 'asleep'
|
||
</li>
|
||
<li>
|
||
<b>residentsAwoken</b> - number of residents with state 'awoken'
|
||
</li>
|
||
<li>
|
||
<b>residentsGone</b> - number of residents with state 'gone'
|
||
</li>
|
||
<li>
|
||
<b>residentsGotosleep</b> - number of residents with state 'gotosleep'
|
||
</li>
|
||
<li>
|
||
<b>residentsGuests</b> - number of active guests who are currently treated as part of the residents scope
|
||
</li>
|
||
<li>
|
||
<b>residentsHome</b> - number of residents with state 'home'
|
||
</li>
|
||
<li>
|
||
<b>residentsTotal</b> - total number of all active residents despite their current state
|
||
</li>
|
||
<li>
|
||
<b>residentsTotalAbsent</b> - number of all residents who are currently underway
|
||
</li>
|
||
<li>
|
||
<b>residentsTotalPresent</b> - number of all residents who are currently at home
|
||
</li>
|
||
<li>
|
||
<b>residentsTotalWayhome</b> - number of all active residents who are currently on their way back home
|
||
</li>
|
||
<li>
|
||
<b>state</b> - reflects the current state
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<a name="RFXCOM"></a>
|
||
<h3>RFXCOM</h3>
|
||
<ul>
|
||
<table>
|
||
<tr><td>
|
||
This module is for the old <a href="http://www.rfxcom.com">RFXCOM</a> USB or LAN based 433 Mhz RF receivers and transmitters (order order code 80002 and others). It does not support the new RFXtrx433 transmitter because it uses a different protocol. See <a href="#RFXTRX">RFXTRX</a> for support of the RFXtrx433 transmitter.<br>
|
||
These receivers supports many protocols like Oregon Scientific weather sensors, RFXMeter devices, X10 security and lighting devices and others. <br>
|
||
Currently the following parser modules are implemented: <br>
|
||
<ul>
|
||
<li> 41_OREGON.pm (see device <a href="#OREGON">OREGON</a>): Process messages Oregon Scientific weather sensors.
|
||
See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> of
|
||
Oregon Scientific weather sensors that could be received by the RFXCOM receivers.
|
||
Until now the following Oregon Scientific weather sensors have been tested successfully: BTHR918, BTHR918N, PCR800, RGR918, THGR228N, THGR810, THR128, THWR288A, WTGR800, WGR918. It will probably work with many other Oregon sensors supported by RFXCOM receivers. Please give feedback if you use other sensors.<br>
|
||
</li>
|
||
<li> 42_RFXMETER.pm (see device <a href="#RFXMETER">RFXMETER</a>): Process RFXCOM RFXMeter devices. See <a href="http://www.rfxcom.com/sensors.htm">http://www.rfxcom.com/sensors.htm</a>.</li>
|
||
<li> 43_RFXX10REC.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10 security and X10 lighting devices. </li>
|
||
</ul>
|
||
<br>
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module
|
||
if the devices is connected via USB or a serial port.
|
||
<br><br>
|
||
<a name="RFXCOMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> RFXCOM <device> [noinit] </code><br>
|
||
</ul>
|
||
<br>
|
||
USB-connected (80002):<br><ul>
|
||
<device> specifies the USB port to communicate with the RFXCOM receiver.
|
||
Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
|
||
For example /dev/ttyUSB0.<br>
|
||
<br>
|
||
Example: <br>
|
||
<code>define RFXCOMUSB RFXCOM /dev/ttyUSB0</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
Network-connected devices:
|
||
<br><ul>
|
||
<device> specifies the host:port of the device. E.g.
|
||
192.168.1.5:10001
|
||
</ul>
|
||
<ul>
|
||
noninit is optional and issues that the RFXCOM device should not be
|
||
initialized. This is useful if you share a RFXCOM device. It is also useful
|
||
for testing to simulate a RFXCOM receiver via netcat or via FHEM2FHEM.
|
||
<br>
|
||
<br>
|
||
Example: <br>
|
||
<code>define RFXCOMTCP RFXCOM 192.168.1.5:10001</code>
|
||
<br>
|
||
<code>define RFXCOMTCP2 RFXCOM 192.168.1.121:10001 noinit</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
</table>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
<li>longids<br>
|
||
Comma separated list of device-types for RFXCOM that should be handled using long IDs. This additional ID is a one byte hex string and is generated by the Oregon sensor when is it powered on. The value seems to be randomly generated. This has the advantage that you may use more than one Oregon sensor of the same type even if it has no switch to set a sensor id. For example the author uses two BTHR918N sensors at the same time. All have different deviceids. The drawback is that the deviceid changes after changing batteries. All devices listed as longids will get an additional one byte hex string appended to the device name.<br>
|
||
Default is to use long IDs for all devices.
|
||
<br><br>
|
||
Examples:<PRE>
|
||
# Do not use any long IDs for any devices:
|
||
attr RFXCOMUSB longids 0
|
||
# Use any long IDs for all devices (this is default):
|
||
attr RFXCOMUSB longids 1
|
||
# Use longids for BTHR918N devices.
|
||
# Will generate devices names like BTHR918N_f3.
|
||
attr RFXCOMUSB longids BTHR918N
|
||
# Use longids for TX3_T and TX3_H devices.
|
||
# Will generate devices names like TX3_T_07, TX3_T_01 ,TX3_H_07.
|
||
attr RFXCOMUSB longids TX3_T,TX3_H</PRE>
|
||
</li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="RFXMETER"></a>
|
||
<h3>RFXMETER</h3>
|
||
<ul>
|
||
The RFXMETER module interprets RFXCOM RFXMeter messages received by a RFXCOM receiver. You need to define an RFXCOM receiver first.
|
||
See the <a href="#RFXCOM">RFXCOM</a>.
|
||
|
||
<br><br>
|
||
|
||
<a name="RFXMETERdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> RFXMETER <deviceid> [<scalefactor>] [<unitname>]</code> <br>
|
||
<br>
|
||
<deviceid> is the device identifier of the RFXMeter sensor and is a one byte hexstring (00-ff).
|
||
<br>
|
||
<scalefactor> is an optional scaling factor. It is multiplied to the value that is received from the RFXmeter sensor.
|
||
<br>
|
||
<unitname> is an optional string that describes the value units. It is added to the Reading generated to describe the values.
|
||
<br><br>
|
||
Example: <br>
|
||
<code>define RFXWater RFXMETER 00 0.5 ltr</code>
|
||
<br>
|
||
<code>define RFXPower RFXMETER 01 0.001 kwh</code>
|
||
<br>
|
||
<code>define RFXGas RFXMETER 02 0.01 cu_m</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="RFXMETERset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="RFXMETERget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="RFXMETERattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="RFXX10REC"></a>
|
||
<h3>RFXX10REC</h3>
|
||
<ul>
|
||
The RFXX10REC module interprets X10 security and X10 lighting messages received by a RFXCOM RF receiver. Reported also to work with KlikAanKlikUit. You need to define an RFXCOM receiver first.
|
||
See <a href="#RFXCOM">RFXCOM</a>.
|
||
|
||
<br><br>
|
||
|
||
<a name="RFXX10RECdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> RFXX10REC <type> <deviceid> <devicelog> [<deviceid> <devicelog>] </code> <br>
|
||
<br>
|
||
<code><type></code>
|
||
<ul>
|
||
specifies the type of the X10 device: <br>
|
||
X10 security devices:
|
||
<ul>
|
||
<li> <code>ds10a</code> (X10 security ds10a Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed], status of the delay switch [min|max]], and battery status [ok|low].)</li>
|
||
<li> <code>ms10a</code> (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
|
||
<li> <code>sd90</code> (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)</li>
|
||
<li> <code>kr18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
|
||
</ul>
|
||
X10 lighting devices:
|
||
<ul>
|
||
<li> <code>ms14a</code> (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor)) </li>
|
||
<li> <code>x10</code> (All other x10 devices. Report [on|off] on both deviceids.)</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<code><deviceid></code>
|
||
<ul>
|
||
specifies the first device id of the device. X10 security have a a 16-Bit device id which has to be written as a hex-string (example "5a54").
|
||
A X10 lighting device has a house code A..P followed by a unitcode 1..16 (example "B1").
|
||
</ul>
|
||
<br>
|
||
<code><devicelog></code>
|
||
<ul>
|
||
is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "Smoke" for sd90.
|
||
</ul>
|
||
<br>
|
||
<code><deviceid2></code>
|
||
<ul>
|
||
is optional and specifies the second device id of the device if it exists. For example sd90 smoke sensors can be configured to report two device ids. ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
|
||
</ul>
|
||
<br>
|
||
<code><devicelog2></code>
|
||
<ul>
|
||
is optional for the name used for the Reading of <code><deviceid2></code>.
|
||
</ul>
|
||
<br>
|
||
Example: <br>
|
||
<code>define livingroom_window RFXX10REC ds10a 72cd Window</code>
|
||
<br>
|
||
<code>define motion_sensor1 RFXX10REC ms10a 55c6 motion</code>
|
||
<br>
|
||
<code>define smoke_sensor1 RFXX10REC sd90 54d3 Smoke 54d3 Smoketest</code>
|
||
<br>
|
||
<code>define motion_sensor2 RFXX10REC ms14a A1 motion A2 light</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="RFXX10RECset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="RFXX10RECget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="RFXX10RECattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<p>
|
||
<a name="ROOMMATE" id="ROOMMATE"></a>
|
||
</p>
|
||
<h3>
|
||
ROOMMATE
|
||
</h3>
|
||
<div style="margin-left: 2em">
|
||
<a name="ROOMMATEdefine" id="ROOMMATEdefine"></a> <b>Define</b>
|
||
<div style="margin-left: 2em">
|
||
<code>define <rr_FirstName> ROOMMATE [<device name of resident group>]</code><br>
|
||
<br>
|
||
Provides a special dummy device to represent a resident of your home.<br>
|
||
Based on the current state and other readings, you may trigger other actions within FHEM.<br>
|
||
<br>
|
||
Used by superior module <a href="#RESIDENTS">RESIDENTS</a> but may also be used stand-alone.<br>
|
||
<br>
|
||
Example:<br>
|
||
<div style="margin-left: 2em">
|
||
<code># Standalone<br>
|
||
define rr_Manfred ROOMMATE<br>
|
||
<br>
|
||
# Typical group member<br>
|
||
define rr_Manfred ROOMMATE rgr_Residents # to be member of resident group rgr_Residents<br>
|
||
<br>
|
||
# Member of multiple groups<br>
|
||
define rr_Manfred ROOMMATE rgr_Residents,rgr_Parents # to be member of resident group rgr_Residents and rgr_Parents<br>
|
||
<br>
|
||
# Complex family structure<br>
|
||
define rr_Manfred ROOMMATE rgr_Residents,rgr_Parents # Parent<br>
|
||
define rr_Lisa ROOMMATE rgr_Residents,rgr_Parents # Parent<br>
|
||
define rr_Rick ROOMMATE rgr_Residents,rgr_Children # Child1<br>
|
||
define rr_Alex ROOMMATE rgr_Residents,rgr_Children # Child2</code>
|
||
</div>
|
||
</div><br>
|
||
<div style="margin-left: 2em">
|
||
Please note the RESIDENTS group device needs to be existing before a ROOMMATE device can become a member of it.
|
||
</div><br>
|
||
<br>
|
||
<br>
|
||
<a name="ROOMMATEset" id="ROOMMATEset"></a> <b>Set</b>
|
||
<div style="margin-left: 2em">
|
||
<code>set <rr_FirstName> <command> [<parameter>]</code><br>
|
||
<br>
|
||
Currently, the following commands are defined.<br>
|
||
<ul>
|
||
<li>
|
||
<b>location</b> - sets reading 'location'; see attribute rr_locations to adjust list shown in FHEMWEB
|
||
</li>
|
||
<li>
|
||
<b>mood</b> - sets reading 'mood'; see attribute rr_moods to adjust list shown in FHEMWEB
|
||
</li>
|
||
<li>
|
||
<b>state</b> home,gotosleep,asleep,awoken,absent,gone switch between states; see attribute rr_states to adjust list shown in FHEMWEB
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Possible states and their meaning</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
This module differs between 6 states:<br>
|
||
<br>
|
||
<ul>
|
||
<li>
|
||
<b>home</b> - individual is present at home and awake
|
||
</li>
|
||
<li>
|
||
<b>gotosleep</b> - individual is on it's way to bed
|
||
</li>
|
||
<li>
|
||
<b>asleep</b> - individual is currently sleeping
|
||
</li>
|
||
<li>
|
||
<b>awoken</b> - individual just woke up from sleep
|
||
</li>
|
||
<li>
|
||
<b>absent</b> - individual is not present at home but will be back shortly
|
||
</li>
|
||
<li>
|
||
<b>gone</b> - individual is away from home for longer period
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Presence correlation to location</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Under specific circumstances, changing state will automatically change reading 'location' as well.<br>
|
||
<br>
|
||
Whenever presence state changes from 'absent' to 'present', the location is set to 'home'. If attribute rr_locationHome was defined, first location from it will be used as home location.<br>
|
||
<br>
|
||
Whenever presence state changes from 'present' to 'absent', the location is set to 'underway'. If attribute rr_locationUnderway was defined, first location from it will be used as underway location.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Auto Gone</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Whenever an individual is set to 'absent', a trigger is started to automatically change state to 'gone' after a specific timeframe.<br>
|
||
Default value is 36 hours.<br>
|
||
<br>
|
||
This behaviour can be customized by attribute rr_autoGoneAfter.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Synchronizing presence with other ROOMMATE or GUEST devices</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
If you always leave or arrive at your house together with other roommates or guests, you may enable a synchronization of your presence state for certain individuals.<br>
|
||
By setting attribute rr_passPresenceTo, those individuals will follow your presence state changes to 'home', 'absent' or 'gone' as you do them with your own device.<br>
|
||
<br>
|
||
Please note that individuals with current state 'gone' or 'none' (in case of guests) will not be touched.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
<u>Location correlation to state</u><br>
|
||
<br>
|
||
<div style="margin-left: 2em">
|
||
Under specific circumstances, changing location will have an effect on the actual state as well.<br>
|
||
<br>
|
||
Whenever location is set to 'home', the state is set to 'home' if prior presence state was 'absent'. If attribute rr_locationHome was defined, all of those locations will trigger state change to 'home' as well.<br>
|
||
<br>
|
||
Whenever location is set to 'underway', the state is set to 'absent' if prior presence state was 'present'. If attribute rr_locationUnderway was defined, all of those locations will trigger state change to 'absent' as well. Those locations won't appear in reading 'lastLocation'.<br>
|
||
<br>
|
||
Whenever location is set to 'wayhome', the reading 'wayhome' is set to '1' if current presence state is 'absent'. If attribute rr_locationWayhome was defined, LEAVING one of those locations will set reading 'wayhome' to '1' as well. So you actually have implicit and explicit options to trigger wayhome.<br>
|
||
Arriving at home will reset the value of 'wayhome' to '0'.<br>
|
||
<br>
|
||
If you are using the <a href="#GEOFANCY">GEOFANCY</a> module, you can easily have your location updated with GEOFANCY events by defining a simple NOTIFY-trigger like this:<br>
|
||
<br>
|
||
<code>define n_rr_Manfred.location notify geofancy:currLoc_Manfred.* set rr_Manfred location $EVTPART1</code><br>
|
||
<br>
|
||
By defining geofencing zones called 'home' and 'wayhome' in the iOS app, you automatically get all the features of automatic state changes described above.
|
||
</div>
|
||
</div><br>
|
||
<br>
|
||
<a name="ROOMMATEattr" id="ROOMMATEattr"></a> <b>Attributes</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>rr_autoGoneAfter</b> - hours after which state should be auto-set to 'gone' when current state is 'absent'; defaults to 36 hours
|
||
</li>
|
||
<li>
|
||
<b>rr_locationHome</b> - locations matching these will be treated as being at home; first entry reflects default value to be used with state correlation; separate entries by space; defaults to 'home'
|
||
</li>
|
||
<li>
|
||
<b>rr_locationUnderway</b> - locations matching these will be treated as being underway; first entry reflects default value to be used with state correlation; separate entries by comma or space; defaults to "underway"
|
||
</li>
|
||
<li>
|
||
<b>rr_locationWayhome</b> - leaving a location matching these will set reading wayhome to 1; separate entries by space; defaults to "wayhome"
|
||
</li>
|
||
<li>
|
||
<b>rr_locations</b> - list of locations to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
|
||
</li>
|
||
<li>
|
||
<b>rr_moodDefault</b> - the mood that should be set after arriving at home or changing state from awoken to home
|
||
</li>
|
||
<li>
|
||
<b>rr_moodSleepy</b> - the mood that should be set if state was changed to gotosleep or awoken
|
||
</li>
|
||
<li>
|
||
<b>rr_moods</b> - list of moods to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
|
||
</li>
|
||
<li>
|
||
<b>rr_passPresenceTo</b> - synchronize presence state with other ROOMMATE or GUEST devices; separte devices by space
|
||
</li>
|
||
<li>
|
||
<b>rr_realname</b> - whenever ROOMMATE wants to use the realname it uses the value of attribute alias or group; defaults to group
|
||
</li>
|
||
<li>
|
||
<b>rr_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
|
||
</li>
|
||
<li>
|
||
<b>rr_states</b> - list of states to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces; unsupported states will lead to errors though
|
||
</li>
|
||
</ul>
|
||
</div><br>
|
||
<br>
|
||
<br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<div style="margin-left: 2em">
|
||
<ul>
|
||
<li>
|
||
<b>durTimerAbsence</b> - timer to show the duration of absence from home in minutes
|
||
</li>
|
||
<li>
|
||
<b>durTimerPresence</b> - timer to show the duration of presence at home in minutes
|
||
</li>
|
||
<li>
|
||
<b>durTimerSleep</b> - timer to show the duration of sleep in minutes
|
||
</li>
|
||
<li>
|
||
<b>lastArrival</b> - timestamp of last arrival at home
|
||
</li>
|
||
<li>
|
||
<b>lastAwake</b> - timestamp of last sleep cycle end
|
||
</li>
|
||
<li>
|
||
<b>lastDeparture</b> - timestamp of last departure from home
|
||
</li>
|
||
<li>
|
||
<b>lastDurAbsence</b> - duration of last absence from home in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastDurPresence</b> - duration of last presence at home in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastDurSleep</b> - duration of last sleep in following format: hours:minutes:seconds
|
||
</li>
|
||
<li>
|
||
<b>lastLocation</b> - the prior location
|
||
</li>
|
||
<li>
|
||
<b>lastMood</b> - the prior mood
|
||
</li>
|
||
<li>
|
||
<b>lastSleep</b> - timestamp of last sleep cycle begin
|
||
</li>
|
||
<li>
|
||
<b>lastState</b> - the prior state
|
||
</li>
|
||
<li>
|
||
<b>location</b> - the current location
|
||
</li>
|
||
<li>
|
||
<b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
|
||
</li>
|
||
<li>
|
||
<b>mood</b> - the current mood
|
||
</li>
|
||
<li>
|
||
<b>state</b> - reflects the current state
|
||
</li>
|
||
<li>
|
||
<b>wayhome</b> - depending on current location, it can become '1' if individual is on his/her way back home
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<a name="RPII2C"></a>
|
||
<h3>RPII2C</h3>
|
||
<ul>
|
||
<a name="RPII2C"></a>
|
||
Provides access to Raspberry Pi's I2C interfaces for some logical modules and also directly.<br>
|
||
This modul will basically work on every linux system that provides <code>/dev/i2c-x</code>.<br><br>
|
||
|
||
<b>preliminary:</b><br>
|
||
<ul>
|
||
<li>
|
||
This module uses gpio utility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> library change access rights of I2C-Interface<br>
|
||
WiringPi installation is described here: <a href="#RPI_GPIO">RPI_GPIO</a><br>
|
||
Alternatively for other systems (BeagleBone, etc.) you can manually change access rights for <code>/dev/i2c-x</code>. You will need write-/read access for user that runs FHEM. This can be doen e.g. in etc/init.d/fhem<br>
|
||
|
||
</li>
|
||
<li>
|
||
installation of i2c dependencies:<br>
|
||
<code>sudo apt-get install libi2c-dev i2c-tools build-essential</code><br>
|
||
</li>
|
||
<li>
|
||
load I2C kernel modules:<br>
|
||
open /etc/modules<br>
|
||
<code>sudo nano /etc/modules</code><br>
|
||
add theese lines<br>
|
||
<code>
|
||
i2c-dev<br>
|
||
i2c-bcm2708<br>
|
||
</code>
|
||
</li>
|
||
<li>
|
||
To access the I2C-Bus the Device::SMBus module is necessary:<br>
|
||
<code>sudo apt-get install libmoose-perl<br>
|
||
sudo cpan Device::SMBus</code><br>
|
||
</li>
|
||
</ul>
|
||
<a name="RPII2CDefine"></a><br>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> RPII2C <I2C Bus Number></code><br>
|
||
where <code><I2C Bus Number></code> is the number of the I2C bus that should be used (0 or 1)<br><br>
|
||
</ul>
|
||
|
||
<a name="RPII2CSet"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>
|
||
Write one byte (or more bytes sequentially) directly to an I2C device (for devices that have only one register to write):<br>
|
||
<code>set <name> writeByte <I2C Address> <value></code><br><br>
|
||
</li>
|
||
<li>
|
||
Write one byte (or more bytes sequentially) to the specified register of an I2C device:<br>
|
||
<code>set <name> writeByteReg <I2C Address> <Register Address> <value></code><br><br>
|
||
</li>
|
||
<li>
|
||
Write n-bytes to an register range, beginning at the specified register:<br>
|
||
<code>set <name> writeBlock <I2C Address> <Register Address> <value></code><br><br>
|
||
</li>
|
||
<li>
|
||
Same as writeBlock but writes register range sequentially. The numbers of byte to write must be a multipe of the number of register.
|
||
<code>set <name> writeNBlock <I2C Address> <Register Address> <number of registers> <value></code><br><br>
|
||
</li><br>
|
||
Examples:
|
||
<ul>
|
||
Write 0xAA to device with I2C address 0x60<br>
|
||
<code>set test1 writeByte 60 AA</code><br>
|
||
Write 0xAA to register 0x01 of device with I2C address 0x6E<br>
|
||
<code>set test1 writeByteReg 6E 01 AA</code><br>
|
||
Write 0xAA to register 0x01 of device with I2C address 0x6E, after it write 0x55 to 0x02 as two separate commands<br>
|
||
<code>set test1 writeByteReg 6E 01 AA 55</code><br>
|
||
Write 0xA4 to register 0x03, 0x00 to register 0x04 and 0xDA to register 0x05 of device with I2C address 0x60 as an block command<br>
|
||
<code>set test1 writeBlock 60 03 A4 00 DA</code><br>
|
||
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="RPII2CGet"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> read <I2C Address> [<Register Address> [<number of registers>]] </code>
|
||
<br>
|
||
gets value of I2C device's registers<br><br>
|
||
Examples:
|
||
<ul>
|
||
Reads byte from device with I2C address 0x60<br>
|
||
<code>get test1 writeByte 60</code><br>
|
||
Reads register 0x01 of device with I2C address 0x6E.<br>
|
||
<code>get test1 read 6E 01 AA 55</code><br>
|
||
Reads register 0x03 to 0x06 of device with I2C address 0x60.<br>
|
||
<code>get test1 read 60 03 4</code><br>
|
||
</ul><br>
|
||
</ul><br>
|
||
|
||
<a name="RPII2CAttr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="RPI_GPIO"></a>
|
||
<h3>RPI_GPIO</h3>
|
||
<ul>
|
||
<a name="RPI_GPIO"></a>
|
||
<p>
|
||
Raspberry Pi offers direct access to several GPIO via header P1 (and P5 on V2). The Pinout is shown in table under define.
|
||
With this module you are able to access these GPIO's directly as output or input. For input you can use either polling or interrupt mode<br><br>
|
||
<b>Warning: Never apply any external voltage to an output configured pin! GPIO's internal logic operate with 3,3V. Don't exceed this Voltage!</b><br><br>
|
||
|
||
<b>preliminary:</b><br>
|
||
GPIO Pins accessed by sysfs. The files are located in folder /system/class/gpio which can be only accessed by root.
|
||
This module uses gpio utility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> library to export and change access rights of GPIO's<br>
|
||
Install WiringPi:
|
||
<pre>
|
||
sudo apt-get update
|
||
sudo apt-get upgrade
|
||
sudo apt-get install git-core
|
||
git clone git://git.drogon.net/wiringPi
|
||
cd wiringPi
|
||
./build
|
||
sudo adduser fhem gpio</pre>
|
||
Thats all<br><br>
|
||
|
||
<a name="RPI_GPIODefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> RPI_GPIO <GPIO number></code><br><br>
|
||
all usable <code>GPIO number</code> are in the following tables<br><br>
|
||
|
||
<table border="0" cellspacing="0" cellpadding="0">
|
||
<td>
|
||
PCB Revision 1 P1 pin header
|
||
<table border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #000000; border-collapse:collapse; font-size:80%; empty-cells:show;">
|
||
<tr><td>Function</td> <td>Pin</td><td></td><td>Pin</td> <td>Function</td></tr>
|
||
<tr><td>3,3V</td> <td>1</td> <td></td><td>2</td> <td>5V</td></tr>
|
||
<tr><td><b>GPIO 0 (SDA0)</b></td><td>3</td> <td></td><td>4</td> <td></td></tr>
|
||
<tr><td><b>GPIO 1 (SCL0)</b></td><td>5</td> <td></td><td>6</td> <td>GND</td></tr>
|
||
<tr><td>GPIO 4 (GPCLK0)</td> <td>7</td> <td></td><td>8</td> <td>GPIO 14 (TxD)</td></tr>
|
||
<tr><td></td> <td>9</td> <td></td><td>10</td> <td>GPIO 15 (RxD)</td></tr>
|
||
<tr><td>GPIO 17</td> <td>11</td> <td></td><td>12</td> <td>GPIO 18 (PCM_CLK)</td></tr>
|
||
<tr><td><b>GPIO 21</b></td> <td>13</td> <td></td><td>14</td> <td></td></tr>
|
||
<tr><td>GPIO 22</td> <td>15</td> <td></td><td>16</td> <td>GPIO 23</td></tr>
|
||
<tr><td></td> <td>17</td> <td></td><td>18</td> <td>GPIO 24</td></tr>
|
||
<tr><td>GPIO 10 (MOSI)</td> <td>19</td> <td></td><td>20</td> <td></td></tr>
|
||
<tr><td>GPIO 9 (MISO)</td> <td>21</td> <td></td><td>22</td> <td>GPIO 25</td></tr>
|
||
<tr><td>GPIO 11 (SCLK)</td> <td>23</td> <td></td><td>24</td> <td>GPIO 8 (CE0)</td></tr>
|
||
<tr><td></td> <td>25</td> <td></td><td>26</td> <td>GPIO 7 (CE1)</td></tr></table>
|
||
</td>
|
||
<td>
|
||
PCB Revision 2 P1 pin header
|
||
<table border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #000000; border-collapse:collapse; font-size:80%; empty-cells:show;">
|
||
<tr><td>Function</td> <td>Pin</td><td></td><td>Pin</td> <td>Function</td></tr>
|
||
<tr><td>3,3V</td> <td>1</td> <td></td><td>2</td> <td>5V</td></tr>
|
||
<tr><td><b>GPIO 2 (SDA1)</b></td><td>3</td> <td></td><td>4</td> <td></td></tr>
|
||
<tr><td><b>GPIO 3 (SCL1)</b></td><td>5</td> <td></td><td>6</td> <td>GND</td></tr>
|
||
<tr><td>GPIO 4 (GPCLK0)</td> <td>7</td> <td></td><td>8</td> <td>GPIO 14 (TxD)</td></tr>
|
||
<tr><td></td> <td>9</td> <td></td><td>10</td> <td>GPIO 15 (RxD)</td></tr>
|
||
<tr><td>GPIO 17</td> <td>11</td> <td></td><td>12</td> <td>GPIO 18 (PCM_CLK)</td></tr>
|
||
<tr><td><b>GPIO 27</b></td> <td>13</td> <td></td><td>14</td> <td></td></tr>
|
||
<tr><td>GPIO 22</td> <td>15</td> <td></td><td>16</td> <td>GPIO 23</td></tr>
|
||
<tr><td></td> <td>17</td> <td></td><td>18</td> <td>GPIO 24</td></tr>
|
||
<tr><td>GPIO 10 (MOSI)</td> <td>19</td> <td></td><td>20</td> <td></td></tr>
|
||
<tr><td>GPIO 9 (MISO)</td> <td>21</td> <td></td><td>22</td> <td>GPIO 25</td></tr>
|
||
<tr><td>GPIO 11 (SCLK)</td> <td>23</td> <td></td><td>24</td> <td>GPIO 8 (CE0)</td></tr>
|
||
<tr><td></td> <td>25</td> <td></td><td>26</td> <td>GPIO 7 (CE1)</td></tr></table>
|
||
</td>
|
||
<td>
|
||
PCB Revision 2 P5 pin header
|
||
<table border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #000000; border-collapse:collapse; font-size:80%; empty-cells:show;">
|
||
<tr><td>Function</td> <td>Pin</td><td></td><td>Pin</td><td>Function</td></tr>
|
||
<tr><td>5V</td> <td>1</td> <td></td><td>2</td> <td>3,3V</td></tr>
|
||
<tr><td>GPIO 28 (SDA0)</td><td>3</td> <td></td><td>4</td> <td>GPIO 29 (SCL0)</td></tr>
|
||
<tr><td>GPIO 30</td> <td>5</td> <td></td><td>6</td> <td>GPOI 31</td></tr>
|
||
<tr><td>GND</td> <td>7</td> <td></td><td>8</td> <td>GND</td></tr></table>
|
||
</td>
|
||
</table>
|
||
|
||
Examples:
|
||
<pre>
|
||
define Pin12 RPI_GPIO 18
|
||
attr Pin12
|
||
attr Pin12 poll_interval 5
|
||
</pre>
|
||
</ul>
|
||
|
||
<a name="RPI_GPIOSet"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<ul><li>for output configured GPIO
|
||
<ul><code>
|
||
off<br>
|
||
on<br>
|
||
toggle<br>
|
||
</code>
|
||
</ul>
|
||
The <a href="#setExtensions"> set extensions</a> are also supported.<br>
|
||
</li>
|
||
<li>for input configured GPIO
|
||
<ul><code>
|
||
readval
|
||
</code></ul>
|
||
readval refreshes the reading Pinlevel and, if attr toggletostate not set, the state value
|
||
</ul>
|
||
</li><br>
|
||
Examples:
|
||
<ul>
|
||
<code>set Pin12 off</code><br>
|
||
<code>set Pin11,Pin12 on</code><br>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="RPI_GPIOGet"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name></code>
|
||
<br><br>
|
||
returns "high" or "low" regarding the actual status of the pin and writes this value to reading <b>Pinlevel</b>
|
||
</ul><br>
|
||
|
||
<a name="RPI_GPIOAttr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>direction<br>
|
||
Sets the GPIO direction to input or output.<br>
|
||
Default: input, valid values: input, output<br><br>
|
||
</li>
|
||
<li>interrupt<br>
|
||
<b>can only be used with GPIO configured as input</b><br>
|
||
enables edge detection for GPIO pin<br>
|
||
on each interrupt event readings Pinlevel and state will be updated<br>
|
||
Default: none, valid values: none, falling, rising, both<br>
|
||
For "both" the reading Longpress will be added and set to on as long as kes hold down longer than 1s<br>
|
||
For "falling" and "rising" the reading Toggle will be added an will be toggled at every interrupt and the reading Counter that increments at every interrupt<br><br>
|
||
</li>
|
||
<li>poll_interval<br>
|
||
Set the polling interval in minutes to query the GPIO's level<br>
|
||
Default: -, valid values: decimal number<br><br>
|
||
</li>
|
||
<li>toggletostate<br>
|
||
<b>works with interrupt set to falling or rising only</b><br>
|
||
if yes, state will be toggled at each interrupt event<br>
|
||
Default: no, valid values: yes, no<br><br>
|
||
</li>
|
||
<li>pud_resistor<br>
|
||
Sets the internal pullup/pulldown resistor<br>
|
||
Default: -, valid values: off, up, down<br><br>
|
||
</li>
|
||
<li>debounce_in_ms<br>
|
||
readout of pin value x ms after an interrupt occured. Can be used for switch debouncing<br>
|
||
Default: 0, valid values: decimal number<br><br>
|
||
</li>
|
||
<li>restoreOnStartup<br>
|
||
Restore Readings and sets after reboot<br>
|
||
Default: on, valid values: on, off<br><br>
|
||
</li>
|
||
<li>longpressinterval<br>
|
||
<b>works with interrupt set to both only</b><br>
|
||
time in seconds, a port need to be high to set reading longpress to on<br>
|
||
Default: 1, valid values: 0.1 - 10<br><br>
|
||
</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="RSS"></a>
|
||
<h3>RSS</h3>
|
||
<ul>
|
||
Provides a freely configurable RSS feed.<p>
|
||
|
||
Currently a media RSS feed delivering status pictures in JPEG format is supported. This media
|
||
RSS feed can be used to feed a status display to a network-enabled photo frame.<p>
|
||
|
||
You need to have the perl module <code>GD</code> installed. This module is most likely not
|
||
available for small systems like Fritz!Box.<p>
|
||
RSS is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use RSS.</p>
|
||
|
||
<a name="RSSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> RSS jpg <hostname> <filename></code><br><br>
|
||
|
||
Defines the RSS feed. <code>jpg</code> is a fixed literal to allow for future
|
||
extensions. <code><hostname></code> is the hostname of the fhem server as
|
||
seen from the consumer of the RSS feed. <code><filename></code> is the
|
||
name of the file that contains the <a href="RSSlayout">layout definition</a>.<p>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define FrameRSS RSS jpg host.example.org /etc/fhem/layout</code><br>
|
||
<code>define MyRSS RSS jpg 192.168.1.222 /var/fhem/conf/layout.txt</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="RSSset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> rereadcfg</code>
|
||
<br><br>
|
||
Rereads the <a href="RSSlayout">layout definition</a> from the file. Useful to enable
|
||
changes in the layout on-the-fly.
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="RSSattr"></a>
|
||
<b>Attributes</b>
|
||
<br><br>
|
||
<ul>
|
||
<li>size<br>The dimensions of the JPEG picture in the format
|
||
<code><width>x<height></code>.</li><br>
|
||
<li>bg<br>The directory that contains the background pictures (must be in JPEG format).</li><br>
|
||
<li>tmin<br>The background picture is shown at least <code>tmin</code> seconds,
|
||
no matter how frequently the RSS feed consumer accesses the page.</li><br>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<b>Usage information</b>
|
||
<br><br>
|
||
<ul>
|
||
If a least one RSS feed is defined, the menu entry <code>RSS</code> appears in the FHEMWEB
|
||
side menu. If you click it you get a list of all defined RSS feeds. The URL of any such is
|
||
RSS feed is <code>http://hostname:port/fhem/rss/name.rss</code> with <code>hostname</code> and
|
||
<code>name</code> from the RSS feed's <a href="RSSdefine">definition</a> and the <code>port</code>
|
||
(usually 8083) and literal <code>/fhem</code> from the underlying <a href="#FHEMWEB">FHEMWEB</a>
|
||
definition.<p>
|
||
|
||
Example:
|
||
<ul><code>http://host.example.org:8083/fhem/rss/FrameRSS.rss</code></ul><p>
|
||
|
||
The media RSS feed points to a dynamically generated JPEG picture. The URL of the JPEG picture
|
||
belonging to the RSS feed is <code>http://hostname:port/fhem/rss/name.jpg</code>, i.e. the URL
|
||
of the RSS feed with the extension <code>rss</code> changed to <code>jpg</code>.<p>
|
||
|
||
Example:
|
||
<ul><code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code></ul><p>
|
||
|
||
To render the JPEG picture the current, or, if <code>tmin</code> seconds have elapsed, the next
|
||
JPEG picture from the directory <code>bg</code> is chosen and scaled to the dimensions given
|
||
in <code>size</code>. The background is black if no usable JPEG picture can be found. Next the
|
||
script in the <a href="RSSlayout">layout definition</a> is used to superimpose items on
|
||
the background.<p>
|
||
|
||
You can directly access the URL of the JPEG picture in your browser. Reload the page to see
|
||
how it works.<p>
|
||
|
||
The media RSS feed advertises to refresh after 1 minute (ttl). Some photo frames ignore it and
|
||
use their preset refresh rate. Go for a photo frame with an adjustable refresh rate (e.g
|
||
every 5 seconds) if you have the choice!<p>
|
||
|
||
This is how the fhem config part might look like:<p>
|
||
<code>
|
||
define ui FHEMWEB 8083 global<br><br>
|
||
|
||
define FrameRSS RSS jpg host.example.org /etc/fhem/layout<br>
|
||
attr FrameRSS size 800x600<br>
|
||
attr FrameRSS bg /usr/share/pictures<br>
|
||
attr FrameRSS tmin 10<br>
|
||
</code>
|
||
|
||
</ul>
|
||
|
||
<a name="RSSlayout"></a>
|
||
<b>Layout definition</b>
|
||
<br><br>
|
||
<ul>
|
||
The layout definition is a script for placing items on the background. It is read top-down.
|
||
It consists of layout control commands and items placement commands. Layout control
|
||
commands define the appearance of subsequent items. Item placement commands actually
|
||
render items.<p>
|
||
|
||
Everything after a # is treated as a comment and ignored. You can fold long lines by
|
||
putting a \ at the end.<p>
|
||
|
||
<i>General notes</i><br>
|
||
<ol>
|
||
<li>Use double quotes to quote literal text if perl specials are allowed.</li>
|
||
<li>Text alignment requires the Perl module GD::Text::Align to be installed. Text wrapping (in text boxes) require GD::Text::Wrap to be installed. Debian-based systems can install both with <code>apt-get install libgd-text-perl</code>.</li>
|
||
</ol>
|
||
<p>
|
||
<i>Notes on coordinates</i><br>
|
||
<ol>
|
||
<li>(0,0) is the upper left corner.</li>
|
||
<li>Coordinates equal or greater than 1 are considered to be absolute pixels, coordinates between 0 and 1 are considered to
|
||
be relative to the total width or height of the picture.</li>
|
||
<li>Literal <code>x</code> and <code>y</code> evaluate to the most recently used x- and y-coordinate. See also moveto and moveby below.</li>
|
||
<!--<li>You can use <code>{ <a href="#perl"><perl special></a> }</code> for x and for y.</li>-->
|
||
</ol>
|
||
<p>
|
||
|
||
|
||
<i>Layout control commands</i><p>
|
||
|
||
<ul>
|
||
<li>moveto <x> <y><br>Moves most recently used x- and y-coordinate to the given absolute or relative position.</li><br>
|
||
|
||
<li>moveby <x> <y><br>Moves most recently used x- and y-coordinate by the given absolute or relative amounts.</li><br>
|
||
|
||
<li>font "<font>"<br>Sets the font. <font> is the name of a TrueType font (e.g.
|
||
<code>Arial</code>) or the full path to a TrueType font
|
||
(e.g. <code>/usr/share/fonts/truetype/arial.ttf</code>),
|
||
whatever works on your system.</li><br>
|
||
|
||
<li>rgb "<color>"<br>Sets the color. <color> is a 6-digit hex number, every 2 digits
|
||
determining the red, green and blue color components as in HTML color codes (e.g.
|
||
<code>FF0000</code> for red, <code>C0C0C0</code> for light gray). You can use
|
||
<code>{ <a href="#perl"><perl special></a> }</code> for <color>.</li><br>
|
||
|
||
<li>pt <pt><br>Sets the font size in points.</li><br>
|
||
|
||
<li>thalign|ihalign|halign "left"|"center"|"right"<br>Sets the horizontal alignment of text, image or both. Defaults to left-aligned. You can use
|
||
<code>{ <a href="#perl"><perl special></a> }</code> instead of the literal alignment control word.</li><br>
|
||
|
||
<li>tvalign|ivalign|valign "top"|"center"|"base"|"bottom"<br>Sets the vertical alignment of text, image or both. Defaults to base-aligned for text and
|
||
top-aligned for image. You can use
|
||
<code>{ <a href="#perl"><perl special></a> }</code> instead of the literal alignment control word.</li><br>
|
||
|
||
<li>linespace <space><br>Sets the line spacing in pixels for text boxes (see textbox item below).</li><br>
|
||
|
||
<li>condition <condition><br>Subsequent layout control and item placement commands except for another condition command
|
||
are ignored if and only if <condition>
|
||
evaluates to false.</li><br>
|
||
</ul>
|
||
|
||
<i>Item placement commands</i><p>
|
||
<ul>
|
||
<li>text <x> <y> <text><br>Renders the text <text> at the
|
||
position (<x>, <y>) using the current font, font size and color.
|
||
You can use
|
||
<code>{ <a href="#perl"><perl special></a> }</code> for <text> to fully
|
||
access device readings and do some programming on the fly. See below for examples.</li><br>
|
||
<li>textbox <x> <y> <boxwidth> <text><br>Same as before but text is rendered in a box of horizontal width <boxwidth>.</li><br>
|
||
<li>time <x> <y><br>Renders the current time in HH:MM format.</li><br>
|
||
<li>seconds <x> <y> <format><br>Renders the curent seconds. Maybe usefull for a RSS Clock. With option colon a : </li><br>
|
||
<li>date <x> <y><br>Renders the current date in DD:MM:YYY format.</li><br>
|
||
<li>line <x1> <y1> <x2> <y2> [<thickness>]<br>Draws a line from position (<x1>, <y1>) to position (<x2>, <y2>) with optional thickness (default=1).</li><br>
|
||
<li>img <x> <y> <['w' or 'h']s> <imgtype> <srctype> <arg> <br>Renders a picture at the
|
||
position (<x>, <y>). The <imgtype> is one of <code>gif</code>, <code>jpeg</code>, <code>png</code>.
|
||
The picture is scaled by the factor <s> (a decimal value). If 'w' or 'h' is in front of scale-value the value is used to set width or height to the value in pixel. If <srctype> is <code>file</code>, the picture
|
||
is loaded from the filename <arg>, if <srctype> is <code>url</code>, the picture
|
||
is loaded from the URL <arg>, if <srctype> is <code>data</code>, the picture
|
||
is piped in from data <arg>. You can use
|
||
<code>{ <a href="#perl"><perl special></a> }</code> for <arg>. See below for example.
|
||
Notice: do not load the image from URL that is served by fhem as it leads to a deadlock.<br></li>
|
||
<br>
|
||
</ul>
|
||
|
||
<i>Example</i><p>
|
||
This is how a layout definition might look like:<p>
|
||
<code>
|
||
font /usr/share/fonts/truetype/arial.ttf # must be a TrueType font<br>
|
||
rgb "c0c0c0" # HTML color notation, RGB<br>
|
||
pt 48 # font size in points<br>
|
||
time 0.10 0.90<br>
|
||
pt 24<br>
|
||
text 0.10 0.95 { ReadingsVal("MyWeather","temperature","?"). "C" }<br>
|
||
moveby 0 -25<br>
|
||
text x y "Another text"<br>
|
||
img 20 530 0.5 png file { "/usr/share/fhem/www/images/weather/" . ReadingsVal("MyWeather","icon","") . ".png" }<br>
|
||
</code>
|
||
<p>
|
||
|
||
<i>Special uses</i><p>
|
||
|
||
You can display <a href="#SVG">SVG</a> plots with the aid of the helper function <code>plotAsPng(<name>[,<zoom>[,<offset>]])</code> (in 98_SVG.pm). Examples:<p>
|
||
<code>
|
||
img 20 30 0.6 png data { plotAsPng("mySVGPlot") }<BR>
|
||
img 20 30 0.6 png data { plotAsPng("mySVGPlot","qday",-1) }
|
||
</code>
|
||
<p>
|
||
This requires the perl module Image::LibRSVG and librsvg. Debian-based systems can install these with <code>apt-get install libimage-librsvg-perl</code>.
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="RandomTimer"></a>
|
||
<h1>RandomTimer</h1>
|
||
<h2>Define</h2>
|
||
<ul>
|
||
<code><font size="+2">define <name> RandomTimer <timespec_start> <device> <timespec_stop> [<timeToSwitch>]</font></code><br>
|
||
<br>
|
||
Defines a device, that imitates the random switch functionality of a timer clock, like a <b>FS20 ZSU</b>.
|
||
The idea to create it, came from the problem, that is was always a little bit tricky to install a timer clock before
|
||
holiday: finding the manual, testing it the days before and three different timer clocks with three different manuals - a horror.<br>
|
||
By using it in conjunction with a dummy and a <a href="#disableCond">disableCond</a>, i'm able to switch the always defined timer on every weekend easily from all over the word.
|
||
<br><br>
|
||
<h3>Deskrition</h3>
|
||
a RandomTimer device starts at timespec_start switching device. Every (timeToSwitch
|
||
seconds +-10%) it trys to switch device on/off. The switching period stops when the
|
||
next time to switch is greater than timespec_stop.
|
||
<br><br>
|
||
</ul>
|
||
<h3>Parameter</h3>
|
||
<ul>
|
||
<b>timespec_start</b>
|
||
<br>
|
||
The parameter <b>timespec_start</b> defines the start time of the timer with format: HH:MM:SS.
|
||
It can be a Perlfunction as known from the timespec <a href="#at">at</a> .
|
||
<br><br>
|
||
<b>device</b>
|
||
<br>
|
||
The parameter <b>device</b> defines the fhem device that should be switched.
|
||
<br><br>
|
||
<b>timespec_stop</b>
|
||
<br>
|
||
The parameter <b>timespec_stop</b> defines the stop time of the timer with format: HH:MM:SS.
|
||
It can be a Perlfunction as known from the timespec <a href="#at">at</a> .
|
||
<br><br>
|
||
<b>timeToSwitch</b>
|
||
<br>
|
||
The parameter <b>timeToSwitch</b> defines the time in seconds between two on/off switches.
|
||
<br><br>
|
||
</ul>
|
||
<h3>Examples</h3>
|
||
<ul>
|
||
<li>
|
||
<code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch +03:00:00 500</code><br>
|
||
defines a timer that starts at sunset an ends 3 hous later. The timer trys to switch every 500 seconds(+-10%).
|
||
</li><br><br>
|
||
<li>
|
||
<code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch *{sunset_abs(3*3600)} 480</code><br>
|
||
defines a timer that starts at sunset and stops after sunset + 3 hours. The timer trys to switch every 480 seconds(+-10%).
|
||
</li><br><br>
|
||
<li>
|
||
<code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch 22:30:00 300</code><br>
|
||
defines a timer that starts at sunset an ends at 22:30. The timer trys to switch every 300 seconds(+-10%).
|
||
</li><br><br>
|
||
</ul>
|
||
|
||
<!-- -------------------------------------------------------------------------- -->
|
||
<!-- Set ------------------------------------------------------------------- -->
|
||
<!-- -------------------------------------------------------------------------- -->
|
||
<a name="RandomTimerSet"></a>
|
||
<h3>Set</h3>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<!-- -------------------------------------------------------------------------- -->
|
||
<!-- Get ------------------------------------------------------------------- -->
|
||
<!-- -------------------------------------------------------------------------- -->
|
||
<a name="RandomTimerGet"></a>
|
||
<h3>Get</h3>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<!-- -------------------------------------------------------------------------- -->
|
||
<!-- Attributes --------------------------------------------------------------- -->
|
||
<!-- -------------------------------------------------------------------------- -->
|
||
<a name="RandomTimerAttributes"></a>
|
||
<h3>Attributes</h3>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li><a name="disableCond">disableCond</a><br>
|
||
The default behavior of a RandomTimer is, that it works.
|
||
To set the Randomtimer out of work, you can specify in the disableCond attibute a condition in perlcode that must evaluate to true.
|
||
The Condition must be put into round brackets. The best way is to define
|
||
a function in 99_utils.
|
||
<br>
|
||
<b>Examples</b>
|
||
<pre>
|
||
attr ZufallsTimerZ disableCond (!isVerreist())
|
||
attr ZufallsTimerZ disableCond (Value("presenceDummy" eq "notPresent"))
|
||
</pre>
|
||
</li>
|
||
|
||
<li><a name="disableCond">disableCond</a><br>
|
||
The default behavior of a RandomTimer is, that it shuts down the device after stoptime is reached.
|
||
The <b>keepDeviceAlive</b> attribute changes the behavior. If set, the device status is not changed when the stoptime is reached.
|
||
<br>
|
||
<b>Example</b>
|
||
<pre>
|
||
attr ZufallsTimerZ keepDeviceAlive
|
||
</pre>
|
||
</li>
|
||
|
||
<li><a name="onOffCmd">onCmd, offCmd</a><br>
|
||
Setting the on-/offCmd changes the command sent to the device. Standard is: "set <device> on".
|
||
The device can be specified by a @.
|
||
<br>
|
||
<b>Examples</b>
|
||
<pre>
|
||
attr Timer oncmd {fhem("set @ on-for-timer 14")}
|
||
attr Timer offCmd {fhem("set @ off 16")}
|
||
attr Timer oncmd set @ on-for-timer 12
|
||
attr Timer offCmd set @ off 12
|
||
</pre>
|
||
</li>
|
||
|
||
<li><a name="switchmode">switchmode</a><br>
|
||
Setting the switchmode you can influence the behavior of switching on/off.
|
||
The parameter has the Format 999/999 and the default ist 800/200. The values are in "per mill".
|
||
The first parameter sets the value of the probability that the device will be switched on when the device is off.
|
||
The second parameter sets the value of the probability that the device will be switched off when the device is off.
|
||
<b>Examples</b>
|
||
<pre>
|
||
attr ZufallsTimerZ switchmode 400/400
|
||
</pre>
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
<a name="Revolt"></a>
|
||
<h3>Revolt NC-5462</h3>
|
||
<ul>
|
||
Provides voltage, current, frequency, power, pf, energy readings for Revolt NC-5462 devices via CUL.
|
||
<br><br>
|
||
|
||
<a name="RevoltDefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Revolt <id></code>
|
||
<br><br>
|
||
<id> is a 4 digit hex number to identify the NC-5462 device.<br>
|
||
Note: devices are autocreated on reception of the first message.<br>
|
||
</ul>
|
||
<br>
|
||
<a name="RevoltReadings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>energy [kWh]</li>
|
||
<li>power [W]</li>
|
||
<li>voltage [V]</li>
|
||
<li>current [A]</li>
|
||
<li>frequency [Hz]</li>
|
||
<li>Pf</li>
|
||
</ul>
|
||
|
||
</ul>
|
||
<a name="SCIVT"></a>
|
||
<h3>SCIVT</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="SCIVTdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SCIVT <SCD-device></code>
|
||
<br><br>
|
||
|
||
Define a SCD series solar controler device. Details see <a
|
||
href="http://english.ivt-hirschau.de/content.php?parent_id=CAT_64&doc_id=DOC_118">here</a>.
|
||
You probably need a Serial to USB controller like the PL2303.
|
||
<br>
|
||
Defining an SCIVT device will schedule an internal task, which reads the
|
||
status of the device every 5 minutes, and triggers notify/filelog commands.
|
||
<br>Note: Currently this device does not support a "set" function, only
|
||
a single get function which reads the device status immediately.
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define scd SCIVT /dev/ttyUSB2</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="SVICTset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="SVICTget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get SCVIT data</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="SVICTattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (SCD)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="SISPM"></a>
|
||
<h3>SISPM</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="SISPMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SISPM </path/to/sispmctl></code>
|
||
<br><br>
|
||
|
||
<!--<div style="background-color: #ffaaaa;"> -->
|
||
<div>
|
||
When <i>using multiple SIS PMs on one host</i>, sispmctl up to and including V 2.7 has a bug:
|
||
<pre>plug-2:# sispmctl -v -s -d 1 -g all -d 2 -g all
|
||
|
||
SiS PM Control for Linux 2.7
|
||
|
||
(C) 2004, 2005, 2006, 2007, 2008 by Mondrian Nuessle, (C) 2005, 2006 by Andreas Neuper.
|
||
This program is free software.
|
||
[...]
|
||
|
||
Gembird #0 is USB device 013.This device is a 4-socket SiS-PM.
|
||
[...]
|
||
|
||
Gembird #1 is USB device 015.This device is a 4-socket SiS-PM.
|
||
[...]
|
||
|
||
Accessing Gembird #1 USB device 015
|
||
Status of outlet 1: on
|
||
Status of outlet 2: on
|
||
Status of outlet 3: on
|
||
Status of outlet 4: on
|
||
Error performing requested action
|
||
Libusb error string: error sending control message: Invalid argument
|
||
Terminating
|
||
*** glibc detected *** sispmctl: double free or corruption (fasttop): 0x000251e0 ***
|
||
[...]</pre>
|
||
Well, the fix is simple and will be sent upstream, but in case it's not incorporated
|
||
at the time you need it, here it is; it's easy to apply even by hand ;-)
|
||
<pre>
|
||
--- src/main.c-old 2010-01-19 16:56:15.000000000 +0100
|
||
+++ src/main.c 2010-01-19 16:54:56.000000000 +0100
|
||
@@ -441,7 +441,7 @@
|
||
}
|
||
break;
|
||
case 'd': // replace previous (first is default) device by selected one
|
||
- if(udev!=NULL) usb_close (udev);
|
||
+ if(udev!=NULL) { usb_close (udev); udev=NULL; }
|
||
devnum = atoi(optarg);
|
||
if(devnum>=count) devnum=count-1;
|
||
break;
|
||
</pre></div><br>
|
||
|
||
Defines a path to the program "sispmctl", which is used to control (locally attached)
|
||
"Silver Shield Power Manager" devices. Usually these are connected to the local computer
|
||
via USB, more than one "sispm" device per computer is supported. (Please note that, due
|
||
to neglections in their USB driver, AVM's Fritz!Box 7170 (and derivates, like Deutsche
|
||
Telekom's Speedport W901V) <b>is not</b> able to talk to these devices ... The Fritz!Box
|
||
72xx and 73xx should be fine.)
|
||
|
||
The communication between FHEM and the Power Manager device is done by using the open
|
||
source <a href="http://sispmctl.sourceforge.net/">sispmctl</a> program. Thus, for the
|
||
time being, THIS functionality is only available running FHEM on Linux (or any other platform
|
||
where you can get the sispmctl program compiled and running). On the bright side: by
|
||
interfacing via commandline, it is possible to define multiple SISPM devices, e. g. with
|
||
a wrapper that does execute sispmctl on a remote (Linux) system. And: sispmctl runs happily
|
||
on Marvells SheevaPlug ;) <i>Please note:</i> if you're not running FHEM as root, you most likely
|
||
have to make sispmctl setuid root (<code>chmod 4755 /path/to/sispmctl</code>) or fiddle with
|
||
udev so that the devices of the Power Manager are owned by the user running FHEM.
|
||
|
||
After defining a SISPM device, a first test is done, identifying attached PMs. If this
|
||
succeeds, an internal task is scheduled to read the status every 30 seconds. (Reason
|
||
being that someone else could have switched sockets externally to FHEM.)
|
||
|
||
To actually control any power sockets, you need to define a <a href="#SIS_PMS">SIS_PMS</a>
|
||
device ;) If autocreate is enabled, those should be autocreated for your convenience as
|
||
soon as the first scan took place (30 seconds after the define).
|
||
|
||
Implementation of SISPM.pm tries to be nice, that is it reads from the pipe only
|
||
non-blocking (== if there is data), so it should be safe even to use it via ssh or
|
||
a netcat-pipe over the Internet, but this, as well, has not been tested extensively yet.
|
||
<br><br>
|
||
|
||
Attributes:
|
||
<ul>
|
||
<li><code>model</code>: <code>SISPM</code> (ignored for now)</li>
|
||
</ul>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define PMS_Terrarium SISPM /usr/bin/sispmctl</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="SISPMset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="SISPMget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="SISPMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (SISPM)</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="SIS_PMS"></a>
|
||
|
||
<h3>SIS_PMS</h3>
|
||
<ul>
|
||
This module is responsible for handling the actual sockets (power on,
|
||
power off, toggle) on a "Silver Shield Power Manager", see <a href="#SISPM">SISPM</a>
|
||
for how to define access to one (SIS_PMS stands for "Silver Shield Power Manager Socket").
|
||
<br><br>
|
||
|
||
<a name="SIS_PMSdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SIS_PMS <serial> <socket></code>
|
||
<br><br>
|
||
|
||
To securely distinguish multiple attached Power Manager devices, the
|
||
serial number of those is used. You get these with "sispmctl -s" - or
|
||
just let autocreate define the sockets attached for you.<br>
|
||
|
||
<ul>
|
||
<li><code><serial></code> is the serial number of the Power Manager device, see above.</li>
|
||
<li><code><socket></code> is a number between 1 and 4 (for a 4 socket model)</li>
|
||
</ul>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define lamp SIS_PMS 01:02:03:04:05 1</code><br>
|
||
<code>define otherlamp SIS_PMS 01:02:03:04:05 3</code><br>
|
||
<code>define tv SIS_PMS 01:01:38:44:55 1</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="SIS_PMSset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> [<time>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
off
|
||
on
|
||
toggle
|
||
on-till # Special, see the note
|
||
off-till # Special, see the note
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set lamp on</code><br>
|
||
<code>set lamp1,lamp2,lamp3 on</code><br>
|
||
<code>set lamp1-lamp3 on</code><br>
|
||
<code>set hql_lamp on-till 18:45</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>As an external program is used, a noticeable delay may occur.</li>
|
||
<li>*-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
|
||
or { <perl code> }, where the perl-code returns a time
|
||
specification).
|
||
If the current time is greater than the specified time, then the
|
||
command is ignored, else an "on" or "off" command, respectively, is
|
||
generated, and for the given time an "off"/"on" command is
|
||
scheduleld via the at command.</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="SIS_PMSattributes"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<a name="attrdummy"></a>
|
||
<li>dummy<br>
|
||
Set the device attribute dummy to define devices which should not
|
||
output any signals. Associated notifys will be executed if the signal
|
||
is received. Used e.g. to react to a code from a sender, but it will
|
||
not actually switch if triggered in the web frontend.
|
||
</li><br>
|
||
|
||
<li><a href="#loglevel">loglevel</a></li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="SML"></a>
|
||
|
||
<h3>SML</h3>
|
||
<ul><p>
|
||
This module supports "Intelligenter Strom Zhler"(ENBW) and "Sparzhler" (Yellow Strom).<br>
|
||
The electricity meter will be polled in a defined interval (1-100) for new values.
|
||
</p>
|
||
<b>Define</b><br>
|
||
<code>define <name> SML <host> <port> [<interval> <timeout>]</code><br>
|
||
<p>
|
||
Example:<br>
|
||
define StromZ1 SML 192.168.178.20 <br>
|
||
define StromZ2 SML 192.168.10.25 60 60 <br>
|
||
</p>
|
||
|
||
<b>Set</b><br>
|
||
set <name> <value> <nummber><br>where value is one of:<br><br>
|
||
<ul>
|
||
<li><code>TOTALPOWER</code> </li>
|
||
<li><code>YEARPOWER </code> </li>
|
||
<li><code>MONTHPOWER</code> </li>
|
||
<li><code>DAYPOWER </code> </li>
|
||
<li><code>Interval </code> </li>
|
||
</ul>
|
||
<br>Example:<br>
|
||
set <name> TOTALPOWER 12345 <br><br>
|
||
|
||
<b>Get</b><br>
|
||
get <name> <value> <br>where value is one of:<br>
|
||
<ul>
|
||
<li><code>TOTALPOWER</code></li>
|
||
<li><code>YEARPOWER </code></li>
|
||
<li><code>MONTHPOWER</code></li>
|
||
<li><code>DAYPOWER </code></li>
|
||
<li><code>Interval </code> </li>
|
||
</ul>
|
||
<br>Example:<br>
|
||
get <name> DAYPOWER<br>
|
||
get <name> YEARPOWER<br><br>
|
||
|
||
</ul>
|
||
|
||
<a name="STACKABLE_CC"></a>
|
||
<h3>STACKABLE_CC</h3>
|
||
<ul>
|
||
This module handles the stackable CC1101 devices for the Raspberry PI from
|
||
busware.de. You can attach a lot of CUL-Type devices to a single RPi this way.
|
||
The first device is defined as a CUL, the rest of them as STACKABLE_CC.
|
||
<br><br>
|
||
|
||
<a name="STACKABLE_CCdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> STACKABLE_CC <Base-Device-Name></code> <br>
|
||
<br>
|
||
<Base-Device-Name> is the name of the device, which this device is
|
||
attached on, the first one has to be defined as a CUL device<br>
|
||
Example:
|
||
<ul><code>
|
||
define SCC0 CUL /dev/ttyAMA0@38400<br>
|
||
attr SCC0 rfmode SlowRF<br>
|
||
define SCC1 STACKABLE_CC CUL<br>
|
||
attr SCC1 rfmode HomeMatic<br>
|
||
define SCC2 STACKABLE_CC CUL<br>
|
||
attr SCC2 rfmode Max<br>
|
||
</code></ul>
|
||
<b>Important:</b>
|
||
<ul>
|
||
<li>The rfmode has to be specified explicitely (valid for the STACKABLE_CC
|
||
types only, not for the first, which is defined as a CUL).</li>
|
||
<li>In case of SlowRF, the FHTID has to be specified explicitely with the
|
||
command "set SCCX raw T01HHHH". Again, this is valid for the STACKABLE_CC
|
||
types only.</li>
|
||
<li>If you rename the base CUL or a STACKABLE_CC, which is a base for
|
||
another one, the define of the next one has to be adjusted, and FHEM has to be
|
||
restarted.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="STACKABLE_CCset"></a>
|
||
<b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
|
||
|
||
<a name="STACKABLE_CCget"></a>
|
||
<b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
|
||
|
||
<a name="STACKABLE_CCattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
<li><a href="#ignore">ignore</a></li><br>
|
||
The rest of the attributes is the same as for the <a href="#CULattr">CUL</a>.
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="STV"></a>
|
||
|
||
<h3>STV</h3>
|
||
<ul><p>
|
||
This module supports Samsung TV devices.<br>
|
||
LEXXBXX (B Series) use port 52235 <br>
|
||
LEXXCXX (C|D Series) use port 55000 <br>
|
||
</p>
|
||
<b>Define</b><br>
|
||
<code>define <name> STV <host>]</code><br>
|
||
<p>
|
||
Example:<br>
|
||
define Television1 STV 192.168.178.20 <br> or
|
||
define Television2 STV 192.168.178.20 52235 <br>
|
||
define Television2 STV 192.168.178.20 55000 <br>
|
||
</p>
|
||
<b>Set</b><br>
|
||
set <name> <value> <nummber><br>where value is one of:<br><br>
|
||
<ul>
|
||
<li><code>mute</code> </li>
|
||
<li><code>volume </code> </li>
|
||
<li><code>call</code> </li>
|
||
<li><code>sms </code> </li>
|
||
<li><code>date </code> </li>
|
||
</ul>
|
||
<br>Example:<br>
|
||
set <name> mute <br>
|
||
set <name> volume 20 <br>
|
||
set <name> call Peter 012345678 Phone 87654321 <br><br>
|
||
|
||
<b>Get</b><br>
|
||
<ul>N/A</ul><br>
|
||
</ul>
|
||
|
||
<a name="SUNRISE_EL"></a>
|
||
<h3>SUNRISE_EL</h3>
|
||
<ul>
|
||
This module is used to define the functions<pre>
|
||
sunrise, sunset,
|
||
sunrise_rel, sunset_rel
|
||
sunrise_abs, sunset_abs
|
||
isday</pre>
|
||
perl functions, to be used in <a href="#at">at</a> or FS20 on-till commands.<br>
|
||
First you should set the longitude and latitude global attributes to the
|
||
exact longitude and latitude values (see e.g. maps.google.com for the exact
|
||
values, which should be in the form of a floating point value). The default
|
||
value is Frankfurt am Main, Germany.
|
||
<br><br>
|
||
The default altitude ($defaultaltit in SUNRISE_EL.pm) defines the sunrise/sunset
|
||
for Civil twilight (i.e. one can no longer read outside without artificial
|
||
illumination), which differs from sunrise/sunset times found on different
|
||
websites. See perldoc "DateTime::Event::Sunrise" for alternatives.
|
||
<br><br>
|
||
|
||
sunrise()/sunset() returns the absolute time of the next sunrise/sunset,
|
||
adding 24 hours if the next event is tomorrow, to use it in the timespec of
|
||
an at device or for the on-till command for FS20 devices.<br>
|
||
|
||
sunrise_rel()/sunset_rel() returns the relative time to the next
|
||
sunrise/sunset. <br>
|
||
sunrise_abs()/sunset_abs() return the absolute time of the corresponding
|
||
event today (no 24 hours added).<br>
|
||
All functions take up to three arguments:<br>
|
||
<ul>
|
||
<li>The first specifies an offset (in seconds), which will be added to the
|
||
event.</li>
|
||
<li>The second and third specify min and max values (format: "HH:MM").</li>
|
||
</ul>
|
||
<br>
|
||
isday() can be used in some notify or at commands to check if the sun is up or
|
||
down.<br><br>
|
||
|
||
Optionally, for all functions you can set first argument which defines a horizon value
|
||
which then is used instead of the $defaultaltit in SUNRISE_EL.pm.<br>
|
||
Possible values are: "REAL", "CIVIL", "NAUTIC", "ASTRONOMIC" or a
|
||
positive or negative number preceded by "HORIZON="<br>
|
||
REAL is 0, CIVIL is -6, NATUIC is -12, ASTRONOMIC is -18 degrees above horizon.<br><br>
|
||
Example:<br>
|
||
<ul>
|
||
<PRE>
|
||
# When sun is 6 degrees below horizon - same as sunrise();
|
||
sunrise("CIVIL");
|
||
|
||
# When sun is 3 degrees below (-3 above) horizon (Between real and civil sunset)
|
||
sunset("HORIZON=-3");
|
||
|
||
# When sun is 1 degree above horizon
|
||
sunset("HORIZON=1");
|
||
|
||
# Switch lamp1 on at real sunset, not before 18:00 and not after 21:00
|
||
define a15 at *{sunset("REAL",0,"18:00","21:00")} set lamp1 on
|
||
</PRE>
|
||
</ul>
|
||
|
||
<b>Define</b> <ul>N/A</ul><br>
|
||
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<b>Attributes</b><br>
|
||
<ul>
|
||
<a name="latitude"></a>
|
||
<li>latitude<br>
|
||
If set, this latitude is used to calculate sunset/sunrise<br>
|
||
Notation need to be in decimal format (for example Berlin = 52.666)
|
||
As default Frankfurt/Main, Germany (50.112) is used.
|
||
</li><br>
|
||
<a name="longitude"></a>
|
||
<li>longitude<br>
|
||
If set, this longitude is used to calculate sunset/sunrise<br>
|
||
Notation need to be in decimal format (for example Berlin = 13.400)
|
||
As default Frankfurt/Main, Germany (8.686) is used.
|
||
</li><br>
|
||
<a name="altitude"></a>
|
||
<li>altitude<br>
|
||
Used by other modules.
|
||
</li><br>
|
||
Note: these are global attributes, e.g.<br>
|
||
<ul>
|
||
attr global latitude 50.112<br>
|
||
attr global longitude 8.686<br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
|
||
</ul>
|
||
|
||
<a name="SVG"></a>
|
||
<h3>SVG</h3>
|
||
<ul>
|
||
<a name="SVGlinkdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SVG
|
||
<logDevice>:<gplotfile>:<logfile></code>
|
||
<br><br>
|
||
This is the Plotting/Charting device of FHEMWEB
|
||
Examples:
|
||
<ul>
|
||
<code>define MyPlot SVG inlog:temp4hum4:CURRENT</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>Normally you won't define an SVG device manually, as
|
||
FHEMWEB makes it easy for you, just plot a logfile (see <a
|
||
href="#logtype">logtype</a>) and click on "Create SVG instance".
|
||
Specifying CURRENT as a logfilename will always access the current
|
||
logfile, even if its name changes regularly.</li>
|
||
<li>For historic reasons this module uses a Gnuplot file description
|
||
to store different attributes. Some special commands (beginning with
|
||
#FileLog or #DbLog) are used additionally, and not all gnuplot
|
||
attribtues are implemented.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="SVGset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>copyGplotFile<br>
|
||
Copy the currently specified gplot file to a new file, which is named
|
||
after the SVG device, existing files will be overwritten.
|
||
This operation is needed in order to use the plot editor (see below)
|
||
without affecting other SVG instances using the same gplot file.
|
||
Creating the SVG instance from the FileLog detail menu will also
|
||
create a unique gplot file, in this case this operation is not needed.
|
||
</li>
|
||
</ul><br>
|
||
|
||
<a name="SVGget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="SVGattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="fixedrange"></a>
|
||
<li>fixedrange [offset]<br>
|
||
Contains two time specs in the form YYYY-MM-DD separated by a space.
|
||
In plotmode gnuplot-scroll or SVG the given time-range will be used,
|
||
and no scrolling for this SVG will be possible. Needed e.g. for
|
||
looking at last-years data without scrolling.<br><br>
|
||
If the value is one of hour, day, <N>days, week, month, year than
|
||
set the zoom level for this SVG independently of the user specified
|
||
zoom-level. This is useful for pages with multiple plots: one of the
|
||
plots is best viewed in with the default (day) zoom, the other one with
|
||
a week zoom.<br>
|
||
|
||
If given, the optional integer parameter offset refers to a different
|
||
period (e.g. last year: fixedrange year -1, 2 days ago: fixedrange day
|
||
-2).
|
||
|
||
</li><br>
|
||
|
||
<a name="fixedoffset"></a>
|
||
<li>fixedoffset <nDays><br>
|
||
Set an fixed offset (in days) for the plot.
|
||
</li><br>
|
||
|
||
<a name="startDate"></a>
|
||
<li>startDate<br>
|
||
Set the start date for the plot. Used for demo installations.
|
||
</li><br>
|
||
|
||
<li><a href="#plotsize">plotsize</a></li><br>
|
||
|
||
<li><a href="#plotmode">plotmode</a></li><br>
|
||
|
||
<a name="label"></a>
|
||
<li>label<br>
|
||
Double-Colon separated list of values. The values will be used to replace
|
||
<L#> type of strings in the .gplot file, with # beginning at 1
|
||
(<L1>, <L2>, etc.). Each value will be evaluated as a perl
|
||
expression, so you have access e.g. to the Value functions.<br><br>
|
||
|
||
If the plotmode is gnuplot-scroll or SVG, you can also use the min, max,
|
||
avg, cnt, sum, currval (last value) and currdate (last date) values of
|
||
the individual curves, by accessing the corresponding values from the
|
||
data hash, see the example below:<br>
|
||
|
||
<ul>
|
||
<li>Fixed text for the right and left axis:<br>
|
||
<ul>
|
||
<li>Fhem config:<br>
|
||
attr wl_1 label "Temperature"::"Humidity"</li>
|
||
<li>.gplot file entry:<br>
|
||
set ylabel <L1><br>
|
||
set y2label <L2></li>
|
||
</ul></li>
|
||
<li>Title with maximum and current values of the 1st curve (FileLog)
|
||
<ul>
|
||
<li>Fhem config:<br>
|
||
attr wl_1 label "Max $data{max1}, Current $data{currval1}"</li>
|
||
<li>.gplot file entry:<br>
|
||
set title <L1><br></li>
|
||
</ul></li>
|
||
</ul>
|
||
</li>
|
||
|
||
<a name="title"></a>
|
||
<li>title<br>
|
||
A special form of label (see above), which replaces the string <TL>
|
||
in the .gplot file. It defaults to the filename of the logfile.
|
||
</li>
|
||
|
||
<a name="plotfunction"></a>
|
||
<li>plotfunction<br>
|
||
Space value separated list of values. The value will be used to replace
|
||
<SPEC#> type of strings in the .gplot file, with # beginning at 1
|
||
(<SPEC1>, <SPEC2>, etc.) in the #FileLog or #DbLog directive.
|
||
With this attribute you can use the same .gplot file for multiple devices
|
||
with the same logdevice.
|
||
<ul><b>Example:</b><br>
|
||
<li>#FileLog <SPEC1><br>
|
||
with: attr <SVGdevice> plotfunction "4:IR\x3a:0:"<br>
|
||
instead of<br>
|
||
#FileLog 4:IR\x3a:0:
|
||
</li>
|
||
<li>#DbLog <SPEC1><br>
|
||
with: attr <SVGdevice> plotfunction
|
||
"Garage_Raumtemp:temperature::"<br> instead of<br>
|
||
#DbLog Garage_Raumtemp:temperature::
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="plotEditor"></a>
|
||
<b>Plot-Editor</b>
|
||
<br>
|
||
This editor is visible on the detail screen of the SVG instance.
|
||
Most features are obvious here, up to some exceptions:
|
||
<ul>
|
||
<li>if you want to omit the title for a Diagram label, enter notitle in the
|
||
input field.</li>
|
||
<li>if you want to specify a fixed value (not taken from a column) if a
|
||
string found (e.g. 1 if the FS20 switch is on and 0 if it is off), then
|
||
you have to specify the Tics first, and write the .gplot file, before you
|
||
can select this value from the dropdown.<br>
|
||
Example:
|
||
<ul>
|
||
Enter in the Tics field: ("On" 1, "Off" 0)<br>
|
||
Write .gplot file<br>
|
||
Select "1" from the column dropdown (note the double quote!) for the
|
||
regexp switch.on, and "0" for the regexp switch.off.<br>
|
||
Write .gplot file again<br>
|
||
</ul></li>
|
||
</ul>
|
||
The visibility of the ploteditor can be configured with the FHEMWEB attribute
|
||
<a href="#ploteditor">ploteditor</a>.
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="SWAP"></a>
|
||
<h3>SWAP</h3>
|
||
<ul>
|
||
|
||
<tr><td>
|
||
The SWAP protocoll is used by panStamps (<a href="http://www.panstamp.com">panstamp.com</a>).<br><br>
|
||
|
||
This is a generic module that will handle all SWAP devices with known device description files via
|
||
a <a href="#panStamp">panStick</a> as the IODevice.<br><br>
|
||
|
||
All communication is done on the SWAP register level. FHEM readings are created for all user registers
|
||
and userReadings are created to map low level SWAP registers to 'human readable' format with the
|
||
mapping from the device descriprion files.<br><br>
|
||
|
||
For higher level features like "on,off,on-for-timer,..." specialized modules have to be used.<br><br>
|
||
|
||
Messages for devices in power-down-state are queued and send when the device enters SYNC state.
|
||
This typicaly happens during device startup after a reset.
|
||
|
||
<br><br>
|
||
Notes:
|
||
<ul>
|
||
<li> This module requires XML::Simple.</li>
|
||
<li>Devices with the default address FF will be changed to the first free address in the range F0-FE.</li>
|
||
<li>For power-down devices the default transmit interval of FFFF will be changed to 0384 (900 seconds).</li>
|
||
</ul>
|
||
|
||
<br>
|
||
<br>
|
||
|
||
<a name="SWAPDefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SWAP <ID></code> <br>
|
||
<br>
|
||
The ID is a 2 digit hex number to identify the moth in the panStamp network.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="SWAP_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>regGet <reg><br>
|
||
request status message for register id <reg>.
|
||
for system registers the register name can be used instead if the two digit register id in hex.
|
||
</li><br>
|
||
|
||
<li>regSet <reg> <data><br>
|
||
write <data> to register id <reg>.
|
||
for system registers the register name can be used instead if the twi digit register id in hex.
|
||
</li><br>
|
||
|
||
<li>regSet <reg>.<ep> <data><br>
|
||
write <data> to endpoint <ep> of register <reg>. will not work if no reading for register <reg> is available as all nibbles that are not part of endpoint <ep> will be filled from this reading.
|
||
</li><br>
|
||
|
||
<li>statusRequest<br>
|
||
request transmision of all registers.
|
||
</li><br>
|
||
<li>readDeviceXML<br>
|
||
reload the device description xml file.
|
||
</li><br>
|
||
<li>clearUnconfirmed<br>
|
||
clears the list of unconfirmed messages.
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="SWAP_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>regList<br>
|
||
list all non-system registers of this device.
|
||
</li><br>
|
||
<li>regListAll<br>
|
||
list all registers of this device.
|
||
</li><br>
|
||
<li>listUnconfirmed<br>
|
||
list all unconfirmed messages.
|
||
</li><br>
|
||
<li>products<br>
|
||
dumps all known devices.
|
||
</li><br>
|
||
<li>deviceXML<br>
|
||
dumps the device xml data.
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="SWAP_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>ProductCode<br>
|
||
ProductCode of the device. used to read the register configuration from the device definition file.
|
||
hast to be set manualy for devices that are in sleep mode during definition.
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="SWAP_0000002200000003"></a>
|
||
<h3>SWAP_0000002200000003</h3>
|
||
<ul>
|
||
|
||
<tr><td>
|
||
Module for the justme version of the panstamp rgb driver board with ir (sketch product code 0000002200000003).
|
||
|
||
<br><br>
|
||
to learn an ir command the simplest way ist to use 'learnIR #'. the on board led will start to blink indicating ir learning mode. after an ir command is received the blinking will switch to slow and the boards waits for a fhem command (on/off/...) and will link the ir command to the fhem command.
|
||
<br><br>
|
||
received ir commands that will not trigger one of the 16 possible learned commands will be send as SWAP register 0C to fhem and can be used in notifys.
|
||
<br><br>
|
||
SWAP register 0E will configure the power on state of the board: off, configured color, last color before power down.
|
||
<br><br>
|
||
|
||
<a name="SWAP_0000002200000003_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SWAP_0000002200000003 <ID> 0000002200000003</code> <br>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="SWAP_0000002200000003_Set"></a>
|
||
<b>Set </b>
|
||
all SWAP set commands and:
|
||
<ul>
|
||
<li>on<br>
|
||
</li>
|
||
<li>on-for-timer <time><br>
|
||
</li>
|
||
<li>off<br>
|
||
</li>
|
||
<li>toggle<br>
|
||
</li><br>
|
||
|
||
<li>rgb <RRGGBB><br>
|
||
set the led color
|
||
</li><br>
|
||
|
||
<li>dimUP<br>
|
||
</li>
|
||
<li>dimDown<br>
|
||
</li><br>
|
||
|
||
<li>setIR # <code><br>
|
||
</li>
|
||
<li>learnIR #<br>
|
||
</li>
|
||
<li>storeIR # <code> <command><br>
|
||
</li><br>
|
||
|
||
<li>getIR # | all<br>
|
||
read content of IR regisgter # or all IR registers
|
||
</li><br>
|
||
|
||
<li>setFade <RRGGBB> <time><br>
|
||
stores color and time in fede register #
|
||
</li><br>
|
||
|
||
<li>startFade <#1> <#2><br>
|
||
starts an endless fading loop over all fading registers [#1..#2]
|
||
</li><br>
|
||
|
||
<li>getFade # | all<br>
|
||
read content of fade regisgter # or all fade regisgters
|
||
</li><br>
|
||
|
||
<li><a href="#setExtensions"> set extensions</a> are supported.</li>
|
||
</ul><br>
|
||
|
||
<a name="SWAP_0000002200000003_Get"></a>
|
||
<b>Get</b>
|
||
all SWAP get commands and:
|
||
<ul>
|
||
<li>rgb<br>
|
||
returns the current led color
|
||
</li><br>
|
||
<li>listIR<br>
|
||
list all IR registers of this device. use getIR first.
|
||
</li><br>
|
||
<li>listFade<br>
|
||
list all fade registers. use getFade first.
|
||
</li><br>
|
||
</ul><br>
|
||
|
||
<a name="SWAP_0000002200000003_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>color-icon<br>
|
||
1 -> use lamp color as icon color and 100% shape as icon shape<br>
|
||
2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
|
||
<li>ProductCode<br>
|
||
must be 0000002200000003</li><br>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<!-- ================================ -->
|
||
<a name="SYSMON"></a>
|
||
<h3>SYSMON</h3>
|
||
<ul>
|
||
This module provides statistics about the system running FHEM server. Only Linux-based systems are supported.
|
||
Some informations are hardware specific and are not available on every platform.
|
||
So far, this module has been tested on the following systems:
|
||
Raspberry Pi (Debian Wheezy) BeagleBone Black, FritzBox 7390 (no CPU data), WR703N under OpenWrt (no CPU data).
|
||
<br><br>
|
||
<b>Define</b>
|
||
<br><br>
|
||
<code>define <name> SYSMON [<M1>[ <M2>[ <M3>[ <M4>]]]]</code><br>
|
||
<br>
|
||
|
||
This statement creates a new SYSMON instance. The parameters M1 to M4 define the refresh interval for various Readings (statistics). The parameters are to be understood as multipliers for the time defined by INTERVAL_BASE. Because this time is fixed at 60 seconds, the Mx-parameter can be considered as time intervals in minutes.<br>
|
||
If one (or more) of the multiplier is set to zero, the corresponding readings is deactivated.
|
||
<br>
|
||
<br>
|
||
The parameters are responsible for updating the readings according to the following scheme:
|
||
<ul>
|
||
<li>M1: (Default: 1)<br>
|
||
cpu_freq, cpu_temp, cpu_temp_avg, loadavg, stat_cpu, stat_cpu_diff, stat_cpu_percent, stat_cpu_text<br><br>
|
||
</li>
|
||
<li>M2: (Default: M1)<br>
|
||
ram, swap<br>
|
||
</li>
|
||
<li>M3: (Default: M1)<br>
|
||
eth0, eth0_diff, wlan0, wlan0_diff<br><br>
|
||
</li>
|
||
<li>M4: (Default: 10*M1)<br>
|
||
Filesystem informations<br><br>
|
||
</li>
|
||
<li>The following parameters are always updated with the base interval (regardless of the Mx-parameter):<br>
|
||
fhemuptime, fhemuptime_text, idletime, idletime_text, uptime, uptime_text<br><br>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<b>Readings:</b>
|
||
<br><br>
|
||
<ul>
|
||
<li>cpu_bogomips<br>
|
||
CPU Speed: BogoMIPS
|
||
</li>
|
||
<li>cpu_freq<br>
|
||
CPU frequency
|
||
</li>
|
||
<br>
|
||
<li>cpu_temp<br>
|
||
CPU temperature
|
||
</li>
|
||
<br>
|
||
<li>cpu_temp_avg<br>
|
||
Average of the CPU temperature, formed over the last 4 values.
|
||
</li>
|
||
<br>
|
||
<li>fhemuptime<br>
|
||
Time (in seconds) since the start of FHEM server.
|
||
</li>
|
||
<br>
|
||
<li>fhemuptime_text<br>
|
||
Time since the start of the FHEM server: human-readable output (text representation).
|
||
</li>
|
||
<br>
|
||
<li>idletime<br>
|
||
Time spent by the system since the start in the idle mode (period of inactivity).
|
||
</li>
|
||
<br>
|
||
<li>idletime_text<br>
|
||
The inactivity time of the system since system start in human readable form.
|
||
</li>
|
||
<br>
|
||
<li>loadavg<br>
|
||
System load (load average): 1 minute, 5 minutes and 15 minutes.
|
||
</li>
|
||
<br>
|
||
<li>ram<br>
|
||
memory usage.
|
||
</li>
|
||
<br>
|
||
<li>swap<br>
|
||
swap usage.
|
||
</li>
|
||
<br>
|
||
<li>uptime<br>
|
||
System uptime.
|
||
</li>
|
||
<br>
|
||
<li>uptime_text<br>
|
||
System uptime (human readable).
|
||
</li>
|
||
<br>
|
||
<li>Network statistics<br>
|
||
Statistics for the specified network interface about the data volumes transferred and the difference since the previous measurement.
|
||
<br>
|
||
Examples:<br>
|
||
Amount of the transmitted data via interface eth0.<br>
|
||
<code>eth0: RX: 940.58 MB, TX: 736.19 MB, Total: 1676.77 MB</code><br>
|
||
Change of the amount of the transferred data in relation to the previous call (for eth0).<br>
|
||
<code>eth0_diff: RX: 0.66 MB, TX: 0.06 MB, Total: 0.72 MB</code><br>
|
||
</li>
|
||
<br>
|
||
<li>File system information<br>
|
||
Usage of the desired file systems.<br>
|
||
Example:<br>
|
||
<code>fs_root: Total: 7340 MB, Used: 3573 MB, 52 %, Available: 3425 MB at /</code>
|
||
</li>
|
||
<br>
|
||
<li>CPU utilization<br>
|
||
Information about the utilization of CPUs.<br>
|
||
Example:<br>
|
||
<code>stat_cpu: 10145283 0 2187286 90586051 542691 69393 400342</code><br>
|
||
<code>stat_cpu_diff: 2151 0 1239 2522 10 3 761</code><br>
|
||
<code>stat_cpu_percent: 4.82 0.00 1.81 93.11 0.05 0.00 0.20</code><br>
|
||
<code>stat_cpu_text: user: 32.17 %, nice: 0.00 %, sys: 18.53 %, idle: 37.72 %, io: 0.15 %, irq: 0.04 %, sirq: 11.38 %</code>
|
||
</li>
|
||
<br>
|
||
<li>user defined<br>
|
||
These readings provide output of commands, which are passed to the operating system.
|
||
</li>
|
||
<br>
|
||
<br>
|
||
</ul>
|
||
|
||
Sample output:<br>
|
||
<ul>
|
||
|
||
<table style="border: 1px solid black;">
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname">cpu_freq</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>900</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">cpu_temp</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>49.77</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">cpu_temp_avg</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>49.7</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">eth0</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>RX: 2954.22 MB, TX: 3469.21 MB, Total: 6423.43 MB</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">eth0_diff</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>RX: 6.50 MB, TX: 0.23 MB, Total: 6.73 MB</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">fhemuptime</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>11231</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">fhemuptime_text </div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>0 days, 03 hours, 07 minutes</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">idletime</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>931024 88.35 %</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">idletime_text</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>10 days, 18 hours, 37 minutes (88.35 %)</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">loadavg</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>0.14 0.18 0.22</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">ram</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>Total: 485 MB, Used: 140 MB, 28.87 %, Free: 345 MB</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">swap</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>n/a</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">uptime</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>1053739</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">uptime_text</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>12 days, 04 hours, 42 minutes</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">wlan0</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>RX: 0.00 MB, TX: 0.00 MB, Total: 0 MB</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">wlan0_diff</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>RX: 0.00 MB, TX: 0.00 MB, Total: 0.00 MB</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">fs_root</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>Total: 7404 MB, Used: 3533 MB, 50 %, Available: 3545 MB at /</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname"><div class="dname">fs_boot</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>Total: 56 MB, Used: 19 MB, 33 %, Available: 38 MB at /boot</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div class="dname"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname">fs_usb1</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>Total: 30942 MB, Used: 6191 MB, 21 %, Available: 24752 MB at /media/usb1 </div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname">stat_cpu</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>10145283 0 2187286 90586051 542691 69393 400342 </div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname">stat_cpu_diff</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>2151 0 1239 2522 10 3 761 </div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td style="border-bottom: 1px solid black;"><div class="dname">stat_cpu_percent</div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>4.82 0.00 1.81 93.11 0.05 0.00 0.20 </div></td>
|
||
<td style="border-bottom: 1px solid black;"><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
<tr><td><div class="dname">stat_cpu_text</div></td>
|
||
<td><div>user: 32.17 %, nice: 0.00 %, sys: 18.53 %, idle: 37.72 %, io: 0.15 %, irq: 0.04 %, sirq: 11.38 % </div></td>
|
||
<td><div>2013-11-27 00:05:36</div></td>
|
||
</tr>
|
||
</table>
|
||
</ul><br>
|
||
|
||
<b>Get:</b><br><br>
|
||
<ul>
|
||
<li>interval<br>
|
||
Lists the specified polling intervalls.
|
||
</li>
|
||
<br>
|
||
<li>list<br>
|
||
Lists all readings.
|
||
</li>
|
||
<br>
|
||
<li>update<br>
|
||
Refreshs all readings.
|
||
</li>
|
||
<br>
|
||
<li>version<br>
|
||
Displays the version of SYSMON module.
|
||
</li>
|
||
<br>
|
||
</ul><br>
|
||
|
||
<b>Set:</b><br><br>
|
||
<ul>
|
||
<li>interval_multipliers<br>
|
||
Defines update intervals (as in the definition of the device).
|
||
</li>
|
||
<br>
|
||
<li>clean<br>
|
||
Clears user-definable Readings. After an update (manual or automatic) new readings are generated.<br>
|
||
</li>
|
||
<br>
|
||
<li>clear <reading name><br>
|
||
Deletes the Reading entry with the given name. After an update this entry is possibly re-created (if defined). This mechanism allows the selective deleting unnecessary custom entries.<br>
|
||
</li>
|
||
<br>
|
||
</ul><br>
|
||
|
||
<b>Attributes:</b><br><br>
|
||
<ul>
|
||
<li>filesystems <reading name>[:<mountpoint>[:<comment>]],...<br>
|
||
Specifies the file system to be monitored (a comma-separated list). <br>
|
||
Reading-name is used in the display and logging, the mount point is the basis of the evaluation, comment is relevant to the HTML display (see SYSMON_ShowValuesHTML)<br>
|
||
Examples: <br>
|
||
<code>/boot,/,/media/usb1</code><br>
|
||
<code>fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick</code><br>
|
||
</li>
|
||
<br>
|
||
<li>network-interfaces <name>[:<interface>[:<comment>]],...<br>
|
||
Comma-separated list of network interfaces that are to be monitored. Each entry consists of the Reading-name, the name of the Netwerk adapter and a comment for the HTML output (see SYSMON_ShowValuesHTML). If no colon is used, the value is used simultaneously as a Reading-name and interface name.<br>
|
||
Example <code>ethernet:eth0:Ethernet,wlan:wlan0:WiFi</code><br>
|
||
</li>
|
||
<br>
|
||
<li>user-defined <readingsName>:<Interval_Minutes>:<Comment>:<Cmd>,...<br>
|
||
This comma-separated list defines user defined Readings with the following data: Reading name, refresh interval (in minutes), a Comment, and operating system command.
|
||
<br>The os commands are executed according to the specified Intervals and are noted as Readings with the specified name. Comments are used for the HTML output (see SYSMON_ShowValuesHTML)..
|
||
<br>All parameter parts are required!
|
||
<br>It is important that the specified commands are executed quickly, because at this time the entire FHEM server is blocked!<br>
|
||
If results of the long-running operations required, these should be set up as a CRON job and store results as a text file.<br><br>
|
||
Example: Display of package updates for the operating system:<br>
|
||
cron-Job:<br>
|
||
<code> apt-get upgrade --dry-run| perl -ne '/(\d*)\s[upgraded|aktualisiert]\D*(\d*)\D*install|^ \S+.*/ and print "$1 aktualisierte, $2 neue Pakete"' 2>/dev/null > /opt/fhem/data/updatestatus.txt</code>
|
||
<br>
|
||
<code>uder-defined</code> attribute<br><code>sys_updates:1440:System Aktualisierungen:cat /opt/fhem/data/updatestatus.txt</code><br>
|
||
the number of available updates is daily recorded as 'sys_updates'.
|
||
</li>
|
||
<br>
|
||
<li>disable<br>
|
||
Possible values: 0 and 1. '1' means that the update is stopped.
|
||
</li>
|
||
<br>
|
||
</ul><br>
|
||
|
||
<b>Plots:</b><br><br>
|
||
<ul>
|
||
predefined gplot files:<br>
|
||
<ul>
|
||
FileLog versions:<br>
|
||
<code>
|
||
SM_RAM.gplot<br>
|
||
SM_CPUTemp.gplot<br>
|
||
SM_FS_root.gplot<br>
|
||
SM_FS_usb1.gplot<br>
|
||
SM_Load.gplot<br>
|
||
SM_Network_eth0.gplot<br>
|
||
SM_Network_eth0t.gplot<br>
|
||
SM_Network_wlan0.gplot<br>
|
||
SM_CPUStat.gplot<br>
|
||
SM_CPUStatSum.gplot<br>
|
||
SM_CPUStatTotal.gplot<br>
|
||
</code>
|
||
DbLog versions:<br>
|
||
<code>
|
||
SM_DB_all.gplot<br>
|
||
SM_DB_CPUFreq.gplot<br>
|
||
SM_DB_CPUTemp.gplot<br>
|
||
SM_DB_Load.gplot<br>
|
||
SM_DB_Network_eth0.gplot<br>
|
||
SM_DB_RAM.gplot<br>
|
||
</code>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<b>HTML output method (see Weblink): SYSMON_ShowValuesHTML(<SYSMON-Instance>[,<Liste>])</b><br><br>
|
||
<ul>
|
||
The module provides a function that returns selected Readings as HTML.<br>
|
||
As a parameter the name of the defined SYSMON device is expected.<br>
|
||
The second parameter is optional and specifies a list of readings to be displayed in the format <code><ReadingName>[:<Comment>[:<Postfix>]]</code>.<br>
|
||
<code>ReadingName</code> is the Name of desired Reading, <code>Comment</code> is used as the display name and postfix is displayed after eihentlichen value (such as units or as MHz can be displayed).<br>
|
||
If no <code>Comment</code> is specified, an internally predefined description is used.<br>
|
||
If no list specified, a predefined selection is used (all values are displayed).<br><br>
|
||
<code>define sysv1 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}</code><br>
|
||
<code>define sysv2 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: °C', 'cpu_freq:CPU Frequenz: MHz'))}</code>
|
||
</ul><br>
|
||
|
||
<b>Text output method (see Weblink): SYSMON_ShowValuesText(<SYSMON-Instance>[,<Liste>])</b><br><br>
|
||
<ul>
|
||
According to SYSMON_ShowValuesHTML, but formatted as plain text.<br>
|
||
</ul><br>
|
||
|
||
<b>Examples:</b><br><br>
|
||
<ul>
|
||
<code>
|
||
# Modul-Definition<br>
|
||
define sysmon SYSMON 1 1 1 10<br>
|
||
#attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,^~ /.*usb.*,~ /$<br>
|
||
attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,fs_.*,stat_cpu_percent<br>
|
||
attr sysmon filesystems fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick<br>
|
||
attr sysmon network-interfaces eth0:eth0:Ethernet,wlan0:wlan0:WiFi<br>
|
||
attr sysmon group RPi<br>
|
||
attr sysmon room 9.03_Tech<br>
|
||
<br>
|
||
# Log<br>
|
||
define FileLog_sysmon FileLog ./log/sysmon-%Y-%m.log sysmon<br>
|
||
attr FileLog_sysmon group RPi<br>
|
||
attr FileLog_sysmon logtype SM_CPUTemp:Plot,text<br>
|
||
attr FileLog_sysmon room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: CPU-Temperatur<br>
|
||
define wl_sysmon_temp SVG FileLog_sysmon:SM_CPUTemp:CURRENT<br>
|
||
attr wl_sysmon_temp group RPi<br>
|
||
attr wl_sysmon_temp label "CPU Temperatur: Min $data{min2}, Max $data{max2}, Last $data{currval2}"<br>
|
||
attr wl_sysmon_temp room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: Netzwerk-Datenübertragung für eth0<br>
|
||
define wl_sysmon_eth0 SVG FileLog_sysmon:SM_Network_eth0:CURRENT<br>
|
||
attr wl_sysmon_eth0 group RPi<br>
|
||
attr wl_sysmon_eth0 label "Netzwerk-Traffic eth0: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
|
||
attr wl_sysmon_eth0 room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: Netzwerk-Datenübertragung für wlan0<br>
|
||
define wl_sysmon_wlan0 SVG FileLog_sysmon:SM_Network_wlan0:CURRENT<br>
|
||
attr wl_sysmon_wlan0 group RPi<br>
|
||
attr wl_sysmon_wlan0 label "Netzwerk-Traffic wlan0: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
|
||
attr wl_sysmon_wlan0 room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: CPU-Auslastung (load average)<br>
|
||
define wl_sysmon_load SVG FileLog_sysmon:SM_Load:CURRENT<br>
|
||
attr wl_sysmon_load group RPi<br>
|
||
attr wl_sysmon_load label "Load Min: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
|
||
attr wl_sysmon_load room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: RAM-Nutzung<br>
|
||
define wl_sysmon_ram SVG FileLog_sysmon:SM_RAM:CURRENT<br>
|
||
attr wl_sysmon_ram group RPi<br>
|
||
attr wl_sysmon_ram label "RAM-Nutzung Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
|
||
attr wl_sysmon_ram room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: Dateisystem: Root-Partition<br>
|
||
define wl_sysmon_fs_root SVG FileLog_sysmon:SM_FS_root:CURRENT<br>
|
||
attr wl_sysmon_fs_root group RPi<br>
|
||
attr wl_sysmon_fs_root label "Root Partition Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
|
||
attr wl_sysmon_fs_root room 9.03_Tech<br>
|
||
<br>
|
||
# Visualisierung: Dateisystem: USB-Stick<br>
|
||
define wl_sysmon_fs_usb1 SVG FileLog_sysmon:SM_FS_usb1:CURRENT<br>
|
||
attr wl_sysmon_fs_usb1 group RPi<br>
|
||
attr wl_sysmon_fs_usb1 label "USB1 Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
|
||
attr wl_sysmon_fs_usb1 room 9.03_Tech<br>
|
||
<br>
|
||
# Anzeige der Readings zum Einbinden in ein 'Raum'.<br>
|
||
define SysValues weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}<br>
|
||
attr SysValues group RPi<br>
|
||
attr SysValues room 9.03_Tech<br>
|
||
<br>
|
||
# Anzeige CPU Auslasung<br>
|
||
define wl_sysmon_cpustat SVG FileLog_sysmon:SM_CPUStat:CURRENT<br>
|
||
attr wl_sysmon_cpustat label "CPU(min/max): user:$data{min1}/$data{max1} nice:$data{min2}/$data{max2} sys:$data{min3}/$data{max3} idle:$data{min4}/$data{max4} io:$data{min5}/$data{max5} irq:$data{min6}/$data{max6} sirq:$data{min7}/$data{max7}"<br>
|
||
attr wl_sysmon_cpustat group RPi<br>
|
||
attr wl_sysmon_cpustat room 9.99_Test<br>
|
||
attr wl_sysmon_cpustat plotsize 840,420<br>
|
||
define wl_sysmon_cpustat_s SVG FileLog_sysmon:SM_CPUStatSum:CURRENT<br>
|
||
attr wl_sysmon_cpustat_s label "CPU(min/max): user:$data{min1}/$data{max1} nice:$data{min2}/$data{max2} sys:$data{min3}/$data{max3} idle:$data{min4}/$data{max4} io:$data{min5}/$data{max5} irq:$data{min6}/$data{max6} sirq:$data{min7}/$data{max7}"<br>
|
||
attr wl_sysmon_cpustat_s group RPi<br>
|
||
attr wl_sysmon_cpustat_s room 9.99_Test<br>
|
||
attr wl_sysmon_cpustat_s plotsize 840,420<br>
|
||
define wl_sysmon_cpustatT SVG FileLog_sysmon:SM_CPUStatTotal:CURRENT<br>
|
||
attr wl_sysmon_cpustatT label "CPU-Auslastung"<br>
|
||
attr wl_sysmon_cpustatT group RPi<br>
|
||
attr wl_sysmon_cpustatT plotsize 840,420<br>
|
||
attr wl_sysmon_cpustatT room 9.99_Test<br>
|
||
</code>
|
||
</ul>
|
||
|
||
</ul>
|
||
<!-- ================================ -->
|
||
|
||
<a name="SYSSTAT"></a>
|
||
<h3>SYSSTAT</h3>
|
||
<ul>
|
||
Provides system statistics for the host FHEM runs on or a remote Linux system that is reachable by preconfigured passwordless ssh access.<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>This module needs <code>Sys::Statistics::Linux</code> on Linux.<br>
|
||
It can be installed with '<code>cpan install Sys::Statistics::Linux</code>'<br>
|
||
or on debian with '<code>apt-get install libsys-statistics-linux-perl</code>'</li>
|
||
|
||
<li>To monitor a target by snmp <code>Net::SNMP</code> hast to be installed.<br></li>
|
||
|
||
<li>To plot the load values the following code can be used:
|
||
<PRE>
|
||
define sysstatlog FileLog /usr/local/FHEM/var/log/sysstat-%Y-%m.log sysstat
|
||
attr sysstatlog nrarchive 1
|
||
define wl_sysstat weblink fileplot sysstatlog:sysstat:CURRENT
|
||
attr wl_sysstat label "Load Min: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"
|
||
attr wl_sysstat room System
|
||
</PRE></li>
|
||
<li>to match the root filesystem (mount point '/') in diskusage plots use
|
||
'<code>#FileLog 4:/\x3a:0:</code>' or '<code>#FileLog 4:\s..\s:0:</code>'
|
||
and <b>not</b> '<code>#FileLog 4:/:0:</code>' as the later will match all mount points</li>.
|
||
</ul>
|
||
|
||
<a name="SYSSTAT_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> SYSSTAT [<interval> [<interval_fs>] [<host>]]</code><br>
|
||
<br>
|
||
|
||
Defines a SYSSTAT device.<br><br>
|
||
|
||
The load is updated every <interval> seconds. The default and minimum is 60.<br><br>
|
||
The diskusage is updated every <interval_fs> seconds. The default is <interval>*60 and the minimum is 60.
|
||
<interval_fs> is only aproximated and works best if <interval_fs> is an integral multiple of <interval>.<br><br>
|
||
|
||
If <host> is given it has to be accessible by ssh without the need for a password.
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define sysstat SYSSTAT</code><br>
|
||
<code>define sysstat SYSSTAT 300</code><br>
|
||
<code>define sysstat SYSSTAT 60 600</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="SYSSTAT_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>load<br>
|
||
the 1 minute load average (for windows targets monitored by snmp aproximated value</li>
|
||
<li>state<br>
|
||
the 1, 5 and 15 minute load averages (or windows targets monitored by snmp the per cpu utilization)</li>
|
||
<li>user,system,idle,iowait<br>
|
||
respective percentage of systemutilization (linux targets only)</li>
|
||
<li><mountpoint><br>
|
||
free bytes for <mountpoint></li>
|
||
</ul><br>
|
||
|
||
<a name="SYSSTAT_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of<br><br>
|
||
<li>filesystems<br>
|
||
Lists the filesystems that can be monitored.</li>
|
||
</ul><br>
|
||
|
||
<a name="SYSSTAT_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>disable<br>
|
||
keep timers running but disable collection of statistics.</li>
|
||
<li>filesystems<br>
|
||
List of comma separated filesystems (not mountpoints) that should be monitored.<br>
|
||
Examples:
|
||
<ul>
|
||
<code>attr sysstat filesystems /dev/md0,/dev/md2</code><br>
|
||
<code>attr sysstat filesystems /dev/.*</code><br>
|
||
<code>attr sysstat filesystems 1,3,5</code><br>
|
||
</ul></li></lu>
|
||
<li>showpercent<br>
|
||
If set the usage is shown in percent. If not set the remaining free space in bytes is shown.</li>
|
||
<li>snmp<br>
|
||
1 -> use snmp to monitor load, uptime and filesystems (including physical and virtual memory)</li>
|
||
<li>stat<br>
|
||
1 -> monitor user,system,idle and iowait percentage of system utilization (available only for linux targets)</li>
|
||
<li>raspberrytemperature<br>
|
||
If set and > 0 the raspberry pi on chip termal sensor is read.<br>
|
||
If set to 2 a geometric average over the last 4 values is created.</li>
|
||
<li>synologytemperature<br>
|
||
If set and > 0 the main temperaure of a synology diskstation is read. requires snmp.<br>
|
||
If set to 2 a geometric average over the last 4 values is created.</li>
|
||
<li>raspberrycpufreq<br>
|
||
If set and > 0 the raspberry pi on chip termal sensor is read.</li>
|
||
<li>uptime<br>
|
||
If set and > 0 the system uptime is read.<br>
|
||
If set to 2 the uptime is displayed in seconds.</li>
|
||
<li>useregex<br>
|
||
If set the entries of the filesystems list are treated as regex.</li>
|
||
<li>ssh_user<br>
|
||
The username for ssh remote access.</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="TCM"></a>
|
||
<h3>TCM</h3>
|
||
<ul>
|
||
The TCM module serves an USB or TCP/IP connected TCM120 or TCM310 EnOcean
|
||
Transceiver module. These are mostly packaged together with a serial to USB
|
||
chip and an antenna, e.g. the BSC BOR contains the TCM120, the <a
|
||
href="http://www.enocean.com/de/enocean_module/usb-300-oem/">USB 300</a> from
|
||
EnOcean and the EUL from busware contains a TCM310. See also the datasheet
|
||
available from <a href="http://www.enocean.com">www.enocean.com</a>.
|
||
<br>
|
||
As the TCM120 and the TCM310 speak completely different protocols, this
|
||
module implements 2 drivers in one. It is the "physical" part for the <a
|
||
href="#EnOcean">EnOcean</a> module.<br><br>
|
||
Please note that EnOcean repeaters also send Fhem data telegrams again. Use
|
||
<code>attr <name> <a href="#blockSenderID">blockSenderID</a> own</code>
|
||
to block receiving telegrams with TCM SenderIDs.<br>
|
||
The address range used by your transceiver module, can be found in the
|
||
parameters BaseID and LastID.
|
||
<br><br>
|
||
The transceiver moduls do not always support all commands. The supported range
|
||
of commands depends on the hardware and the firmware version. A firmware update
|
||
is usually not provided.
|
||
<br><br>
|
||
The TCM module enables also a read-only wired connection to Eltako actuators over the
|
||
Eltako RS485 bus in the switchboard or distribution box via Eltako FGW14 RS232-RS485
|
||
gateway modules. These actuators are linked to an associated wireless antenna module
|
||
(FAM14) on the bus. The FAM14 device frequently polls the actuator status of all
|
||
associated devices if the FAM14 operating mode rotary switch is on position 4.
|
||
Therefore, actuator states can be retrieved more reliable, even after any fhem downtime,
|
||
when switch events or actuator confirmations could not have been tracked during the
|
||
downtime. As all actuators are polled approx. every 1-2 seconds, it should be avoided to
|
||
use event-on-update-reading. Use instead either event-on-change-reading or
|
||
event-min-interval.
|
||
The Eltako bus uses the EnOcean Serial Protocol version 2 (ESP2) protocol, which is
|
||
the same serial protocol used by TCM120 modules. For this reason, a FGW14 can be
|
||
configured as a TCM120.<br><br>
|
||
|
||
<a name="TCMdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TCM [120|310] <device></code> <br>
|
||
<br>
|
||
First you have to specify the type of the EnOcean Transceiver Chip, i.e
|
||
either 120 for the TCM120 or 310 for the TCM310.<br><br>
|
||
<code>device</code> can take the same parameters (@baudrate, @directio,
|
||
TCP/IP, none) like the <a href="#CULdefine">CUL</a>, but you probably have
|
||
to specify the baudrate: the TCM120 should be opened with 9600 Baud, the
|
||
TCM310 with 57600 baud. For Eltako FGW14 devices, type has to be set to 120 and
|
||
the baudrate has to be set to 57600 baud if the FGW14 operating mode
|
||
rotary switch is on position 6.<br>
|
||
Example:
|
||
<ul><code>
|
||
define BscBor TCM 120 /dev/ttyACM0@9600<br>
|
||
define FGW14 TCM 120 /dev/ttyS3@57600
|
||
define TCM310 TCM 310 /dev/ttyACM0@57600<br>
|
||
define TCM310 TCM 310 COM1@57600 (Windows)<br>
|
||
</code></ul>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="TCMset"></a>
|
||
<b>Set</b><br>
|
||
<ul><b>TCM 120</b><br>
|
||
<li>idbase [FF800000 ... FFFFFF80]<br>
|
||
Set the BaseID.<br>
|
||
Note: The firmware executes this command only up to then times to prevent misuse.</li>
|
||
<li>modem_off<br>
|
||
Deactivates TCM modem functionality</li>
|
||
<li>modem_on [0000 ... FFFF]<br>
|
||
Activates TCM modem functionality and sets the modem ID</li>
|
||
<li>teach <t/s> or pairForSec <t/s><br>
|
||
Set Fhem in teach-in mode.<br>
|
||
The command is required for UTE and to teach-in bidirectional actuators
|
||
e. g. EEP 4BS (RORG A5-20-XX),
|
||
see <a href="#EnOcean_teach-in"> Bidirectional Teach-In / Teach-Out</a>.</li>
|
||
<li>reset<br>
|
||
Reset the device</li>
|
||
<li>sensitivity [00|01]<br>
|
||
Set the TCM radio sensitivity: low = 00, high = 01</li>
|
||
<li>sleep<br>
|
||
Enter the energy saving mode</li>
|
||
<li>wake<br>
|
||
Wakes up from sleep mode</li>
|
||
<br><br>
|
||
For details see the TCM 120 User Manual available from <a href="http://www.enocean.com">www.enocean.com</a>.
|
||
<br><br>
|
||
</ul>
|
||
<ul><b>TCM 310</b><br>
|
||
<li>baseID [FF800000 ... FFFFFF80]<br>
|
||
Set the BaseID.<br>
|
||
Note: The firmware executes this command only up to then times to prevent misuse.</li>
|
||
<li>bist<br>
|
||
Perform Flash BIST operation (Built-in-self-test).</li>
|
||
<li>maturity [00|01]<br>
|
||
Waiting till end of maturity time before received radio telegrams will transmit:
|
||
radio telegrams are send immediately = 00, after the maturity time is elapsed = 01</li>
|
||
<li>teach <t/s> or pairForSec <t/s><br>
|
||
Set Fhem in teach-in mode.<br>
|
||
The command is required for UTE and to teach-in bidirectional actuators
|
||
e. g. EEP 4BS (RORG A5-20-XX),
|
||
see <a href="#EnOcean_teach-in"> Bidirectional Teach-In / Teach-Out</a>.</li>
|
||
<li>reset<br>
|
||
Reset the device</li>
|
||
<li>repeater [0000|0101|0102]<br>
|
||
Set Repeater Level: off = 0000, 1 = 0101, 2 = 0102.</li>
|
||
<li>sleep <t/10 ms> (Range: 00000000 ... 00FFFFFF)<br>
|
||
Enter the energy saving mode</li>
|
||
<li>subtel [00|01]<br>
|
||
Transmitting additional subtelegram info: Enable = 01, Disable = 00</li>
|
||
<br><br>
|
||
For details see the EnOcean Serial Protocol 3 (ESP3) available from
|
||
<a href="http://www.enocean.com">www.enocean.com</a>.
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="TCMget"></a>
|
||
<b>Get</b><br>
|
||
<ul><b>TCM 120</b><br>
|
||
<li>idbase<br>
|
||
Get the BaseID. You need this command in order to control EnOcean devices,
|
||
see the <a href="#EnOceandefine">EnOcean</a> paragraph.
|
||
</li>
|
||
<li>modem_status<br>
|
||
Requests the current modem status.</li>
|
||
<li>sensitivity<br>
|
||
Get the TCM radio sensitivity, low = 00, high = 01</li>
|
||
<li>sw_ver<br>
|
||
Read the device SW version / HW version, chip-ID, etc.</li>
|
||
<br><br>
|
||
For details see the TCM 120 User Manual available from <a href="http://www.enocean.com">www.enocean.com</a>.
|
||
<br><br>
|
||
</ul>
|
||
<ul><b>TCM 310</b><br>
|
||
<li>baseID<br>
|
||
Get the BaseID. You need this command in order to control EnOcean devices,
|
||
see the <a href="#EnOceandefine">EnOcean</a> paragraph.</li>
|
||
<li>numSecureDev<br>
|
||
Read number of teached in secure devices.</li>
|
||
<li>repeater<br>
|
||
Read Repeater Level: off = 0000, 1 = 0101, 2 = 0102.</li>
|
||
<li>version<br>
|
||
Read the device SW version / HW version, chip-ID, etc.</li>
|
||
<br><br>
|
||
For details see the EnOcean Serial Protocol 3 (ESP3) available from
|
||
<a href="http://www.enocean.com">www.enocean.com</a>.
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="TCMattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a name="blockSenderID">blockSenderID</a> <own|no>,
|
||
[blockSenderID] = own is default.<br>
|
||
Block receiving telegrams with a TCM SenderID sent by repeaters.
|
||
</li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="THRESHOLD"></a>
|
||
<h3>THRESHOLD</h3>
|
||
<ul>
|
||
Diverse controls can be realized by means of the module by evaluation of sensor data.
|
||
In the simplest case, this module reads any sensor that provides values in decimal and execute FHEM/Perl commands, if the value of the sensor is higher or lower than the threshold value.
|
||
A typical application is the simulation of a thermostat or humidistat.<br>
|
||
<br>
|
||
With one or more such modules, complex systems can be implemented for heating, cooling, ventilation, dehumidification or shading.
|
||
But even simple notification when crossing or falling below a specific value can be easily realized. It no if-statements in Perl or notify definitions need to be made.
|
||
This leads to quickly create and clear controls, without having to necessarily go into the Perl matter.<br>
|
||
Some application examples are at the end of the module description.<br>
|
||
<br>
|
||
According to the definition of a module type THRESHOLD eg:<br>
|
||
<br>
|
||
<code>define <name> THRESHOLD <sensor> <actor></code><br>
|
||
<br>
|
||
It is controlled by setting a desired value with:<br>
|
||
<br>
|
||
<code>set <name> desired <value></code><br>
|
||
<br>
|
||
The module begins with the control system only when a desired value is set!<br>
|
||
<br>
|
||
The specification of the desired value may also come from another sensor. This control may take place by the comparison of two sensors.<br>
|
||
<br>
|
||
Likewise, any wall thermostats can be used (eg, HM, MAX, FHT) for the definition of the reference temperature.<br>
|
||
<br>
|
||
The switching behavior can also be influenced by another sensor or sensor group.<br>
|
||
<br>
|
||
The combination of multiple THRESHOLD modules together is possible, see examples below.<br>
|
||
<br>
|
||
</ul>
|
||
<a name="THRESHOLDdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<br>
|
||
<code>define <name> THRESHOLD <sensor>:<reading>:<hysteresis>:<target_value>:<offset> AND|OR <sensor2>:<reading2>:<state> <actor>|<cmd1_gt>|<cmd2_lt>|<cmd_default_index>|<state_cmd1_gt>:<state_cmd2_lt>|<state_format></code><br>
|
||
<br>
|
||
<br>
|
||
<li><b>sensor</b><br>
|
||
a defined sensor in FHEM
|
||
</li>
|
||
<br>
|
||
<li><b>reading</b> (optional)<br>
|
||
reading of the sensor, which includes a value in decimal<br>
|
||
default value: temperature
|
||
</li>
|
||
<br>
|
||
<li><b>hysteresis</b> (optional)<br>
|
||
Hysteresis, this provides the threshold_min = desired_value - hysteresis<br>
|
||
default value: 1 at temperature, 10 at huminity
|
||
</li>
|
||
<br>
|
||
<li><b>target_value</b> (optional)<br>
|
||
number: Initial value, if no value is specified, it must be set with "set desired value".<br>
|
||
else:<sensorname>:<reading>, an additional sensor can be specified, which sets the target value dynamically.<br>
|
||
default value: no value
|
||
</li>
|
||
<br>
|
||
<li><b>offset</b> (optional)<br>
|
||
Offset to desired value<br>
|
||
This results:<br>
|
||
threshold_max = desired_value + offset and threshold_min = desired_value - hysteresis + offset<br>
|
||
Defaultwert: 0<br>
|
||
</li>
|
||
<br>
|
||
<br>
|
||
<li><b>AND|OR</b> (optional)<br>
|
||
logical operator with an optional second sensor<br>
|
||
</li>
|
||
<br>
|
||
<li><b>sensor2</b> (optional, nur in Verbindung mit AND oder OR)<br>
|
||
the second sensor
|
||
</li>
|
||
<br>
|
||
<li><b>reading2</b> (optional)<br>
|
||
reading of the second sensor<br>
|
||
default value: state
|
||
</li>
|
||
<br>
|
||
<li><b>state</b> (optional)<br>
|
||
state of the second sensor<br>
|
||
default value: open
|
||
</li><br>
|
||
<br>
|
||
<li><b>actor</b> (optional)<br>
|
||
actor device defined in FHEM
|
||
</li>
|
||
<br>
|
||
<li><b>cmd1_gt</b> (optional)<br>
|
||
FHEM/Perl command that is executed, if the value of the sensor is higher than desired value and/or the value of sensor 2 is matchted. @ is a placeholder for the specified actor.<br>
|
||
default value: set actor off, if actor defined
|
||
</li>
|
||
<br>
|
||
<li><b>cmd2_lt</b> (optional)<br>
|
||
FHEM/Perl command that is executed, if the value of the sensor is lower than threshold_min or the value of sensor 2 is not matchted. @ is a placeholder for the specified actor.<br>
|
||
default value: set actor on, if actor defined
|
||
</li>
|
||
<br>
|
||
<li><b>cmd_default_index</b> (optional)<br>
|
||
Index of command that is executed after setting the desired value until the desired value or threshold_min value is reached.<br>
|
||
0 - no command<br>
|
||
1 - cmd1_gt<br>
|
||
2 - cmd2_lt<br>
|
||
default value: 2, if actor defined, else 0<br>
|
||
</li>
|
||
<br>
|
||
<li><b>state_cmd1_gt</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
|
||
state, which is displayed, if FHEM/Perl-command cmd1_gt was executed. If state_cmd1_gt state ist set, other states, such as active or deactivated are suppressed.
|
||
<br>
|
||
default value: none
|
||
</li>
|
||
<br>
|
||
<li><b>state_cmd2_lt</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
|
||
state, which is displayed, if FHEM/Perl-command cmd1_gt was executed. If state_cmd1_gt state ist set, other states, such as active or deactivated are suppressed.
|
||
<br>
|
||
default value: none
|
||
</li>
|
||
<br>
|
||
<li><b>state_format</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
|
||
Format of the state output: arbitrary text with placeholders.<br>
|
||
Possible placeholders:<br>
|
||
_m: mode<br>
|
||
_dv: desired_value<br>
|
||
_s1v: sensor_value<br>
|
||
_s2s: sensor2_state<br>
|
||
_sc: state_cmd<br>
|
||
Default value: _m _dv _sc, _sc when state_cmd1_gt and state_cmd2_lt set without actor.<br><br>
|
||
</li>
|
||
<br>
|
||
<b><u>Examples:</u></b><br>
|
||
<br>
|
||
Example for heating:<br>
|
||
<br>
|
||
It is heated up to the desired value of 20. If the value below the threshold_min value of 19 (20-1)
|
||
the heating is switched on again.<br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD temp_sens heating</code><br>
|
||
<br>
|
||
<code>set thermostat desired 20</code><br>
|
||
<br>
|
||
<br>
|
||
Example for heating with window contact:<br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD temp_sens OR win_sens heating</code><br>
|
||
<br>
|
||
<br>
|
||
Example for heating with multiple window contacts:<br>
|
||
<br>
|
||
<code>define W_ALL structure W_type W1 W2 W3 ....</code><br>
|
||
<code>attr W_ALL clientstate_behavior relative</code><br>
|
||
<code>attr W_ALL clientstate_priority open closed</code><br>
|
||
<br>
|
||
then: <br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD S1 OR W_ALL heating</code><br>
|
||
<br>
|
||
<br>
|
||
More examples for dehumidification, air conditioning, watering:<br>
|
||
<br>
|
||
<code>define hygrostat THRESHOLD hym_sens:humidity dehydrator|set @ on|set @ off|1</code><br>
|
||
<code>define hygrostat THRESHOLD hym_sens:humidity AND Sensor2:state:close dehydrator|set @ on|set @ off|1</code><br>
|
||
<code>define thermostat THRESHOLD temp_sens:temperature:1 aircon|set @ on|set @ off|1</code><br>
|
||
<code>define thermostat THRESHOLD temp_sens AND Sensor2:state:close aircon|set @ on|set @ off|1</code><br>
|
||
<code>define hygrostat THRESHOLD hym_sens:humidity:20 watering|set @ off|set @ on|2</code><br>
|
||
<br>
|
||
<br>
|
||
It can also FHEM/perl command chains are specified:<br>
|
||
<br>
|
||
Examples:<br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD sensor |set Switch1 on;;set Switch2 on|set Switch1 off;;set Switch2 off|1</code><br>
|
||
<code>define thermostat THRESHOLD sensor alarm|{Log 2,"value is exceeded"}|set @ on;;set Switch2 on</code><br>
|
||
<code>define thermostat THRESHOLD sensor ||{Log 2,"value is reached"}|</code><br>
|
||
<br>
|
||
<br>
|
||
Examples of the reference input by another sensor:<br>
|
||
<br>
|
||
Hot water circulation: The return temperature is 5 degrees (offset) below the hot water tank temperature and can vary by up to 4 degrees (hysteresis).<br>
|
||
<br>
|
||
<code>define TH_water_circulation THRESHOLD return_w:temperature:4:water_storage:temperature:-5 circualtion_pump</code><br>
|
||
<br>
|
||
Control of heating by a wall thermostat with acquisition the desired and actual temperature from the wall thermostat:<br>
|
||
<br>
|
||
<code>define TH_heating THRESHOLD WT:measured-temp:1:WT:desired-temp heating</code><br>
|
||
<br>
|
||
<code>set TH_heating desired 17</code> overrides the desired-values from the wall thermostat until called <code>set TH_heating external</code><br>
|
||
<br>
|
||
<br>
|
||
Examples of customized state output:<br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD sensor aircon|set @ on|set @ off|2|on:off</code><br>
|
||
<br>
|
||
<br>
|
||
Example of state output (eg for state evaluation in other modules) without executing code:<br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD sensor:temperature:0:30</code><br>
|
||
<br>
|
||
by reason of default values:<br>
|
||
<br>
|
||
<code>define thermostat THRESHOLD sensor:temperature:0:30||||off:on|_sc</code><br>
|
||
<br>
|
||
<br>
|
||
Example of combining several THRESHOLD modules together:<br>
|
||
<br>
|
||
It should be heated when the room temperature drops below 21 degrees and the outside temperature is below 15 degrees:<br>
|
||
<br>
|
||
<code>define TH_outdoor THRESHOLD outdoor:temperature:0:15</code><br>
|
||
<code>define TH_room THRESHOLD indoor OR TH_outdoor:state:off heating</code><br>
|
||
<code>set TH_room desired 21</code><br>
|
||
<br>
|
||
<br>
|
||
An example of time-dependent heating in combination with Heating_Control module:<br>
|
||
<br>
|
||
<code>define TH_living_room THRESHOLD T_living_room heating</code><br>
|
||
<code>define HC_living_room Heating_Control TH_living_room 06:00|22 22:00|18 set @ desired %</code><br>
|
||
<br>
|
||
<br>
|
||
Examples of customized state output:<br>
|
||
<br>
|
||
State output: <mode> <state_cmd> <desired_value> <sensor_value><br>
|
||
<br>
|
||
<code>define TH_living_room THRESHOLD T_living_room heating|set @ off|set @ on|2|off:on|_m _sc _dv _s1v</code><br>
|
||
<br>
|
||
or<br>
|
||
<br>
|
||
<code>define TH_living_room THRESHOLD T_living_room heating</code><br>
|
||
<code>attr TH_living_room state_cmd1_gt off</code><br>
|
||
<code>attr TH_living_room state_cmd2_lt on</code><br>
|
||
<code>attr TH_living_room state_format _m _sc _dv _s1v</code><br>
|
||
<br>
|
||
</ul>
|
||
<a name="THRESHOLDset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li> <code>set <name> desired <value><br></code>
|
||
Set the desired value. If no desired value is set, the module is not active.
|
||
</li>
|
||
<br>
|
||
<li> <code>set <name> deactivated <value><br></code>
|
||
Module is disabled.
|
||
</li>
|
||
<br>
|
||
<li> <code>set <name> active <value><br></code>
|
||
Module is activated. If under target_value a sensor for reference input has been defined, the current setpoint will be inhibited until set "set <name> external".
|
||
</li>
|
||
<br>
|
||
<li><code>set <name> externel<br></code>
|
||
Module is activated, reference input comes from the target sensor, if a sensor has been defined under target_value.<br>
|
||
</li>
|
||
<br>
|
||
<li> <code>set <name> hysteresis <value><br></code>
|
||
Set hysteresis value.
|
||
</li>
|
||
<br>
|
||
<li><code>set <name> offset <value><br></code>
|
||
Set offset value.<br>
|
||
Defaultwert: 0
|
||
</li>
|
||
<br>
|
||
<li><code>set <name> cmd1_gt</code><br>
|
||
Executes the command defined in cmd1_gt.<br>
|
||
</li>
|
||
<br>
|
||
<li><code>set <name> cmd2_lt</code><br>
|
||
Executes the command defined in cmd2_lt.<br>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="THRESHOLDget"></a>
|
||
<b>Get </b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="THRESHOLDattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li>state_cmd1_gt</li>
|
||
<li>state_cmd2_lt</li>
|
||
<li>state_format</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="THZ"></a>
|
||
<h3>THZ</h3>
|
||
<ul>
|
||
THZ module: comunicate through serial interface RS232/USB (eg /dev/ttyxx) or through ser2net (e.g 10.0.x.x:5555) with a Tecalor/Stiebel Eltron heatpump. <br>
|
||
Tested on a THZ303/Sol (with serial speed 57600/115200@USB) and a THZ403 (with serial speed 115200) with the same Firmware 4.39. <br>
|
||
Tested on a LWZ404 (with serial speed 115200) with Firmware 5.39. <br>
|
||
Tested on fritzbox, nas-qnap, raspi and macos.<br>
|
||
This module is not working if you have an older firmware; Nevertheless, "parsing" could be easily updated, because now the registers are well described.
|
||
https://answers.launchpad.net/heatpumpmonitor/+question/100347 <br>
|
||
Implemented: read of status parameters and read/write of configuration parameters.
|
||
<br><br>
|
||
|
||
<a name="THZdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> THZ <device></code> <br>
|
||
<br>
|
||
<code>device</code> can take the same parameters (@baudrate, @directio,
|
||
TCP/IP, none) like the <a href="#CULdefine">CUL</a>, e.g 57600 baud or 115200.<br>
|
||
Example:
|
||
direct connection
|
||
<ul><code>
|
||
define Mytecalor THZ /dev/ttyUSB0@115200<br>
|
||
</code></ul>
|
||
or network connection (like via ser2net)<br>
|
||
<ul><code>
|
||
define Myremotetecalor THZ 192.168.0.244:2323
|
||
</code></ul>
|
||
<br>
|
||
<ul><code>
|
||
define Mythz THZ /dev/ttyUSB0@115200 <br>
|
||
attr Mythz interval_allFB 300 # internal polling interval 5min <br>
|
||
attr Mythz interval_history 28800 # internal polling interval 8h <br>
|
||
attr Mythz interval_last10errors 86400 # internal polling interval 24h <br>
|
||
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz <br>
|
||
</code></ul>
|
||
<br>
|
||
If the attributes interval_allFB and interval_history are not defined (or 0), their internal polling is disabled.
|
||
Clearly you can also define the polling interval outside the module with the "at" command.
|
||
<br>
|
||
<ul><code>
|
||
define Mythz THZ /dev/ttyUSB0@115200 <br>
|
||
define atMythzFB at +*00:05:00 {fhem "get Mythz allFB","1";;return()} <br>
|
||
define atMythz09 at +*08:00:00 {fhem "get Mythz history","1";;return()} <br>
|
||
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz <br>
|
||
</code></ul>
|
||
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="TRX"></a>
|
||
<h3>TRX</h3>
|
||
<ul>
|
||
<table>
|
||
<tr><td>
|
||
This module is for the <a href="http://www.rfxcom.com">RFXCOM</a> RFXtrx433 USB based 433 Mhz RF transmitters.
|
||
This USB based transmitter is able to receive and transmit many protocols like Oregon Scientific weather sensors, X10 security and lighting devices, ARC ((address code wheels) HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO,
|
||
AB600, Duewi, DomiaLite, COCO) and others. <br>
|
||
Currently the following parser modules are implemented: <br>
|
||
<ul>
|
||
<li> 46_TRX_WEATHER.pm (see device <a href="#TRX">TRX</a>): Process messages Oregon Scientific weather sensors.
|
||
See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> for a list of
|
||
Oregon Scientific weather sensors that could be received by the RFXtrx433 tranmitter.
|
||
Until now the following Oregon Scientific weather sensors have been tested successfully: BTHR918, BTHR918N, PCR800, RGR918, THGR228N, THGR810, THR128, THWR288A, WTGR800, WGR918. It will also work with many other Oregon sensors supported by RFXtrx433. Please give feedback if you use other sensors.<br>
|
||
</li>
|
||
<li> 46_TRX_SECURITY.pm (see device <a href="#TRX_SECURITY">TRX_SECURITY</a>): Receive X10, KD101 and Visonic security sensors.</li>
|
||
<li> 46_TRX_LIGHT.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10, ARC, ELRO AB400D, Waveman, Chacon EMW200, IMPULS, RisingSun, Philips SBC, AC, HomeEasy EU and ANSLUT lighting devices (switches and remote control). ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. AC is the protocol used by different brands with units having a learning mode button:
|
||
KlikAanKlikUit, NEXA, CHACON, HomeEasy UK.</li>
|
||
</ul>
|
||
<br>
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module
|
||
if the devices is connected via USB or a serial port.
|
||
<br><br>
|
||
<a name="TRXdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TRX <device> [noinit] </code><br>
|
||
</ul>
|
||
<br>
|
||
USB-connected:<br><ul>
|
||
<device> specifies the USB port to communicate with the RFXtrx433 receiver.
|
||
Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
|
||
For example /dev/ttyUSB0. Please note that RFXtrx433 normally operates at 38400 baud. You may specify the baudrate used after the @ char.<br>
|
||
<br>
|
||
Example: <br>
|
||
<code>define RFXTRXUSB TRX /dev/ttyUSB0@38400</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
Network-connected devices:
|
||
<br><ul>
|
||
<device> specifies the host:port of the device. E.g.
|
||
192.168.1.5:10001
|
||
</ul>
|
||
<ul>
|
||
noninit is optional and issues that the RFXtrx433 device should not be
|
||
initialized. This is useful if you share a RFXtrx433 device via LAN. It is
|
||
also useful for testing to simulate a RFXtrx433 receiver via netcat or via
|
||
FHEM2FHEM.
|
||
|
||
<br>
|
||
<br>
|
||
Example: <br>
|
||
<code>define RFXTRXTCP TRX 192.168.1.5:10001</code>
|
||
<br>
|
||
<code>define RFXTRXTCP2 TRX 192.168.1.121:10001 noinit</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
</table>
|
||
|
||
<a name="TRXattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
<li>longids<br>
|
||
Comma separated list of device-types for TRX_WEATHER that should be handled using long IDs. This additional ID is a one byte hex string and is generated by the Oregon sensor when is it powered on. The value seems to be randomly generated. This has the advantage that you may use more than one Oregon sensor of the same type even if it has no switch to set a sensor id. For example the author uses two BTHR918N sensors at the same time. All have different deviceids. The drawback is that the deviceid changes after changing batteries. All devices listed as longids will get an additional one byte hex string appended to the device name.<br>
|
||
Default is to use no long IDs.
|
||
<br><br>
|
||
Examples:<PRE>
|
||
# Do not use any long IDs for any devices (this is default):
|
||
attr RFXCOMUSB longids 0
|
||
# Use long IDs for all devices:
|
||
attr RFXCOMUSB longids 1
|
||
# Use longids for BTHR918N devices.
|
||
# Will generate devices names like BTHR918N_f3.
|
||
attr RFXTRXUSB longids BTHR918N
|
||
# Use longids for TX3_T and TX3_H devices.
|
||
# Will generate devices names like TX3_T_07, TX3_T_01 ,TX3_H_07.
|
||
attr RFXTRXUSB longids TX3_T,TX3_H</PRE>
|
||
</li><br>
|
||
<li>rssi<br>
|
||
1: enable RSSI logging, 0: disable RSSI logging<br>
|
||
Default is no RSSI logging.
|
||
<br><br>
|
||
Examples:<PRE>
|
||
# Do log rssi values (this is default):
|
||
attr RFXCOMUSB rssi 0
|
||
# Enable rssi logging for devices:
|
||
attr RFXCOMUSB rssi 1
|
||
</li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="TRX_ELSE"></a>
|
||
<h3>TRX_ELSE</h3>
|
||
<ul>
|
||
The TRX_ELSE module is invoked by TRX if a code is received by RFXCOM RFXtrx433 RF receiver that is currently not handled by a TRX_-Module. You need to define an RFXtrx433 receiver first.
|
||
See <a href="#TRX">TRX</a>.
|
||
<br>
|
||
<a name="TRX_SECURITYdefine"></a>
|
||
<br>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TRX_ELSE <hextype></code> <br>
|
||
<br>
|
||
<code><hextype></code>
|
||
<ul>
|
||
specifies the hexvalue (00 - ff) of the type received by the RFXtrx433 transceiver. <br>
|
||
</ul>
|
||
<br>
|
||
Example: <br>
|
||
<code>define TRX_UNKNOWN_9A TRX_ELSE 9A</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="TRX_LIGHT"></a>
|
||
<h3>TRX_LIGHT</h3>
|
||
<ul>
|
||
The TRX_LIGHT module receives and sends X10, ARC, ELRO AB400D, Waveman, Chacon EMW200, IMPULS, RisingSun, AC, HomeEasy EU and ANSLUT lighting devices (switches and remote control). Allows to send Philips SBC (receive not possible). ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. AC is the protocol used by different brands with units having a learning mode button:
|
||
KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. <br> You need to define an RFXtrx433 transceiver receiver first.
|
||
See <a href="#TRX">TRX</a>.
|
||
|
||
<br><br>
|
||
|
||
<a name="TRX_LIGHTdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TRX_LIGHT <type> <deviceid> <devicelog> [<deviceid2> <devicelog2>] </code> <br>
|
||
<code>define <name> TRX_LIGHT PT2262 <deviceid> <devicelog> <commandcodes></code> <br>
|
||
<br>
|
||
<code><type></code>
|
||
<ul>
|
||
specifies the type of the device: <br>
|
||
X10 lighting devices:
|
||
<ul>
|
||
<li> <code>MS14A</code> (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor)) </li>
|
||
<li> <code>X10</code> (All other x10 devices. Report [off|on|dim|bright|all_off|all_on] on both deviceids.)</li>
|
||
<li> <code>ARC</code> (ARC devices. ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. Report [off|on|all_off|all_on|chime].)</li>
|
||
<li> <code>AB400D</code> (ELRO AB400D devices. Report [off|on].)</li>
|
||
<li> <code>WAVEMAN</code> (Waveman devices. Report [off|on].)</li>
|
||
<li> <code>EMW200</code> (Chacon EMW200 devices. Report [off|on|all_off|all_on].)</li>
|
||
<li> <code>IMPULS</code> (IMPULS devices. Report [off|on].)</li>
|
||
<li> <code>RISINGSUN</code> (RisingSun devices. Report [off|on].)</li>
|
||
<li> <code>PHILIPS_SBC</code> (Philips SBC devices. Send [off|on|all_off|all_on].)</li>
|
||
<li> <code>AC</code> (AC devices. AC is the protocol used by different brands with units having a learning mode button: KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. Report [off|on|level <NUM>|all_off|all_on|all_level <NUM>].)</li>
|
||
<li> <code>HOMEEASY</code> (HomeEasy EU devices. Report [off|on|level|all_off|all_on|all_level].)</li>
|
||
<li> <code>ANSLUT</code> (Anslut devices. Report [off|on|level|all_off|all_on|all_level].)</li>
|
||
<li> <code>PT2262</code> (Devices using PT2262/PT2272 (coder/decoder) chip. To use this enable Lighting4 in RFXmngr. Please note that this disables ARC. For more information see <a href="http://www.fhemwiki.de/wiki/RFXtrx#PT2262_empfangen_und_senden_mit_TRX_LIGHT.pm">FHEM-Wiki</a>
|
||
)</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<code><deviceid></code>
|
||
<ul>
|
||
specifies the first device id of the device. <br>
|
||
A lighting device normally has a house code A..P followed by a unitcode 1..16 (example "B1").<br>
|
||
For AC, HomeEasy EU and ANSLUT it is a 10 Character-Hex-String for the deviceid, consisting of <br>
|
||
- unid-id: 8-Char-Hex: 00000001 to 03FFFFFF<br>
|
||
- unit-code: 2-Char-Hex: 01 to 10 <br>
|
||
</ul>
|
||
<br>
|
||
<code><devicelog></code>
|
||
<ul>
|
||
is the name of the Reading used to report. Suggested: "motion" for motion sensors. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
|
||
</ul>
|
||
<br>
|
||
<code><deviceid2></code>
|
||
<ul>
|
||
is optional and specifies the second device id of the device if it exists. For example ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
|
||
</ul>
|
||
<br>
|
||
<code><devicelog2></code>
|
||
<ul>
|
||
is optional for the name used for the Reading of <code><deviceid2></code>.If you use "none" then no addional Reading is reported. Just the state is used to report the change.
|
||
</ul>
|
||
<br>
|
||
<code><commandcodes></code>
|
||
<ul>
|
||
is used for PT2262 and specifies the possible base4 digits for the command separated by : and a string that specifies a string that is the command. Example '<code>0:off,1:on</code>'.
|
||
</ul>
|
||
<br>
|
||
Example: <br>
|
||
<code>define motion_sensor2 TRX_LIGHT MS14A A1 motion A2 light</code>
|
||
<br>
|
||
<code>define Steckdose TRX_LIGHT ARC G2 light</code>
|
||
<br>
|
||
<code>define light TRX_LIGHT AC 0101010101 light</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="TRX_LIGHTset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> [<levelnum>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
off
|
||
on
|
||
dim # only for X10, KOPPLA
|
||
bright # only for X10, KOPPLA
|
||
all_off # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
|
||
all_on # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
|
||
chime # only for ARC
|
||
level <levelnum> # only AC, HOMEEASY, ANSLUT: set level to <levelnum> (range: 0=0% to 15=100%)
|
||
on-till # Special, see the note
|
||
on-for-timer # Special, see the note
|
||
</pre>
|
||
Example: <br>
|
||
<code>set Steckdose on</code>
|
||
<br>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li><code>on-till</code> requires an absolute time in the "at" format
|
||
(HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
|
||
returns a time specification).
|
||
If the current time is greater than the specified time, then the
|
||
command is ignored, else an "on" command is generated, and for the
|
||
given "till-time" an off command is scheduleld via the at command.
|
||
</li>
|
||
<li><code>on-for-timer</code> requires a relative time in the "at" format
|
||
(HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
|
||
returns a time specification).
|
||
</li>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="TRX_LIGHTget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="TRX_LIGHTattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="TRX_SECURITY"></a>
|
||
<h3>TRX_SECURITY</h3>
|
||
<ul>
|
||
The TRX_SECURITY module interprets X10, KD101 and Visonic security sensors received by a RFXCOM RFXtrx433 RF receiver. You need to define an RFXtrx433 receiver first. See <a href="#TRX">TRX</a>.
|
||
|
||
<br><br>
|
||
|
||
<a name="TRX_SECURITYdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TRX_SECURITY <type> <deviceid> <devicelog> [<deviceid2> <devicelog2>] </code> <br>
|
||
<br>
|
||
<code><type></code>
|
||
<ul>
|
||
specifies one of the following security devices:
|
||
<ul>
|
||
<li> <code>DS10A</code> (X10 security ds10a Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed], status of the delay switch [min|max]], and battery status [ok|low].)</li>
|
||
<li> <code>MS10A</code> (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
|
||
<li> <code>SD90</code> (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)</li>
|
||
<li> <code>KR18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
|
||
<li> <code>KD101</code> (KD101 smoke sensor. Report the Reading "smoke" with values [normal|alert])</li>
|
||
<li> <code>VISONIC_WINDOW</code> (VISONIC security Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed] and battery status [ok|low].)</li>
|
||
<li> <code>VISONIC_MOTION</code> (VISONIC security motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
<code><deviceid></code>
|
||
<ul>
|
||
specifies the first device id of the device. X10 security (DS10A, MS10A) and SD90 have a a 16 bit device id which has to be written as a hex-string (example "5a54"). All other devices have a 24 bit device id.
|
||
</ul>
|
||
<br>
|
||
<code><devicelog></code>
|
||
<ul>
|
||
is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "smoke" for sd90. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
|
||
</ul>
|
||
<br>
|
||
<code><deviceid2></code>
|
||
<ul>
|
||
is optional and specifies the second device id of the device if it exists. For example sd90 smoke sensors can be configured to report two device ids.
|
||
</ul>
|
||
<br>
|
||
<code><devicelog2></code>
|
||
<ul>
|
||
is optional for the name used for the Reading of <code><deviceid2></code>. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
|
||
</ul>
|
||
<br>
|
||
Example: <br>
|
||
<code>define livingroom_window TRX_SECURITY ds10a 72cd Window</code>
|
||
<br>
|
||
<code>define motion_sensor1 TRX_SECURITY ms10a 55c6 motion</code>
|
||
<br>
|
||
<code>define smoke_sensor1 TRX_SECURITY sd90 54d3 Smoke 54d3 Smoketest</code>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="TRX_SECURITYset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> </code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
alert # only for KD101
|
||
pair # only for KD101
|
||
</pre>
|
||
Example: <br>
|
||
<code>set TRX_KD101_a5ca00 alert</code>
|
||
<br>
|
||
</ul><br>
|
||
|
||
<a name="TRX_SECURITYget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="TRX_SECURITYattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="TRX_WEATHER"></a>
|
||
<h3>TRX_WEATHER</h3>
|
||
<ul>
|
||
The TRX_WEATHER module interprets weather sensor messages received by a RTXtrx receiver. See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> for a list of
|
||
Oregon Scientific weather sensors that could be received by the RFXtrx433 tranmitter. You need to define a RFXtrx433 receiver first. See
|
||
See <a href="#TRX">TRX</a>.
|
||
|
||
<br><br>
|
||
|
||
<a name="TRX_WEATHERdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TRX_WEATHER <deviceid></code> <br>
|
||
<br>
|
||
<code><deviceid></code>
|
||
<ul>
|
||
is the device identifier of the sensor. It consists of the sensors name and (only if the attribute longids is set of the RFXtrx433) an a one byte hex string (00-ff) that identifies the sensor. If an sensor uses an switch to set an additional is then this is also added. The define statement with the deviceid is generated automatically by autocreate. The following sensor names are used: <br>
|
||
"THR128" (for THR128/138, THC138),<br>
|
||
"THGR132N" (for THC238/268,THN132,THWR288,THRN122,THN122,AW129/131),<br>
|
||
"THWR800", <br>
|
||
"RTHN318", <br>
|
||
"TX3_T" (for LaCrosse TX3, TX4, TX17),<br>
|
||
"THGR228N" (for THGN122/123, THGN132, THGR122/228/238/268),<br>
|
||
"THGR810",<br>
|
||
"RTGR328",<br>
|
||
"THGR328",<br>
|
||
"WTGR800_T" (for temperature of WTGR800),<br>
|
||
"THGR918" (for THGR918, THGRN228, THGN500),<br>
|
||
"TFATS34C" (for TFA TS34C),<br>
|
||
"BTHR918",<br>
|
||
"BTHR918N (for BTHR918N, BTHR968),<br>
|
||
"RGR918" (for RGR126/682/918),<br>
|
||
"PCR800",<br>
|
||
"TFA_RAIN" (for TFA rain sensor),<br>
|
||
"WTGR800_A" (for wind sensor of WTGR800),<br>
|
||
"WGR800" (for wind sensor of WGR800),<br>
|
||
"WGR918" (for wind sensor of STR918 and WGR918),<br>
|
||
"TFA_WIND" (for TFA wind sensor),<br>
|
||
"BWR101" (for Oregon Scientific BWR101),<br>
|
||
"GR101" (for Oregon Scientific GR101)
|
||
</ul>
|
||
<br>
|
||
Example: <br>
|
||
<ul>
|
||
<code>define Tempsensor TRX_WEATHER TX3_T</code><br>
|
||
<code>define Tempsensor3 TRX_WEATHER THR128_3</code><br>
|
||
<code>define Windsensor TRX_WEATHER WGR918_A</code><br>
|
||
<code>define Regensensor TRX_WEATHER RGR918</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br><br>
|
||
<ul>
|
||
<code>define <name> TRX_WEATHER <deviceid> [<scale_current> <scale_total> <add_total>]</code> <br>
|
||
<br>
|
||
<code><deviceid></code>
|
||
<ul>
|
||
is the device identifier of the energy sensor. It consists of the sensors name and (only if the attribute longids is set of the RFXtrx433) an a two byte hex string (0000-ffff) that identifies the sensor. The define statement with the deviceid is generated automatically by autocreate. The following sensor names are used: <br>
|
||
"CM160" (for OWL CM119 or CM160),<br>
|
||
"CM180" (for OWL CM180),<br><br>
|
||
"CM180i"(for OWL CM180i),<br><br>
|
||
</ul>
|
||
The following Readings are generated:<br>
|
||
<ul>
|
||
<code>"energy_current:"</code>:
|
||
<ul>
|
||
Only for CM160 and CM180: current usage in Watt. If <scale_current> is defined the result is: <code>energy_current * <scale_current></code>.
|
||
</ul>
|
||
<code>"energy_chx:"</code>:
|
||
<ul>
|
||
Only for CM180i (where chx is ch1, ch2 or ch3): current usage in Ampere. If <scale_current> is defined the result is: <code>energy_chx * <scale_current></code>.
|
||
</ul>
|
||
<code>"energy_total:"</code>:
|
||
<ul>
|
||
current usage in kWh. If scale_total and add_total is defined the result is: <code>energy_total * <scale_total> + <add_total></code>.
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
Example: <br>
|
||
<ul>
|
||
<code>define Tempsensor TRX_WEATHER CM160_1401</code><br>
|
||
<code>define Tempsensor TRX_WEATHER CM180_1401 1 1 0</code><br>
|
||
<code>define Tempsensor TRX_WEATHER CM180_1401 0.9 0.9 -1000</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="TRX_WEATHERset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="TRX_WEATHERget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="TRX_WEATHERattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
|
||
<a name="TUL"></a>
|
||
<h3>TUL</h3>
|
||
<ul>
|
||
|
||
<table>
|
||
<tr><td>
|
||
The TUL module is the representation of a EIB / KNX connector in FHEM.
|
||
<a href="#EIB">EIB</a> instances represent the EIB / KNX devices and will need a TUL as IODev to communicate with the EIB / KNX network.<br>
|
||
The TUL module is designed to connect to EIB network either using EIBD or the <a href="http://busware.de/tiki-index.php?page=TUL" target="_blank">TUL usb stick</a> created by busware.de
|
||
|
||
Note: this module may require the Device::SerialPort or Win32::SerialPort
|
||
module if you attach the device via USB and the OS sets strange default
|
||
parameters for serial devices.
|
||
|
||
</td><td>
|
||
<img src="http://busware.de/show_image.php?id=269" width="100%" height="100%"/>
|
||
</td></tr>
|
||
</table>
|
||
|
||
<a name="TULdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TUL <device> <physical address></code> <br>
|
||
<br>
|
||
TUL usb stick / TPUART serial devices:<br><ul>
|
||
<device> specifies the serial port to communicate with the TUL.
|
||
The name of the serial-device depends on your distribution, under
|
||
linux the cdc_acm kernel module is responsible, and usually a
|
||
/dev/ttyACM0 device will be created. If your distribution does not have a
|
||
cdc_acm module, you can force usbserial to handle the TUL by the
|
||
following command:<ul>modprobe usbserial vendor=0x03eb
|
||
product=0x204b</ul>In this case the device is most probably
|
||
/dev/ttyUSB0.<br><br>
|
||
|
||
You can also specify a baudrate if the device name contains the @
|
||
character, e.g.: /dev/ttyACM0@19200<br><br>
|
||
Note: For TUL usb stick the baudrate 19200 is needed and this is the default
|
||
when no baudrate is given.
|
||
<br><br>
|
||
|
||
Example:<br>
|
||
<code>define tul TUL tul:/dev/ttyACM0 1.1.249</code>
|
||
</ul>
|
||
EIBD:<br><ul>
|
||
<device> specifies the host:port of the eibd device. E.g.
|
||
eibd:192.168.0.244:2323. When using the standard port, the port can be omitted.
|
||
<br><br>
|
||
|
||
Example:<br>
|
||
<code>define tul TUL eibd:localhost 1.1.249</code>
|
||
</ul>
|
||
<br>
|
||
If the device is called none, then no device will be opened, so you
|
||
can experiment without hardware attached.<br>
|
||
|
||
The physical address is used as the source address of telegrams sent to EIB network.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="TULset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<li>raw<br>
|
||
Issue a TUL raw telegram message
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="TULget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>raw<br>
|
||
sends a read telegram
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="TULattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li><br>
|
||
<li><a href="#attrdummy">dummy</a></li><br>
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
<li><a href="#loglevel">loglevel</a></li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="TellStick"></a>
|
||
<h3>TellStick</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="TellStickdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> TellStick </path/to/tdtool></code>
|
||
<br><br>
|
||
|
||
<!--<div style="background-color: #ffaaaa;"> -->
|
||
<div>
|
||
Defines a path to the program "tdtool", which is used to control a (locally attached)
|
||
"Telldus TellStick [Duo]" USB device. A TellStick controls a wide range of 433 MHz
|
||
devices, like the widely available switchable power outlets from InterTechno.<br><br>
|
||
To keep things simple, FHEM interfaces with the telldus-core suite (available
|
||
for Linux, Windows, Mac OSX) via the supplied tool, "tdtool". This FHEM module
|
||
will initially use "tdtool --list" to receive a list of configured devices, then let
|
||
autocreate (if enabled) create them as <a href="#SIS_PMS">SIS_PMS</a> devices.<br></br>
|
||
<i>Please make sure</i> that the user running FHEM under ("fhem" in a standard setup on
|
||
Linux) has the <i>r/w-right to access the stick's device</i> ("/dev/tellstick"
|
||
in telldus-core version 2.0) — if the state of your devices do not change when
|
||
modified im FHEM, access rights problems are the most probable cause
|
||
(<code>chmod o+rw /dev/tellstick</code> should fix that; you may want to automate it
|
||
via udev or adding the fhem user to the proper group ;))<br></br>
|
||
This module has only been tested with the 2.0 branch of teldus-core because of a known bug
|
||
in 2.1, <a href="http://www.telldus.com/forum/viewtopic.php?f=15&t=1645"> preventing
|
||
version 2.1 working properly with some TellSticks</a> and/or "tdtool" application; FTR, the
|
||
"Batch: 8" version a was granted usage of for writing this module was impacted by it ...
|
||
|
||
To actually control any power sockets, you need to define a <a href="#SIS_PMS">SIS_PMS</a>
|
||
device — TellStick.pm uses SIS_PMS devices ("socket" is te:ll:st:ck:01, "socketnr"
|
||
is the ID of the device in "tdtool"), as as of now only on/off switching is supported and
|
||
this was the easiest implementation path. SIS_PMS is supported by <a href="http://sites.google.com/site/andfhem/">andFHEM</a>, the Android
|
||
frontend, so this make some sense. (Furthermore, I don't own dimmable devices and they are
|
||
actually not really cheap; >15 EUR/socket compared to the 15 EUR for 5 switch-only, non-self
|
||
learning socket adapters from Intertechno at your local home improvement store.)
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define TStick TellStick /usr/bin/tdtool</code><br>
|
||
<code>define Deckenfluter SIS_PMS te:ll:st:ck:01 2</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="TellStickset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="TellStickget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="TellStickattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>none <!--<a href="#model">model</a> (TellStick)--></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="Text2Speech"></a>
|
||
<h3>Text2Speech</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="Text2Speechdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<b>Local : </b><code>define <name> Text2Speech <alsadevice></code><br>
|
||
<b>Remote: </b><code>define <name> Text2Speech <host>[:<portnr>][:SSL] [portpassword]</code>
|
||
<p>
|
||
This module converts any text into speech with serveral possible providers. The Device can be defined as locally
|
||
or remote device.
|
||
</p>
|
||
|
||
<li>
|
||
<b>Local Device</b><br>
|
||
<ul>
|
||
The output will be send to any connected audiodevice. For example external speakers connected per jack
|
||
or with bluetooth speakers - connected per bluetooth dongle. Its important to install mplayer.<br>
|
||
<code>apt-get install mplayer</code><br>
|
||
The given alsadevice has to be configured in <code>/etc/asound.conf</code>
|
||
<p>
|
||
<b>Special AlsaDevice: </b><i>none</i><br>
|
||
The internal mplayer command will be without any audio directive if the given alsadevice is <i>none</i>.
|
||
In this case mplayer is using the standard audiodevice.
|
||
</p>
|
||
<p>
|
||
<b>Example:</b><br>
|
||
<code>define MyTTS Text2Speech hw=0.0</code><br>
|
||
<code>define MyTTS Text2Speech none</code>
|
||
</p>
|
||
</ul>
|
||
</li>
|
||
|
||
<li>
|
||
<b>Remote Device</b><br>
|
||
<ul>
|
||
This module can configured as remote-device for client-server Environments. The Client has to be configured
|
||
as local device.<br>
|
||
Notice: the Name of the locally instance has to be the same!
|
||
<ul>
|
||
<li>Host: setting up IP-adress</li>
|
||
<li>PortNr: setting up TelnetPort of FHEM; default: 7072</li>
|
||
<li>SSL: setting up if connect over SSL; default: no SSL</li>
|
||
<li>PortPassword: setting up the configured target telnet passwort</li>
|
||
</ul>
|
||
<p>
|
||
<b>Example:</b><br>
|
||
<code>define MyTTS Text2Speech 192.168.178.10:7072 fhempasswd</code>
|
||
<code>define MyTTS Text2Speech 192.168.178.10</code>
|
||
</p>
|
||
</ul>
|
||
</li>
|
||
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="Text2Speechset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><b>tts</b>:<br>
|
||
Giving a text to translate into audio.
|
||
</li>
|
||
<li><b>volume</b>:<br>
|
||
Setting up the volume audio response.<br>
|
||
Notice: Only available in locally instances!
|
||
</li>
|
||
</ul><br>
|
||
|
||
<a name="Text2Speechget"></a>
|
||
<b>Get</b>
|
||
<ul>N/A</ul><br>
|
||
|
||
<a name="Text2Speechattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>TTS_Delemiter<br>
|
||
optional: By using the google engine, its not possible to convert more than 100 characters in a single audio brick.
|
||
With a delemiter the audio brick will be split at this character. A delemiter must be a single character.!<br>
|
||
By default, ech audio brick will be split at sentence end. Is a single sentence longer than 100 characters,
|
||
the sentence will be split additionally at comma, semicolon and the word <i>and</i>.<br>
|
||
Notice: Only available in locally instances with Google engine!
|
||
</li>
|
||
|
||
<li>TTS_Ressource<br>
|
||
optional: Selection of the Translator Engine<br>
|
||
Notice: Only available in locally instances!
|
||
<ul>
|
||
<li>Google<br>
|
||
Using the Google Engine. It´s nessessary to have internet access. This engine is the recommend engine
|
||
because the quality is fantastic. This engine is using by default.
|
||
</li>
|
||
<li>ESpeak<br>
|
||
Using the ESpeak Engine. Installation of the espeak sourcen is required.<br>
|
||
<code>apt-get install espeak</code>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
|
||
<li>TTS_CacheFileDir<br>
|
||
optional: The downloaded Goole audio bricks are saved in this folder for reusing.
|
||
No automatically implemented deleting are available.<br>
|
||
Default: <i>cache/</i><br>
|
||
Notice: Only available in locally instances!
|
||
</li>
|
||
|
||
<li>TTS_UseMP3Wrap<br>
|
||
optional: To become a liquid audio response its recommend to use the tool mp3wrap.
|
||
Each downloaded audio bricks are concatinated to a single audio file to play with mplayer.<br>
|
||
Installtion of the mp3wrap source is required.<br>
|
||
<code>apt-get install mp3wrap</code><br>
|
||
Notice: Only available in locally instances!
|
||
</li>
|
||
|
||
<li>TTS_MplayerCall<br>
|
||
optional: Setting up the Mplayer system call. The following example is default.<br>
|
||
Example: <code>sudo /usr/bin/mplayer</code>
|
||
</li>
|
||
|
||
<li>TTS_SentenceAppendix<br>
|
||
Optional: Definition of one mp3-file to append each time of audio response.<br>
|
||
Using of Mp3Wrap is required. The audio bricks has to be downloaded before into CacheFileDir.
|
||
Example: <code>silence.mp3</code>
|
||
</li>
|
||
|
||
<li>TTS_FileMapping<br>
|
||
Definition of mp3files with a custom templatedefinition. Separated by space.
|
||
All templatedefinitions can used in audiobricks by i>tts</i>.
|
||
The definition must begin and end with e colon.
|
||
The mp3files must saved in the given directory by <i>TTS_FIleTemplateDir</i>.<br>
|
||
<code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
|
||
<code>set MyTTS tts Attention: This is my ringtone :ring: Its loud?</code>
|
||
</li>
|
||
|
||
<li>TTS_FileTemplateDir<br>
|
||
Directory to save all mp3-files are defined in <i>TTS_FileMapping</i> und <i>TTS_SentenceAppendix</i><br>
|
||
Optional, Default: <code>cache/templates</code>
|
||
</li>
|
||
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||
|
||
<li><a href="#disable">disable</a><br>
|
||
If this attribute is activated, the soundoutput will be disabled.<br>
|
||
Possible values: 0 => not disabled , 1 => disabled<br>
|
||
Default Value is 0 (not disabled)<br><br>
|
||
</li>
|
||
|
||
<li><a href="#verbose">verbose</a><br>
|
||
<b>4:</b> each step will be logged<br>
|
||
<b>5:</b> Additionally the individual debug informations from mplayer and mp3wrap will be logged
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
<a name="Twilight"></a>
|
||
<h3>Twilight</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="Twilightdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Twilight <latitude> <longitude> [<indoor_horizon> [<Weather_Position>]]</code><br>
|
||
<br>
|
||
Defines a virtual device for Twilight calculations <br><br>
|
||
|
||
<b>latitude, longitude</b>
|
||
<br>
|
||
The parameters <b>latitude</b> and <b>longitude</b> are decimal numbers which give the position on earth for which the twilight states shall be calculated.
|
||
<br><br>
|
||
<b>indoor_horizon</b>
|
||
<br>
|
||
The parameter <b>indoor_horizon</b> gives a virtual horizon higher than 0, that shall be used for calculation of indoor twilight (typical values are between 0 and 6)
|
||
<br><br>
|
||
<b>Weather_Position</b>
|
||
<br>
|
||
The parameter <b>Weather_Position</b> is the yahoo weather id used for getting the weather condition. Go to http://weather.yahoo.com/ and enter a city or zip code. In the upcoming webpage, the id is a the end of the URL. Example: Munich, Germany -> 676757
|
||
<br><br>
|
||
|
||
A Twilight device periodically calculates the times of different twilight phases throughout the day.
|
||
It calculates a virtual "light" element, that gives an indicator about the amount of the current daylight.
|
||
Besides the location on earth it is influenced by a so called "indoor horizon" (e.g. if there are high buildings, mountains) as well as by weather conditions. Very bad weather conditions lead to a reduced daylight for nearly the whole day.
|
||
The light calculated spans between 0 and 6, where the values mean the following:
|
||
<br><br>
|
||
<b>light</b>
|
||
<br>
|
||
<code>0 - total night, sun is at least -18 degree below horizon</code><br>
|
||
<code>1 - astronomical twilight, sun is between -12 and -18 degree below horizon</code><br>
|
||
<code>2 - nautical twilight, sun is between -6 and -12 degree below horizon</code><br>
|
||
<code>3 - civil twilight, sun is between 0 and -6 degree below horizon</code><br>
|
||
<code>4 - indoor twilight, sun is between the indoor_horizon and 0 degree below horizon (not used if indoor_horizon=0)</code><br>
|
||
<code>5 - weather twilight, sun is between indoor_horizon and a virtual weather horizon (the weather horizon depends on weather conditions (optional)</code><br>
|
||
<code>6 - maximum daylight</code><br>
|
||
<br>
|
||
<b>Azimut, Elevation, Twilight</b>
|
||
<br>
|
||
The module calculates additionally the <b>azimuth</b> and the <b>elevation</b> of the sun. The values can be used to control a roller shutter.
|
||
<br><br>
|
||
As a new (twi)light value the reading <b>Twilight</b> ist added. It is derived from the elevation of the sun with the formula: (Elevation+12)/18 * 100). The value allows a more detailed
|
||
control of any lamp during the sunrise/sunset phase. The value ist betwenn 0% and 100% when the elevation is between -12° and 6°.
|
||
<br><br>
|
||
You must know, that depending on the latitude, the sun will not reach any elevation. In june/july the sun never falls in middle europe
|
||
below -18°. In more northern countries(norway ...) the sun may not go below 0°.
|
||
<br><br>
|
||
Any control depending on the value of Twilight must
|
||
consider these aspects.
|
||
<br><br>
|
||
|
||
Example:
|
||
<pre>
|
||
define myTwilight Twilight 49.962529 10.324845 3 676757
|
||
</pre>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Twilightset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="Twilightget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
|
||
<code>get <name> <reading></code><br><br>
|
||
<table>
|
||
<tr><td><b>light</b></td><td>the current virtual daylight value</td></tr>
|
||
<tr><td><b>nextEvent</b></td><td>the name of the next event</td></tr>
|
||
<tr><td><b>nextEventTime</b></td><td>the time when the next event will probably happen (during light phase 5 and 6 this is updated when weather conditions change</td></tr>
|
||
<tr><td><b>sr_astro</b></td><td>time of astronomical sunrise</td></tr>
|
||
<tr><td><b>sr_naut</b></td><td>time of nautical sunrise</td></tr>
|
||
<tr><td><b>sr_civil</b></td><td>time of civil sunrise</td></tr>
|
||
<tr><td><b>sr</b></td><td>time of sunrise</td></tr>
|
||
<tr><td><b>sr_indoor</b></td><td>time of indoor sunrise</td></tr>
|
||
<tr><td><b>sr_weather</b></td><td>time of weather sunrise</td></tr>
|
||
<tr><td><b>ss_weather</b></td><td>time of weather sunset</td></tr>
|
||
<tr><td><b>ss_indoor</b></td><td>time of indoor sunset</td></tr>
|
||
<tr><td><b>ss</b></td><td>time of sunset</td></tr>
|
||
<tr><td><b>ss_civil</b></td><td>time of civil sunset</td></tr>
|
||
<tr><td><b>ss_nautic</b></td><td>time of nautic sunset</td></tr>
|
||
<tr><td><b>ss_astro</b></td><td>time of astro sunset</td></tr>
|
||
<tr><td><b>azimuth</b></td><td>the current azimuth of the sun 0° ist north 180° is south</td></tr>
|
||
<tr><td><b>compasspoint</b></td><td>a textual representation of the compass point</td></tr>
|
||
<tr><td><b>elevation</b></td><td>the elevaltion of the sun</td></tr>
|
||
<tr><td><b>twilight</b></td><td>a percetal value of a new (twi)light value: (elevation+12)/18 * 100) </td></tr>
|
||
<tr><td><b>twilight_weather</b></td><td>a percetal value of a new (twi)light value: (elevation-WEATHER_HORIZON+12)/18 * 100). So if there is weather, it
|
||
is always a little bit darker than by fair weather</td></tr>
|
||
<tr><td><b>condition</b></td><td>the yahoo condition weather code</td></tr>
|
||
<tr><td><b>condition_txt</b></td><td>the yahoo condition weather code as textual representation</td></tr>
|
||
<tr><td><b>horizon</b></td><td>value auf the actual horizon 0°, -6°, -12°, -18°</td></tr>
|
||
</table>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Twilightattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Twilightfunc"></a>
|
||
<b>Functions</b>
|
||
<ul>
|
||
<li><b>twilight</b>(<b>$twilight</b>, <b>$reading</b>, <b>$min</b>, <b>$max</b>)</li> - implements a routine to compute the twilighttimes like sunrise with min max values.<br><br>
|
||
<table>
|
||
<tr><td><b>$twilight</b></td><td>name of the twilight instance</td></tr>
|
||
<tr><td><b>$reading</b></td><td>name of the reading to use example: ss_astro, ss_weather ...</td></tr>
|
||
<tr><td><b>$min</b></td><td>parameter min time - optional</td></tr>
|
||
<tr><td><b>$max</b></td><td>parameter max time - optional</td></tr>
|
||
</table>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="UNIRoll"></a>
|
||
<h3>UNIRoll</h3>
|
||
<ul>
|
||
The protocol is used by the Lott UNIROLL R-23700 reciever. The radio
|
||
(868.35 MHz) messages are either received through an <a href="#FHZ">FHZ</a>
|
||
or an <a href="#CUL">CUL</a> device, so this must be defined first.
|
||
Recieving sender messages is not integrated jet.
|
||
The CUL has to allow working with zero synchbits at the beginning of a raw-message.
|
||
This is possible with culfw 1.49 or higher.
|
||
<br><br>
|
||
|
||
<a name="UNIRolldefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> UNIRoll <devicegroup> <deviceaddress> </code>
|
||
<br><br>
|
||
|
||
The values of devicegroup address (similar to the housecode) and device address (button)
|
||
has to be defined as hexadecimal value.
|
||
There is no master or group code integrated.
|
||
<br>
|
||
|
||
<ul>
|
||
<li><code><devicecode></code> is a 4 digit hex number,
|
||
corresponding to the housecode address.</li>
|
||
<li><code><channel></code> is a 1 digit hex number,
|
||
corresponding to a button of the transmitter.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define roll UNIRoll 7777 0</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="UNIRollset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> [<time>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
up
|
||
stop
|
||
down
|
||
pos (The attribute useRolloPos has to be set to 1 to use this.)
|
||
[<time>] in seconds for up, down or pos
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set roll up</code><br>
|
||
<code>set roll up 10</code><br>
|
||
<code>set roll1,roll2,roll3 up</code><br>
|
||
<code>set roll1-roll3 up</code><br>
|
||
</ul>
|
||
<br></ul>
|
||
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="UNIRollattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="IODev"></a>
|
||
<li>IODev<br>
|
||
Set the IO or physical device which should be used for sending signals
|
||
for this "logical" device. An example for the physical device is an FHZ
|
||
or a CUL. The device will not work without this entry.</li><br>
|
||
|
||
<a name="eventMap"></a>
|
||
<li>eventMap<br>
|
||
Replace event names and set arguments. The value of this attribute
|
||
consists of a list of space separated values, each value is a colon
|
||
separated pair. The first part specifies the "old" value, the second
|
||
the new/desired value. If the first character is slash(/) or komma(,)
|
||
then split not by space but by this character, enabling to embed spaces.<br><br>
|
||
Examples:<ul><code>
|
||
attr device eventMap up:open down:closed<br>
|
||
set device open
|
||
</code></ul>
|
||
</li><br>
|
||
|
||
<li><a href="#showtime">showtime</a></li><br>
|
||
|
||
<a name="sendStopBeforeCmd"></a>
|
||
<li>sendStopBeforeCmd <value><br>
|
||
Before any up/down-command a stop-command will be sent to stop a random
|
||
operation. This might cause failure in some situations. This attribute
|
||
can be used to switch off the stop-command by setting it to these values.<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
1 - send always stop (default)
|
||
0 - send no stop
|
||
2 - send stop only before up
|
||
3 - send stop only before down
|
||
</pre></li>
|
||
|
||
<a name="useRolloPos"></a>
|
||
<li>useRolloPos <value><br>
|
||
The position of each device can be stored. By this it is possible to move from
|
||
any position to any other position. As this feature is software-based, a
|
||
manual operation will not be recognized. To set the device into a definite
|
||
state, a up or down command will reset the counter for the position.<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
1 - RolloPos will be used
|
||
0 - RolloPos is not used (default)
|
||
</pre><br>
|
||
These attributes will be created automatical if useRolloPos is set to 1.
|
||
They will not be deleted, if the value is set to 0 or the attribut is deleted.
|
||
<pre>
|
||
rMin - Time in seconds for the topmost position
|
||
rMax - Time in seconds until the device is fully closed
|
||
rPos - This is an internal value and must not be changed!
|
||
</pre></li>
|
||
|
||
<a name="model"></a>
|
||
<li>model<br>
|
||
The model attribute denotes the model type of the device.
|
||
The attributes will (currently) not be used by the fhem.pl directly.
|
||
It can be used by e.g. external programs or web interfaces to
|
||
distinguish classes of devices and send the appropriate commands.
|
||
The spelling of the model names are as quoted on the printed
|
||
documentation which comes which each device. This name is used
|
||
without blanks in all lower-case letters. Valid characters should be
|
||
<code>a-z 0-9</code> and <code>-</code> (dash),
|
||
other characters should be ommited. Here is a list of "official"
|
||
devices:<br><br>
|
||
|
||
<b>Receiver/Actor</b>: there is only one reciever: R_23700
|
||
</li><br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
</ul>
|
||
<a name="USBWX"></a>
|
||
<h3>USBWX</h3>
|
||
<ul>
|
||
The USBWX module interprets the messages received by the ELV <a
|
||
href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">USB-WDE1</a>
|
||
weather receiver. This receiver is compaptible with the following ELV sensors:
|
||
KS200/KS300, S300IA, S300TH, ASH2200, PS50. It also known to work with Conrad
|
||
weather sensors KS555, S555TH and ASH555.<br> This module was tested with ELV
|
||
S300TH, ELV ASH2200, ELV KS300, Conrad S555TH and Conrad KS555. <br> Readings
|
||
and STATE of temperature/humidity sensors are compatible with the CUL_WS
|
||
module. For KS300/KS555 sensors STATE is compatible with the KS300 module. The
|
||
module is integrated into autocreate to generate the appropriate filelogs and
|
||
weblinks automatically.
|
||
<br><br>
|
||
Note: this module requires the Device::SerialPort or Win32::SerialPort module
|
||
if the devices is connected via USB or a serial port.
|
||
<br><br>
|
||
|
||
<a name="USBWXdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> USBWX <serial device></code>
|
||
<br>
|
||
<br>Defines USB-WDE1 attached via usb.<br>
|
||
<br>
|
||
<code>define <name> USBWX <code> [corr1...corr4]</code> <br>
|
||
<br>
|
||
<code> is the code which must be set on the sensor. Valid values
|
||
are 1 through 8. <br> 9 is used as the sensor id of the ks300 sensor.<br>
|
||
corr1..corr4 are up to 4 numerical correction factors, which will be added
|
||
to the respective value to calibrate the device. Note: rain-values will be
|
||
multiplied and not added to the correction factor.
|
||
<br>
|
||
<br>
|
||
Example:<pre>
|
||
define USBWDE1 USBWX /dev/ttyUSB0
|
||
define USBWX_1 USBWX 1
|
||
define USBWX_livingroom USBWX 2
|
||
define USBWX_ks300 USBWX 9
|
||
</pre>
|
||
</ul>
|
||
|
||
<a name="USBWXset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
<a name="USBWXget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="USBWXattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="USF1000"></a>
|
||
<h3>USF1000</h3>
|
||
<ul>
|
||
Fhem can receive your tank's fill level from the USF1000S device
|
||
through a <a href="#FHZ">FHZ</a> device, so one must be defined first.
|
||
The state contains the fill level in % (lower case v in the device state)
|
||
and the current volume in liters (upper case V in the device state).
|
||
Measured distance to the liquid's surface, fill level, volume and warnings
|
||
(Test mode, Battery low) are available. Due to the design of the USF1000S
|
||
protocol, you can have only one USF1000S in range of your FHZ as these
|
||
devices cannot be distinguished.<br>
|
||
<br>
|
||
|
||
<a name="USF1000Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> USF1000 <geometry></code>
|
||
<br><br>
|
||
|
||
<code><geometry></code> determines the form of the tank and the
|
||
position of the sensor. The following geometries are currently
|
||
supported:<br><br>
|
||
<ul>
|
||
<li><code>cub <length> <width> <height> <offset></code></li>
|
||
<li><code>cylv <diameter> <height> <offset></code></li>
|
||
</ul>
|
||
<br>
|
||
<code>cub</code> stands for a cuboid whose base is <length> × <width>.
|
||
<code>cylv</code> stands for a vertical cylinder whose diameter is <diameter>.
|
||
<height> is the distance of the surface of the liquid from the ground
|
||
if the tank is full. <offset> is the distance of the sensor relative to
|
||
the surface of the liquid. All quantities are expressed in meters.<br>
|
||
<br>
|
||
|
||
Example:<br>
|
||
<ul>
|
||
<code>define MyTank USF1000 cylv 2 1 0.3</code>: a cylindrical water tank with
|
||
2 meters diameter. The water stands 1 meter high if the tank is full. The
|
||
sensor is fixed 1,3 meters above ground.<br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="USF1000set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="USF1000get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="USF1000attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a> (usf1000s)</li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
<a name="Utils"></a>
|
||
<h3>Utils</h3>
|
||
<ul>
|
||
<br/>
|
||
This is a collection of functions that can be used module-independant in all your own development<br/>
|
||
</br>
|
||
<pre>
|
||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||
# IMPORTANT: do not insert your own functions inside
|
||
# the file 99_Utils.pm!
|
||
#
|
||
# This file will be overwritten during an FHEM update and all
|
||
# your own inserts will be lost.
|
||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||
#
|
||
# To avoid this, we recommend following procedure:
|
||
#
|
||
# 1. Create your own file 99_myUtils.pm from the template below
|
||
# 2. Put this file inside the ./FHEM directory
|
||
# 3. Put your own functions into this new file
|
||
#
|
||
<br/>
|
||
<code>
|
||
# start-of-template
|
||
package main;
|
||
|
||
use strict;
|
||
use warnings;
|
||
use POSIX;
|
||
|
||
sub
|
||
myUtils_Initialize($$)
|
||
{
|
||
my ($hash) = @_;
|
||
}
|
||
|
||
# start with your own functions below this line
|
||
|
||
|
||
# behind your last function, we need the following
|
||
1;
|
||
# end-of-template
|
||
</code>
|
||
</pre>
|
||
</br>
|
||
<b>Defined functions</b><br/><br/>
|
||
<ul>
|
||
<li><b>abstime2rel()</b><br>???</li><br/>
|
||
<li><b>ltrim()</b><br>returns string without leading spaces</li><br/>
|
||
<li><b>max()</b><br>returns the highest value from a given list (sorted alphanumeric)</li><br/>
|
||
<li><b>maxNum()</b><br>returns the highest value from a given list (sorted numeric)</li><br/>
|
||
<li><b>min()</b><br>returns the lowest value from a given list (sorted alphanumeric)</li><br/>
|
||
<li><b>minNum()</b><br>returns the lowest value from a given list (sorted numeric)</li><br/>
|
||
<li><b>rtrim()</b><br>returns string without trailing spaces</li><br/>
|
||
<li><b>time_str2num()</b><br>???</li><br/>
|
||
<li><b>trim()</b><br>returns string without leading and without trailing spaces</li><br/>
|
||
<li><b>UntoggleDirect()</b><br>For devices paired directly, converts state 'toggle' into 'on' or 'off'</li><br/>
|
||
<li><b>UntoggleIndirect()</b><br>For devices paired indirectly, switches the target device 'on' or 'off' <br/>
|
||
also when a 'toggle' was sent from the source device</li><br/>
|
||
</ul>
|
||
</ul>
|
||
<a name="VIERA"></a>
|
||
<h3>VIERA</h3>
|
||
<ul>
|
||
<a name="VIERAdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> VIERA <host> [<interval>]</code>
|
||
<br><br>
|
||
This module controls Panasonic TV device over ethernet. It's possible to
|
||
power down the tv, change volume or mute/unmute the TV. Also this modul is simulating
|
||
the remote control and you are able to send different command buttons actions of remote control.
|
||
The module is tested with Panasonic plasma TV tx-p50vt30e
|
||
<br><br>
|
||
Defining a VIERA device will schedule an internal task (interval can be set
|
||
with optional parameter <interval> in seconds, if not set, the value is 30
|
||
seconds), which periodically reads the status of volume and mute status and triggers
|
||
notify/filelog commands.<br><br>
|
||
Example:
|
||
<ul><code>
|
||
define myTV1 VIERA 192.168.178.20<br><br>
|
||
define myTV1 VIERA 192.168.178.20 60 #with custom interval of 60 seconds
|
||
</code></ul>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="VIERAset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <command> [<value>]</code>
|
||
<br><br>
|
||
Currently, the following commands are defined.
|
||
<ul>
|
||
<code>
|
||
off<br>
|
||
mute [on|off]<br>
|
||
volume [0-100]<br>
|
||
volumeUp<br>
|
||
volumeDown<br>
|
||
channel [1-9999]<br>
|
||
channelUp<br>
|
||
channelDown<br>
|
||
statusRequest<br>
|
||
remoteControl <command><br>
|
||
</code>
|
||
</ul>
|
||
</ul>
|
||
<ul>
|
||
<br>
|
||
<u>Remote control (depending on your model, maybe)</u><br>
|
||
For this application the following commands are available:<br>
|
||
<ul><code>
|
||
3D => 3D button<br>
|
||
BLUE => Blue<br>
|
||
CANCEL => Cancel / Exit<br>
|
||
CHG_INPUT => AV<br>
|
||
CH_DOWN => Channel down<br>
|
||
CH_UP => Channel up<br>
|
||
D0 => Digit 0<br>
|
||
D1 => Digit 1<br>
|
||
D2 => Digit 2<br>
|
||
D3 => Digit 3<br>
|
||
D4 => Digit 4<br>
|
||
D5 => Digit 5<br>
|
||
D6 => Digit 6<br>
|
||
D7 => Digit 7<br>
|
||
D8 => Digit 8<br>
|
||
D9 => Digit 9<br>
|
||
DISP_MODE => Display mode / Aspect ratio<br>
|
||
DOWN => Control DOWN<br>
|
||
ENTER => Control Center click / enter<br>
|
||
EPG => Guide / EPG<br>
|
||
FF => Fast forward<br>
|
||
GREEN => Green<br>
|
||
HOLD => TTV hold / image freeze<br>
|
||
INDEX => TTV index<br>
|
||
INFO => Info<br>
|
||
INTERNET => VIERA connect<br>
|
||
LEFT => Control LEFT<br>
|
||
MENU => Menu<br>
|
||
MUTE => Mute<br>
|
||
PAUSE => Pause<br>
|
||
PLAY => Play<br>
|
||
POWER => Power off<br>
|
||
P_NR => P-NR (Noise reduction)<br>
|
||
REC => Record<br>
|
||
RED => Red<br>
|
||
RETURN => Return<br>
|
||
REW => Rewind<br>
|
||
RIGHT => Control RIGHT<br>
|
||
R_TUNE => Seems to do the same as INFO<br>
|
||
SD_CARD => SD-card<br>
|
||
SKIP_NEXT => Skip next<br>
|
||
SKIP_PREV => Skip previous<br>
|
||
STOP => Stop<br>
|
||
STTL => STTL / Subtitles<br>
|
||
SUBMENU => Option<br>
|
||
TEXT => Text / TTV<br>
|
||
TV => TV<br>
|
||
UP => Control UP<br>
|
||
VIERA_LINK => VIERA link<br>
|
||
VOLDOWN => Volume down<br>
|
||
VOLUP => Volume up<br>
|
||
VTOOLS => VIERA tools<br>
|
||
YELLOW => Yellow<br>
|
||
</code></ul>
|
||
|
||
<br>
|
||
Example:<br>
|
||
<ul><code>
|
||
set <name> mute on<br>
|
||
set <name> volume 20<br>
|
||
set <name> remoteControl CH_DOWN<br>
|
||
</code></ul>
|
||
|
||
<br>
|
||
Notes:<br>
|
||
<ul>Activate volume remotecontrol by DLNA: Menu -> Setup -> Network Setup -> Network Link Settings -> DLNA RemoteVolume -> On</ul>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="VIERAget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <what></code>
|
||
<br><br>
|
||
Currently, the following commands are defined and return the current state of the TV.
|
||
<ul><code>
|
||
mute<br>
|
||
volume<br>
|
||
power<br>
|
||
presence<br>
|
||
</code></ul>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="VIERAattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>N/A</ul>
|
||
|
||
<br>
|
||
<a name="VIERAevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>volume</li>
|
||
<li>mute</li>
|
||
<li>presence</li>
|
||
<li>power</li>
|
||
<li>state</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="VantagePro2"></a>
|
||
<h3>VantagePro2</h3>
|
||
<ul>
|
||
Note: this module needs the Net::Telnet perl module.
|
||
<br><br>
|
||
<a name="VantagePro2define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> <ip-address> <port> <delay></code>
|
||
<br><br>
|
||
Defines a Davis VantagePro2 weatherstation attached on transparent ethernet/usb|serial server accessable by telnet.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define AUSSEN.wetterstation VantagePro2 192.168.8.127 4999 60</code><br>
|
||
<code>
|
||
fhem> list AUSSEN.wetterstation<br>
|
||
Internals:<br>
|
||
DEF 192.168.8.127 4999 60<br>
|
||
Host 192.168.8.127<br>
|
||
NAME AUSSEN.wetterstation<br>
|
||
NR 5<br>
|
||
Port 4999<br>
|
||
STATE T-OUT: 22.78 T-IN: 26.50 H-OUT: 55 H-IN: 45 W: 1.61 W-AV: 1.61 WS 257 R: 0.00 S: 770 UV: 4.1 RD: 0 RM: 41 RY: 241 BM: 76.27 BT: Steady<br>
|
||
TYPE VantagePro2<br>
|
||
Readings:<br>
|
||
2010-08-04 10:15:17 10 min. average windspeed 1.61 (km/h)<br>
|
||
2010-08-04 10:15:17 UV 4.1 (UV/Index)<br>
|
||
2010-08-04 10:15:17 barometer 76.27 (Millimeters)<br>
|
||
2010-08-04 10:15:17 barometer trend Steady<br>
|
||
2010-08-04 10:15:17 day rain 0 (mm/day)<br>
|
||
2010-08-04 10:15:17 humidity inside 45 (%)<br>
|
||
2010-08-04 10:15:17 humidity outside 55 (%)<br>
|
||
2010-08-04 10:15:17 month rain 41 (mm/month)<br>
|
||
2010-08-04 10:15:17 rainrate 0.00 (mm/h)<br>
|
||
2010-08-04 10:15:17 solar 770 (Watt/m^2)<br>
|
||
2010-08-04 10:15:17 temperature-inside 26.50 (Celsius)<br>
|
||
2010-08-04 10:15:17 temperature-outside 22.78 (Celsius)<br>
|
||
2010-08-04 10:15:17 wind direction 257 (Degrees)<br>
|
||
2010-08-04 10:15:17 windspeed 1.61 (km/h)<br>
|
||
2010-08-04 10:15:17 year rain 241 (mm/year)<br>
|
||
Attributes:<br>
|
||
delay 60<br>
|
||
</code><br>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WEBCOUNT"></a>
|
||
<h3>WEBCOUNT</h3>
|
||
<ul>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br><br>
|
||
<a name="WEBCOUNTdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> WEBCOUNT <ip-address> <port> <delay></code>
|
||
<br><br>
|
||
Defines an WEBCOUNT device (Box with 6 count pulses, www.wut.de) via ip address. The device is pooled (delay interval).<br><br>
|
||
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define pump WEBCOUNT 192.168.8.200 1 60</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<a name="WEBIO"></a>
|
||
<h3>WEBIO</h3>
|
||
<ul>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br><br>
|
||
<a name="WEBIOdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> WEBIO <ip-address> <port> <delay></code>
|
||
<br><br>
|
||
Defines an Web-IO device (Box with 2 Analog-In/Out 0..10V, www.wut.de) via ip address. The status of the device is also pooled (delay interval).<br><br>
|
||
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define pumpspeed WEBIO 192.168.8.200 1 60</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="WEBIOset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
0.00 - 10.00
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set pumpspeed 6.75</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WEBIO_12DIGITAL"></a>
|
||
<h3>WEBIO_12DIGITAL</h3>
|
||
<ul>
|
||
Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
|
||
<br><br>
|
||
<a name="WEBIO_12DIGITALdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> WEBIO_12DIGITAL <ip-address> <outputport> <delay></code>
|
||
<br><br>
|
||
Defines an Web-IO-Digital device (Box with up to 12 digital in/outputs, www.wut.de) via ip address. The status of the device is also pooled (delay interval).<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define motor1 WEBIO_12DIGITAL 192.168.8.200 1 60</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="WEBIO_12DIGITALset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
on off
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set motor1 on</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WEBTHERM"></a>
|
||
<h3>WEBTHERM</h3>
|
||
<ul>
|
||
This module connects a <a href="http://www.wut.de/e-57w0w-ww-dade-000.php">Web-Thermometer made by W&T</a> to your FHEM installation.<br/>
|
||
Currently this module is no longer maintained, but it should work in its current state.<br/>
|
||
It is provided "as is" for backward compatibility.<br/>
|
||
<br />
|
||
<a name="WEBTHERM_Define"></a>
|
||
<b>Define</b>
|
||
<ul><br/>
|
||
<code>define <name> WEBTHERM <ip-address> <port-nr> <interval></code><br/>
|
||
<br/>
|
||
Defines a WEBTHERM device at given ip and port.</br>
|
||
Values are polled periodically defined by given interval (in seconds).<br/>
|
||
Read temperature is written into reading "state".<br/>
|
||
</ul>
|
||
<br/><br />
|
||
|
||
<a name="WEBTHERM_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br/><br />
|
||
|
||
<a name="WEBTHERM_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br/><br />
|
||
|
||
<a name="WEBTHERM_Attr"></a>
|
||
<b>Attr</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
</ul>
|
||
<a name="WOL"></a>
|
||
<h3>WOL</h3>
|
||
|
||
Defines a WOL device via its MAC and IP address.<br><br>
|
||
|
||
when sending the <b>on</b> command to a WOL device it wakes up the dependent device by sending a magic packet. When running in repeat mode the magic paket ist sent every n seconds to the device.
|
||
So, for example a Buffalo NAS can be kept awake.
|
||
<ul>
|
||
<a name="WOLdefine"></a>
|
||
<h4>Define</h4>
|
||
<ul>
|
||
<code><b><font size="+1">define <name> WOL <MAC> <IP> [<mode> [<repeat>]]</font></b></code>
|
||
<br><br>
|
||
|
||
<dl>
|
||
<dt><b>MAC</b></dt>
|
||
<dd>MAC-Adress of the host</dd>
|
||
<dt><b>IP</b></dt>
|
||
<dd>IP-Adress of the host (or broadcast address of the local network if IP of the host is unknown)</dd>
|
||
<dt><b>mode <i>[EW|UDP]</i></b></dt>
|
||
<dd>EW: wakeup by <i>usr/bin/ether-wake</i> </dd>
|
||
<dd>UDP: wakeup by an implementation like <i>Net::Wake(CPAN)</i></dd>
|
||
</dl>
|
||
<br><br>
|
||
|
||
<b><font size="+1">Examples</font></b>:
|
||
<ul>
|
||
<code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 switching only one time</code><br>
|
||
<code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 EW by ether-wake(linux command)</code><br>
|
||
<code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 BOTH by both methods</code><br>
|
||
<code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 UDP 200 in repeat mode<i><b>usr/bin/ether-wake</b></i> in repeatmode</code><br>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<b><font size="+1">Notes</font></b>:
|
||
<ul>
|
||
Not every hardware is able to wake up other devices by default. Oftenly firewalls filter magic packets. Switch them first off.
|
||
You may need a packet sniffer to check some malfunktion.
|
||
With this module you get two methods to do the job: see the mode parameter.
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WOLset"></a>
|
||
<h4>Set </h4>
|
||
<ul>
|
||
<code><b><font size="+1">set <name> <value></font></b></code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
<b>refresh</b> # checks(by ping) whether the device is currently running
|
||
<b>on</b> # sends a magic packet to the defined MAC address
|
||
<b>off</b> # stops sending magic packets and sends the <b>shutdownCmd</b>(see attributes)
|
||
</pre>
|
||
|
||
<b><font size="+1">Examples</font></b>:
|
||
<ul>
|
||
<code>set computer1 on</code><br>
|
||
<code>set computer1 off</code><br>
|
||
<code>set computer1 refresh</code><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WOLattr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><code>attr <name> sysCmd <string></code>
|
||
<br>Custom command executed to wakeup a remote machine, i.e. <code>/usr/bin/ether-wake or /usr/bin/wakeonlan</code></li>
|
||
<li><code>attr <name> shutdownCmd <command></code>
|
||
<br>Custom command executed to shutdown a remote machine. You can use <command>, like you use it in at, notify or Watchdog</li>
|
||
<br><br>
|
||
Examples:
|
||
<PRE>
|
||
attr wol shutdownCmd set lamp on # fhem command
|
||
attr wol shutdownCmd { Log 1, "Teatime" } # Perl command
|
||
attr wol shutdownCmd "/bin/echo "Teatime" > /dev/console" # shell command
|
||
</PRE>
|
||
<li><code>attr <name> interval <seconds></code></a>
|
||
<br>defines the time between two checks by a <i>ping</i> if state of <name> is <i>on</i></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WS2000"></a>
|
||
<h3>WS2000</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="WS2000define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> WS2000 <device_to_connect></code>
|
||
<br><br>
|
||
|
||
Define a WS2000 series raw receiver device sold by ELV. Details see <a
|
||
href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=6724">here</a>.
|
||
Unlike 86_FS10.pm it will handle the complete device communication itself
|
||
and doesnt require an external program. For this reason you can now use
|
||
this also on windows.
|
||
<br>
|
||
This Device will be usually connect to a serial port, but you can also
|
||
define a raw network redirector like lantronix XPORT(TM).
|
||
<br>Note: Currently this device does not support a "set" function
|
||
<br><br>
|
||
|
||
Attributes:
|
||
<ul>
|
||
<li><code>rain</code>: factor for calculating amount of rain in ml/count</li>
|
||
<li><code>altitude</code>: height in meters to calculate pressure for NN (not used yet)</li>
|
||
</ul>
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define WS2000 WS2000 /dev/ttyS0</code><br>
|
||
</ul>
|
||
<ul>
|
||
<code>define WS2000 WS2000 xport:10001</code><br>
|
||
</ul>
|
||
<ul>
|
||
<code>attr WS2000 rain 366</code> : use factor 366 ml/count for rain sensor S2000R<br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="WS2000get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> list</code>
|
||
<br>
|
||
Gets the last reading of all received sensord
|
||
<br><br>
|
||
<code>get <name> [TH0..TH7, T0..T7, I0..I7, R0..R7, W0..W7, L0..L7, P0..P7,LAST,RAW]</code><br>
|
||
get the last reading for the name sensor, <br>
|
||
<code>LAST</code>: Last received Sensor
|
||
<br><br>
|
||
<code>RAW</code>: original Data from interface
|
||
<br><br>
|
||
</ul>
|
||
|
||
|
||
<a name="WS2000attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> (ws2000)</li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li>rain</li>
|
||
<li>altitude</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="WS300"></a>
|
||
<h3>WS300</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="WS300define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define WS300Device WS300 <serial device></code><br>
|
||
or<br>
|
||
<code>define <devname> WS300 [0-9]</code><br>
|
||
<br>
|
||
The first line is mandatory if you have a WS300 device: it defines the
|
||
input device with its USB port. The name of this device is fixed and must
|
||
be WS300Device. It must be the first defined WS300 device.<br>
|
||
|
||
For each additional device (with number 0 to 9) you have to define another
|
||
WS300 device, with an arbitrary name. The WS300 device which reports the
|
||
readings will be defined with the port number 9, an optional KS300 with the
|
||
port number 8.<br><br>
|
||
|
||
Examples:
|
||
<pre>
|
||
define WS300Device WS300 /dev/ttyUSB1
|
||
define ash2200.1 WS300 0
|
||
define ks300 WS300 8
|
||
define ws300 WS300 9
|
||
</pre>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="WS300set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set WS300Device <interval(min.)> <height(m)> <rainvalume(ml)></code>
|
||
<br><br>
|
||
Set some WS300 configuration parameters.
|
||
</ul>
|
||
|
||
|
||
<a name="WS300get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="WS300attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#model">model</a> (ws300)</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="WS3600"></a>
|
||
<h3>WS3600</h3>
|
||
<ul>
|
||
Defines a weather station, which is queried by means of an external
|
||
program. That program is executed by FHEM and is expected to deliver the
|
||
data at stdout in the format of a WS3600 series weather station (details
|
||
see below).<br>
|
||
<br>
|
||
<a name="WS3600define"></a> <b>Define</b>
|
||
<ul>
|
||
<code>define <name> WS3600 "<wsreaderprog>
|
||
[<options>]" [<interval>]</code> <br>
|
||
<br>
|
||
<ul>
|
||
<dl>
|
||
<dt><wsreaderprog></dt>
|
||
<dd>full path to the executable which queries the weatherstation
|
||
(for WS3600 series fetch3600 should be used)</dd>
|
||
<dt><options></dt>
|
||
<dd>options for <wsreaderprog>, if necessary</dd>
|
||
<dt><interval></dt>
|
||
<dd>this optional parameter is the time between subsequent calls to
|
||
<wsreaderprog>. It defaults to 60s.</dd>
|
||
</dl>
|
||
</ul>
|
||
<br>
|
||
Supported Stations are:<br>
|
||
<ul>
|
||
<li>WS3600 series weather station (Europe Supplies, technotrade, etc;
|
||
refer to <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
|
||
(german) for details on this model) with fetch3600 from the
|
||
toolchain <a href="http://open3600.fast-mail.nl/tiki-index.php">open3600</a>).
|
||
Fetch3600 delivers the current readings line by line as
|
||
reading-value-pairs. These are read periodically and translated into
|
||
more readable names for FHEM by the module WS3600.pm. </li>
|
||
<li><a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS2300">WS2300</a>
|
||
with toolchain <a href="http://www.lavrsen.dk/twiki/bin/view/Open2300/WebHome">open2300</a>,
|
||
because it is rather similar to the WS3600.</li>
|
||
<li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
|
||
(and other stations which come with the EasyWeather windows
|
||
application) with <a href="https://code.google.com/p/fowsr/">fowsr</a>
|
||
(version 2.0 or above)</li>
|
||
</ul>
|
||
<br>
|
||
Currently, it is expected that the WS is attached to the local computer
|
||
and <wsreaderprog> is run locally. Basically the executable called
|
||
needs to supply on stdout an output similar to what fetch3600 returns;
|
||
how to implement a "networked setup" is left as an excercise to the
|
||
reader. <br>
|
||
For the records, this is an output of fetch3600:<br>
|
||
<div style="height: 120px; width: 215px; border: 1px solid #cccccc; overflow: auto;">
|
||
<pre>Date 14-Nov-2009
|
||
Time 10:50:22
|
||
Ti 22.8
|
||
Timin 20.8
|
||
Timax 27.9
|
||
TTimin 10:27
|
||
DTimin 15-10-2009
|
||
TTimax 23:31
|
||
DTimax 20-08-2009
|
||
To 14.2
|
||
Tomin -0.4
|
||
Tomax 35.6
|
||
TTomin 07:03
|
||
DTomin 15-10-2009
|
||
TTomax 16:52
|
||
DTomax 20-08-2009
|
||
DP 9.2
|
||
DPmin -2.2
|
||
DPmax 20.3
|
||
TDPmin 07:03
|
||
DDPmin 15-10-2009
|
||
TDPmax 11:58
|
||
DDPmax 20-08-2009
|
||
RHi 48
|
||
RHimin 32
|
||
RHimax 57
|
||
TRHimin 17:03
|
||
DRHimin 21-10-2009
|
||
TRHimax 22:24
|
||
DRHimax 07-10-2009
|
||
RHo 72
|
||
RHomin 27
|
||
RHomax 96
|
||
TRHomin 16:41
|
||
DRHomin 20-08-2009
|
||
TRHomax 06:28
|
||
DRHomax 02-11-2009
|
||
WS 0.0
|
||
DIRtext WSW
|
||
DIR0 247.5
|
||
DIR1 247.5
|
||
DIR2 247.5
|
||
DIR3 247.5
|
||
DIR4 247.5
|
||
DIR5 247.5
|
||
WC 14.2
|
||
WCmin -0.4
|
||
WCmax 35.6
|
||
TWCmin 07:03
|
||
DWCmin 15-10-2009
|
||
TWCmax 16:52
|
||
DWCmax 20-08-2009
|
||
WSmin 0.0
|
||
WSmax 25.6
|
||
TWSmin 10:44
|
||
DWSmin 14-11-2009
|
||
TWSmax 19:08
|
||
DWSmax 24-09-2009
|
||
R1h 0.00
|
||
R1hmax 24.34
|
||
TR1hmax 22:34
|
||
DR1hmax 07-10-2009
|
||
R24h 0.00
|
||
R24hmax 55.42
|
||
TR24hmax 07:11
|
||
DR24hmax 08-10-2009
|
||
R1w 29.00
|
||
R1wmax 95.83
|
||
TR1wmax 00:00
|
||
DR1wmax 12-10-2009
|
||
R1m 117.58
|
||
R1mmax 117.58
|
||
TR1mmax 00:00
|
||
DR1mmax 01-11-2009
|
||
Rtot 3028.70
|
||
TRtot 03:29
|
||
DRtot 18-09-2005
|
||
RP 992.200
|
||
AP 995.900
|
||
RPmin 970.300
|
||
RPmax 1020.000
|
||
TRPmin 05:25
|
||
DRPmin 04-11-2009
|
||
TRPmax 09:19
|
||
DRPmax 11-09-2009
|
||
Tendency Falling
|
||
Forecast Cloudy</pre>
|
||
</div>
|
||
There is no expectation on the readings received from the fetch3600
|
||
binary; so, in essence, if you have a similar setup (unsupported,
|
||
attached weather station and a means to get it's reading into an output
|
||
similar to above's), you <em>should be able</em> to use WS3600.pm with
|
||
a custom written script to interface FHEM with your station as well.
|
||
WS3600.pm <em>only recognizes the above readings</em> (and translates
|
||
these into, e. g., <code>Temp-inside</code> for <code>Ti</code> for
|
||
use within FHEM), other lines are silently dropped on the floor. Note:
|
||
To step down the number of readings date and time records will now be
|
||
merged to one reading containing date and time. This now also allows
|
||
records with merged date / time values delivered from
|
||
<wsreaderprog> - detected by prefix <code>DT</code> (e.g. <code>Date</code>
|
||
+ <code>Time</code> --> <code>DTime</code>, <code>DRPmin</code> +
|
||
<code>TRPmin</code> --> <code>DTRPmin</code> and so on). <br>
|
||
fetch3600 is available as binary for the Windows OS as well, <em>but
|
||
operation under that OS isn't tested yet.</em> <br>
|
||
<br>
|
||
Examples:
|
||
<ul>
|
||
<code>define myWS3600 W3600 /usr/local/bin/fetch360</code><br>
|
||
<code>define myWS1080 W3600 "/usr/local/bin/fowsr -c" 300</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<a name="WS3600set"></a> <b>Set</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
<a name="WS3600get"></a> <b>Get</b>
|
||
<ul>
|
||
N/A
|
||
</ul>
|
||
<br>
|
||
<a name="WS3600attr"></a> <b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#model">model</a> WS3600, WS2300,
|
||
WS1080 (not used for anything, yet)</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="WWO"></a>
|
||
<h3>WWO</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="WWOdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> WWO <location> <apikey></code><br>
|
||
<br>
|
||
Defines a virtual device for WWO forecasts.<br><br>
|
||
|
||
A WWO device periodically gathers current and forecast weather conditions
|
||
from worldweatheronline.com (the free api version)<br>
|
||
You need to signup at <a href="http://developer.worldweatheronline.com">http://developer.worldweatheronline.com</a> to get an apikey)<br><br>
|
||
|
||
The parameter <code>location</code> is the WOEID (WHERE-ON-EARTH-ID), go to
|
||
<a href="http://www.worldweatheronline.com">http://www.worldweatheronline.com</a> to find it out for your valid location.<br><br>
|
||
|
||
The natural language in which the forecast information appears is english.
|
||
<br><br>
|
||
|
||
The interval is set to update the values every hour.
|
||
<br><br>
|
||
|
||
Examples:
|
||
<pre>
|
||
define MyWeather WWO Berlin,Germany
|
||
</pre>
|
||
|
||
The module provides one additional function <code>WWOAsHtml</code>. The function return the HTML code for a
|
||
vertically arranged weather forecast.
|
||
<br><br>
|
||
|
||
Example:
|
||
<pre>
|
||
define MyWeatherWeblink weblink htmlCode { WWOAsHtml("MyWeather") }
|
||
</pre>
|
||
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Weatherset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> update</code><br><br>
|
||
|
||
Forces the retrieval of the weather data. The next automatic retrieval is scheduled to occur
|
||
<code>interval</code> seconds later.<br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Weatherget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <reading></code><br><br>
|
||
|
||
Valid readings and their meaning (? can be one of 0, 1, 2, 3, 4, 5 and stands
|
||
for today, tomorrow, etc. - with 'fc?_' or without! - without is meaning 'current condition'):<br>
|
||
<table>
|
||
<tr><td>cloudcover</td><td>cloudcover in percent</td></tr>
|
||
<tr><td>current_date_time</td><td>last update of forecast on server</td></tr>
|
||
<tr><td>fc?_date</td><td>date of the forecast condition - not valid without 'fc?'</td></tr>
|
||
<tr><td>fc?_icon</td><td>name of the forecasticon</td></tr>
|
||
<tr><td>fc?_precipMM</td><td>preciption for day</td></tr>
|
||
<tr><td>fc?_tempMaxC</td><td>forecasted daily high in degrees centigrade</td></tr>
|
||
<tr><td>fc?_tempMaxF</td><td>forecasted daily high in degrees fahrenheit</td></tr>
|
||
<tr><td>fc?_tempMinC</td><td>forecasted daily low in degrees centigrade</td></tr>
|
||
<tr><td>fc?_tempMinF</td><td>forecasted daily low in degrees fahrenheit</td></tr>
|
||
<tr><td>fc?_weatherCode</td><td>weathercode</td></tr>
|
||
<tr><td>fc?_weatherDesc</td><td>short weather desciption</td></tr>
|
||
<tr><td>fc?_weatherIconUrl</td><td>full url to the weathericonfile</td></tr>
|
||
<tr><td>fc?_winddir16Point</td><td>winddirection with 16 points</td></tr>
|
||
<tr><td>fc?_winddirDegree</td><td>windirection in degrees</td></tr>
|
||
<tr><td>fc?_winddirection</td><td>winddirection</td></tr>
|
||
<tr><td>fc?_windspeedKmph</td><td>windspeed in km/h</td></tr>
|
||
<tr><td>fc?_windspeedMiles</td><td>windspeed in miles/h</td></tr>
|
||
<tr><td>humidity</td><td>current humidity in %</td></tr>
|
||
<tr><td>localObsDateTime</td><td>local time of observation</td></tr>
|
||
<tr><td>observation_time</td><td>time of observation</td></tr>
|
||
<tr><td>pressure</td><td>air pressure in hPa</td></tr>
|
||
<tr><td>query</td><td>returns the queried location</td></tr>
|
||
<tr><td>temperature</td><td>current temperature in degrees centigrade</td></tr>
|
||
<tr><td>visibility</td><td>current visibilit in km</td></tr>
|
||
</table>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Weatherattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="Weather"></a>
|
||
<h3>Weather</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="Weatherdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> Weather <location> [<interval> [<language>]]</code><br>
|
||
<br>
|
||
Defines a virtual device for weather forecasts.<br><br>
|
||
|
||
A Weather device periodically gathers current and forecast weather conditions
|
||
from the Yahoo Weather API.<br><br>
|
||
|
||
The parameter <code>location</code> is the WOEID (WHERE-ON-EARTH-ID), go to
|
||
<a href="http://weather.yahoo.com">http://weather.yahoo.com</a> to find it out for your location.<br><br>
|
||
|
||
The optional parameter <code>interval</code> is the time between subsequent updates
|
||
in seconds. It defaults to 3600 (1 hour).<br><br>
|
||
|
||
The optional language parameter may be one of
|
||
<code>de</code>,
|
||
<code>en</code>,
|
||
<code>nl</code>,
|
||
|
||
It determines the natural language in which the forecast information appears.
|
||
It defaults to <code>en</code>. If you want to set the language you also have to set the interval.<br><br>
|
||
|
||
Examples:
|
||
<pre>
|
||
define MyWeather Weather 673513
|
||
define Forecast Weather 673513 1800
|
||
</pre>
|
||
|
||
The module provides four additional functions <code>WeatherAsHtml</code>, <code>WeatherAsHtmlV</code>, <code>WeatherAsHtmlH</code> and
|
||
<code>WeatherAsHtmlD</code>. The former two functions are identical: they return the HTML code for a
|
||
vertically arranged weather forecast. The third function returns the HTML code for a horizontally arranged weather forecast. The
|
||
latter function dynamically picks the orientation depending on wether a smallscreen style is set (vertical layout) or not (horizontal layout).<br><br>
|
||
Example:
|
||
<pre>
|
||
define MyWeatherWeblink weblink htmlCode { WeatherAsHtmlH("MyWeather") }
|
||
</pre>
|
||
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Weatherset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> update</code><br><br>
|
||
|
||
Forces the retrieval of the weather data. The next automatic retrieval is scheduled to occur
|
||
<code>interval</code> seconds later.<br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Weatherget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <reading></code><br><br>
|
||
|
||
Valid readings and their meaning (? can be one of 1, 2, 3, 4, 5 and stands
|
||
for today, tomorrow, etc.):<br>
|
||
<table>
|
||
<tr><td>city</td><td>name of town returned for location</td></tr>
|
||
<tr><td>code</td><td>current condition code</td></tr>
|
||
<tr><td>condition</td><td>current condition</td></tr>
|
||
<tr><td>current_date_time</td><td>last update of forecast on server</td></tr>
|
||
<tr><td>fc?_code</td><td>forecast condition code</td></tr>
|
||
<tr><td>fc?_condition</td><td>forecast condition</td></tr>
|
||
<tr><td>fc?_day_of_week</td><td>day of week for day +?</td></tr>
|
||
<tr><td>fc?_high_c</td><td>forecasted daily high in degrees centigrade</td></tr>
|
||
<tr><td>fc?_icon</td><td>forecast icon</td></tr>
|
||
<tr><td>fc?_low_c</td><td>forecasted daily low in degrees centigrade</td></tr>
|
||
<tr><td>humidity</td><td>current humidity in %</td></tr>
|
||
<tr><td>icon</td><td>relative path for current icon</td></tr>
|
||
<tr><td>pressure</td><td>air pressure in hPa</td></tr>
|
||
<tr><td>pressure_trend</td><td>air pressure trend (0= steady, 1= rising, 2= falling)</td></tr>
|
||
<tr><td>pressure_trend_txt</td><td>textual representation of air pressure trend</td></tr>
|
||
<tr><td>pressure_trend_sym</td><td>symbolic representation of air pressure trend</td></tr>
|
||
<tr><td>temperature</td><td>current temperature in degrees centigrade</td></tr>
|
||
<tr><td>temp_c</td><td>current temperature in degrees centigrade</td></tr>
|
||
<tr><td>temp_f</td><td>current temperature in degrees Fahrenheit</td></tr>
|
||
<tr><td>visibility</td><td>visibility in km</td></tr>
|
||
<tr><td>wind</td><td>wind speed in km/h</td></tr>
|
||
<tr><td>wind_chill</td><td>wind chill in degrees centigrade</td></tr>
|
||
<tr><td>wind_condition</td><td>wind direction and speed</td></tr>
|
||
<tr><td>wind_direction</td><td>direction wind comes from in degrees (0 = north wind)</td></tr>
|
||
<tr><td>wind_speed</td><td>same as wind</td></tr>
|
||
</table>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="Weatherattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="WeekdayTimer"></a>
|
||
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
|
||
<h3>WeekdayTimer</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="weekdayTimer_define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> WeekdayTimer <device> <profile> <command>|<condition></code>
|
||
<br><br>
|
||
|
||
to set a weekly profile for <device><br><br>
|
||
|
||
You can define different switchingtimes for every day.<br>
|
||
The new parameter is sent to the <device> automatically with <br><br>
|
||
|
||
<code>set <device> <para></code><br><br>
|
||
|
||
If you have defined a <condition> and this condition is false if the switchingtime has reached, no command will executed.<br>
|
||
An other case is to define an own perl command with <command>.
|
||
<p>
|
||
The following parameter are defined:
|
||
<ul><b>device</b><br>
|
||
The device to switch at the given time.
|
||
</ul>
|
||
<p>
|
||
<ul><b>profile</b><br>
|
||
Define the weekly profile. All timings are separated by space. A switchingtime is defined by the following example:<br>
|
||
<ul><b>[<weekdays>|]<time>|<parameter></b></ul><br>
|
||
<u>weekdays:</u> optional, if not set every day is used. Otherwise you can define a day as a number or as shortname.<br>
|
||
<u>time:</u>define the time to switch, format: HH:MM(HH in 24 hour format).<br>
|
||
<u>parameter:</u>the parameter to be set, using any text value like <b>on</b>, <b>off</b>, <b>dim30%</b>, <b>eco</b> or <b>comfort</b> - whatever your device understands.<br>
|
||
</ul>
|
||
<p>
|
||
<ul><b>command</b><br>
|
||
If no condition is set, all other is interpreted as a command. Perl-code is setting up
|
||
by well-known Block with {}.<br>
|
||
Note: if a command is defined only this command is executed. In case of executing
|
||
a "set desired-temp" command, you must define it explicit.<br>
|
||
The following parameter are replaced:<br>
|
||
<ol>
|
||
<li>@ => the device to switch</li>
|
||
<li>% => the new parameter</li>
|
||
</ol>
|
||
</ul>
|
||
<p>
|
||
<ul><b>condition</b><br>
|
||
if a condition is defined you must declared this with () and a valid perl-code.<br>
|
||
The return value must be boolean.<br>
|
||
The parameter @ and % will be interpreted.
|
||
</ul>
|
||
<p>
|
||
<b>Example:</b>
|
||
<ul>
|
||
<code>define shutter WeekdayTimer bath 12345|05:20|up 12345|20:30|down</code><br>
|
||
Mo-Fr are setting the shutter at 05:20 to <b>up</b>, and at 20:30 <b>down</b>.<p>
|
||
|
||
<code>define heatingBath WeekdayTimer bath 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|eco
|
||
{fhem("set dummy on"); fhem("set @ desired-temp %");}</code><br>
|
||
At the given times and weekdays only(!) the command will be executed.<p>
|
||
|
||
<code>define dimmer WeekdayTimer livingRoom Sa-Su,We|07:00|dim30% Sa-Su,We|21:00|dim90% (ReadingsVal("WeAreThere", "state", "no") eq "yes")</code><br>
|
||
The dimmer is only set to dimXX% if the dummy variable WeAreThere is "yes"(not a real live example).<p>
|
||
|
||
If you want to have set all WeekdayTimer their current value (after a phase of exception),
|
||
you can call the function <b> WeekdayTimer_SetAllParms ()</b>.
|
||
This call can be automatically coupled to a dummy by notify:
|
||
<code>define WDStatus2 notify Dummy:. * {WeekdayTimer_SetAllParms ()}</code>
|
||
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="WeekdayTimerset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="WeekdayTimerget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="WeekdayTimerLogattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a href="#event-on-update-reading">event-on-update-reading</a></li>
|
||
<li><a href="#event-on-change-reading">event-on-change-reading</a></li>
|
||
<li><a href="#stateFormat">stateFormat</a></li>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
|
||
<a name="X10"></a>
|
||
<h3>X10</h3>
|
||
<ul>
|
||
<a name="X10define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> X10 <model> <housecode>
|
||
<unitcode></code>
|
||
<br><br>
|
||
|
||
Defines an X10 device via its model, housecode and unitcode.<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li><code><model></code> is one of
|
||
<ul>
|
||
<li><code>lm12</code>: lamp module, dimmable</li>
|
||
<li><code>lm15</code>: lamp module, not dimmable</li>
|
||
<li><code>am12</code>: appliance module, not dimmable</li>
|
||
<li><code>tm12</code>: tranceiver module, not dimmable. Its
|
||
unitcode is 1.</li>
|
||
</ul>
|
||
Model determines whether a dim command is reasonable to be sent
|
||
or not.</li>
|
||
<li><code><housecode></code> ranges from A to P.</li>
|
||
<li><code><unitcode></code> ranges from 1 to 16.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define lamp1 X10 lm12 N 10</code><br>
|
||
<code>define pump X10 am12 B 7</code><br>
|
||
<code>define lamp2 X10 lm15 N 11</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="X10set"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <value> [<argument>]</code>
|
||
<br><br>
|
||
where <code>value</code> is one of:<br>
|
||
<pre>
|
||
dimdown # requires argument, see the note
|
||
dimup # requires argument, see the note
|
||
off
|
||
on
|
||
on-till # Special, see the note
|
||
on-for-timer # Special, see the note
|
||
</pre>
|
||
Examples:
|
||
<ul>
|
||
<code>set lamp1 dimup 10</code><br>
|
||
<code>set lamp1,lamp2 off</code><br>
|
||
<code>set pump off</code><br>
|
||
<code>set lamp2 on-till 19:59</code><br>
|
||
<code>set lamp2 on-for-timer 00:02:30</code><br>
|
||
</ul>
|
||
<br>
|
||
Notes:
|
||
<ul>
|
||
<li>Only switching and dimming are supported by now.</li>
|
||
<li>Dimming is valid only for a dimmable device as specified by
|
||
the <code>model</code> argument in its <code>define</code>
|
||
statement.</li>
|
||
<li>An X10 device has 210 discrete brightness levels. If you use a
|
||
X10 sender, e.g. a remote control or a wall switch to dim, a
|
||
brightness step is 100%/210.</li>
|
||
<li><code>dimdown</code> and <code>dimup</code> take a number in the
|
||
range from 0 to 22 as argument. It is assumed that argument 1 is
|
||
a 1% brightness change (microdim) and arguments 2 to 22 are
|
||
10%..100% brightness changes. The meaning of argument 0 is
|
||
unclear.</li>
|
||
<li>This currently leads to some confusion in the logs as the
|
||
<code>dimdown</code> and <code>dimup</code> codes are logged with
|
||
different meaning of the arguments depending on whether the commands
|
||
were sent from the PC or from a remote control or a wall switch.</li>
|
||
<li><code>dimdown</code> and <code>dimup</code> from on and off states may
|
||
have unexpected results. This seems to be a feature of the X10
|
||
devices.</li>
|
||
<li><code>on-till</code> requires an absolute time in the "at" format
|
||
(HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
|
||
returns a time specification).
|
||
If the current time is greater than the specified time, then the
|
||
command is ignored, else an "on" command is generated, and for the
|
||
given "till-time" an off command is scheduleld via the at command.
|
||
</li>
|
||
<li><code>on-for-timer</code> requires a relative time in the "at" format
|
||
(HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
|
||
returns a time specification).
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="X10get"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="X10attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#attrdummy">dummy</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a> (lm12,lm15,am12,tm13)</li>
|
||
<li><a href="#IODev">IODev</a></li><br>
|
||
<li><a href="#eventMap">eventMap</a></li><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="XBMC"></a>
|
||
<h3>XBMC</h3>
|
||
<ul>
|
||
<a name="XBMCdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> XBMC <ip[:port]> <http|tcp> [<username>] [<password>]</code>
|
||
<br><br>
|
||
|
||
This module allows you to control XBMC and receive events from XBMC. It can also be used to control Plex (see attribute <i>compatibilityMode</i>).<br><br>
|
||
|
||
<b>Prerequisites</b>
|
||
<ul>
|
||
<li>Requires XBMC "Frodo" 12.0.</li>
|
||
<li>To use this module you will have to enable JSON-RPC. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.</li>
|
||
<li>The Perl module JSON is required. <br>
|
||
On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
|
||
Via CPAN: <code>cpan install JSON</code>
|
||
To get it working on a Fritzbox the JSON module has to be installed manually.</li>
|
||
</ul>
|
||
|
||
To receive events it is necessary to use TCP. The default TCP port is 9090. Username and password are optional for TCP. Be sure to enable JSON-RPC
|
||
for TCP. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC>here</a>.<br><br>
|
||
|
||
If you just want to control XBMC you can use the HTTP instead of tcp. The username and password are required for HTTP. Be sure to enable JSON-RPC for HTTP.
|
||
See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br><br>
|
||
|
||
Example:<br><br>
|
||
<ul>
|
||
<code>
|
||
define htpc XBMC 192.168.0.10 tcp
|
||
<br><br>
|
||
define htpc XBMC 192.168.0.10:9000 tcp # With custom port
|
||
<br><br>
|
||
define htpc XBMC 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
|
||
<br><br>
|
||
define htpc XBMC 192.168.0.10 http xbmc passwd # Use HTTP with credentials - Note: to receive events use TCP!
|
||
</code>
|
||
</ul><br><br>
|
||
|
||
Remote control:<br>
|
||
There is an simple remote control layout for XBMC which contains the most basic buttons. To add the remote control to the webinterface execute the
|
||
following commands:<br><br>
|
||
<ul>
|
||
<code>
|
||
define <rc_name> remotecontrol #adds the remote control
|
||
<br><br>
|
||
set <rc_name> layout XBMC_RClayout #sets the layout for the remote control
|
||
<br><br>
|
||
set <rc_name> makenotify <XBMC_device> #links the buttons to the actions
|
||
</code>
|
||
</ul><br><br>
|
||
|
||
Known issues:<br>
|
||
XBMC sometimes creates events twices. For example the Player.OnPlay event is created twice if play a song. Unfortunately this
|
||
is a issue of XBMC. The fix of this bug is included in future version of XBMC (> 12.2).
|
||
|
||
</ul>
|
||
|
||
<a name="XBMCset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <command> [<parameter>]</code>
|
||
<br><br>
|
||
This module supports the following commands:<br>
|
||
|
||
Player related commands:<br>
|
||
<ul>
|
||
<li><b>play [<all|audio|video|picture>]</b> - starts the playback (might only work if previously paused). The second argument defines which player should be started. By default the active players will be started</li>
|
||
<li><b>pause [<all|audio|video|picture>]</b> - pauses the playback</li>
|
||
<li><b>playpause [<all|audio|video|picture>]</b> - toggles between play and pause for the given player</li>
|
||
<li><b>stop [<all|audio|video|picture>]</b> - stop the playback</li>
|
||
<li><b>next [<all|audio|video|picture>]</b> - jump to the next track</li>
|
||
<li><b>prev [<all|audio|video|picture>]</b> - jump to the previous track or the beginning of the current track.</li>
|
||
<li><b>goto <position> [<audio|video|picture>]</b> - Goes to the <position> in the playlist. <position> has to be a number.</li>
|
||
<li><b>shuffle [<toggle|on|off>] [<audio|video|picture>]</b> - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.</li>
|
||
<li><b>repeat <one|all|off> [<audio|video|picture>]</b> - Sets the repeat mode.</li>
|
||
<li><b>open <URI></b> - Plays the resource located at the URI (can be a url or a file)</li>
|
||
<li><b>opendir <path></b> - Plays the content of the directory</li>
|
||
</ul>
|
||
<br>Input related commands:<br>
|
||
<ul>
|
||
<li><b>back</b> - Back-button</li>
|
||
<li><b>down</b> - Down-button</li>
|
||
<li><b>up</b> - Up-button</li>
|
||
<li><b>left</b> - Left-button</li>
|
||
<li><b>right</b> - Right-button</li>
|
||
<li><b>home</b> - Home-button</li>
|
||
<li><b>select</b> - Select-button</li>
|
||
<li><b>info</b> - Info-button</li>
|
||
<li><b>showosd</b> - Opens the OSD (On Screen Display)</li>
|
||
<li><b>showcodec</b> - Shows Codec information</li>
|
||
<li><b>exec <action></b> - Execute an input action. All available actions are listed <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Input.Action">here</a></li>
|
||
<li><b>send <text></b> - Sends <text> as input to XBMC</li>
|
||
</ul>
|
||
<br>Libary related commands:<br>
|
||
<ul>
|
||
<li><b>videolibrary clean</b> - Removes non-existing files from the video libary</li>
|
||
<li><b>videolibrary scan</b> - Scan for new video files</li>
|
||
<li><b>audiolibrary clean</b> - Removes non-existing files from the audio libary</li>
|
||
<li><b>audiolibrary scan</b> - Scan for new audio files</li>
|
||
</ul>
|
||
<br>Application related commands:<br>
|
||
<ul>
|
||
<li><b>mute [<0|1>]</b> - 1 for mute; 0 for unmute; by default the mute status will be toggled</li>
|
||
<li><b>volume <n></b> - sets the volume to <n>. <n> must be a number between 0 and 100</li>
|
||
<li><b>volumeDown <n></b> - volume down</li>
|
||
<li><b>volumeUp <n></b> - volume up</li>
|
||
<li><b>quit</b> - closes XBMC</li>
|
||
<li><b>off</b> - depending on the value of the attribute "offMode" XBMC will be closed (see quit) or the system will be shut down, put into hibernation or stand by. Default is quit.</li>
|
||
</ul>
|
||
<br>System related commands:<br>
|
||
<ul>
|
||
<li><b>eject</b> - will eject the optical drive</li>
|
||
<li><b>shutdown</b> - the XBMC host will be shut down</li>
|
||
<li><b>suspend</b> - the XBMC host will be put into stand by</li>
|
||
<li><b>hibernate</b> - the XBMC host will be put into hibernation</li>
|
||
<li><b>reboot</b> - the XBMC host will be rebooted</li>
|
||
</ul>
|
||
</ul>
|
||
<br><br>
|
||
|
||
<u>Messaging</u>
|
||
<ul>
|
||
To show messages on XBMC (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br>
|
||
<code>set <XBMC_device> msg <title> <msg> [<duration>] [<icon>]</code><br>
|
||
The default duration of a message is 5000 (5 seconds). The minimum duration is 1500 (1.5 seconds). By default no icon is shown. XBMC provides three
|
||
different icon: error, info and warning. You can also use an uri to define an icon. Please enclose title and/or message into quotes (" or ') if it consists
|
||
of multiple words.
|
||
</ul>
|
||
|
||
<br>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<ul>
|
||
<li><b>audiolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
|
||
<li><b>currentAlbum</b> - album of the current song/musicvideo</li>
|
||
<li><b>currentArtist</b> - artist of the current song/musicvideo</li>
|
||
<li><b>currentMedia</b> - file/URL of the media item being played</li>
|
||
<li><b>currentTitle</b> - title of the current media item</li>
|
||
<li><b>currentTrack</b> - track of the current song/musicvideo</li>
|
||
<li><b>episode</b> - episode number</li>
|
||
<li><b>episodeid</b> - id of the episode in the video library</li>
|
||
<li><b>fullscreen</b> - indicates if XBMC runs in fullscreen mode (on/off)</li>
|
||
<li><b>label</b> - label of the current media item</li>
|
||
<li><b>movieid</b> - id of the movie in the video library</li>
|
||
<li><b>musicvideoid</b> - id of the musicvideo in the video library</li>
|
||
<li><b>mute</b> - indicates if XBMC is muted (on/off)</li>
|
||
<li><b>name</b> - software name (e.g. XBMC)</li>
|
||
<li><b>originaltitle</b> - original title of the movie being played</li>
|
||
<li><b>partymode</b> - indicates if XBMC runs in party mode (on/off) (not available for Plex)</li>
|
||
<li><b>playlist</b> - Possible values: add, clear, remove</li>
|
||
<li><b>playStatus</b> - Indicates the player status: playing, paused, stopped</li>
|
||
<li><b>repeat</b> - current repeat mode (one/all/off)</li>
|
||
<li><b>season</b> - season of the current episode</li>
|
||
<li><b>showtitle</b> - title of the show being played</li>
|
||
<li><b>shuffle</b> - indicates if the playback is shuffled (on/off)</li>
|
||
<li><b>skin</b> - current skin of XBMC</li>
|
||
<li><b>songid</b> - id of the song in the music library</li>
|
||
<li><b>system</b> - Possible values: lowbattery, quit, restart, sleep, wake</li>
|
||
<li><b>time</b> - current position in the playing media item (only updated on play/pause)</li>
|
||
<li><b>totaltime</b> - total run time of the current media item</li>
|
||
<li><b>type</b> - type of the media item. Possible values: episode, movie, song, musicvideo, picture, unknown</li>
|
||
<li><b>version</b> - version of XBMC</li>
|
||
<li><b>videolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
|
||
<li><b>volume</b> - value between 0 and 100 stating the current volume setting</li>
|
||
<li><b>year</b> - year of the movie being played</li>
|
||
</ul>
|
||
<br><br>
|
||
<u>Remarks on the events</u><br><br>
|
||
<ul>
|
||
The event <b>playStatus = playing</b> indicates a playback of a media item. Depending on the event <b>type</b> different events are generated:
|
||
<ul>
|
||
<li><b>type = song</b> generated events are: <b>album, artist, file, title</b> and <b>track</b></li>
|
||
<li><b>type = musicvideo</b> generated events are: <b>album, artist, file</b> and <b>title</b></li>
|
||
<li><b>type = episode</b> generated events are: <b>episode, file, season, showtitle,</b> and <b>title</b></li>
|
||
<li><b>type = movie</b> generated events are: <b>originaltitle, file, title,</b> and <b>year</b></li>
|
||
<li><b>type = picture</b> generated events are: <b>file</b></li>
|
||
<li><b>type = unknown</b> generated events are: <b>file</b></li>
|
||
</ul>
|
||
</ul>
|
||
<br><br>
|
||
<a name="XBMCattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>compatibilityMode<br>
|
||
This module can also be used to control Plex, since the JSON Api is mostly the same, but there are some differences.
|
||
If you want to control Plex set the attribute <i>compatibilityMode</i> to <i>plex</i>.</li>
|
||
<li>offMode<br>
|
||
Declares what should be down if the off command is executed. Possible values are <i>quit</i> (closes XBMC), <i>hibernate</i> (puts system into hibernation),
|
||
<i>suspend</i> (puts system into stand by), and <i>shutdown</i> (shuts down the system). Default value is <i>quit</i></li>
|
||
<li>fork<br>
|
||
If XBMC does not run all the time it used to be the case that FHEM blocks because it cannot reach XBMC (only happened
|
||
if TCP was used). If you encounter problems like FHEM not responding for a few seconds then you should set <code>attr <XBMC_device> fork enable</code>
|
||
which will move the search for XBMC into a separate process.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="XmlList"></a>
|
||
<h3>xmllist</h3>
|
||
<ul>
|
||
<code>xmllist [devspec]</code>
|
||
<br><br>
|
||
Returns an XML tree of device definitions. <a href="#devspec">devspec</a> is
|
||
optional, and restricts the list of devices if specified.
|
||
<br><br>
|
||
Example:
|
||
<code>
|
||
<ul>
|
||
fhem> xmllist<br>
|
||
<FHZINFO><br>
|
||
<ul>
|
||
<internal_LIST><br>
|
||
<ul>
|
||
<internal name="global" state="internal" sets="" attrs="room configfile logfile ..."><br>
|
||
<ul>
|
||
<INT key="DEF" value="<no definition>"/><br>
|
||
<INT key="NR" value="0"/><br>
|
||
<INT key="STATE" value="internal"/><br>
|
||
</ul>
|
||
[...]<br>
|
||
</ul>
|
||
</ul>
|
||
</ul></code>
|
||
</ul>
|
||
|
||
<a name="YAMAHA_AVR"></a>
|
||
<h3>YAMAHA_AVR</h3>
|
||
<ul>
|
||
|
||
<a name="YAMAHA_AVRdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>
|
||
define <name> YAMAHA_AVR <ip-address> [<zone>] [<status_interval>]
|
||
<br><br>
|
||
define <name> YAMAHA_AVR <ip-address> [<zone>] [<off_status_interval>] [<on_status_interval>]
|
||
</code>
|
||
<br><br>
|
||
|
||
This module controls AV receiver from Yamaha via network connection. You are able
|
||
to power your AV reveiver on and off, query it's power state,
|
||
select the input (HDMI, AV, AirPlay, internet radio, Tuner, ...), select the volume
|
||
or mute/unmute the volume.<br><br>
|
||
Defining a YAMAHA_AVR device will schedule an internal task (interval can be set
|
||
with optional parameter <status_interval> in seconds, if not set, the value is 30
|
||
seconds), which periodically reads the status of the AV receiver (power state, selected
|
||
input, volume and mute status) and triggers notify/filelog commands.
|
||
<br><br>
|
||
Different status update intervals depending on the power state can be given also.
|
||
If two intervals are given in the define statement, the first interval statement stands for the status update
|
||
interval in seconds in case the device is off, absent or any other non-normal state. The second
|
||
interval statement is used when the device is on.
|
||
|
||
Example:<br><br>
|
||
<ul><code>
|
||
define AV_Receiver YAMAHA_AVR 192.168.0.10
|
||
<br><br>
|
||
# With custom status interval of 60 seconds<br>
|
||
define AV_Receiver YAMAHA_AVR 192.168.0.10 mainzone 60
|
||
<br><br>
|
||
# With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
|
||
define AV_Receiver YAMAHA_AVR 192.168.0.10 mainzone 60 10
|
||
</code></ul>
|
||
|
||
</ul>
|
||
<br><br>
|
||
<b>Zone Selection</b><br>
|
||
<ul>
|
||
If your receiver supports zone selection (e.g. RX-V671, RX-V673,... and the AVANTAGE series)
|
||
you can select the zone which should be controlled. The RX-V3xx and RX-V4xx series for example
|
||
just have a "Main Zone" (which is the whole receiver itself). In general you have the following
|
||
possibilities for the parameter <zone> (depending on your receiver model).<br><br>
|
||
<ul>
|
||
<li><b>mainzone</b> - this is the main zone (standard)</li>
|
||
<li><b>zone2</b> - The second zone (Zone 2)</li>
|
||
<li><b>zone3</b> - The third zone (Zone 3)</li>
|
||
<li><b>zone4</b> - The fourth zone (Zone 4)</li>
|
||
</ul>
|
||
<br>
|
||
Depending on your receiver model you have not all inputs available on these different zones.
|
||
The module just offers the real available inputs.
|
||
<br><br>
|
||
Example:
|
||
<br><br>
|
||
<ul><code>
|
||
define AV_Receiver YAMAHA_AVR 192.168.0.10 # If no zone is specified, the "Main Zone" will be used.<br>
|
||
attr AV_Receiver YAMAHA_AVR room Livingroom<br>
|
||
<br>
|
||
# Define the second zone<br>
|
||
define AV_Receiver_Zone2 YAMAHA_AVR 192.168.0.10 zone2<br>
|
||
attr AV_Receiver_Zone2 room Bedroom
|
||
</code></ul><br><br>
|
||
For each Zone you will need an own YAMAHA_AVR device, which can be assigned to a different room.
|
||
Each zone can be controlled separatly from all other available zones.
|
||
<br><br>
|
||
</ul>
|
||
|
||
<a name="YAMAHA_AVRset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <command> [<parameter>]</code>
|
||
<br><br>
|
||
Currently, the following commands are defined; the available inputs are depending on the used receiver.
|
||
The module only offers the real available inputs and scenes. The following input commands are just an example and can differ.
|
||
<br><br>
|
||
<ul>
|
||
<li><b>on</b> - powers on the device</li>
|
||
<li><b>off</b> - shuts down the device </li>
|
||
<li><b>input</b> hdm1,hdmX,... - selects the input channel (only the real available inputs were given)</li>
|
||
<li><b>scene</b> scene1,sceneX - select the scene</li>
|
||
<li><b>volume</b> 0...100 - set the volume level in percentage</li>
|
||
<li><b>volumeStraight</b> -80...15 - set the volume level in decibel</li>
|
||
<li><b>volumeUp</b> [0-100] - increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead)</li>
|
||
<li><b>volumeDown</b> [0-100] - decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead)</li>
|
||
<li><b>mute</b> on|off|toggle - activates volume mute</li>
|
||
<li><b>statusRequest</b> - requests the current status of the device</li>
|
||
<li><b>remoteControl</b> up,down,... - sends remote control commands as listed below</li>
|
||
|
||
</ul>
|
||
</ul><br><br>
|
||
<u>Remote control (not in all zones available, depending on your model)</u><br><br>
|
||
<ul>
|
||
In many receiver models, inputs exist, which can't be used just by selecting them. These inputs needs
|
||
a manual interaction with the remote control to activate the playback (e.g. Internet Radio, Network Streaming).<br><br>
|
||
For this application the following commands are available:<br><br>
|
||
|
||
<u>Cursor Selection:</u><br><br>
|
||
<ul><code>
|
||
remoteControl up<br>
|
||
remoteControl down<br>
|
||
remoteControl left<br>
|
||
remoteControl right<br>
|
||
remoteControl enter<br>
|
||
remoteControl return<br>
|
||
</code></ul><br><br>
|
||
|
||
<u>Menu Selection:</u><br><br>
|
||
<ul><code>
|
||
remoteControl setup<br>
|
||
remoteControl option<br>
|
||
remoteControl display<br>
|
||
</code></ul><br><br>
|
||
|
||
<u>Tuner Control:</u><br><br>
|
||
<ul><code>
|
||
remoteControl tunerPresetUp<br>
|
||
remoteControl tunerPresetDown<br>
|
||
</code></ul><br><br>
|
||
|
||
The button names are the same as on your remote control.<br><br>
|
||
|
||
A typical example is the automatical turn on and play an internet radio broadcast:<br><br>
|
||
<ul><code>
|
||
# the initial definition.<br>
|
||
define AV_receiver YAMAHA_AVR 192.168.0.3
|
||
</code></ul><br><br>
|
||
And in your 99_MyUtils.pm the following function:<br><br>
|
||
<ul><code>
|
||
sub startNetRadio()<br>
|
||
{<br>
|
||
fhem "set AV_Receiver on";<br>
|
||
sleep 5;<br>
|
||
fhem "set AV_Receiver input netradio";<br>
|
||
sleep 4;<br>
|
||
fhem "set AV_Receiver remoteControl enter";<br>
|
||
sleep 2;<br>
|
||
fhem "set AV_Receiver remoteControl enter";<br>
|
||
}
|
||
</code></ul><br><br>
|
||
The remote control commands must be separated with a sleep, because the receiver is loading meanwhile and don't accept commands.<br><br>
|
||
|
||
Now you can use this function by typing the following line in your FHEM command line or in your notify-definitions:<br><br>
|
||
<ul><code>
|
||
{startNetRadio()}
|
||
</code></ul><br><br>
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
<a name="YAMAHA_AVRget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <reading></code>
|
||
<br><br>
|
||
Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
|
||
<br><br>
|
||
</ul>
|
||
<a name="YAMAHA_AVRattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||
<li><a name="request-timeout">request-timeout</a></li>
|
||
Optional attribute change the response timeout in seconds for all queries to the receiver.
|
||
<br><br>
|
||
Possible values: 1-5 seconds. Default value is 4 seconds.<br><br>
|
||
<li><a name="disable">disable</a></li>
|
||
Optional attribute to disable the internal cyclic status update of the receiver. Manual status updates via statusRequest command is still possible.
|
||
<br><br>
|
||
Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.<br><br>
|
||
<li><a name="volume-smooth-change">volume-smooth-change</a></li>
|
||
Optional attribute to activate a smooth volume change.
|
||
<br><br>
|
||
Possible values: 0 => off , 1 => on<br><br>
|
||
<li><a name="volume-smooth-steps">volume-smooth-steps</a></li>
|
||
Optional attribute to define the number of volume changes between the
|
||
current and the desired volume. Default value is 5 steps<br><br>
|
||
<li><a name="volume-smooth-steps">volumeSteps</a></li>
|
||
Optional attribute to define the default increasing and decreasing level for the volumeUp and volumeDown set command. Default value is 5%<br>
|
||
<br>
|
||
</ul>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<ul>
|
||
<li><b>input</b> - The selected input source according to the FHEM input commands</li>
|
||
<li><b>inputName</b> - The input description as seen on the receiver display</li>
|
||
<li><b>mute</b> - Reports the mute status of the receiver or zone (can be "on" or "off")</li>
|
||
<li><b>power</b> - Reports the power status of the receiver or zone (can be "on" or "off")</li>
|
||
<li><b>presence</b> - Reports the presence status of the receiver or zone (can be "absent" or "present"). In case of an absent device, it cannot be controlled via FHEM anymore.</li>
|
||
<li><b>volume</b> - Reports the current volume level of the receiver or zone in percentage values (between 0 and 100 %)</li>
|
||
<li><b>volumeStraight</b> - Reports the current volume level of the receiver or zone in decibel values (between -80.5 and +15.5 dB)</li>
|
||
<li><b>state</b> - Reports the current power state and an absence of the device (can be "on", "off" or "absent")</li>
|
||
<br><br><u>Input dependent Readings/Events:</u><br>
|
||
<li><b>currentChannel</b> - Number of the input channel (SIRIUS only)</li>
|
||
<li><b>currentStation</b> - Station name of the current radio station (available on NET RADIO, PANDORA</li>
|
||
<li><b>currentAlbum</b> - Album name of the current song</li>
|
||
<li><b>currentArtist</b> - Artist name of the current song</li>
|
||
<li><b>currentTitle</b> - Title of the current song</li>
|
||
<li><b>playStatus</b> - indicates if the input plays music or not</li>
|
||
</ul>
|
||
<br>
|
||
<b>Implementator's note</b><br>
|
||
<ul>
|
||
The module is only usable if you activate "Network Standby" on your receiver. Otherwise it is not possible to communicate with the receiver when it is turned off.
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="YAMAHA_BD"></a>
|
||
<h3>YAMAHA_BD</h3>
|
||
<ul>
|
||
|
||
<a name="YAMAHA_BDdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>
|
||
define <name> YAMAHA_BD <ip-address> [<status_interval>]
|
||
<br><br>
|
||
define <name> YAMAHA_BD <ip-address> [<off_status_interval>] [<on_status_interval>]
|
||
</code>
|
||
<br><br>
|
||
|
||
This module controls Blu-Ray players from Yamaha via network connection. You are able
|
||
to switch your player on and off, query it's power state,
|
||
control the playback, open and close the tray and send all remote control commands.<br><br>
|
||
Defining a YAMAHA_BD device will schedule an internal task (interval can be set
|
||
with optional parameter <status_interval> in seconds, if not set, the value is 30
|
||
seconds), which periodically reads the status of the player (power state, current disc, tray status,...)
|
||
and triggers notify/filelog commands.
|
||
<br><br>
|
||
Different status update intervals depending on the power state can be given also.
|
||
If two intervals are given to the define statement, the first interval statement represents the status update
|
||
interval in seconds in case the device is off, absent or any other non-normal state. The second
|
||
interval statement is used when the device is on.
|
||
|
||
Example:<br><br>
|
||
<ul><code>
|
||
define BD_Player YAMAHA_BD 192.168.0.10
|
||
<br><br>
|
||
# With custom status interval of 60 seconds<br>
|
||
define BD_Player YAMAHA_BD 192.168.0.10 60
|
||
<br><br>
|
||
# With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
|
||
define BD_Player YAMAHA_BD 192.168.0.10 60 10
|
||
</code></ul>
|
||
|
||
</ul>
|
||
<br><br>
|
||
<a name="YAMAHA_BDset"></a>
|
||
<b>Set </b>
|
||
<ul>
|
||
<code>set <name> <command> [<parameter>]</code>
|
||
<br><br>
|
||
Currently, the following commands are defined.
|
||
<br><br>
|
||
<ul>
|
||
<li><b>on</b> - powers on the device</li>
|
||
<li><b>off</b> - shuts down the device </li>
|
||
<li><b>tray</b> open,close - open or close the disc tray</li>
|
||
<li><b>statusRequest</b> - requests the current status of the device</li>
|
||
<li><b>remoteControl</b> up,down,... - sends remote control commands as listed in the following chapter</li>
|
||
</ul><br>
|
||
<u>Playback control commands</u>
|
||
<ul>
|
||
<li><b>play</b> - start playing the current media</li>
|
||
<li><b>pause</b> - pause the current media playback</li>
|
||
<li><b>stop</b> - stop the current media playback</li>
|
||
<li><b>skip</b> forward,reverse - skip the current track or chapter</li>
|
||
<li><b>fast</b> forward,reverse - fast forward or reverse playback</li>
|
||
<li><b>slow</b> forward,reverse - slow forward or reverse playback</li>
|
||
|
||
|
||
</ul>
|
||
</ul><br><br>
|
||
<u>Remote control</u><br><br>
|
||
<ul>
|
||
The following commands are available:<br><br>
|
||
|
||
<u>Number Buttons (0-9):</u><br><br>
|
||
<ul><code>
|
||
remoteControl 0<br>
|
||
remoteControl 1<br>
|
||
remoteControl 2<br>
|
||
...<br>
|
||
remoteControl 9<br>
|
||
</code></ul><br><br>
|
||
|
||
<u>Cursor Selection:</u><br><br>
|
||
<ul><code>
|
||
remoteControl up<br>
|
||
remoteControl down<br>
|
||
remoteControl left<br>
|
||
remoteControl right<br>
|
||
remoteControl enter<br>
|
||
remoteControl return<br>
|
||
</code></ul><br><br>
|
||
|
||
<u>Menu Selection:</u><br><br>
|
||
<ul><code>
|
||
remoteControl OSDonScreen<br>
|
||
remoteControl OSDstatus<br>
|
||
remoteControl popupMenu<br>
|
||
remoteControl topMenu<br>
|
||
remoteControl setup<br>
|
||
remoteControl home<br>
|
||
remoteControl clear<br>
|
||
</code></ul><br><br>
|
||
|
||
<u>Color Buttons:</u><br><br>
|
||
<ul><code>
|
||
remoteControl red<br>
|
||
remoteControl green<br>
|
||
remoteControl yellow<br>
|
||
remoteControl blue<br>
|
||
</code></ul><br><br>
|
||
|
||
The button names are the same as on your remote control.<br><br>
|
||
|
||
</ul>
|
||
|
||
<a name="YAMAHA_BDget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <reading></code>
|
||
<br><br>
|
||
Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
|
||
<br><br>
|
||
</ul>
|
||
<a name="YAMAHA_BDattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||
<li><a name="disable">disable</a></li>
|
||
Optional attribute to disable the internal cyclic status update of the player. Manual status updates via statusRequest command is still possible.
|
||
<br><br>
|
||
Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.<br><br>
|
||
<li><a name="request-timeout">request-timeout</a></li>
|
||
Optional attribute change the response timeout in seconds for all queries to the player.
|
||
<br><br>
|
||
Possible values: 1-5 seconds. Default value is 4 seconds.<br><br>
|
||
</ul>
|
||
<b>Generated Readings/Events:</b><br>
|
||
<ul>
|
||
<li><b>input</b> - The current playback source (can be "DISC", "USB" or "Network")</li>
|
||
<li><b>discType</b> - The current type of disc, which is inserted (e.g. "No Disc", "CD", "DVD", "BD",...)</li>
|
||
<li><b>error</b> - indicates an hardware error of the player (can be "none", "fan error" or "usb overcurrent")</li>
|
||
<li><b>power</b> - Reports the power status of the player or zone (can be "on" or "off")</li>
|
||
<li><b>presence</b> - Reports the presence status of the player or zone (can be "absent" or "present"). In case of an absent device, it cannot be controlled via FHEM anymore.</li>
|
||
<li><b>trayStatus</b> - The disc tray status (can be "open" or "close")</li>
|
||
<li><b>state</b> - Reports the current power state and an absence of the device (can be "on", "off" or "absent")</li>
|
||
<br><br><u>Input dependent Readings/Events:</u><br>
|
||
<li><b>currentChapter</b> - Number of the current DVD/BD Chapter (only at DVD/BD's)</li>
|
||
<li><b>currentMedia</b> - Name of the current file (only at USB)</li>
|
||
<li><b>playTimeCurrent</b> - current timecode of played media</li>
|
||
<li><b>playTimeTotal</b> - the total time of the current movie (only at DVD/BD's)</li>
|
||
<li><b>playStatus</b> - indicates if the player plays media or not (can be "play", "pause", "stop", "fast fwd", "fast rev", "slow fwd", "slow rev")</li>
|
||
</ul>
|
||
<br>
|
||
<b>Implementator's note</b><br>
|
||
<ul>
|
||
<li>Some older models (e.g. BD-S671) cannot be controlled over networked by delivery. A <u><b>firmware update is neccessary</b></u> to control theese models via FHEM</li>
|
||
<li>The module is only usable if you activate "Network Control" on your player. Otherwise it is not possible to communicate with the player.</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="ZWDongle"></a>
|
||
<h3>ZWDongle</h3>
|
||
<ul>
|
||
This module serves a ZWave dongle, which is attached via USB or TCP/IP, and
|
||
enables the use of ZWave devices (see also the <a href="#ZWave">ZWave</a>
|
||
module). It was tested wit a Goodway WD6001, but since the protocol is
|
||
standardized, it should work with other devices too. A notable exception is
|
||
the USB device from Merten.
|
||
<br><br>
|
||
<a name="ZWDongledefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ZWDongle <device></code>
|
||
<br>
|
||
<br>
|
||
Upon initial connection the module will get the homeId of the attached
|
||
device. Since the DevIo module is used to open the device, you can also use
|
||
devices connected via TCP/IP. See <a href="#CULdefine">this</a> paragraph on
|
||
device naming details.
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define zwdongle_1 ZWDongle /dev/cu.PL2303-000014FA@115200</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWDongleset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
|
||
<li>addNode [on|off]<br>
|
||
Activate (or deactivate) inclusion mode. The controller (i.e. the dongle)
|
||
will accept inclusion (i.e. pairing/learning) requests only while in this
|
||
mode. After activating inclusion mode usually you have to press a switch
|
||
three times within 1.5 seconds on the node to be included into the network
|
||
of the controller. If autocreate is active, a fhem device will be created
|
||
after inclusion.</li>
|
||
|
||
<li>removeNode [on|off]<br>
|
||
Activate (or deactivate) exclusion mode. Note: the corresponding fhem
|
||
device have to be deleted manually.</li>
|
||
|
||
<li>createNode id<br>
|
||
Request the class information for the specified node, and create a fhem
|
||
device upon reception of the answer. Used for previously included nodes,
|
||
see the nodeList get command below.</li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWDongleget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>nodeList<br>
|
||
return the list of included nodeIds. Can be used to recreate fhem-nodes
|
||
with the createNode command.</li>
|
||
|
||
<li>homeId<br>
|
||
return the six hex-digit homeId of the controller.</li>
|
||
|
||
<li>caps, ctrlCaps, version<br>
|
||
return different controller specific information. Needed by developers
|
||
only. </li>
|
||
|
||
<li>nodeInfo<br>
|
||
return node specific information. Needed by developers only.</li>
|
||
|
||
|
||
<li>raw<br>
|
||
Send raw data to the controller. Developer only.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWDongleattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#model">model</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWDongleevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li>ZW_ADD_NODE_TO_NETWORK [learnReady|nodeFound|controller|done|failed]
|
||
</li>
|
||
<li>ZW_REMOVE_NODE_TO_NETWORK [learnReady|nodeFound|slave|controller|done|failed]
|
||
</li>
|
||
<li>UNDEFINED ZWave_${type6}_$id ZWave $homeId $id $classes"
|
||
</li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
|
||
<a name="ZWave"></a>
|
||
<h3>ZWave</h3>
|
||
<ul>
|
||
This module is used to control ZWave devices via FHEM, see <a
|
||
href="http://www.z-wave.com">www.z-wave.com</a> on details for this device family.
|
||
This module is a client of the <a href="#ZWDongle">ZWDongle</a> module, which
|
||
is directly attached to the controller via USB or TCP/IP.
|
||
<br><br>
|
||
<a name="ZWavedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> ZWave <homeId> <id> [classes]</code>
|
||
<br>
|
||
<br>
|
||
<homeId> is the homeId of the controller node, and id is the id of the
|
||
slave node in the network of this controller.<br>
|
||
classes is a hex-list of ZWave device classes. This argument is usually
|
||
specified by autocreate when creating a device. If you wish to manually
|
||
create a device, use the classes attribute instead, see below for details.
|
||
Defining a ZWave device the first time is usually done by autocreate.
|
||
<br>
|
||
Example:
|
||
<ul>
|
||
<code>define lamp ZWave 00ce2074 9</code><br>
|
||
<code>attr lamp classes SWITCH_BINARY BASIC MANUFACTURER_SPECIFIC VERSION SWITCH_ALL ASSOCIATION METER CONFIGURATION ALARM</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
Note: the sets/gets/generated events of a gven node depend on the classes
|
||
supported by this node. If a node supports 3 classes, then the union of
|
||
these sets/gets/events will be available for this node.<br>
|
||
Commands for battery operated nodes will be queues internally, and sent when
|
||
the node sends a message. Answer to get commands appear then as events, the
|
||
corresponding readings will be updated.
|
||
<br><br>
|
||
|
||
<a name="ZWaveset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<br>
|
||
<b>Note</b>: devices with on/off functionality support the <a
|
||
href="#setExtensions"> set extensions</a>.
|
||
|
||
<br><br><b>Class ASSOCIATION</b>
|
||
<li>associationAdd groupId nodeId ...<br>
|
||
Add the specified list of nodeIds to the assotion group groupId.<br> Note:
|
||
upon creating a fhem-device for the first time fhem will automatically add
|
||
the controller to the first association group of the node corresponding to
|
||
the fhem device, i.e it issues a "set name associationAdd 1
|
||
controllerNodeId"</li>
|
||
|
||
<li>associationDel groupId nodeId ...<br>
|
||
Remove the specified list of nodeIds from the assotion group groupId.</li>
|
||
|
||
<br><br><b>Class BASIC</b>
|
||
<li>basicValue value<br>
|
||
Send value (0-255) to this device. The interpretation is device dependent,
|
||
e.g. for a SWITCH_BINARY device 0 is off and anything else is on.</li>
|
||
|
||
<br><br><b>Class CONFIGURATION</b>
|
||
<li>configByte cfgAddress 8bitValue<br>
|
||
configWord cfgAddress 16bitValue<br>
|
||
configLong cfgAddress 32bitValue<br>
|
||
Send a configuration value for the parameter cfgAddress. cfgAddress and
|
||
value is node specific.</li>
|
||
<li>configDefault cfgAddress<br>
|
||
Reset the configuration parameter for the cfgAddress parameter to its
|
||
default value. See the device documentation to determine this value.</li>
|
||
|
||
<br><br><b>Class SWITCH_BINARY</b>
|
||
<li>on<br>
|
||
switch the device on</li>
|
||
<li>off<br>
|
||
switch the device off</li>
|
||
<li>reportOn,reportOff<br>
|
||
activate/deactivate the reporting of device state changes to the
|
||
association group.</li>
|
||
|
||
<br><br><b>Class SWITCH_MULTILEVEL</b>
|
||
<li>on, off, reportOn, reportOff<br>
|
||
the same as for SWITCH_BINARY.</li>
|
||
<li>dim value<br>
|
||
dim to the requested value (0..100)</li>
|
||
|
||
<br><br><b>Class THERMOSTAT_MODE</b>
|
||
<li>tmOff</li>
|
||
<li>tmCooling</li>
|
||
<li>tmHeating</li>
|
||
<li>tmManual<br>
|
||
set the thermostat mode to off, cooling, heating or manual.
|
||
</li>
|
||
|
||
<br><br><b>Class WAKE_UP</b>
|
||
<li>wakeupInterval value<br>
|
||
Set the wakeup interval of battery operated devices to the given value in
|
||
seconds. Upon wakeup the device sends a wakeup notification.</li>
|
||
<li>wakeupNoMoreInformation<br>
|
||
put a battery driven device into sleep mode. </li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWaveget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
|
||
<br><br><b>Class ALARM</b>
|
||
<li>alarm alarmId<br>
|
||
return the value for alarmId. The value is device specific.
|
||
</li>
|
||
|
||
<br><br><b>Class ASSOCIATION</b>
|
||
<li>association groupId<br>
|
||
return the list of nodeIds in the association group groupId in the form:<br>
|
||
assocGroup_X:Max Y, Nodes id,id...
|
||
</li>
|
||
|
||
<br><b>Class BASIC</b>
|
||
<li>basicStatus<br>
|
||
return the status of the node as basicReport:XY. The value (XY) depends on
|
||
the node, e.g a SWITCH_BINARY device report 00 for off and FF (255) for on.
|
||
</li>
|
||
|
||
<br><br><b>Class BATTERY</b>
|
||
<li>battery<br>
|
||
return the charge of the battery in %, as battery:value %
|
||
</li>
|
||
|
||
<br><br><b>Class CONFIGURATION</b>
|
||
<li>config cfgAddress<br>
|
||
return the value of the configuration parameter cfgAddress. The value is
|
||
device specific.
|
||
</li>
|
||
|
||
<br><br><b>HRV_STATUS</b>
|
||
<li>hrvStatus<br>
|
||
report the current status (temperature, etc)
|
||
</li>
|
||
<li>hrvStatusSupported<br>
|
||
report the supported status fields as a bitfield.
|
||
</li>
|
||
|
||
<br><br><b>Class MULTI_CHANNEL</b>
|
||
<li>mcEndpoints<br>
|
||
return the list of endpoints available, e.g.:<br>
|
||
mcEndpoints: total 2, identical
|
||
</li>
|
||
<li>mcCapability chid<br>
|
||
return the classes supported by the endpoint/channel chid. If the channel
|
||
does not exists, create a FHEM node for it. Example:<br>
|
||
mcCapability_02:SWITCH_BINARY<br>
|
||
<b>Note:</b> This is the best way to create the secondary nodes of a
|
||
MULTI_CHANNEL device. The device is only created for channel 2 or greater.
|
||
</li>
|
||
|
||
<br><br><b>Class SENSOR_ALARM</b>
|
||
<li>alarm alarmType<br>
|
||
return the nodes alarm status of the requested alarmType. 00 = GENERIC,
|
||
01 = SMOKE, 02 = CO, 03 = CO2, 04 = HEAT, 05 = WATER, ff = returns the
|
||
nodes first supported alarm type.
|
||
</li>
|
||
|
||
<br><br><b>Class SENSOR_BINARY</b>
|
||
<li>sbStatus<br>
|
||
return the status of the node, as state:open or state:closed.
|
||
</li>
|
||
|
||
<br><br><b>Class SENSOR_MULTILEVEL</b>
|
||
<li>smStatus<br>
|
||
request data from the node (temperature/humidity/etc)
|
||
</li>
|
||
|
||
<br><br><b>Class SWITCH_BINARY</b>
|
||
<li>swbStatus<br>
|
||
return the status of the node, as state:on or state:off.
|
||
</li>
|
||
|
||
<br><br><b>Class SWITCH_MULTILEVEL</b>
|
||
<li>swmStatus<br>
|
||
return the status of the node, as state:on, state:off or state:dim value.
|
||
</li>
|
||
|
||
<br><br><b>Class THERMOSTAT_MODE</b>
|
||
<li>thermostatMode<br>
|
||
request the mode
|
||
</li>
|
||
|
||
<br><br><b>Class THERMOSTAT_SETPOINT</b>
|
||
<li>setpoint<br>
|
||
request the setpoint
|
||
</li>
|
||
|
||
<br><br><b>Class VERSION</b>
|
||
<li>version<br>
|
||
return the version information of this node in the form:<br>
|
||
Lib A Prot x.y App a.b
|
||
</li>
|
||
|
||
<br><br><b>Class WAKE_UP</b>
|
||
<li>wakeupInterval<br>
|
||
return the wakeup interval in seconds, in the form<br>
|
||
wakeupReport:interval seconds target id
|
||
</li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWaveattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#IODev">IODev</a></li>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#ignore">ignore</a></li>
|
||
<li><a href="#dummy">dummy</a></li>
|
||
<li><a href="#showtime">showtime</a></li>
|
||
<li><a href="#model">model</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li><a href="#classes">classes</a>
|
||
This attribute is needed by the ZWave module, as the list of the possible
|
||
set/get commands depends on it. It contains a space separated list of
|
||
class names (capital letters).
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="ZWaveevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
|
||
<br><br><b>Class ALARM</b>
|
||
<li>alarm_type_X:level Y</li>
|
||
|
||
<br><br><b>Class ASSOCIATION</b>
|
||
<li>assocGroup_X:Max Y Nodes A,B,...</li>
|
||
|
||
<br><b>Class BASIC</b>
|
||
<li>basicReport:XY</li>
|
||
|
||
<br><br><b>Class BATTERY</b>
|
||
<li>battery:chargelevel %</li>
|
||
|
||
<br><br><b>Class CLOCK</b>
|
||
<li>clock:get</li>
|
||
|
||
<br><br><b>Class CONFIGURATION</b>
|
||
<li>config_X:Y</li>
|
||
|
||
<br><br><b>Class HRV_STATUS</b>
|
||
<li>outdoorTemperature: %0.1f C</li>
|
||
<li>supplyAirTemperature: %0.1f C</li>
|
||
<li>exhaustAirTemperature: %0.1f C</li>
|
||
<li>dischargeAirTemperature: %0.1f C</li>
|
||
<li>indoorTemperature: %0.1f C</li>
|
||
<li>indoorHumidity: %s %</li>
|
||
<li>remainingFilterLife: %s %</li>
|
||
<li>supportedStatus: <list of supported stati></li>
|
||
|
||
<br><br><b>Class METER</b>
|
||
<li>energy:val [kWh|kVAh|pulseCount]</li>
|
||
<li>gas:val [m3|feet3|pulseCount]</li>
|
||
<li>water:val [m3|feet3|USgallons|pulseCount]</li>
|
||
<li>power:val W</li>
|
||
|
||
<br><br><b>Class MULTI_CHANNEL</b>
|
||
<li>endpoints:total X $dynamic $identical</li>
|
||
<li>mcCapability_X:class1 class2 ...</li>
|
||
|
||
<br><br><b>Class SENSOR_ALARM</b>
|
||
<li>alarm_type_X:level Y node $nodeID seconds $seconds</li>
|
||
|
||
<br><br><b>Class SENSOR_BINARY</b>
|
||
<li>state:open</li>
|
||
<li>state:closed</li>
|
||
<li>motion:00|ff</li>
|
||
<li>tamper:00|ff </li>
|
||
|
||
|
||
<br><br><b>Class SENSOR_MULTILEVEL</b>
|
||
<li>temperature $val [C|F]</li>
|
||
<li>generalPurpose $val %</li>
|
||
<li>luminance $val [%|Lux]</li>
|
||
<li>power $val [W|Btu/h]</li>
|
||
<li>humidity $val %</li>
|
||
<li>velocity $val [m/s|mph]</li>
|
||
<li>direction $val</li>
|
||
<li>atmosphericPressure $val [kPa|inchHg]</li>
|
||
<li>barometricPressure $val [kPa|inchHg]</li>
|
||
<li>solarRadiation $val W/m2</li>
|
||
<li>dewpoint $val [C|F]</li>
|
||
<li>rain $val [mm/h|in/h]</li>
|
||
<li>tideLevel $val [m|feet]</li>
|
||
<li>weight $val [kg|pound]</li>
|
||
<li>voltage $val [V|mV]</li>
|
||
<li>current $val [A|mA]</li>
|
||
<li>CO2-level $val ppm</li>
|
||
<li>airFlow $val [m3/h|cfm]</li>
|
||
<li>tankCapacity $val [l|cbm|usgal]</li>
|
||
<li>distance $val [m|cm|feet]</li>
|
||
<li>anglePosition $val [%|relN|relS]</li>
|
||
|
||
<br><br><b>Class SWITCH_BINARY</b>
|
||
<li>state:on</li>
|
||
<li>state:off</li>
|
||
|
||
<br><br><b>Class SWITCH_MULTILEVEL</b>
|
||
<li>state:on</li>
|
||
<li>state:off</li>
|
||
<li>state:dim value</li>
|
||
|
||
<br><br><b>Class THERMOSTAT_MODE</b>
|
||
<li>off</li>
|
||
<li>cooling</li>
|
||
<li>heating</li>
|
||
<li>manual</li>
|
||
|
||
<br><br><b>Class THERMOSTAT_SETPOINT</b>
|
||
<li>temperature:$temp [C|F] [heating|cooling]</li>
|
||
|
||
<br><br><b>Class VERSION</b>
|
||
<li>version:Lib A Prot x.y App a.b</li>
|
||
|
||
<br><br><b>Class WAKE_UP</b>
|
||
<li>wakeup:notification</li>
|
||
<li>wakeupReport:interval:X target:Y</li>
|
||
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="apptime"></a>
|
||
<h3>apptime</h3>
|
||
<ul>
|
||
<code>apptime</code>
|
||
<br>
|
||
<br>
|
||
apptime provides information about application procedure execution time.
|
||
It is designed to identify long runner jobs causing latency as well as
|
||
overall high cpu usage jobs<br>
|
||
No information about FHEM kernel times and delays will be provided. <br>
|
||
Once started apptime monitors tasks. User may reset counter during operation.
|
||
apptime adds about 1% CPU load in average to FHEM.
|
||
in order to remove apptime shutdown restart is necessary.
|
||
<br>
|
||
<br>
|
||
<b>Features:</b><br>
|
||
<ul>
|
||
<li><code>apptime</code><br>
|
||
apptime is started with the its first call nad continously monitor operation.<br>
|
||
To unload apptime shutdown restart is necessary<br> </li>
|
||
<li><code>apptime clear</code><br>
|
||
reset all counter and start fom Zero<br> </li>
|
||
<li><code>apptime [count|funktion|average|clear|max|name|total] [all]</code><br>
|
||
display a table sorted by the field selected<br>
|
||
<b>all</b> will display the complete table while by default only the top lines are printed. <br></li>
|
||
</ul>
|
||
<br>
|
||
<b>Columns:</b><br>
|
||
<ul>
|
||
<li><b>name</b><br>
|
||
name of the entity executing the procedure<br>
|
||
if it is a function called by InternalTimer the name starts with <b>tmr-</b>.
|
||
by then it gives the name of the funktion to be called<br>
|
||
</li>
|
||
<li><b>function</b><br>
|
||
procedure name which was executed<br>
|
||
if it is an InternalTimer call it gives its calling parameter <br>
|
||
</li>
|
||
<li><b>max</b><br>
|
||
longest duration measured for this procedure in ms <br> </li>
|
||
<li><b>count</b><br>
|
||
number of calls for this procedure<br> </li>
|
||
<li><b>total</b><br>
|
||
accumulated duration of this procedure over all calls monitored<br> </li>
|
||
<li><b>average</b><br>
|
||
average time a call of this procedure takes<br> </li>
|
||
<li><b>maxDly</b><br>
|
||
maximum delay of a timer call to its schedules time. This column is not relevant
|
||
for non-timer calls.<br> </li>
|
||
<li><b>param Max call</b><br>
|
||
gives the parameter of the call with the max duration<br> </li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="at"></a>
|
||
<h3>at</h3>
|
||
<ul>
|
||
|
||
Start an arbitrary FHEM command at a later time.<br>
|
||
<br>
|
||
|
||
<a name="atdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> at <timespec> <command></code><br>
|
||
<br>
|
||
<code><timespec></code> format: [+][*{N}]<timedet><br>
|
||
<ul>
|
||
The optional <code>+</code> indicates that the specification is
|
||
<i>relative</i>(i.e. it will be added to the current time).<br>
|
||
The optional <code>*</code> indicates that the command should be
|
||
executed <i>repeatedly</i>.<br>
|
||
The optional <code>{N}</code> after the * indicates,that the command
|
||
should be repeated <i>N-times</i> only.<br>
|
||
<timedet> is either HH:MM, HH:MM:SS or {perlfunc()}, where perlfunc
|
||
must return a HH:MM or HH:MM:SS date. Note: {perlfunc()} may not contain
|
||
any spaces or tabs.
|
||
</ul>
|
||
<br>
|
||
|
||
Examples:
|
||
<PRE>
|
||
# absolute ones:
|
||
define a1 at 17:00:00 set lamp on # fhem command
|
||
define a2 at 17:00:00 { Log 1, "Teatime" } # Perl command
|
||
define a3 at 17:00:00 "/bin/echo "Teatime" > /dev/console" # shell command
|
||
define a4 at *17:00:00 set lamp on # every day
|
||
|
||
# relative ones
|
||
define a5 at +00:00:10 set lamp on # switch on in 10 seconds
|
||
define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
|
||
define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
|
||
|
||
# Blink 3 times if the piri sends a command
|
||
define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
|
||
|
||
# Switch the lamp on from sunset to 11 PM
|
||
define a9 at +*{sunset_rel()} set lamp on
|
||
define a10 at *23:00:00 set lamp off
|
||
|
||
# More elegant version, works for sunset > 23:00 too
|
||
define a11 at +*{sunset_rel()} set lamp on-till 23:00
|
||
|
||
# Only do this on weekend
|
||
define a12 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
|
||
|
||
# Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
|
||
define a13 at *07:00 set lamp1,lamp2 on-till {sunrise(+600)}
|
||
|
||
# Switch the lamp off 2 minutes after sunrise each day
|
||
define a14 at +{sunrise(+120)} set lamp on
|
||
|
||
# Switch lamp1 on at sunset, not before 18:00 and not after 21:00
|
||
define a15 at *{sunset(0,"18:00","21:00")} set lamp1 on
|
||
|
||
</PRE>
|
||
|
||
Notes:<br>
|
||
<ul>
|
||
<li>if no <code>*</code> is specified, then a command will be executed
|
||
only once, and then the <code>at</code> entry will be deleted. In
|
||
this case the command will be saved to the statefile (as it
|
||
considered volatile, i.e. entered by cronjob) and not to the
|
||
configfile (see the <a href="#save">save</a> command.)
|
||
</li>
|
||
|
||
<li>if the current time is greater than the time specified, then the
|
||
command will be executed tomorrow.</li>
|
||
|
||
<li>For even more complex date handling you either have to call fhem from
|
||
cron or filter the date in a perl expression, see the last example and
|
||
the section <a href="#perl">Perl special</a>.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="atset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="atget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="atattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="disable"></a>
|
||
<li>disable<br>
|
||
Can be applied to at/watchdog/notify/FileLog devices.<br>
|
||
Disables the corresponding at/notify or FileLog device. Note:
|
||
If applied to an <a href="#at">at</a>, the command will not be executed,
|
||
but the next time will be computed.</li><br>
|
||
|
||
<a name="disabledForIntervals"></a>
|
||
<li>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM...<br>
|
||
Space separated list of HH:MM tupels. If the current time is between
|
||
the two time specifications, the current device is disabled. Instead of
|
||
HH:MM you can also specify HH or HH:MM:SS. To specify an interval
|
||
spawning midnight, you have to specify two intervals, e.g.:
|
||
<ul>
|
||
23:00-24:00 00:00-01:00
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="skip_next"></a>
|
||
<li>skip_next<br>
|
||
Used for at commands: skip the execution of the command the next
|
||
time.</li><br>
|
||
|
||
<a name="alignTime"></a>
|
||
<li>alignTime<br>
|
||
Applies only to relative at definitions: adjust the time of the next
|
||
command execution so, that it will also be executed at the desired
|
||
alignTime. The argument is a timespec, see above for the
|
||
definition.<br>
|
||
Example:<br>
|
||
<ul>
|
||
# Make sure that it chimes when the new hour begins<br>
|
||
define at2 at +*01:00 set Chime on-for-timer 1<br>
|
||
attr at2 alignTime 00:00<br>
|
||
</ul>
|
||
</li><br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="autocreate"></a>
|
||
<h3>autocreate</h3>
|
||
<ul>
|
||
|
||
Automatically create not yet defined fhem devices upon reception of a message
|
||
generated by this device. Note: devices which are polled (like the EMEM/EMWZ
|
||
accessed through the EM1010PC) will NOT be automatically created.
|
||
|
||
<br>
|
||
|
||
<a name="autocreatedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> autocreate</code><br>
|
||
<br>
|
||
<ul>
|
||
By defining an instance, the global attribute <a href=
|
||
"#autoload_undefined_devices">autoload_undefined_devices</a>
|
||
is set, so that modules for unknnown devices are automatically loaded.
|
||
The autocreate module intercepts the UNDEFINED event generated by each
|
||
module, creates a device and optionally also FileLog and SVG
|
||
entries.<br>
|
||
<b>Note 1:</b> devices will be created with a unique name, which contains
|
||
the type and a unique id for this type. When <a href="#rename">renaming
|
||
</a> the device, the automatically created filelog and SVG devices
|
||
will also be renamed.<br>
|
||
<b>Note 2:</b> you can disable the automatic creation by setting the
|
||
<a href="#disable">disable</a> attribute, in this case only the rename
|
||
hook is active, and you can use the <a href="#createlog">createlog</a>
|
||
command to add FileLog and SVG to an already defined device.
|
||
<b>Note 3:</b> It makes no sense to create more than one instance of this
|
||
module.
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
Example:<PRE>
|
||
define autocreate autocreate
|
||
attr autocreate autosave
|
||
attr autocreate device_room %TYPE
|
||
attr autocreate filelog test2/log/%NAME-%Y.log
|
||
attr autocreate weblink
|
||
attr autocreate weblink_room Plots
|
||
</PRE>
|
||
</ul>
|
||
|
||
|
||
<a name="autocreateset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="autocreateget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="autocreateattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="autosave"></a>
|
||
<li>autosave<br>
|
||
After creating a device, automatically save the config file with the
|
||
command <a href="#save">save</a> command. Default is 1 (i.e. on), set
|
||
it to 0 to switch it off.</li><br>
|
||
|
||
<a name="device_room"></a>
|
||
<li>device_room<br>
|
||
"Put" the newly created device in this room. The name can contain the
|
||
wildcards %TYPE and %NAME, see the example above.</li><br>
|
||
|
||
<a name="filelogattr"></a>
|
||
<li>filelog<br>
|
||
Create a filelog associated with the device. The filename can contain
|
||
the wildcards %TYPE and %NAME, see the example above. The filelog will
|
||
be "put" in the same room as the device.</li><br>
|
||
|
||
<a name="weblinkattr"></a>
|
||
<li>weblink<br>
|
||
Create an SVG associated with the device/filelog.</li><br>
|
||
|
||
<a name="weblink_room"></a>
|
||
<li>weblink_room<br>
|
||
"Put" the newly created SVG in this room. The name can contain the
|
||
wildcards %TYPE and %NAME, see the example above.</li><br>
|
||
|
||
<li><a href="#disable">disable</a></li>
|
||
<br>
|
||
|
||
<a name="ignoreTypes"></a>
|
||
<li>ignoreTypes<br>
|
||
This is a regexp, to ignore certain devices, e.g. you neighbours FHT.
|
||
You can specify more than one, with usual regexp syntax, e.g.<br>
|
||
attr autocreate ignoreTypes CUL_HOERMANN.*|FHT_1234|CUL_WS_7
|
||
</li>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="createlog"></a>
|
||
<b>createlog</b>
|
||
<ul>
|
||
Use this command to manually add a FileLog and an SVG to an existing
|
||
device.
|
||
This command is part of the autocreate module.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="usb"></a>
|
||
<b>usb</b>
|
||
<ul>
|
||
Usage:
|
||
<ul><code>
|
||
usb scan<br>
|
||
usb create<br>
|
||
</code></ul>
|
||
This command will scan the /dev directory for attached USB devices, and
|
||
will try to identify them. With the argument scan you'll get back a list
|
||
of fhem commands to execute, with the argument create there will be no
|
||
feedback, and the devices will be created instead.<br><br>
|
||
|
||
Note that switching a CUL to HomeMatic mode is still has to be done
|
||
manually.<br><br>
|
||
|
||
On Linux it will also check with the lsusb command, if unflashed CULs are
|
||
attached. If this is the case, it will call CULflash with the appropriate
|
||
parameters (or display the CULflash command if scan is specified). The
|
||
usb command will only flash one device per call.<br><br>
|
||
|
||
This command is part of the autocreate module.
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="average"></a>
|
||
<h3>average</h3>
|
||
<ul>
|
||
|
||
Compute additional average, minimum and maximum values for current day and
|
||
month.
|
||
|
||
<br>
|
||
|
||
<a name="averagedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> average <regexp></code><br>
|
||
<br>
|
||
<ul>
|
||
The syntax for <regexp> is the same as the
|
||
regexp for <a href="#notify">notify</a>.<br>
|
||
If it matches, and the event is of the form "eventname number", then this
|
||
module computes the daily and monthly average, maximum and minimum values
|
||
and generates events of the form
|
||
<ul>
|
||
<device> <eventname>_avg_day: <computed_average>
|
||
</ul>
|
||
<ul>
|
||
<device> <eventname>_min_day: <minimum day value>
|
||
</ul>
|
||
<ul>
|
||
<device> <eventname>_max_day: <maximum day value>
|
||
</ul>
|
||
and
|
||
<ul>
|
||
<device> <eventname>_avg_month: <computed_average>
|
||
</ul>
|
||
<ul>
|
||
<device> <eventname>_min_month: <minimum month value>
|
||
</ul>
|
||
<ul>
|
||
<device> <eventname>_max_month: <maximum month value>
|
||
</ul>
|
||
|
||
at the beginning of the next day or month respectively.<br>
|
||
The current average, minimum, maximum and the cumulated values are stored
|
||
in the device readings.
|
||
</ul>
|
||
<br>
|
||
|
||
Example:<PRE>
|
||
# Compute the average, minimum and maximum for the temperature events of
|
||
# the ws1 device
|
||
define avg_temp_ws1 average ws1:temperature.*
|
||
|
||
# Compute the average, minimum and maximum for each temperature event
|
||
define avg_temp_ws1 average .*:temperature.*
|
||
|
||
# Compute the average, minimum and maximum for all temperature and humidity events
|
||
# Events:
|
||
# ws1 temperature: 22.3
|
||
# ws1 humidity: 67.4
|
||
define avg_temp_ws1 average .*:(temperature|humidity).*
|
||
|
||
# Compute the same from a combined event. Note: we need two average
|
||
# definitions here, each of them defining the name with the first
|
||
# paranthesis, and the value with the second.
|
||
#
|
||
# Event: ws1 T: 52.3 H: 67.4
|
||
define avg_temp_ws1_t average ws1:(T):.([-\d\.]+).*
|
||
define avg_temp_ws1_h average ws1:.*(H):.([-\d\.]+).*
|
||
</PRE>
|
||
</ul>
|
||
|
||
<a name="averageset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="averageget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="averageattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
</ul>
|
||
|
||
<a name="averageevents"></a>
|
||
<b>Generated events:</b>
|
||
<ul>
|
||
<li><eventname>_avg_day: $avg_day</li>
|
||
<li><eventname>_avg_month: $avg_month</li>
|
||
<li><eventname>_min_day: $min_day</li>
|
||
<li><eventname>_min_month: $min_month</li>
|
||
<li><eventname>_max_day: $max_day</li>
|
||
<li><eventname>_max_month: $max_month</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="backup"></a>
|
||
<h3>backup</h3>
|
||
<ul>
|
||
<code>backup</code><br>
|
||
<br>
|
||
The complete FHEM directory (containing the modules), the WebInterface
|
||
pgm2 (if installed) and the config-file will be saved into a .tar.gz
|
||
file by default. The file is stored with a timestamp in the
|
||
<a href="#modpath">modpath</a>/backup directory or to a directory
|
||
specified by the global attribute <a href="#backupdir">backupdir</a>.<br>
|
||
Note: tar and gzip must be installed to use this feature.
|
||
<br>
|
||
<br>
|
||
If you need to call tar with support for symlinks, you could set the
|
||
global attribute <a href="#backupsymlink">backupsymlink</a> to everything
|
||
else as "no".
|
||
<br>
|
||
<br>
|
||
You could pass the backup to your own command / script by using the
|
||
global attribute <a href="#backupcmd">backupcmd</a>.
|
||
<br>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="cloneDummy"></a>
|
||
<h3>cloneDummy</h3>
|
||
<ul>
|
||
This module provides a cloneDummy which will receive readings from any other device sending data to fhem.<br/>
|
||
E.g. may be used in an FHEM2FHEM environment<br/>
|
||
<br/>
|
||
|
||
<a name="cloneDummydefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <cloneDevice> cloneDummy <sourceDevice> [reading]</code>
|
||
<br/>
|
||
<br/>
|
||
Example:<br/>
|
||
<br/>
|
||
<ul><code>define clone_OWX_26_09FF26010000 cloneDummy OWX_26_09FF26010000</code></ul>
|
||
<br/>
|
||
Optional parameter [reading] will be written to STATE if provided.<br/>
|
||
<br/>
|
||
Example:<br/>
|
||
<br/>
|
||
<ul><code>define clone_OWX_26_09FF26010000 cloneDummy OWX_26_09FF26010000 temperature</code></ul>
|
||
</ul>
|
||
<br/>
|
||
|
||
<a name="cloneDummyset"></a>
|
||
<b>Set</b> <ul>N/A</ul>
|
||
<br/>
|
||
|
||
<a name="cloneDummyget"></a>
|
||
<b>Get</b> <ul>N/A</ul>
|
||
<br/>
|
||
|
||
<a name="cloneDummyattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#readingFnAttributes"><b>readingFnAttributes</b></a></li>
|
||
<li><b>cloneIgnore</b> - comma separated list of readingnames that will NOT be generated.<br/>
|
||
Usefull to prevent truncated readingnames coming from state events.</li>
|
||
</ul>
|
||
<br/>
|
||
<b>Important: You MUST use different names for cloneDevice and sourceDevice!</b><br/>
|
||
</ul>
|
||
|
||
<a name="cmdalias"></a>
|
||
<h3>cmdalias</h3>
|
||
<ul>
|
||
create new commands or replace internal ones.
|
||
<br>
|
||
|
||
<a name="cmdaliasdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> cmdalias <cmd> [parameter]
|
||
AS newcommand..."</code><br>
|
||
<br>
|
||
<ul>
|
||
parameter is optional and is a regexp which must match the command
|
||
entered.
|
||
If it matches, then the specified newcommand will be executed, which is
|
||
a fhem command (see <a href="#command">Fhem command types</a> for
|
||
details). Like in the <a href="#notify">notify</a> commands, $EVENT or
|
||
$EVTPART may be used, in this case representing the command arguments as
|
||
whole or the unique words entered.<br>
|
||
Notes:<ul>
|
||
<li>newcommand may contain cmd, but recursion is not allowed.</li>
|
||
<li>if there are multiple definitions, they are checked/executed in
|
||
alphabetically sorted name oder.</li>
|
||
</ul>
|
||
Examples:
|
||
<ul><code>
|
||
define s1 cmdalias shutdown update AS save;;shutdown<br>
|
||
define s2 cmdalias set lamp .* AS { Log 1, "$EVENT";; fhem("set $EVENT") }
|
||
</code></ul>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="configDB"></a>
|
||
<h3>configDB</h3>
|
||
<ul>
|
||
This is the core backend library for configuration from SQL database.<br/>
|
||
See <a href="#configdb">configdb command documentation</a> for detailed info.<br/>
|
||
</ul>
|
||
|
||
<a name="configdb"></a>
|
||
<h3>configdb</h3>
|
||
<ul>
|
||
Starting with version 5079, fhem can be used with a configuration database instead of a plain text file (e.g. fhem.cfg).<br/>
|
||
This offers the possibility to completely waive all cfg-files, "include"-problems and so on.<br/>
|
||
Furthermore, configDB offers a versioning of several configuration together with the possibility to restore a former configuration.<br/>
|
||
Access to database is provided via perl's database interface DBI.<br/>
|
||
<br/>
|
||
<b>Prerequisits / Installation</b><br/>
|
||
<ul><br/>
|
||
<li>Please install perl package Text::Diff if not already installed on your system.</li><br/>
|
||
<li>You must have access to a SQL database. Supported database types are SQLITE, MYSQL and POSTGRESQL.</li><br/>
|
||
<li>The corresponding DBD module must be available in your perl environment,<br/>
|
||
e.g. sqlite3 running on a Debian systems requires package libdbd-sqlite3-perl</li><br/>
|
||
<li>Create an empty database, e.g. with sqlite3:<br/>
|
||
<pre>
|
||
mba:fhem udo$ sqlite3 configDB.db
|
||
|
||
SQLite version 3.7.13 2012-07-17 17:46:21
|
||
Enter ".help" for instructions
|
||
Enter SQL statements terminated with a ";"
|
||
sqlite> pragma auto_vacuum=2;
|
||
sqlite> .quit
|
||
|
||
mba:fhem udo$
|
||
</pre></li>
|
||
<li>The database tables will be created automatically.</li><br/>
|
||
<li>Create a configuration file containing the connection string to access database.<br/>
|
||
<br/>
|
||
<b>IMPORTANT:</b>
|
||
<ul><br/>
|
||
<li>This file <b>must</b> be named "configDB.conf"</li>
|
||
<li>This file <b>must</b> be located in your fhem main directory, e.g. /opt/fhem</li>
|
||
</ul>
|
||
<br/>
|
||
<pre>
|
||
## for MySQL
|
||
################################################################
|
||
#%dbconfig= (
|
||
# connection => "mysql:database=configDB;host=db;port=3306",
|
||
# user => "fhemuser",
|
||
# password => "fhempassword",
|
||
#);
|
||
################################################################
|
||
#
|
||
## for PostgreSQL
|
||
################################################################
|
||
#%dbconfig= (
|
||
# connection => "Pg:database=configDB;host=localhost",
|
||
# user => "fhemuser",
|
||
# password => "fhempassword"
|
||
#);
|
||
################################################################
|
||
#
|
||
## for SQLite (username and password stay empty for SQLite)
|
||
################################################################
|
||
#%dbconfig= (
|
||
# connection => "SQLite:dbname=/opt/fhem/configDB.db",
|
||
# user => "",
|
||
# password => ""
|
||
#);
|
||
################################################################
|
||
</pre></li><br/>
|
||
</ul>
|
||
|
||
<b>Start with a complete new "fresh" fhem Installation</b><br/>
|
||
<ul><br/>
|
||
It's easy... simply start fhem by issuing following command:<br/><br/>
|
||
<ul><code>perl fhem.pl configDB</code></ul><br/>
|
||
|
||
<b>configDB</b> is a keyword which is recognized by fhem to use database for configuration.<br/>
|
||
<br/>
|
||
<b>That's all.</b> Everything (save, rereadcfg etc) should work as usual.
|
||
</ul>
|
||
|
||
<br/>
|
||
<b>or:</b><br/>
|
||
<br/>
|
||
|
||
<b>Migrate your existing fhem configuration into the database</b><br/>
|
||
<ul><br/>
|
||
It's easy, too... <br/>
|
||
<br/>
|
||
<li>start your fhem the last time with fhem.cfg<br/><br/>
|
||
<ul><code>perl fhem.pl fhem.cfg</code></ul></li><br/>
|
||
<br/>
|
||
<li>transfer your existing configuration into the database<br/><br/>
|
||
<ul>enter<br/><br/><code>configdb migrate</code><br/>
|
||
<br/>
|
||
into frontend's command line</ul><br/></br>
|
||
Be patient! Migration can take some time, especially on mini-systems like RaspberryPi or Beaglebone.<br/>
|
||
Completed migration will be indicated by showing database statistics.<br/>
|
||
Your original configfile will not be touched or modified by this step.</li><br/>
|
||
<li>shutdown fhem</li><br/>
|
||
<li>restart fhem with keyword configDB<br/><br/>
|
||
<ul><code>perl fhem.pl configDB</code></ul></li><br/>
|
||
<b>configDB</b> is a keyword which is recognized by fhem to use database for configuration.<br/>
|
||
<br/>
|
||
<b>That's all.</b> Everything (save, rereadcfg etc) should work as usual.
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Additional functions provided</b><br/>
|
||
<ul><br/>
|
||
A new command <code>configdb</code> is propagated to fhem.<br/>
|
||
This command can be used with different parameters.<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb attr [attribute] [value]</code></li><br/>
|
||
Provides the possibility to pass attributes to backend and frontend.<br/>
|
||
<br/>
|
||
<code> configdb attr private 1</code> - set the attribute named 'private' to value 1.<br/>
|
||
<br/>
|
||
<code> configdb attr private</code> - delete the attribute named 'private'<br/>
|
||
<br/>
|
||
<code> configdb attr</code> - show all defined attributes.<br/>
|
||
<br/>
|
||
Currently, only one attribute is supported. If 'private' is set to 1 the user and password info<br/>
|
||
will not be shown in 'configdb info' output.<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb backup</code></li><br/>
|
||
Replaces fhem's default backup process, since backup is no longer supported <br/>
|
||
with activated configDB.<br/>
|
||
<br/>
|
||
<b>Important:</b><br/>
|
||
Please be aware you are responsible for data backup of your database yourself!<br/>
|
||
The backup command can and will not do this job for you!<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb diff <device> <version></code></li><br/>
|
||
Compare configuration dataset for device <device>
|
||
from current version 0 with version <version><br/>
|
||
Example for valid request:<br/>
|
||
<br/>
|
||
<code>get configDB telnetPort 1</code><br/>
|
||
<br/>
|
||
will show a result like this:
|
||
<pre>
|
||
compare device: telnetPort in current version 0 (left) to version: 1 (right)
|
||
+--+--------------------------------------+--+--------------------------------------+
|
||
| 1|define telnetPort telnet 7072 global | 1|define telnetPort telnet 7072 global |
|
||
* 2|attr telnetPort room telnet * | |
|
||
+--+--------------------------------------+--+--------------------------------------+</pre>
|
||
|
||
<li><code>configdb export <targetFilename> [version];</code></li><br/>
|
||
Exports specified version from config database into file <targetFilename><br/>
|
||
Default version if not specified = 0<br/>
|
||
The target file can be imported again, if needed.<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb info</code></li><br/>
|
||
Returns some database statistics<br/>
|
||
<pre>
|
||
--------------------------------------------------------------------------------
|
||
configDB Database Information
|
||
--------------------------------------------------------------------------------
|
||
dbconn: SQLite:dbname=/opt/fhem/configDB.db
|
||
dbuser:
|
||
dbpass:
|
||
dbtype: SQLITE
|
||
--------------------------------------------------------------------------------
|
||
fhemconfig: 7707 entries
|
||
|
||
Ver 0 saved: Sat Mar 1 11:37:00 2014 def: 293 attr: 1248
|
||
Ver 1 saved: Fri Feb 28 23:55:13 2014 def: 293 attr: 1248
|
||
Ver 2 saved: Fri Feb 28 23:49:01 2014 def: 293 attr: 1248
|
||
Ver 3 saved: Fri Feb 28 22:24:40 2014 def: 293 attr: 1247
|
||
Ver 4 saved: Fri Feb 28 22:14:03 2014 def: 293 attr: 1246
|
||
--------------------------------------------------------------------------------
|
||
fhemstate: 1890 entries saved: Sat Mar 1 12:05:00 2014
|
||
--------------------------------------------------------------------------------
|
||
</pre>
|
||
Ver 0 always indicates the currently running configuration.<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb list [device] [version]</code></li><br/>
|
||
Search for device named [device] in configuration version [version]<br/>
|
||
in database archive.<br/>
|
||
Default value for [device] = % to show all devices.<br/>
|
||
Default value for [version] = 0 to show devices from current version.<br/>
|
||
Examples for valid requests:<br/>
|
||
<br/>
|
||
<code>get configDB list</code><br/>
|
||
<code>get configDB list global</code><br/>
|
||
<code>get configDB list '' 1</code><br/>
|
||
<code>get configDB list global 1</code><br/>
|
||
<br/>
|
||
|
||
<li><code>configdb recover <version></code></li><br/>
|
||
Restores an older version from database archive.<br/>
|
||
<code>set configDB recover 3</code> will <b>copy</b> version #3 from database
|
||
to version #0.<br/>
|
||
Original version #0 will be lost.<br/><br/>
|
||
<b>Important!</b><br/>
|
||
The restored version will <b>NOT</b> be activated automatically!<br/>
|
||
You must do a <code>rereadcfg</code> or - even better - <code>shutdown restart</code> yourself.<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb reorg [keep]</code></li><br/>
|
||
Deletes all stored versions with version number higher than [keep].<br/>
|
||
Default value for optional parameter keep = 3.<br/>
|
||
This function can be used to create a nightly running job for<br/>
|
||
database reorganisation when called from an at-Definition.<br/>
|
||
<br/>
|
||
|
||
<li><code>configdb uuid</code></li><br/>
|
||
Returns a uuid that can be used for own purposes.<br/>
|
||
<br/>
|
||
|
||
</ul>
|
||
<br/>
|
||
<br/>
|
||
<b>Author's notes</b><br/>
|
||
<br/>
|
||
<ul>
|
||
<li>You can find two template files for datebase and configfile (sqlite only!) for easy installation.<br/>
|
||
Just copy them to your fhem installation directory (/opt/fhem) and have fun.</li>
|
||
<br/>
|
||
<li>The frontend option "Edit files"->"config file" will be removed when running configDB.</li>
|
||
<br/>
|
||
<li>Please be patient when issuing a "save" command
|
||
(either manually or by clicking on "save config").<br/>
|
||
This will take some moments, due to writing version informations.<br/>
|
||
Finishing the save-process will be indicated by a corresponding message in frontend.</li>
|
||
<br/>
|
||
<li>There still will be some more (planned) development to this extension,
|
||
especially regarding some perfomance issues.</li>
|
||
<br/>
|
||
<li>Have fun!</li>
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="dewpoint"></a>
|
||
<h3>dewpoint</h3>
|
||
<ul>
|
||
Dewpoint calculations. Offers three different ways to use dewpoint: <br>
|
||
<ul>
|
||
<li><b>dewpoint</b><br>
|
||
Compute additional event dewpoint from a sensor offering temperature and humidity.</li>
|
||
<li><b>fan</b><br>
|
||
Generate a event to turn a fan on if the outside air has less water than the inside.</li>
|
||
<li><b>alarm</b><br>
|
||
Generate a mold alarm if a reference temperature is lower that the current dewpoint.</li>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="dewpointdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> dewpoint dewpoint <devicename-regex> [<temp_name> <hum_name> <new_name>]</code><br>
|
||
<br>
|
||
<ul>
|
||
Calculates dewpoint for device <devicename-regex> from temperature and humidity
|
||
and write it to a new reading named dewpoint.
|
||
If optional <temp_name>, <hum_name> and <new_name> is specified
|
||
then read temperature from reading <temp_name>, humidity from reading <hum_name>
|
||
and write the calculated dewpoint to reading <new_name>.<br>
|
||
If <temp_name> is T then use temperature from state T: H:, add <new_name> to the state.
|
||
</ul>
|
||
<br>
|
||
|
||
Example:<PRE>
|
||
# Compute the dewpoint for the temperature/humidity
|
||
# events of the temp1 device and generate reading dewpoint.
|
||
define dew_temp1 dewpoint dewpoint temp1
|
||
define dew_temp1 dewpoint dewpoint temp1 temperature humidity dewpoint
|
||
|
||
# Compute the dewpoint for the temperature/humidity
|
||
# events of all devices offering temperature and humidity
|
||
# and generate reading dewpoint.
|
||
define dew_all dewpoint dewpoint .*
|
||
define dew_all dewpoint dewpoint .* temperature humidity dewpoint
|
||
|
||
# Compute the dewpoint for the temperature/humidity
|
||
# events of the device Aussen_1 offering temperature and humidity
|
||
# and insert is into STATE.
|
||
define dew_state dewpoint dewpoint Aussen_1 T H D
|
||
|
||
# Compute the dewpoint for the temperature/humidity
|
||
# events of all devices offering temperature and humidity
|
||
# and insert the result into the STATE.
|
||
# Example STATE: "T: 10 H: 62.5" will change to
|
||
# "T: 10 H: 62.5 D: 3.2"
|
||
define dew_state dewpoint dewpoint .* T H D
|
||
|
||
</PRE>
|
||
</ul>
|
||
|
||
<ul>
|
||
<code>define <name> dewpoint fan <devicename-regex> <devicename-outside> <min-temp> [<diff_temp>]</code><br>
|
||
<br>
|
||
<ul>
|
||
May be used to turn an fan on or off if the outside air has less water.
|
||
<ul>
|
||
<li>
|
||
Generate event "fan: on" if (dewpoint of <devicename-outside>) + <diff_temp> is lower
|
||
than dewpoint of <devicename> and temperature of <devicename-outside> is >= min-temp
|
||
and reading "fan" was not already "on". The event will be generated for <devicename>. Parameter <diff-temp> is optional</li>
|
||
<li>Generate event "fan: off": else and if reading "fan" was not already "off".</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
Example:<PRE>
|
||
# Generate event "fan: on" when dewpoint of Aussen_1 is first
|
||
# time lower than basement_tempsensor and outside temperature is >= 0
|
||
# and change it to "fan: off" is this condition changes.
|
||
# Set a switch on/off (fan_switch) depending on the state.
|
||
define dew_fan1 dewpoint fan basement_tempsensor Aussen_1 0
|
||
define dew_fan1_on notify basement_tempsensor.*fan:.*on set fan_switch on
|
||
define dew_fan1_off notify basement_tempsensor.*fan:.*off set fan_switch off
|
||
|
||
</PRE>
|
||
</ul>
|
||
|
||
<ul>
|
||
<code>define <name> dewpoint alarm <devicename-regex> <devicename-reference> <diff-temp></code><br>
|
||
<br>
|
||
<ul>
|
||
Generate a mold alarm if a reference temperature is lower that the current dewpoint.
|
||
<ul>
|
||
<li>
|
||
Generate reading/event "alarm: on" if temperature of <devicename-reference> - <diff-temp> is lower
|
||
than dewpoint of <devicename> and reading "alarm" was not already "on". The event will be generated for <devicename>.</li>
|
||
<li>Generate reading/event "alarm: off" if temperature of <devicename-reference> - <diff-temp> is higher than dewpoint of <devicename> and reading "alarm" was not already "off".</li>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
Example:<PRE>
|
||
# Using a wall temperature sensor (wallsensor) and a temp/hum sensor
|
||
# (roomsensor) to alarm if the temperature of the wall is lower than
|
||
# the dewpoint of the air. In this case the water of the air will
|
||
# condense on the wall because the wall is cold.
|
||
# Set a switch on (alarm_siren) if alarm is on using notify.
|
||
define dew_alarm1 dewpoint alarm roomsensor wallsensor 0
|
||
define roomsensor_alarm_on notify roomsensor.*alarm:.*on set alarm_siren on
|
||
define roomsensor_alarm_off notify roomsensor.*alarm:.*off set alarm_siren off
|
||
|
||
# If you do not have a temperature sensor in/on the wall, you may also
|
||
# compare the rooms dewpoint to the temperature of the same or another
|
||
# inside sensor. Alarm is temperature is 5 degrees colder than the
|
||
# inside dewpointinside.
|
||
define dev_alarm2 dewpoint alarm roomsensor roomsensor 5
|
||
|
||
</PRE>
|
||
</ul>
|
||
|
||
<a name="dewpointset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="dewpointget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="dewpointattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li>max_timediff<br>
|
||
Maximum time difference in seconds allowed between the temperature and humidity values for a device. dewpoint uses the Readings for temperature or humidity if they are not delivered in the event. This is necessary for using dewpoint with event-on-change-reading. Also needed for sensors that do deliver temperature and humidity in different events like for example technoline sensors TX3TH.<br>
|
||
If not set default is 1 second.
|
||
<br><br>
|
||
Examples:<PRE>
|
||
# allow maximum time difference of 60 seconds
|
||
define dew_all dewpoint dewpoint .*
|
||
attr dew_all max_timediff 60
|
||
</li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="dummy"></a>
|
||
<h3>dummy</h3>
|
||
<ul>
|
||
|
||
Define a dummy. A dummy can take via <a href="#set">set</a> any values.
|
||
Used for programming.
|
||
<br><br>
|
||
|
||
<a name="dummydefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> dummy</code>
|
||
<br><br>
|
||
|
||
Example:
|
||
<ul>
|
||
<code>define myvar dummy</code><br>
|
||
<code>set myvar 7</code><br>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="dummyset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<code>set <name> <value></code><br>
|
||
Set any value.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="dummyget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="dummyattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a name="setList">setList</a><br>
|
||
Space separated list of commands, which will be returned upon "set name ?",
|
||
so the FHEMWEB frontend can construct a dropdown and offer on/off
|
||
switches. Example: attr dummyName setList on off
|
||
</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="eventTypes"></a>
|
||
<h3>eventTypes</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="eventTypesdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> eventTypes <filename></code>
|
||
<br><br>
|
||
Collect event types for all devices. This service is used by frontends.
|
||
The filename is used to store the collected events before shutdown.<br>
|
||
More than one instance of eventTypes should not be necessary.
|
||
Examples:
|
||
<ul>
|
||
<code>define et eventTypes log/eventTypes.txt</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="eventTypesset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="eventTypesget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>list [devicename]<br>
|
||
return the list of collected event types for all devices or for
|
||
devicename if specified.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="eventTypesattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="fheminfo"></a>
|
||
<h3>fheminfo</h3>
|
||
<ul>
|
||
<code>fheminfo [send]</code>
|
||
<br>
|
||
<br>
|
||
fheminfo displays information about the system and FHEM definitions.
|
||
<br>
|
||
<br>
|
||
The optional parameter <code>send</code> transmitts the collected data
|
||
to a central server in order to support the development of FHEM. The
|
||
transmitted data is processed graphically. The results can be viewed
|
||
on <a href="http://fhem.de/stats/statistics.cgi">http://fhem.de/stats/statistics.cgi</a>.
|
||
Based on the IP address, the approximate location is determined with
|
||
an accuracy of about 40-80 km. The IP address is not saved.
|
||
<br>
|
||
<br>
|
||
Features:<br>
|
||
<ul>
|
||
<li>Operating System Information</li>
|
||
<li>Hardware architecture</li>
|
||
<li>Installed Perl version</li>
|
||
<li>Installed FHEM release and branch</li>
|
||
<li>Defined modules (only official FHEM Modules are counted)</li>
|
||
<li>Defined models per module</li>
|
||
</ul>
|
||
<br>
|
||
Example:
|
||
<pre>
|
||
fhem> fheminfo
|
||
Fhem info:
|
||
Release : 5.3
|
||
Branch : DEVELOPMENT
|
||
OS : linux
|
||
Arch : i686-linux-gnu-thread-multi-64int
|
||
Perl : v5.14.2
|
||
uniqueID : 87c5cca38dc75a4f388ef87bdcbfbf6f
|
||
|
||
Defined modules:
|
||
ACU : 1
|
||
CUL : 1
|
||
CUL_FHTTK : 12
|
||
CUL_HM : 66
|
||
CUL_WS : 3
|
||
FHEM2FHEM : 1
|
||
FHEMWEB : 3
|
||
FHT : 9
|
||
[...]
|
||
at : 4
|
||
autocreate : 1
|
||
dummy : 23
|
||
notify : 54
|
||
structure : 3
|
||
telnet : 2
|
||
watchdog : 9
|
||
weblink : 17
|
||
|
||
Defined models per module:
|
||
CUL : CUN
|
||
CUL_FHTTK : FHT80TF
|
||
CUL_HM : HM-CC-TC,HM-CC-VD,HM-LC-DIM1T-CV,HM-LC-DIM1T-FM,HM-LC-SW1-PL,[...]
|
||
CUL_WS : S555TH
|
||
FHT : fht80b
|
||
FS20 : fs20pira,fs20s16,fs20s4a,fs20sd,fs20st
|
||
HMS : hms100-mg,hms100-tf,hms100-wd
|
||
KS300 : ks300
|
||
OWSWITCH : DS2413
|
||
</pre>
|
||
<br>
|
||
|
||
<a name="fheminfoattr"></a>
|
||
<b>Attributes</b>
|
||
<br>
|
||
<br>
|
||
The following attributes are used only in conjunction with the
|
||
<code>send</code> parameter. They are set on <code>attr global</code>.
|
||
<br>
|
||
<br>
|
||
<ul>
|
||
<li>uniqueID<br>
|
||
A randomly generated ID (16 pairs of hash values), e.g.
|
||
<code>87c5cca38dc75a4f388ef87bdcbfbf6f</code> which is assigned to the transmitted
|
||
data to prevent duplicate entries.
|
||
<br>
|
||
The <code>uniqueID</code> is stored automatically in a file named <code>FhemUtils/uniqueID</code>
|
||
in FHEM's modules path.
|
||
<br>
|
||
<strong>IMPORTANT NOTE:</strong>
|
||
<br>
|
||
Every installation of FHEM should have to have his own unique ID.
|
||
<br>
|
||
Please do not modify, move or delete this file! You should always backup this file
|
||
(this is normally done by the <code>update</code> command automatically) and please restore
|
||
this file to the same path (<code>FhemUtils</code> in FHEM's modules path), if you plan to
|
||
reinstall your FHEM installation. This prevents duplicate entries for identical
|
||
installations on the same hardware in the statistics.
|
||
<br>
|
||
Otherwise, please use different unique IDs for each installation of FHEM on different
|
||
hardware, e.g. one randomly generated unique ID for FRITZ!Box, another one for the first
|
||
Raspberry Pi, another one for the second Raspberry Pi, etc.
|
||
<br>
|
||
Thanks for your support!
|
||
</li>
|
||
<br>
|
||
<li>sendStatistics<br>
|
||
This attribute is used in conjunction with the <code>update</code> command.
|
||
<br>
|
||
<code>onUpdate</code>: transfer of data on every update (recommended setting).
|
||
<br>
|
||
<code>manually</code>: manually transfer of data via the <code>fheminfo send</code> command.
|
||
<br>
|
||
<code>never</code>: prevents transmission of data at anytime.
|
||
</li>
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="geodata"></a>
|
||
<h3>geodata</h3>
|
||
<ul>
|
||
|
||
Collect some location based data from various internet sources.<br/>
|
||
Data will be updated once an hour.<br/>
|
||
<br/><ul>
|
||
<li><b>openweathermap</b> will always be used.</li>
|
||
<li><b>wunderground api</b> will be used, if wunderground api key is provided by attribute.</li>
|
||
<li><b>google api</b> will be used, if google api key is provided by attribute.<br/>
|
||
Currently google's elevation api and timezone api are used, so check access to those apis for your api key.</li>
|
||
</ul>
|
||
<br/>
|
||
|
||
<a name="geodatadefine"></a>
|
||
<b>Define</b><br/>
|
||
<br/>
|
||
<ul><code>define <location> latitude longitude</code><br/></ul>
|
||
<br/>
|
||
|
||
<a name="geodataset"></a>
|
||
<b>Set</b>
|
||
<ul>n/a</ul><br/>
|
||
<br/>
|
||
|
||
<a name="geodataget"></a>
|
||
<b>Get</b>
|
||
<ul>n/a</ul><br/>
|
||
<br/>
|
||
|
||
<a name="geodataattr"></a>
|
||
<b>Attributes</b><br/>
|
||
<br/>
|
||
<ul>
|
||
<li><b>geo_owoGetUrl</b> - used to correct owo api url manually, normally not needed.</li>
|
||
<li><b>geo_wuApiKey</b> - enter your wunderground api key to access wunderground data.</li>
|
||
<li><b>geo_googleApiKey</b> - enter your google api key to access google api.</li>
|
||
<li><b>geo_language:de,en</b> - select language to be used if supported by api.</li>
|
||
</ul><br/>
|
||
<br/>
|
||
|
||
|
||
</ul>
|
||
|
||
<a name="holiday"></a>
|
||
<h3>holiday</h3>
|
||
<ul>
|
||
<a name="holidaydefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> holiday</code>
|
||
<br><br>
|
||
Define a set of holidays. The module will try to open the file
|
||
<name>.holiday in the <a href="#modpath">modpath</a>/FHEM directory.
|
||
If entries in the holiday file match the current day, then the STATE of
|
||
this holiday instance displayed in the <a href="#list">list</a> command
|
||
will be set to the corresponding values, else the state is set to the text
|
||
none. Most probably you'll want to query this value in some perl script:
|
||
see Value() in the <a href="#perl">perl</a> section or the global attribute
|
||
<a href="#holiday2we"> holiday2we</a>.<br> The file will be reread once
|
||
every night, to compute the value for the current day, and by each get
|
||
command (see below).<br>
|
||
<br>
|
||
|
||
Holiday file definition:<br>
|
||
The file may contain comments (beginning with #) or empty lines.
|
||
Significant lines begin with a number (type) and contain some space
|
||
separated words, depending on the type. The different types are:<br>
|
||
<ul>
|
||
<li>1<br>
|
||
Exact date. Arguments: <MM-DD> <holiday-name><br>
|
||
Exampe: 1 12-24 Christmas
|
||
</li>
|
||
<li>2<br>
|
||
Easter-dependent date. Arguments: <day-offset>
|
||
<holiday-name>.
|
||
The offset is counted from Easter-Sunday.
|
||
<br>
|
||
Exampe: 2 1 Easter-Monday<br>
|
||
Sidenote: You can check the easter date with:
|
||
fhem> { join("-", western_easter(2011)) }
|
||
</li>
|
||
<li>3<br>
|
||
Month dependent date. Arguments: <nth> <weekday>
|
||
<month <holiday-name>.<br>
|
||
Examples:<br>
|
||
<ul>
|
||
3 1 Mon 05 First Monday In May<br>
|
||
3 2 Mon 05 Second Monday In May<br>
|
||
3 -1 Mon 05 Last Monday In May<br>
|
||
3 0 Mon 05 Each Monday In May<br>
|
||
</ul>
|
||
</li>
|
||
<li>4<br>
|
||
Interval. Arguments: <MM-DD> <MM-DD> <holiday-name>
|
||
.<br>
|
||
Example:<br>
|
||
<ul>
|
||
4 06-01 06-30 Summer holiday<br>
|
||
</ul>
|
||
</li>
|
||
<li>5<br>
|
||
Date relative, weekday fixed holiday. Arguments: <nth>
|
||
<weekday> <month> <day> < holiday-name><br>
|
||
Note that while +0 or -0 as offsets are not forbidden, their behaviour
|
||
is undefined in the sense that it might change without notice.<br>
|
||
Examples:<br>
|
||
<ul>
|
||
5 -1 Wed 11 23 Buss und Bettag (first Wednesday before Nov, 23rd)<br>
|
||
5 1 Mon 01 31 First Monday after Jan, 31st (1st Monday in February)<br>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
See also he.holiday in the contrib directory for official holidays in the
|
||
german country of Hessen, and by.holiday for the Bavarian definition.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="holidayset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="holidayget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <name> <MM-DD></code><br>
|
||
<code>get <name> yesterday</code><br>
|
||
<code>get <name> today</code><br>
|
||
<code>get <name> tomorrow</code><br>
|
||
<br><br>
|
||
Return the holiday name of the specified date or the text none.
|
||
<br><br>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="holidayattr"></a>
|
||
<b>Attributes</b><ul>N/A</ul><br>
|
||
|
||
</ul>
|
||
|
||
<a name="mailcheck"></a>
|
||
<h3>mailcheck</h3>
|
||
<ul>
|
||
Watches a mailbox with imap idle and for each new mail triggers an event with the subject of this mail.<br><br>
|
||
This can be used to send mails *to* FHEM and react to them from a notify. Application scenarios are for example
|
||
a geofencing apps on mobile phones, networked devices that inform about warning or failure conditions by e-mail or
|
||
(with a little logic in FHEM) the absence of regular status messages from such devices and so on.<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>Mail::IMAPClient and IO::Socket::SSL and IO::Socket::INET hast to be installed on the FHEM host.</li>
|
||
<li>Probably only works reliably if no other mail programm is marking messages as read at the same time.</li>
|
||
<li>If you experience a hanging system caused by regular forced disconnects of your internet provider you
|
||
can disable and enable the mailcheck instance with an <a href="#at">at</a>.</li>
|
||
<li>If MIME::Parser is installed non ascii subjects will be docoded to utf-8</li>
|
||
<li>If MIME::Parser and Mail::GnuPG are installed gpg signatures can be checked and mails from unknown senders can be ignored.</li>
|
||
</ul><br>
|
||
|
||
<a name="mailcheck_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> mailcheck <host> <user> <password> [<folder>]</code><br>
|
||
<br>
|
||
|
||
Defines a mailcheck device.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define mailcheck mailcheck imap.mail.me.com x.y@me.com</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="mailcheck_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>Subject</br>
|
||
the subject of the last mail received</li>
|
||
</ul><br>
|
||
|
||
<a name="mailcheck_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>update<br>
|
||
trigger an update</li>
|
||
<li>folders<br>
|
||
list available folders</li>
|
||
</ul><br>
|
||
|
||
<a name="mailcheck_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>delete_message<br>
|
||
1 -> delete message after Subject reading is created</li>
|
||
<li>interval<br>
|
||
the interval in seconds used to trigger an update on the connection.
|
||
if idle is supported the defailt is 600, without idle support the default is 60. the minimum is 60.</li>
|
||
<li>nossl<br>
|
||
1 -> don't use ssl.</li><br>
|
||
<li>disable<br>
|
||
1 -> disconnect and stop polling</li>
|
||
<li>debug<br>
|
||
1 -> enables debug output. default target is stdout.</li>
|
||
<li>logfile<br>
|
||
set the target for debug messages if debug is enabled.</li>
|
||
<li>accept_from<br>
|
||
comma separated list of gpg keys that will be accepted for signed messages. Mail::GnuPG and MIME::Parser have to be installed</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="netatmo"></a>
|
||
<h3>netatmo</h3>
|
||
<ul>
|
||
xxx<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>JSON has to be installed on the FHEM host.</li>
|
||
</ul><br>
|
||
|
||
<a name="netatmo_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> netatmo <device></code><br>
|
||
<code>define <name> netatmo [ACCOUNT] <username> <password> <client_id> <client_secret></code><br>
|
||
<br>
|
||
|
||
Defines a netatmo device.<br><br>
|
||
If a netatmo device of the account type is created all fhem devices for the netatmo devices are automaticaly created.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define netatmo netatmo ACCOUNT abc@test.com myPassword 2134123412399119d4123134 AkqcOIHqrasfdaLKcYgZasd987123asd</code><br>
|
||
<code>define netatmo netatmo 2f:13:2b:93:12:31</code><br>
|
||
<code>define netatmo netatmo MODULE 2f:13:2b:93:12:31 f1:32:b9:31:23:11</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="netatmo_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>co2</li>
|
||
<li>battery</li>
|
||
<li>batteryLevel</li>
|
||
</ul><br>
|
||
|
||
<a name="netatmo_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>update<br>
|
||
trigger an update</li>
|
||
</ul><br>
|
||
|
||
<a name="netatmo_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>interval<br>
|
||
the interval in seconds used to check for new values.</li>
|
||
<li>disable<br>
|
||
1 -> stop polling</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="notice"></a>
|
||
<h3>notice</h3>
|
||
<ul>
|
||
<code>notice [confirm [value]|list [<keyword>]|reset [yes]|view <id> [noheader|[de|en]]]</code><br>
|
||
<br>
|
||
View and confirmation of system messages.
|
||
<br>
|
||
<br>
|
||
During an update or a system start from FHEM sometimes it is necessary to
|
||
inform the user about important changes or additions. It may be necessary
|
||
to confirm a system message by the user.
|
||
<br>
|
||
<br>
|
||
By entering the command '<code>notice</code>' a list of all messages is displayed.
|
||
Are messages available in different languages, they are ordered by language.
|
||
<br>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice
|
||
==> Language: de
|
||
ID Published Expired Confirmed Description
|
||
advice-20130128-002 actually never not needed kurze beschreibung
|
||
update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
|
||
|
||
==> Language: en
|
||
ID Published Expired Confirmed Description
|
||
advice-20130128-001 actually never no short description
|
||
advice-20130128-002 actually never not needed short description
|
||
update-20130128-001 actually never no short description
|
||
update-20130128-002 31.01.2013 01.02.2013 no short description
|
||
</pre></code></blockquote>
|
||
By entering '<code>notice list <keyword></code>' the output of the list contains only
|
||
available messages that starts with '<code><keyword></code>'.
|
||
<br>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice list update
|
||
==> Language: de
|
||
ID Published Expired Confirmed Description
|
||
update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
|
||
|
||
==> Language: en
|
||
ID Published Expired Confirmed Description
|
||
update-20130128-001 actually never no short description
|
||
update-20130128-002 31.01.2013 01.02.2013 no short description
|
||
</pre></code></blockquote>
|
||
To display a single message, enter the command '<code>notice view <id></code>' where <code>id</code>
|
||
is the Identifier of the message. You can use the optional parameter <code>noheader</code>
|
||
or the language codes <code>de</code> or <code>en</code> to display the message
|
||
without the header informations or in your prefered language if available.
|
||
<br>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice view advice-20130128-002 de
|
||
ID : advice-20130128-002
|
||
From : M. Fischer
|
||
Date : 28.01.2013
|
||
Expire : 0
|
||
Title : kurze beschreibung
|
||
### Start of Text
|
||
test-advice
|
||
|
||
dies ist ein test
|
||
|
||
001
|
||
### End of Text
|
||
</pre></code></blockquote>
|
||
If it is necessary to confirm a message, this is be done by entering '<code>notice confirm <id> [value]</code>'.
|
||
The optional argument <code>value</code> will also be stored with the confirmation.
|
||
<br>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice confirm update-20130128-001 foo:bar
|
||
update-20130128-001 confirmed on 2013-01-29 20:58:57: foo:bar
|
||
</pre></code></blockquote>
|
||
Sometimes it is necessary to reset all confirmations. This is be done by entering
|
||
'<code>notice reset</code>'.
|
||
<br>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice reset
|
||
This command delete all confirmations.
|
||
If you really want to do this, call 'notice reset yes'
|
||
</pre></code></blockquote>
|
||
<br>
|
||
<strong>For developers only:</strong>
|
||
<br>
|
||
<br>
|
||
<code>notice [condition <id>|get <keyword> <value>|position <id>]</code><br>
|
||
<br>
|
||
<br>
|
||
These arguments are normally not needed by any user.
|
||
<br>
|
||
<br>
|
||
A message may optionally contains one or more code snippets. The argument <code>condition</code> supplies the determined
|
||
value(s) of the embedded test(s) as a key:value pair. If more than one pair returned, they they are seperated by <code>|</code>.
|
||
It is possible to define your own rules for a condition, like <code>!empty</code> or <code>>>5</code> and so on. An example
|
||
of a condition is shown in the below example message file.
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice condition update-20130127-001
|
||
configfile:./fhem.cfg|sendStatistics:never:!empty
|
||
</pre></code></blockquote>
|
||
The argument <code>get</code>, followed by a <code>keyword</code> and a number from 0 to 8, returns a
|
||
comma seperated list of message ids.
|
||
The possible outputs are:
|
||
<ul>
|
||
<li><code>0 returns a list of all messages.</code></li>
|
||
<li><code>1 returns a list of unconfirmed messages.</code></li>
|
||
<li><code>2 returns a list of messages that are not expired.</code></li>
|
||
<li><code>3 returns a list of messages that are not expired and unconfirmed.</code></li>
|
||
<li><code>4 returns a list of published messages.</code></li>
|
||
<li><code>5 returns a list of unconfirmed and published messages.</code></li>
|
||
<li><code>6 returns a list of published messages that are not expired.</code></li>
|
||
<li><code>7 returns a list of published, unconfirmed and not expired messages.</code></li>
|
||
<li><code>8 returns a list of confirmed messages.</code></li>
|
||
</ul>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice get all 2
|
||
advice-20130128-001,advice-20130128-002,update-20130128-001,update-20130128-002
|
||
</pre></code></blockquote>
|
||
The argument <code>position</code> followed by an <code><id></code> returns the view position of a message if defined.
|
||
<br>
|
||
Example:
|
||
<blockquote><code><pre>
|
||
fhem> notice position update-20130128-001
|
||
before
|
||
</pre></code></blockquote>
|
||
Example of a message file:
|
||
<blockquote><code><pre>
|
||
# FROM: M. Fischer
|
||
# DATE: 28.01.2013
|
||
# CONFIRM: 1
|
||
# PUBLISH: 31.01.2013
|
||
# EXPIRE: 01.02.2013
|
||
# KEY_1: sendStatistics
|
||
# VAL_1: AttrVal("global","sendStatistics",undef);
|
||
# CON_1: !empty
|
||
# KEY_2: configfile
|
||
# VAL_2: AttrVal("global","configfile",undef);
|
||
# POSITION: top
|
||
# TITLE_DE: kurze beschreibung
|
||
# NOTICE_DE
|
||
Hinweis:
|
||
|
||
dies ist ein test
|
||
# TITLE_EN: short description
|
||
# NOTICE_EN
|
||
Advice:
|
||
|
||
this is a test
|
||
</pre></code></blockquote>
|
||
The keywords '<code>FROM, DATE, CONFIRM, PUBLISH, EXPIRE, TITLE_DE, TITLE_EN, NOTICE_DE, NOTICE_EN</code>' are fixed.
|
||
It is possible to add any key:value string to these files. Also it is possible to set only one or both keywords of
|
||
'<code>TITLE_DE, TITLE_EN</code>' and '<code>NOTICE_DE, NOTICE_EN</code>'.
|
||
</ul>
|
||
|
||
<a name="notify"></a>
|
||
<h3>notify</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="notifydefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> notify <pattern> <command></code>
|
||
<br><br>
|
||
Execute a command when received an event for the <a
|
||
|
||
href="#define">definition</a> <code><pattern></code>. If
|
||
<command> is enclosed in {}, then it is a perl expression, if it is
|
||
enclosed in "", then it is a shell command, else it is a "plain" fhem.pl
|
||
command (chain). See the <a href="#trigger">trigger</a> command for
|
||
testing it.
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define b3lampV1 notify btn3 set lamp $EVENT</code><br>
|
||
<code>define b3lampV2 notify btn3 { fhem "set lamp $EVENT" }</code><br>
|
||
<code>define b3lampV3 notify btn3 "/usr/local/bin/setlamp "$EVENT""</code><br>
|
||
<code>define b3lampV3 notify btn3 set lamp1 $EVENT;;set lamp2 $EVENT</code><br>
|
||
<code>define wzMessLg notify wz:measured.* "/usr/local/bin/logfht $NAME "$EVENT""</code><br>
|
||
<!-- <code>define LogHToDB notify .*H:.* {DbLog("$NAME","$EVENT")}</code><br> -->
|
||
<code>define LogUndef notify global:UNDEFINED.* "send-me-mail.sh "$EVENT""</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li><code><pattern></code> is either the name of the triggering
|
||
device, or <code>devicename:event</code>.</li>
|
||
|
||
<li><code><pattern></code> must completely (!)
|
||
match either the device name, or the compound of the device name and the
|
||
event. To identify the events use "inform" command in telnet or "Event
|
||
Monitor" in FHEMWEB.</li>
|
||
<li>in the command section you can access the event:
|
||
<ul>
|
||
<li>The variable $EVENT will contain the complete event, e.g.
|
||
<code>measured-temp: 21.7 (Celsius)</code></li>
|
||
<li>$EVTPART0,$EVTPART1,$EVTPART2,etc contain the space separated event
|
||
parts (e.g. <code>$EVTPART0="measured-temp:", $EVTPART1="21.7",
|
||
$EVTPART2="(Celsius)"</code>. This data is available as a local
|
||
variable in perl, as environment variable for shell scripts, and will
|
||
be textually replaced for FHEM commands.</li>
|
||
<li>$NAME contains the device triggering the event, e.g.
|
||
<code>myFht</code></li>
|
||
</ul></li>
|
||
|
||
<li>Note: the following is deprecated and will be removed in a future
|
||
release. The described replacement is attempted if none of the above
|
||
variables ($NAME/$EVENT/etc) found in the command.
|
||
<ul>
|
||
<li>The character <code>%</code> will be replaced with the received
|
||
event, e.g. with <code>on</code> or <code>off</code> or
|
||
<code>measured-temp: 21.7 (Celsius)</code><br> It is advisable to put
|
||
the <code>%</code> into double quotes, else the shell may get a syntax
|
||
error.</li>
|
||
|
||
<li>The character <code>@</code> will be replaced with the device
|
||
name.</li>
|
||
|
||
<li>To use % or @ in the text itself, use the double mode (%% or
|
||
@@).</li>
|
||
|
||
<li>Instead of <code>%</code> and <code>@</code>, the parameters
|
||
<code>%EVENT</code> (same as <code>%</code>), <code>%NAME</code> (same
|
||
as <code>@</code>) and <code>%TYPE</code> (contains the device type,
|
||
e.g. <code>FHT</code>) can be used. The space separated event "parts"
|
||
are available as %EVTPART0, %EVTPART1, etc. A single <code>%</code>
|
||
looses its special meaning if any of these parameters appears in the
|
||
definition.</li>
|
||
</ul></li>
|
||
|
||
<li>To use database logging, define a dblog instance and change the
|
||
$dbconn parameter in the file.</li>
|
||
|
||
<li>Following special events will be generated for the device "global"
|
||
<ul>
|
||
<li>INITIALIZED after initialization is finished.</li>
|
||
<li>DEFINED <devname> after a device is defined.</li>
|
||
<li>DELETED <devname> after a device was deleted.</li>
|
||
<li>RENAMED <old> <new> after a device was renamed.</li>
|
||
<li>UNDEFINED <defspec> upon reception of a message for an
|
||
undefined device.</li>
|
||
</ul></li>
|
||
|
||
<li>Notify can be used to store macros for manual execution. Use the <a
|
||
href="#trigger">trigger</a> command to execute the macro.
|
||
E.g.<br>
|
||
<code>fhem> define MyMacro notify MyMacro { Log 1, "Hello"}</code><br>
|
||
<code>fhem> trigger MyMacro</code><br>
|
||
</li>
|
||
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="notifyset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="notifyget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="notifyattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li><a href="#disabledForIntervals">disabledForIntervals</a></li>
|
||
|
||
<a name="forwardReturnValue"></a>
|
||
<li>forwardReturnValue<br>
|
||
Forward the return value of the executed command to the caller,
|
||
default is disabled (0). If enabled (1), then e.g. a set command which
|
||
triggers this notify will also return this value. This can cause e.g
|
||
FHEMWEB to display this value, when clicking "on" or "off", which is
|
||
often not intended.</li>
|
||
|
||
<li>showTriggerTime<br/>
|
||
Replace STATE content 'active' by timestamp of last execution.</li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="openweathermap"></a>
|
||
<h3>openweathermap</h3>
|
||
<ul>
|
||
|
||
<b>Prerequisits</b>
|
||
<ul>
|
||
<br/>
|
||
<li>Module uses following additional Perl modules:<br/><br/>
|
||
<code>XML::Simple, JSON</code><br/><br/>
|
||
If not already installed in your environment, please install them using appropriate commands from your environment.<br/>
|
||
Use of JSON is optional. You can activate it by setting attribute owoUseXml to 0</li><br/>
|
||
<li>please check global attributes latitude, longitude and altitude are set correctly</li>
|
||
<li>you can use all task alone, in any combination or all together</li>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="openweathermapdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<br/>
|
||
<code>define <name> openweathermap</code>
|
||
<br/><br/>
|
||
This module provides connection to openweathermap-network www.openweathermap.org (owo)<br/>
|
||
You can use this module to do three different tasks:<br/>
|
||
<br/>
|
||
<ul>
|
||
<li>1. send weather data from your own weather station to owo network.</li>
|
||
<li>2. set any weather data in owo network as datasource for your fhem installation. Data from this station will be updated periodically.</li>
|
||
<li>3. retrieve weather data from any weather station in owo network once. (same as 2. but without update)</li>
|
||
</ul>
|
||
<br/>
|
||
Example:<br/>
|
||
<br/>
|
||
<ul><code>define owo openweathermap</code></ul>
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<b>Configuration of your owo tasks</b><br/><br/>
|
||
<ul>
|
||
<a name="owoconfiguration1"></a>
|
||
<li>1. providing your own weather data to owo network</li>
|
||
<br/>
|
||
<ul><code>
|
||
define owo openweathermap<br/>
|
||
attr owo owoUser myuser:mypassword<br/>
|
||
attr owo owoStation myStationName<br/>
|
||
attr owo owoInterval 600<br/>
|
||
attr owo owoSrc00 temp:sensorname:temperature<br/>
|
||
</code></ul><br/>
|
||
|
||
<a name="owoconfiguration2"></a>
|
||
<li>2. set a weather station from owo network as data source for your fhem installation</li>
|
||
<br/>
|
||
<ul><code>
|
||
set owo stationByName Leimen
|
||
<br/><br/>
|
||
set owo stationById 2879241
|
||
<br/><br/>
|
||
set owo stationByGeo 49.3511 8.6894
|
||
</code></ul>
|
||
<br/><br/>
|
||
<ul>
|
||
<li>All commands will retrieve weather data for Leimen (near Heidelberg,DE)</li>
|
||
<li>Readings will be updated periodically, based on value of owoInterval.</li>
|
||
<li>If lat and lon value in stationByGeo are omitted, the corresponding values from global attributes are used.</li>
|
||
<li>All readings will use prefix "c_"</li>
|
||
</ul>
|
||
<br/>
|
||
|
||
<a name="owoconfiguration3"></a>
|
||
<li>3. get weather data from a selected weather station once (e.g. to do own presentations)</li>
|
||
<br/>
|
||
<ul><code>
|
||
get owo stationByName Leimen
|
||
<br/><br/>
|
||
get owo stationById 2879241
|
||
<br/><br/>
|
||
get owo stationByGeo 49.3511 8.6894
|
||
</code></ul>
|
||
<br/><br/>
|
||
<ul>
|
||
<li>All commands will retrieve weather data for Leimen (near Heidelberg,DE) once.</li>
|
||
<li>Readings will not be updated periodically.</li>
|
||
<li>If lat and lon value in stationByGeo are omitted, the corresponding values from global attributes are used.</li>
|
||
<li>All readings will use prefix "g_"</li>
|
||
</ul>
|
||
<br/>
|
||
|
||
</ul>
|
||
<br/><br/>
|
||
|
||
<a name="openweathermapset"></a>
|
||
<b>Set-Commands</b><br/>
|
||
<ul>
|
||
<br/>
|
||
<code>set <name> clear</code><br/>
|
||
<br/>
|
||
<ul>Delete all readings for cleanup</ul>
|
||
<br/><br/>
|
||
<code>set <name> send</code><br/>
|
||
<br/>
|
||
<ul>start an update cycle manually:
|
||
<ul>
|
||
<li>send own data</li>
|
||
<li>update c_* readings from "set" station (if defined)</li>
|
||
<br/>
|
||
<li>does not affect or re-trigger running timer cycles!</li>
|
||
<li>main purpose: for debugging and testing</li>
|
||
</ul>
|
||
</ul>
|
||
<br/><br/>
|
||
<code>set <name> <stationById stationId>|<stationByName stationName>|<stationByGeo> [lat lon]></code>
|
||
<br/><br/>
|
||
<ul>see description above: <a href="#owoconfiguration2">Configuration task 2</a></ul>
|
||
<br/><br/>
|
||
</ul>
|
||
<br/><br/>
|
||
<a name="openweathermapget"></a>
|
||
<b>Get-Commands</b><br/>
|
||
<ul>
|
||
<br/>
|
||
<code>get <name> <stationById stationId>|<stationByName stationName>|<stationByGeo> [lat lon]></code>
|
||
<br/><br/>
|
||
<ul>see description above: <a href="#owoconfiguration3">Configuration task 3</a></ul>
|
||
<br/>
|
||
Used exactly as the "set" command, but with two differences:<br/><br/>
|
||
<ul>
|
||
<li>all generated readings use prefix "g_" instead of "c_"</li>
|
||
<li>readings will not be updated automatically</li>
|
||
</ul>
|
||
</ul>
|
||
<br/><br/>
|
||
<a name="openweathermapattr"></a>
|
||
<b>Attributes</b><br/><br/>
|
||
<ul>
|
||
<li><a href="#do_not_notify">do_not_notify</a></li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<br/>
|
||
<li><b>owoApiKey</b></li>
|
||
<yourOpenweathermapApiKey> - find it in your owo account! If set, it will be used in all owo requests.<br/>
|
||
<li><b>owoDebug</b></li>
|
||
<0|1> this attribute <b>must be defined and set to 0</b> to start sending own weather data to owo network. Otherwise you can find all data as debug informations in logfile.<br/>
|
||
<li><b>owoGetUrl</b></li>
|
||
<owoApiUrl> - current URL to owo api. If this url changes, you can correct it here unless updated version of 98_openweather becomes available.<br/>
|
||
<li><b>owoInterval</b></li>
|
||
<intervalSeconds> - define the interval used for sending own weather data and for updating SET station. Default = 1800sec. If deleted, default will be used.<br/>
|
||
<b>Please do not set interval below 600 seconds! This regulation is defined by openweathermap.org.</b><br/>
|
||
Values below 600 will be corrected to 600.<br/>
|
||
<li><b>owoProxy</b></li>
|
||
<proxyAddress> - define a proxy server address, please give full url and port, e.g. http://192.168.111.222:8080<br/>
|
||
<li><b>owoStation</b></li>
|
||
<yourStationName> - define the station name to be used in "my stats" in owo account<br/>
|
||
<li><b>owoUser</b></li>
|
||
<user:password> - define your username and password for owo access here<br/>
|
||
<li><b>owoRaw</b></li>
|
||
<0|1> - defines wether JSON date from owo will be shown in an additional reading (e.g. to use it for own presentations)<br/>
|
||
<li><b>owoSendUrl</b></li>
|
||
Current URL to post your own data. If this url changes, you can correct it here unless updated version of 98_openweather becomes available.<br/>
|
||
<li><b>owoTimestamp</b></li>
|
||
<0|1> - defines whether date/time readings show timestamps or localtime-formatted informations<br/>
|
||
<li><b>owoSrc00 ... owoSrc19</b></li>
|
||
Each of this attributes contains information about weather data to be sent in format <code>owoParam:sensorName:readingName:offset</code><br/>
|
||
Example: <code>attr owo owoSrc00 temp:outside:temperature</code> will define an attribut owoSrc00, and <br/>
|
||
reading "temperature" from device "outside" will be sent to owo network als paramater "temp" (which indicates current temperature)<br/>
|
||
Parameter "offset" will be added to the read value (e.g. necessary to send dewpoint - use offset 273.15 to send correct value)
|
||
<li><b>owoUseXml</b></li>
|
||
<0|1> - defines wether data must be decoded from XML, e.g. JSON not available on Fritzbox<br/>
|
||
</ul>
|
||
<br/><br/>
|
||
<b>Generated Readings/Events:</b><br/><br/>
|
||
<ul>
|
||
<li><b>state</b> - current device state (defined|active)</li>
|
||
<li><b>c_<readingName></b> - weather data from SET weather station. Readings will be updated periodically</li>
|
||
<li><b>g_<readingName></b> - weather data from GET command. Readings will NOT be updated periodically</li>
|
||
<li><b>my_lastSent</b> - time of last upload to owo network</li>
|
||
<li><b>my_<readingName></b> - all readings from own weather station. These readings will be sent to owo network.</li>
|
||
</ul>
|
||
<br/><br/>
|
||
<b>Author's notes</b><br/><br/>
|
||
<ul>
|
||
<li>further informations about sending your own weather data to owo: <a href="http://openweathermap.org/stations">Link</a></li>
|
||
<li>further informations about owo location search: <a href="http://openweathermap.org/API">Link</a></li>
|
||
<li>further informations about owo weather data: <a href="http://bugs.openweathermap.org/projects/api/wiki/Weather_Data">Link</a></li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="panStamp"></a>
|
||
<h3>panStamp</h3>
|
||
<ul>
|
||
The panStamp is a family of RF devices sold by <a href="http://www.panstamp.com">panstamp.com</a>.
|
||
|
||
It is possible to attach more than one device in order to get better
|
||
reception, fhem will filter out duplicate messages.<br><br>
|
||
|
||
This module provides the IODevice for the <a href="#SWAP">SWAP</a> modules that implement the SWAP protocoll
|
||
to communicate with the individual moths in a panStamp network.<br><br>
|
||
|
||
Note: currently only panSticks are know to work. The panStamp shield for a Rasperry Pi is untested.
|
||
<br><br>
|
||
|
||
Note: this module may require the Device::SerialPort or Win32::SerialPort
|
||
module if you attach the device via USB and the OS sets strange default
|
||
parameters for serial devices.
|
||
|
||
<br><br>
|
||
|
||
<a name="panStamp_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> panStamp <device> [<address> [<channel> [<syncword>]]]</code> <br>
|
||
<br>
|
||
USB-connected devices:<br><ul>
|
||
<device> specifies the serial port to communicate with the panStamp.
|
||
The name of the serial-device depends on your distribution, under
|
||
linux the cdc_acm kernel module is responsible, and usually a
|
||
/dev/ttyACM0 device will be created. If your distribution does not have a
|
||
cdc_acm module, you can force usbserial to handle the panStamp by the
|
||
following command:<ul>modprobe usbserial vendor=0x0403
|
||
product=0x6001</ul>In this case the device is most probably
|
||
/dev/ttyUSB0.<br><br>
|
||
|
||
You can also specify a baudrate if the device name contains the @
|
||
character, e.g.: /dev/ttyACM0@38400<br><br>
|
||
|
||
If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
|
||
perl module Device::SerialPort is not needed, and fhem opens the device
|
||
with simple file io. This might work if the operating system uses sane
|
||
defaults for the serial parameters, e.g. some Linux distributions and
|
||
OSX. <br><br>
|
||
|
||
</ul>
|
||
<br>
|
||
The address is a 2 digit hex number to identify the moth in the panStamp network. The default is 01.<br>
|
||
The channel is a 2 digit hex number to define the channel. the default is 00.<br>
|
||
The syncword is a 4 digit hex number to identify the panStamp network. The default is B547.<br><br>
|
||
|
||
Uppon initialization a broadcast message is send to the panStamp network to try to
|
||
autodetect and autocreate all listening SWAP devices (i.e. all devices not in power down mode).
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="panStamp_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>raw data<br>
|
||
send raw data to the panStamp to be transmitted over the RF link.
|
||
</li><br>
|
||
</ul>
|
||
|
||
<a name="panStamp_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
</ul>
|
||
|
||
<a name="panStamp_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="pilight"></a>
|
||
<h3>pilight</h3>
|
||
<ul>
|
||
<a name="pilight_define"></a>
|
||
<h4>Define</h4>
|
||
<ul>
|
||
<code>define <name> pilight <protocol></code>
|
||
<br/>
|
||
<br/>
|
||
Defines a module for setting pilight compartible switches on or off. See <a href="http://www.sweetpi.de/blog/258/funksteckdosen-mit-dem-raspberry-pi-und-pilight-schalten">Sweetpi</a>.<br><br>
|
||
Supported protocols: kaku_switch, elso. If you need more, just contact me!<br/><br/>
|
||
Example:
|
||
<ul>
|
||
<code>define Weihnachtsbaum pilight kaku_switch</code><br>
|
||
<code>attr Weihnachtsbaum housecode 12323578</code><br>
|
||
<code>attr Weihnachtsbaum unitcode 0</code><br>
|
||
</ul>
|
||
<br/>
|
||
If your pilight server does not run on localhost, please set both the attributes <b>remote_ip</b> and <b>remote_port</b>.
|
||
<br/>
|
||
</ul>
|
||
|
||
<a name="pilight_Attr"></a>
|
||
<h4>Attributes</h4>
|
||
<ul>
|
||
<li><a name="protocol"><code>attr <name> protocol <string></code></a>
|
||
<br />Protocol used in pilight, e.g. "kaku_switch"</li>
|
||
<li><a name="user"><code>attr <name> housecode <string></code></a>
|
||
<br />Housecode used in pilight (for protocol kaku*)</li>
|
||
<li><a name="user"><code>attr <name> unitcode <string></code></a>
|
||
<br />Unit code/device code used in pilight (for protocol kaku* or elso)</li>
|
||
<li><a name="systemcode"><code>attr <name> systemcode <string></code></a>
|
||
<br />Systemcode of your switch (for protocol elso)</li>
|
||
<li><a name="numer"><code>attr <name> remote_ip <string></code></a>
|
||
<br />Remote IP of you pilight server (127.0.0.1 is default)</li>
|
||
<li><a name="numer"><code>attr <name> remote_port <string></code></a>
|
||
<br />Remote port of you pilight server (5000 is default)</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="rain"></a>
|
||
<h3>rain</h3>
|
||
<ul>
|
||
Rain calculations. Offers different values from a rain sensor. <br>
|
||
|
||
<a name="raindefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> rain <devicename-regex> [<rain_name> <israining_name> <new_name>]</code><br>
|
||
<br>
|
||
<ul>
|
||
Calculates rain values for device <devicename-regex> from incremental rain-value and israining-state
|
||
and write it to some new readings named rain_calc_???????.
|
||
If optional <rain_name>, <israining_name> and <new_name> is specified
|
||
then read rain from reading <rain_name>, israining from reading <israining_name>
|
||
and write the calculated rain to reading <new_name>.
|
||
</ul>
|
||
|
||
The following values are generated:
|
||
<ul>
|
||
<li>rain_calc_all --> all values in one line</li>
|
||
<li>rain_calc_d_curr --> liter rain at the current day (from 7:30 local time)</li>
|
||
<li>rain_calc_d_last --> liter rain of 24h before 7:30 local time</li>
|
||
<li>rain_calc_d_start --> first incremental rain value from the rain device after 7:30 local time</li>
|
||
<li>rain_calc_h_curr --> liter rain at the current hour (from XX:30)</li>
|
||
<li>rain_calc_h_last --> liter rain of 1 hour before the last XX:30 time</li>
|
||
<li>rain_calc_h_start --> first incremental rain value from the rain device after last XX:30</li>
|
||
<li>rain_calc_now_diff --> fallen rain in liter since last value from rain device</li>
|
||
<li>rain_calc_now_rate --> fallen rain in liter/hour since last value from rain device</li>
|
||
|
||
</ul>
|
||
|
||
<br>
|
||
|
||
Example:<PRE>
|
||
# Compute the rain for the rain/israining
|
||
# events of the ks300 device and generate reading rain_calc.
|
||
define rain_ks300 rain ks300
|
||
|
||
</PRE>
|
||
</ul>
|
||
|
||
<a name="rainset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="rainget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="rainattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li>DontUseIsRaining 0/1
|
||
<br>
|
||
Don't use the devicevalue IsRaining, if set to 1
|
||
</li>
|
||
<li>DayChangeTime HHMM
|
||
<br>
|
||
Change the default (day)time of the 'set value to zero' time (use the timecode as four digits!)
|
||
<br>
|
||
The minutevalue is used to set the (hour)time of the 'set value to zero' time
|
||
</li>
|
||
|
||
<li>CorrectionValue 1
|
||
<br>
|
||
Use this value if you wish to do a correction of the rain-device-values. It is used as an factor. The value 1 will not change anything.
|
||
</li>
|
||
<br>
|
||
</ul>
|
||
</ul>
|
||
|
||
|
||
<a name="readingsGroup"></a>
|
||
<h3>readingsGroup</h3>
|
||
<ul>
|
||
Displays a collection of readings from on or more devices.
|
||
|
||
<br><br>
|
||
<a name="readingsGroup_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> readingsGroup <device>[:regex] [<device-2>[:regex-2]] ... [<device-n>[:regex-n]]</code><br>
|
||
<br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li><device> can be of the form INTERNAL=VALUE where INTERNAL is the name of an internal value and VALUE is a regex.</li>
|
||
<li><device> can be of the form <STRING> or <{perl}> where STRING or the string returned by perl is
|
||
inserted as a line in the readings list. skipped if STRING is undef.</li>
|
||
<li>If regex is a comma separatet list the reading values will be shown on a single line.</li>
|
||
<li>If regex starts with a '+' it will be matched against the internal values of the device instead of the readings.</li>
|
||
<li>If regex starts with a '?' it will be matched against the attributes of the device instead of the readings.</li>
|
||
<li>regex can be of the form <STRING> or <{perl}[@readings]> where STRING or the string returned by perl is
|
||
inserted as a reading or:
|
||
<ul><li>the item will be skipped if STRING is undef</li>
|
||
<li>if STRING is br a new line will be started</li>
|
||
<li>if STRING is of the form %ICON[%CMD] ICON will be used as the name of an icon instead of a text and CMD
|
||
as the command to be executed if the icon is clicked. also see the commands attribute.</li></ul>
|
||
if readings is given the perl expression will be reevaluated during longpoll updates.</li>
|
||
<li>For internal values and attributes longpoll update is not possible. Refresh the page to update the values.</li>
|
||
<li>the <{perl}> expression is limited to expressions without a space. it is best just to call a small sub
|
||
in 99_myUtils.pm instead of having a compex expression in the define.</li>
|
||
</ul><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>
|
||
define batteries readingsGroup .*:battery</code><br>
|
||
<br>
|
||
<code>define temperatures readingsGroup s300th.*:temperature</code><br>
|
||
<code>define temperatures readingsGroup TYPE=CUL_WS:temperature</code><br>
|
||
<br>
|
||
<code>define culRSSI readingsGroup cul_RSSI=.*:+cul_RSSI</code><br>
|
||
<br>
|
||
<code>define heizung readingsGroup t1:temperature t2:temperature t3:temperature<br>
|
||
attr heizung notime 1<br>
|
||
attr heizung mapping {'t1.temperature' => 'Vorlauf', 't2.temperature' => 'R&uuml;cklauf', 't3.temperature' => 'Zirkulation'}</br>
|
||
attr heizung style style="font-size:20px"<br>
|
||
<br>
|
||
define systemStatus readingsGroup sysstat<br>
|
||
attr systemStatus notime 1<br>
|
||
attr systemStatus nostate 1<br>
|
||
attr systemStatus mapping {'load' => 'Systemauslastung', 'temperature' => 'Systemtemperatur in &deg;C'}<br>
|
||
<br>
|
||
define Verbrauch readingsGroup TYPE=PCA301:state,power,consumption<br>
|
||
attr Verbrauch mapping %ALIAS<br>
|
||
attr Verbrauch nameStyle style="font-weight:bold"<br>
|
||
attr Verbrauch style style="font-size:20px"<br>
|
||
attr Verbrauch valueFormat {power => "%.1f W", consumption => "%.2f kWh"}<br>
|
||
attr Verbrauch valueIcon { state => '%devStateIcon' }<br>
|
||
attr Verbrauch valueStyle {($READING eq "power" && $VALUE > 150)?'style="color:red"':'style="color:green"'}<br>
|
||
<br>
|
||
define rg_battery readingsGroup TYPE=LaCrosse:[Bb]attery<br>
|
||
attr rg_battery alias Batteriestatus<br>
|
||
attr rg_battery commands { "battery.low" => "set %DEVICE replaceBatteryForSec 60" }<br>
|
||
attr rg_battery valueIcon {'battery.ok' => 'batterie', 'battery.low' => 'batterie@red'}<br>
|
||
<br>
|
||
define rgMediaPlayer readingsGroup myMediaPlayer:currentTitle,<>,totaltime,<br>,currentAlbum,<>,currentArtist,<br>,volume,<{if(ReadingsVal($DEVICE,"playStatus","")eq"paused"){"%rc_PLAY%set+$DEVICE+play"}else{"%rc_PAUSE%set+$DEVICE+pause"}}@playStatus>,playStatus<br>
|
||
attr rgMediaPlayer commands { "playStatus.paused" => "set %DEVICE play", "playStatus.playing" => "set %DEVICE pause" }<br>
|
||
attr rgMediaPlayer mapping <br>
|
||
attr rgMediaPlayer notime 1<br>
|
||
attr rgMediaPlayer valueFormat { "volume" => "Volume: %i" }<br>
|
||
#attr rgMediaPlayer valueIcon { "playStatus.paused" => "rc_PLAY", "playStatus.playing" => "rc_PAUSE" }<br>
|
||
</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="readingsGroup_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
</ul><br>
|
||
|
||
<a name="readingsGroup_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
</ul><br>
|
||
|
||
<a name="readingsGroup_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>alwaysTrigger<br>
|
||
1 -> alwaysTrigger update events. even if not visible.</li>
|
||
<li>disable<br>
|
||
1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
|
||
2 -> also disable html table creation<br>
|
||
3 -> also disable html creation completely</li>
|
||
<li>sortDevices<br>
|
||
1 -> sort the device lines alphabetically. use the first of sortby or alias or name that is defined for each device.</li>
|
||
<li>noheading<br>
|
||
If set to 1 the readings table will have no heading.</li>
|
||
<li>nolinks<br>
|
||
Disables the html links from the heading and the reading names.</li>
|
||
<li>nostate<br>
|
||
If set to 1 the state reading is excluded.</li>
|
||
<li>notime<br>
|
||
If set to 1 the reading timestamp is not displayed.</li>
|
||
<li>mapping<br>
|
||
Can be a simple string or a perl expression enclosed in {} that returns a hash that maps reading names
|
||
to the displayed name. The keys can be either the name of the reading or <device>.<reading>.
|
||
%DEVICE, %ALIAS, %ROOM, %GROUP and %READING are replaced by the device name, device alias, room attribute,
|
||
group attribute and reading name respectively. You can also prefix these keywords with $ instead of %. Examples:<br>
|
||
<code>attr temperatures mapping $DEVICE-$READING</code><br>
|
||
<code>attr temperatures mapping {temperature => "%DEVICE Temperatur"}</code>
|
||
</li>
|
||
<li>separator<br>
|
||
The separator to use between the device alias and the reading name if no mapping is given. Defaults to ':'
|
||
a space can be enteread as <code>&nbsp;</code></li>
|
||
<li>style<br>
|
||
Specify an HTML style for the readings table, e.g.:<br>
|
||
<code>attr temperatures style style="font-size:20px"</code></li>
|
||
<li>nameStyle<br>
|
||
Specify an HTML style for the reading names, e.g.:<br>
|
||
<code>attr temperatures nameStyle style="font-weight:bold"</code></li>
|
||
<li>valueStyle<br>
|
||
Specify an HTML style for the reading values, e.g.:<br>
|
||
<code>attr temperatures valueStyle style="text-align:right"</code></li>
|
||
<li>valueColumns<br>
|
||
Specify an HTML colspan for the reading values, e.g.:<br>
|
||
<code>attr wzReceiverRG valueColumns { eventdescription => 'colspan="4"' }</code></li>
|
||
<li>valueFormat<br>
|
||
Specify an sprintf style format string used to display the reading values. If the format string is undef
|
||
this reading will be skipped. Can be given as a string, a perl expression returning a hash or a perl
|
||
expression returning a string, e.g.:<br>
|
||
<code>attr temperatures valueFormat %.1f °C</code></br>
|
||
<code>attr temperatures valueFormat { temperature => "%.1f °C", humidity => "%.1f %" }</code></br>
|
||
<code>attr temperatures valueFormat { ($READING eq 'temperature')?"%.1f °C":undef }</code></li>
|
||
<li>nameIcon<br>
|
||
Specify the icon to be used instead of the reading name. Can be a simple string or a perl expression enclosed
|
||
in {} that returns a hash that maps reading names to the icon name. e.g.:<br>
|
||
<code>attr devices nameIcon $DEVICE</code></li>
|
||
<li>valueIcon<br>
|
||
Specify an icon to be used instead of the reading value. Can be a simple string or a perl expression enclosed
|
||
in {} that returns a hash that maps reading value to the icon name. e.g.:<br>
|
||
<code>attr devices valueIcon $VALUE</code></br>
|
||
<code>attr devices valueIcon {state => '%VALUE'}</code></br>
|
||
<code>attr devices valueIcon {state => '%devStateIcon'}</code>
|
||
<code>attr rgMediaPlayer valueIcon { "playStatus.paused" => "rc_PLAY", "playStatus.playing" => "rc_PAUSE" }</code></li>
|
||
<li>commands<br>
|
||
Can be used in to different ways:
|
||
<ul>
|
||
<li>To make a reading or icon clickable by directly specifying the command that should be executed. eg.:<br>
|
||
<code>attr rgMediaPlayer commands { "playStatus.paused" => "set %DEVICE play", "playStatus.playing" => "set %DEVICE pause" }</code></li><br>
|
||
<li>Or if the mapped command is of the form <command>:[<modifier>] then the normal <a href="#FHEMWEB">FHEMWEB</a>
|
||
webCmd widget for <modifier> will be used for this command. if <modifier> is omitted then the FHEMWEB lookup mechanism for <command> will be used. eg:<br>
|
||
<code>attr rgMediaPlayer commands { volume => "volume:slider,0,1,100" }</code><br>
|
||
<code>attr lights commands { pct => "pct:", dim => "dim:" }</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul><br>
|
||
|
||
The nameStyle and valueStyle attributes can also contain a perl expression enclosed in {} that returns the style
|
||
string to use. The perl code can use $DEVICE,$READING and $VALUE, e.g.:<br>
|
||
<ul>
|
||
<code>attr batteries valueStyle {($VALUE ne "ok")?'style="color:red"':'style="color:green"'}</code><br>
|
||
<code>attr temperatures valueStyle {($DEVICE =~ m/aussen/)?'style="color:green"':'style="color:red"'}</code>
|
||
</ul>
|
||
Note: Only valueStyle, valueFomat, valueIcon and <{...}@reading> are evaluated during longpoll updates
|
||
and valueStyle has to return a non empty style for every possible value. All other perl expressions are
|
||
evaluated only once during html creation and will not reflect value updates with longpoll.
|
||
Refresh the page to update the dynamic style. For nameStyle the color attribut is not working at the moment,
|
||
the font-... and background attributes do work.
|
||
</ul>
|
||
|
||
<a name="readingsProxy"></a>
|
||
<h3>readingsProxy</h3>
|
||
<ul>
|
||
Makes (a subset of) a reading from one device available as a new device.<br>
|
||
This can be used to map channels from 1-Wire, EnOcean or SWAP devices to independend devices that
|
||
can have state,icons and webCmd different from the parent device and can be used in a floorplan.
|
||
<br><br>
|
||
<a name="readingsProxy_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> readingsProxy <device>:<reading></code><br>
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define myProxy readingsProxy myDS2406:latch.A</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="readingsProxy_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
</ul><br>
|
||
|
||
<a name="readingsProxy_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
</ul><br>
|
||
|
||
<a name="readingsProxy_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>disable<br>
|
||
1 -> disable notify processing. Notice: this also disables rename and delete handling.</li>
|
||
<li>getList<br>
|
||
Space separated list of commands, which will be returned upon "get name ?",
|
||
so the FHEMWEB frontend can construct a dropdown.
|
||
%PARENT% will result in the complete list of commands from the parent device.
|
||
get commands not in this list will be rejected.</li>
|
||
<li>setList<br>
|
||
Space separated list of commands, which will be returned upon "set name ?",
|
||
so the FHEMWEB frontend can construct a dropdown and offer on/off switches.
|
||
%PARENT% will result in the complete list of commands from the parent device.
|
||
set commands not in this list will be rejected.
|
||
Example: attr proxyName setList on off</li>
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
<li>getFn<br>
|
||
perl expresion that will return the get command forwarded to the parent device.
|
||
has access to $DEVICE, $READING, $CMD and $ARGS.<br>
|
||
undef -> do nothing<br>
|
||
"" -> pass-through<br>
|
||
(<value>,1) -> directly return <value>, don't call parent getFn<br>
|
||
everything else -> use this instead</li>
|
||
<li>setFn<br>
|
||
perl expresion that will return the set command forwarded to the parent device.
|
||
has access to $DEVICE, $READING, $CMD and $ARGS.<br>
|
||
undef -> do nothing<br>
|
||
"" -> pass-through<br>
|
||
everything else -> use this instead<br>
|
||
Examples:<br>
|
||
<code>attr myProxy setFn {($CMD eq "on")?"off":"on"}</code>
|
||
</li>
|
||
<li>valueFn<br>
|
||
perl expresion that will return the value that sould be used as state.
|
||
has access to $DEVICE, $READING, $CMD and $VALUE.<br>
|
||
undef -> do nothing<br>
|
||
"" -> pass-through<br>
|
||
everything else -> use this instead<br>
|
||
Examples:<br>
|
||
<code>attr myProxy valueFn {($VALUE == 0)?"off":"on"}</code>
|
||
</li>
|
||
</ul><br>
|
||
</ul>
|
||
|
||
<a name="remotecontrol"></a>
|
||
<h3>remotecontrol</h3>
|
||
<ul>
|
||
Displays a graphical remote control. Buttons (=icons) can be chosen and arranged. Predefined layouts are available for e.g. Samsung-TV or iTunes.
|
||
Any buttonclick can be forwarded to the actual fhem-device. For further explanation, please check the <a href="http://www.fhemwiki.de/wiki/Remotecontrol">Wiki-Entry</<>.<br>
|
||
|
||
<a name="remotecontroldefine"></a><br>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <rc-name> remotecontrol</code><br><br>
|
||
Typical steps to implement a remotecontrol:<br>
|
||
<table>
|
||
<tr><td><code>define rc1 remotecontrol</code></td><td><code># defines a "blank" remotecontrol</code></td></tr>
|
||
<tr><td><code>get rc1 layout</code></td><td><code># displays all available predefined layouts</code></td></tr>
|
||
<tr><td><code>set rc1 layout samsung</code></td><td><code># assigns keys for a SamsungTV</code></td></tr>
|
||
<tr><td><code>set rc1 makenotify myTV</code></td><td><code># creates notify_rc1 which forwards every buttonclick to myTV for execution</code></td></tr>
|
||
<tr><td colspan="2"><b>Note:</b> keys can be changed at any time, it is not necessary to redefine the weblink</td></tr>
|
||
<tr><td><code>attr rc1 row15 VOLUP,VOLDOWN</code></td></tr>
|
||
</table>
|
||
</ul>
|
||
|
||
<a name="remotecontrolset"></a><br>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li><code>set <rc-name> layout [delete|<layoutname>]</code><br>
|
||
<code>layout delete</code> deletes all rowXX-attributes<br>
|
||
<code>layout <layoutname></code> assigns a predefined layout to rowXX-attributes</li>
|
||
<li><code>set <rc-name> makeweblink [<name>]</code><br>
|
||
creates a weblink to display the graphical remotecontrol. Default-name is weblink_<rc-name> .</li>
|
||
<li><code>set <rc-name> makenotify <executingDevice></code><br>
|
||
creates a notify to trigger <executingDevice> every time a button has been pressed. name is notify_<rc-name> .</li>
|
||
</ul>
|
||
|
||
<a name="remotecontrolget"></a><br>
|
||
<b>Get</b>
|
||
<ul>
|
||
<code>get <rc-name> [htmlcode|layout]</code><br>
|
||
<li><code>htmlcode</code> displays htmlcode for the remotecontrol on fhem-page</li>
|
||
<li><code>layout</code> shows which predefined layouts ae available</li>
|
||
</ul>
|
||
|
||
<a name="remotecontrolattr"></a><br>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li><a name="rc_iconpath">rc_iconpath</a><br>
|
||
path for icons, default is "icons" . The attribute-value will be used for all icon-files except .svg .</li>
|
||
<li><a name="rc_iconprefix">rc_iconprefix</a><br>
|
||
prefix for icon-files, default is "" . The attribute-value will be used for all icon-files except .svg .</li>
|
||
<li>Note: Icon-names (button-image-file-names) will be composed as <code>fhem/<rc_iconpath>/<rc_iconprefix><command|image></code><br>
|
||
For .svg -icons, the access sequence is according to the FHEMWEB-attribute iconPath, default is openautomation:fhemSVG:default .</li>
|
||
<li><a name="rc_devStateIcon">rc_devStateIcon</a><br>
|
||
In FHEMWEB-room-overview, displays the button-layout on the rc-device itself. Default is 1, set to 0 is the remotecontrol-device should not display its buttons in FHEMWEB roomview.</li>
|
||
<br>
|
||
<li><a href="#rowXX">rowXX</a><br>
|
||
<code>attr <rc-name> rowXX <command>[:<image>][,<command>[:<image>]][,...]</code><br>
|
||
Comma-separated list of buttons/images per row. Any number of buttons can be placed in one row. For each button, use</li>
|
||
<ul>
|
||
<li><code><command></code> is the command that will trigger the event after a buttonclick. Case sensitive.</li>
|
||
<li><code><image></code> is the filename of the image</li><br>
|
||
<li>Per button for the remotecontrol, use</li>
|
||
<li><code><command></code> where an icon with the name <rc_iconprefix><command> is displayed<br>
|
||
Example:<br>
|
||
<code>attr rc1 rc_iconprefix black_btn_ # used for ALL icons on remotecontrol rc1</code><br>
|
||
<code>attr rc1 row00 VOLUP </code><br>
|
||
icon is <code>black_btn_VOLUP</code>, a buttonclick creates the event <code>VOLUP</code>
|
||
</li>
|
||
or
|
||
<li><code><command>:<image></code> where an icon with the name <code><rc_iconprefix><image></code> is displayed<br>
|
||
Example: <br>
|
||
<code>row00=LOUDER:VOLUP</code><br>
|
||
icon is <code>black_btn_VOLUP</code>, a buttonclick creates the event <code>LOUDER</code>
|
||
<br>
|
||
Examples:<br>
|
||
<code>attr rc1 row00 1,2,3,TV,HDMI</code><br>
|
||
<code>attr rc2 row00 play:PLAY,pause:PAUSE,louder:VOLUP,quieter:VOLDOWN</code><br>
|
||
</li>
|
||
<li><b>Hint:</b> use :blank for a blank space, use e.g. :blank,:blank,:blank for a blank row</li>
|
||
</ul>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="sequence"></a>
|
||
<h3>sequence</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="sequencedefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> sequence <re1> <timeout1> <re2> [<timeout2> <re3> ...]</code>
|
||
<br><br>
|
||
|
||
A sequence is used to allow to trigger events for a certain combination of
|
||
button presses on a remote. E.g. to switch on a lamp when pressing the
|
||
Btn1:on, then Btn2:off and at last Btn1:on one after the other you could
|
||
define the following:<br>
|
||
<br>
|
||
<ul>
|
||
<code>
|
||
define lampseq sequence Btn1:on 0.5 Btn2:off 0.5 Btn1:on<br>
|
||
define lampon notify lampseq:trigger set lamp on
|
||
</code>
|
||
</ul>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="sequenceset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="sequenceget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="sequenceattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="speedtest"></a>
|
||
<h3>speedtest</h3>
|
||
<ul>
|
||
Provides internet speed data via <a href="https://github.com/sivel/speedtest-cli">speedtest-cli</a>.<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>speedtest-cli hast to be installed on the FHEM host.</li>
|
||
</ul>
|
||
|
||
<a name="speedtest_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> speedtest [<interval> [<server>]]</code><br>
|
||
<br>
|
||
|
||
Defines a speedtest device.<br><br>
|
||
|
||
The data is updated every <interval> seconds. The default is 3600 and the minimum is 1800.<br><br>
|
||
|
||
<server> gives the speedtest sever id. the list of all servers is available with <PRE>speedtest-cli --list</PRE>.
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define speedtest speedtest</code><br>
|
||
<code>define speedtest speedtest 3600 2760</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="speedtest_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>ping</li>
|
||
<li>download</li>
|
||
<li>upload</li>
|
||
</ul><br>
|
||
|
||
<a name="speedtest_Set"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
<li>statusRequest<br>
|
||
manualy start a test. this works even if the device is set to disable.</li>
|
||
</ul>
|
||
|
||
<a name="speedtest_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>path<br>
|
||
The path to the speedtest binary.</li>
|
||
<li>checks-till-disable<br>
|
||
how often the speedtest should be run before it is automaticaly set to disabled. the value will be decreased by 1 for every run.</li>
|
||
<li>disable<br>
|
||
set to 1 to disable the test.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="structure"></a>
|
||
<h3>structure</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="structuredefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> structure <struct_type> <dev1> <dev2> ...</code>
|
||
<br><br>
|
||
The structure device is used to organize/structure devices in order to
|
||
set groups of them at once (e.g. switching everything off in a house).<br>
|
||
|
||
The list of attached devices can be modified through the addstruct /
|
||
delstruct commands. Each attached device will get the attribute
|
||
<struct_type>=<name><br> when it is added to the list, and the
|
||
attribute will be deleted if the device is deleted from the structure.
|
||
<br>
|
||
The structure devices can also be added to a structure, e.g. you can have
|
||
a building consisting of levels which consists of rooms of devices.
|
||
<br>
|
||
|
||
Example:<br>
|
||
<ul>
|
||
<li>define kitchen structure room lamp1 lamp2</li>
|
||
<li>addstruct kitchen TYPE=FS20</li>
|
||
<li>delstruct kitchen lamp1</li>
|
||
<li>define house structure building kitchen living</li>
|
||
<li>set house off</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<br>
|
||
<a name="structureset"></a>
|
||
<b>Set</b>
|
||
<ul>
|
||
Every set command is propagated to the attached devices. Exception: if an
|
||
attached device has an attribute structexclude, and the attribute value
|
||
matches (as a regexp) the name of the current structure.<br>
|
||
If the set is of the form <code>set <structure> [FILTER=<filter>] <type-specific></code>
|
||
then :FILTER=<filter> will be appended to the device name in the propagated set for
|
||
the attached devices like this: <code>set <devN>:FILTER=<filter> <type-specific></code>
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="structureget"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
get is not supported through a structure device.
|
||
</ul>
|
||
<br>
|
||
|
||
<a name="structureattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="clientstate_behavior"></a>
|
||
<li>clientstate_behavior<br>
|
||
The backward propagated status change from the devices to this structure
|
||
works in two different ways.
|
||
<ul>
|
||
<li>absolute<br>
|
||
The structure status will changed to the common device status of all
|
||
defined devices to this structure if all devices are identical.
|
||
Otherwise the structure status is "undefined".
|
||
</li>
|
||
<li>relative<br>
|
||
See below for clientstate_priority.
|
||
</li>
|
||
<li>relativeKnown<br>
|
||
Like relative, but do not trigger on events not described in
|
||
clientstate_priority. Needed e.g. for HomeMatic devices.
|
||
</li>
|
||
<li>last<br>
|
||
The structure state corresponds to the state of the device last changed.
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
|
||
<a name="clientstate_priority"></a>
|
||
<li>clientstate_priority<br>
|
||
If clientstate_behavior is set to relative, then you have to set the
|
||
attribute "clientstate_priority" with all states of the defined devices
|
||
to this structure in descending order. Each group is delemited by
|
||
space or /. Each entry of one group is delimited by "pipe". The status
|
||
represented by the structure is the first entry of each group.
|
||
Example:<br>
|
||
<ul>
|
||
<li>attr kitchen clientstate_behavior relative</li>
|
||
<li>attr kitchen clientstate_priority An|On|on Aus|Off|off</li>
|
||
<li>attr house clientstate_priority Any_On|An All_Off|Aus</li>
|
||
</ul>
|
||
In this example the status of kitchen is either on or off. The status
|
||
of house is either Any_on or All_off.
|
||
</li>
|
||
<li><struct_type>_map<br>
|
||
With this attribute, which has to specified for the structure-
|
||
<b>member</b>, you can redefine the value reported by a specific
|
||
structure-member for the structure value. The attribute has three
|
||
variants:
|
||
<ul>
|
||
<li>readingName<br>
|
||
take the value from readingName instead of state.
|
||
</li>
|
||
<li>oldVal:newVal<br>
|
||
if the state reading matches oldVal, then replace it with newVal
|
||
</li>
|
||
<li>readingName:oldVal:newVal<br>
|
||
if readingName matches oldVal, then replace it with newVal
|
||
</li>
|
||
</ul>
|
||
Example:
|
||
<ul>
|
||
<li>define door OWSWITCH <ROMID></li>
|
||
<li>define lamp1 dummy</li>
|
||
<li>attr lamp1 cmdlist on off</li>
|
||
<li>define kitchen structure struct_kitchen lamp1 door</li>
|
||
<li>attr kitchen clientstate_priority An|on OK|Aus|off</li>
|
||
<li>attr lamp1 struct_kitchen_map on:An off:Aus</li>
|
||
<li>attr door struct_kitchen_map A:open:on A:closed:off</li>
|
||
<li>attr door2 struct_kitchen_map A</li>
|
||
</ul>
|
||
</li>
|
||
|
||
<a name="structexclude"></a>
|
||
<li>structexclude<br>
|
||
exclude the device from set/notify or attribute operations. For the set
|
||
and notify the value of structexclude must match the structure name,
|
||
for the attr/deleteattr commands ist must match the combination of
|
||
structure_name:attribute_name. Examples:<br>
|
||
<ul>
|
||
<code>
|
||
define kitchen structure room lamp1 lamp2<br>
|
||
attr lamp1 structexclude kitchen<br>
|
||
attr lamp1 structexclude kitchen:stateFormat<br>
|
||
</code>
|
||
</ul>
|
||
</li>
|
||
|
||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="telnet"></a>
|
||
<h3>telnet</h3>
|
||
<ul>
|
||
<br>
|
||
<a name="telnetdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> telnet <portNumber> [global]</code><br>
|
||
or<br>
|
||
<code>define <name> telnet <servername>:<portNumber></code>
|
||
<br><br>
|
||
|
||
First form, <b>server</b> mode:<br>
|
||
Listen on the TCP/IP port <code><portNumber></code> for incoming
|
||
connections. If the second parameter global is <b>not</b> specified,
|
||
the server will only listen to localhost connections.
|
||
<br>
|
||
To use IPV6, specify the portNumber as IPV6:<number>, in this
|
||
case the perl module IO::Socket:INET6 will be requested.
|
||
On Linux you may have to install it with cpan -i IO::Socket::INET6 or
|
||
apt-get libio-socket-inet6-perl; OSX and the FritzBox-7390 perl already has
|
||
this module.<br>
|
||
Examples:
|
||
<ul>
|
||
<code>define tPort telnet 7072 global</code><br>
|
||
<code>attr tPort globalpassword mySecret</code><br>
|
||
<code>attr tPort SSL</code><br>
|
||
</ul>
|
||
Note: The old global attribute port is automatically converted to a
|
||
telnet instance with the name telnetPort. The global allowfrom attibute is
|
||
lost in this conversion.
|
||
|
||
<br><br>
|
||
Second form, <b>client</b> mode:<br>
|
||
Connect to the specified server port, and execute commands received from
|
||
there just like in server mode. This can be used to connect to a fhem
|
||
instance sitting behind a firewall, when installing exceptions in the
|
||
firewall is not desired or possible. Note: this client mode supprts SSL,
|
||
but not IPV6.<br>
|
||
Example:
|
||
<ul>
|
||
Start tcptee first on publicly reachable host outside the firewall.<ul>
|
||
perl contrib/tcptee.pl --bidi 3000</ul>
|
||
Configure fhem inside the firewall:<ul>
|
||
define tClient telnet <tcptee_host>:3000</ul>
|
||
Connect to the fhem from outside of the firewall:<ul>
|
||
telnet <tcptee_host> 3000</ul>
|
||
</ul>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<a name="telnetset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="telnetget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="telnetattr"></a>
|
||
<b>Attributes:</b>
|
||
<ul>
|
||
<a name="password"></a>
|
||
<li>password<br>
|
||
Specify a password, which has to be entered as the very first string
|
||
after the connection is established. If the argument is enclosed in {},
|
||
then it will be evaluated, and the $password variable will be set to
|
||
the password entered. If the return value is true, then the password
|
||
will be accepted. If thies parameter is specified, fhem sends telnet
|
||
IAC requests to supress echo while entering the password.
|
||
Also all returned lines are terminated with \r\n.
|
||
Example:<br>
|
||
<ul>
|
||
<code>
|
||
attr tPort password secret<br>
|
||
attr tPort password {"$password" eq "secret"}
|
||
</code>
|
||
</ul>
|
||
Note: if this attribute is set, you have to specify a password as the
|
||
first argument when using fhem.pl in client mode:
|
||
<ul>
|
||
perl fhem.pl localhost:7072 secret "set lamp on"
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="globalpassword"></a>
|
||
<li>globalpassword<br>
|
||
Just like the attribute password, but a password will only required for
|
||
non-local connections.
|
||
</li><br>
|
||
|
||
<a name="SSL"></a>
|
||
<li>SSL<br>
|
||
Enable SSL encryption of the connection, see the description <a
|
||
href="#HTTPS">here</a> on generating the needed SSL certificates. To
|
||
connect to such a port use one of the following commands:
|
||
<ul>
|
||
socat openssl:fhemhost:fhemport,verify=0 readline<br>
|
||
ncat --ssl fhemhost fhemport<br>
|
||
openssl s_client -connect fhemhost:fhemport<br>
|
||
</ul>
|
||
</li><br>
|
||
|
||
<a name="allowfrom"></a>
|
||
<li>allowfrom<br>
|
||
Regexp of allowed ip-addresses or hostnames. If set,
|
||
only connections from these addresses are allowed.
|
||
</li><br>
|
||
|
||
<a name="connectTimeout"></a>
|
||
<li>connectTimeout<br>
|
||
Wait at maximum this many seconds for the connection to be established.
|
||
Default is 2.
|
||
</li><br>
|
||
|
||
<a name="connectInterval"></a>
|
||
<li>connectInterval<br>
|
||
After closing a connection, or if a connection cannot be estblished,
|
||
try to connect again after this many seconds. Default is 60.
|
||
</li><br>
|
||
|
||
<a name="encoding"></a>
|
||
<li>encoding<br>
|
||
Sets the encoding for the data send to the client. Possible values are latin1 and utf8. Default is utf8.
|
||
</li><br>
|
||
|
||
|
||
</ul>
|
||
|
||
</ul>
|
||
|
||
<a name="update"></a>
|
||
<h3>update</h3>
|
||
<ul>
|
||
<strong>FHEM update / check for updates:</strong>
|
||
<br>
|
||
<code>update [development|stable] [<file|package>] [force]</code><br>
|
||
<code>update [development|stable] check</code><br>
|
||
<code>update housekeeping</code><br><br>
|
||
<strong>Third party package update / check for a package update:</strong>
|
||
<br>
|
||
<code>update thirdparty <url> <package> [force]</code><br>
|
||
<code>update thirdparty <url> <package> check</code><br>
|
||
<br>
|
||
The installed fhem distribution and its installed extensions (just like the
|
||
webGUI PGM2) are updated via this command from the online repository. The
|
||
locally installed files will be checked against the online repository and
|
||
will be updated in case the files online are in a newer version.
|
||
<br>
|
||
<br>
|
||
The update function will process more advanced distribution information
|
||
as well as control commands for updating, removing or renaming existing files.
|
||
New file structures can also be set up via control command files.
|
||
The update process will exclusively work with the file path which is
|
||
given by the global attribute "modpath" except for the fhem.pl file. The user
|
||
decides whether to use a stable, or a developer-rated version of fhem.
|
||
<strong>stable is not yet implemented</strong>, so an update use always the developer-rated version.
|
||
<br>
|
||
<br>
|
||
Furthermore, the use of packages is supported just like in a manual installation
|
||
of fhem. On the moment this only refers to FHEM including PGM2 (FHEMWEB), others
|
||
may follow up. By using the update in this way, only files which are acutally
|
||
used will be updated.
|
||
<br>
|
||
<br>
|
||
The update function supports the installation of third-party packages like
|
||
modules or GUIs that are not part of the FHEM distribution.
|
||
<br>
|
||
<br>
|
||
<i>Notice for Developers of third-party packages:</i>
|
||
<br>
|
||
<i>Further information can be obtained from the file 'docs/LIESMICH.update-thirdparty'.</i>
|
||
<br>
|
||
<br>
|
||
Examples:
|
||
<blockquote>Check for new updates:<code><pre>
|
||
fhem> update check
|
||
</pre></code></blockquote>
|
||
|
||
<blockquote>FHEM update:<code><pre>
|
||
fhem> update
|
||
</pre></code></blockquote>
|
||
|
||
<blockquote>Force FHEM update (all files are updated!):<code><pre>
|
||
fhem> update force
|
||
</pre></code></blockquote>
|
||
|
||
<blockquote>Update a single file:<code><pre>
|
||
fhem> update 98_foobar.pm
|
||
</pre></code></blockquote>
|
||
|
||
<blockquote>Search for a filename:<code><pre>
|
||
fhem> update backup
|
||
'backup' not found. Did you mean:
|
||
==> 98_backup.pm
|
||
nothing to do...
|
||
</pre></code></blockquote>
|
||
|
||
<blockquote>Update / install a third-party package:<code><pre>
|
||
fhem> update thirdparty http://domain.tld/path packagename
|
||
</pre></code></blockquote>
|
||
|
||
<blockquote>Check a third-party package for new updates:<code><pre>
|
||
fhem> update thirdparty http://domain.tld/path packagename check
|
||
</pre></code></blockquote>
|
||
|
||
<a name="updateattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#backup_before_update">backup_before_update</a></li><br>
|
||
|
||
<li><a href="#exclude_from_update">exclude_from_update</a></li><br>
|
||
|
||
<li><a href="#updatebranch">updatebranch</a></li><br>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="watchdog"></a>
|
||
<h3>watchdog</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="watchdogdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> watchdog <regexp1> <timespec> <regexp2> <command></code><br>
|
||
<br>
|
||
Start an arbitrary fhem.pl command if after <timespec> receiving an
|
||
event matching <regexp1> no event matching <regexp2> is
|
||
received.<br>
|
||
The syntax for <regexp1> and <regexp2> is the same as the
|
||
regexp for <a href="#notify">notify</a>.<br>
|
||
<timespec> is HH:MM[:SS]<br>
|
||
<command> is a usual fhem command like used int the <a
|
||
href="#at">at</a> or <a href="#notify">notify</a>
|
||
<br><br>
|
||
|
||
Examples:
|
||
<code><ul>
|
||
# Request data from the FHT80 _once_ if we do not receive any message for<br>
|
||
# 15 Minutes.<br>
|
||
define w watchdog FHT80 00:15:00 SAME set FHT80 date<br>
|
||
|
||
# Request data from the FHT80 _each_ time we do not receive any message for<br>
|
||
# 15 Minutes, i.e. reactivate the watchdog after it triggered. Might be<br>
|
||
# dangerous, as it can trigger in a loop.<br>
|
||
define w watchdog FHT80 00:15:00 SAME set FHT80 date;; trigger w .<br>
|
||
|
||
# Shout once if the HMS100-FIT is not alive<br>
|
||
define w watchdog HMS100-FIT 01:00:00 SAME "alarm-fit.sh"<br>
|
||
|
||
# Send mail if the window is left open<br>
|
||
define w watchdog contact1:open 00:15 contact1:closed "mail_me close window1"<br>
|
||
attr w regexp1WontReactivate<br>
|
||
</ul></code>
|
||
|
||
Notes:<br>
|
||
<ul>
|
||
<li>if <regexp1> is . (dot), then activate the watchdog at
|
||
definition time. Else it will be activated when the first matching
|
||
event is received.</li>
|
||
<li><regexp1> resets the timer of a running watchdog, to avoid it
|
||
use the regexp1WontReactivate attribute.</li>
|
||
<li>if <regexp2> is SAME, then it will be the same as the first
|
||
regexp, and it will be reactivated, when it is received.
|
||
</li>
|
||
<li>trigger <watchdogname> . will activate the trigger if its state
|
||
is defined, and set it into state defined if its state is
|
||
triggered. You always have to reactivate the watchdog with this
|
||
command once it has triggered (unless you restart fhem)</li>
|
||
<li>a generic watchdog (one watchdog responsible for more devices) is
|
||
currently not possible.</li>
|
||
</ul>
|
||
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="watchdogset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="watchdogget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="watchdogattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#disable">disable</a></li>
|
||
<li><a href="#disabledForIntervals">disabledForIntervals</a></li>
|
||
<li><a name="regexp1WontReactivate">regexp1WontReactivate</a><br>
|
||
When a watchdog is active, a second event matching regexp1 will
|
||
normally reset the timeout. Set this attribute to prevents this.
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="weblink"></a>
|
||
<h3>weblink</h3>
|
||
<ul>
|
||
<a name="weblinkdefine"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> weblink [link|image|iframe|htmlCode|cmdList]
|
||
<argument></code>
|
||
<br><br>
|
||
This is a placeholder device used with FHEMWEB to be able to add user
|
||
defined links.
|
||
Examples:
|
||
<ul>
|
||
<code>define homepage weblink link http://www.fhem.de</code><br>
|
||
<code>define webcam_picture weblink image http://w.x.y.z/current.jpg</code><br>
|
||
<code>define interactive_webcam weblink iframe http://w.x.y.z/webcam.cgi</code><br>
|
||
<code>define hr weblink htmlCode <hr></code><br>
|
||
<code>define w_Frlink weblink htmlCode { WeatherAsHtml("w_Frankfurt") }</code><br>
|
||
<code>define systemCommands weblink cmdList pair:Pair:set+cul2+hmPairForSec+60 restart:Restart:shutdown+restart update:UpdateCheck:update+check</code><br>
|
||
</ul>
|
||
<br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>For cmdList <argument> consist of a list of space separated icon:label:cmd triples.</li>
|
||
<li>The readings type is deprecated. Use <a href="#readingGroup">readingGroup</a> instead.</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="weblinkset"></a>
|
||
<b>Set</b> <ul>N/A</ul><br>
|
||
|
||
<a name="weblinkget"></a>
|
||
<b>Get</b> <ul>N/A</ul><br>
|
||
|
||
<a name="weblinkattr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<a name="htmlattr"></a>
|
||
<li>htmlattr<br>
|
||
HTML attributes to be used for link, image and iframe type of links.
|
||
E.g.:<br>
|
||
<ul>
|
||
<code>
|
||
define yw weblink wl_im1 iframe http://weather.yahooapis.com/forecastrss?w=650272&u=c<br>
|
||
attr yw weblink htmlattr width="480" height="560"<br>
|
||
</code>
|
||
</ul></li>
|
||
</ul>
|
||
<br>
|
||
|
||
</ul>
|
||
|
||
<a name="withings"></a>
|
||
<h3>withings</h3>
|
||
<ul>
|
||
xxx<br><br>
|
||
|
||
Notes:
|
||
<ul>
|
||
<li>JSON, LWP::Simple and Digest::MD5 have to be installed on the FHEM host.</li>
|
||
</ul><br>
|
||
|
||
<a name="withings_Define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> withings <device></code><br>
|
||
<code>define <name> withings <userid> <publickey></code><br>
|
||
<code>define <name> withings [ACCOUNT] <login> <password></code><br>
|
||
<br>
|
||
|
||
Defines a withings device.<br><br>
|
||
If a withings device of the account type is created all fhem devices for users and devices are automaticaly created.
|
||
<br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define withings withings abc@test.com myPassword</code><br>
|
||
<code>define withings withings 642123 2a42f132b9312311</code><br>
|
||
</ul>
|
||
</ul><br>
|
||
|
||
<a name="withings_Readings"></a>
|
||
<b>Readings</b>
|
||
<ul>
|
||
<li>weight</li>
|
||
<li>height</li>
|
||
<li>fatFreeMass</li>
|
||
<li>fatRatio</li>
|
||
<li>fatMass</li>
|
||
<li>diastolicBloodPressure</li>
|
||
<li>systolicBloodPressure</li>
|
||
<li>heartPulse</li>
|
||
<br>
|
||
<li>co2</li>
|
||
<li>battery</li>
|
||
<li>batteryLevel</li>
|
||
</ul><br>
|
||
|
||
<a name="withings_Get"></a>
|
||
<b>Get</b>
|
||
<ul>
|
||
<li>update<br>
|
||
trigger an update</li>
|
||
</ul><br>
|
||
|
||
<a name="withings_Attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li>interval<br>
|
||
the interval in seconds used to check for new values.</li>
|
||
<li>disable<br>
|
||
1 -> stop polling</li>
|
||
</ul>
|
||
</ul>
|
||
|
||
<a name="xxLG7000"></a>
|
||
<h3>xxLG7000</h3>
|
||
<ul>
|
||
<br>
|
||
|
||
<a name="xxLG7000define"></a>
|
||
<b>Define</b>
|
||
<ul>
|
||
<code>define <name> xxLG7000 <serial-device></code>
|
||
<br><br>
|
||
|
||
Defines a serial link to a TV set of LG's xxLG70yy (e. g. 47LG7000) series
|
||
and similar TV sets from <a href="http://www.lge.com/">LG</a>. As of January 2010, the following TV sets should
|
||
be compatible:<br><br>
|
||
<ul>
|
||
<li><code>xxLG7000</code>, e. g. 47LG7000 (tested)</li>
|
||
<li><code>xxPG7000</code>, e. g. 50PG7000 (same Manual as 47LG7000 ;))</li>
|
||
<li><code>PS3000/6000/7000/8000 series</code> (according to <a href="http://www.lge.com/uk/products/documents/LGSV09-LR.pdf">LG brochure</a>; no liabilities assumed)</li>
|
||
<li><code>PQ3000/6000 series</code> (see PS3000)</li>
|
||
<li><code>LU4000/5000 series</code> (<i>not LU7000</i>; see PS3000)</li>
|
||
<li><code>LH2000/3000/4000/5000 series</code> (see PS3000)</li>
|
||
<li><code>SL9500/9000/8000 series</code> (see PS3000)</li>
|
||
</ul><br>
|
||
These TV sets feature a serial connector which can officially be used to control
|
||
the TV set (see your Onwer's Manual, there's an Appendix labelled "External Control
|
||
Device setup", referening to cabling and command set). The xxLG7000 module is
|
||
the FHEM module to actually utilize this. (BTW, those TVs run Linux internally ;))<br><br>
|
||
To exercise control over your TV set, use the <a href="#LGTV">LGTV</a> module and
|
||
bind it ("attr <LGTV-name> IODev <xxLG7000-name>") to xxLG7000.<br><br>
|
||
|
||
Examples:
|
||
<ul>
|
||
<code>define myLG7k xxLG7000 /dev/ttyUSB1</code><br>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
<a name="xxLG7000set"></a>
|
||
<b>Set </b>
|
||
<ul> Not used, nothing to set directly. </ul>
|
||
|
||
<a name="xxLG7000get"></a>
|
||
<b>Get</b>
|
||
<ul> Not used, nothing to get directly. </ul>
|
||
|
||
<a name="xxLG7000attr"></a>
|
||
<b>Attributes</b>
|
||
<ul>
|
||
<li><a href="#loglevel">loglevel</a></li>
|
||
<li>SetID (1, 2, ...; see your TV's Owner's Manual how to set it. Defaults to 1 if unset.)</li>
|
||
</ul>
|
||
<br>
|
||
</ul>
|
||
|
||
|
||
<a name="perl"></a>
|
||
<h3>Perl specials</h3>
|
||
If you want to automate some tasks via fhem, then you'll probably use <a
|
||
href="#at">at</a> or <a href="#notify">notify</a>. For more complex tasks
|
||
you'll use either a shell-script or a perl "oneliner" as the at/notify
|
||
argument. This chapter gives some tips in using the perl oneliners.<br><br>
|
||
|
||
<li>To test perl oneliners, type them on the telnet prompt (or FHEMWEB text
|
||
input) by enclosing it in {}, one line at once. The last line will only
|
||
write something in the logfile, the output of the other lines is directly
|
||
visible.
|
||
<ul>
|
||
{ "Hello" }<br>
|
||
{ 1+3*4 }<br>
|
||
{ `ls /etc` }<br>
|
||
{ Log 1, "Hello" }<br>
|
||
</ul>
|
||
<br>
|
||
|
||
<li>
|
||
Perl expressions are separated by ;, in fhem oneliners they have to
|
||
escaped with ;;<br>
|
||
<ul>
|
||
{ my $a = 1+1;; Log 1, "Hello $a" }
|
||
</ul>
|
||
<br>
|
||
|
||
<li>To use fhem commands from the perl expression, use the function fhem(),
|
||
which takes a string argument, this string will be evaluated as a fhem
|
||
command:<br>
|
||
<ul>
|
||
{ fhem "set light on" }<br>
|
||
define n1 notify piri:on { fhem "set light on" }
|
||
</ul>
|
||
Note: if this function returns a value, it will also be logged into the
|
||
global fhem log. Use 1 as a second argument to disable this logging, this
|
||
makes sense when obtainig some values via fhem "get...".
|
||
<br>
|
||
<br>
|
||
|
||
<li>Notify can be used to store macros for manual execution. Use the <a
|
||
href="#trigger">trigger</a> command to execute the macro:<br>
|
||
<ul>
|
||
define MyMacro notify MyMacro { Log 1, "Hello"}<br>
|
||
trigger MyMacro<br>
|
||
define MacroWithArg notify MyMacro { Log 1, "Hello %"}<br>
|
||
trigger MyMacro MyArg<br>
|
||
</ul>
|
||
<br>
|
||
|
||
|
||
<li>To make date and time handling easier, the variables $sec, $min, $hour,
|
||
$mday, $month, $year, $wday, $yday, $isdst are available in the perl
|
||
oneliners (see also perldoc -f localtime). Exceptions: $month is in the
|
||
range of 1 to 12, and $year is corrected by 1900 (as I would expect).
|
||
Additionally the variable $hms contains the time in the HH:MM:SS format.
|
||
<br>
|
||
Additionally the variabe $we is 1 if it is weekend (i.e $wday == 0 or
|
||
$wday == 6), and 0 otherwise. If the <a href="#holiday2we">holida2we</a>
|
||
global attribute is set, $we is 1 for holidays too.<br>
|
||
<ul>
|
||
define n2 notify piri:on { if($hour > 18 || $hour < 5) {
|
||
fhem "set light on" } }<br>
|
||
define roll_en *07:45:00 { fhem "trigger SwitchAllRoll on" if(!$we) }<br>
|
||
define roll_en *08:30:00 { fhem "trigger SwitchAllRoll on" if($we) }<br>
|
||
|
||
</ul>
|
||
<br>
|
||
|
||
<li>
|
||
The following helper functions are defined in 99_Util.pm (which will
|
||
be loaded automatically, as every module with prefix 99):
|
||
<ul>
|
||
<li>min(a,b), max(a,b)</li>
|
||
<li>time_str2num("YYYY-MM-DD HH:MM:SS") returns a numerical value,
|
||
which makes computation of time differences easier</li>
|
||
<li>abstime2rel("HH:MM:SS") converts an absolute time to a relative one
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
|
||
<li>
|
||
To access the device states/attributes, use the following functions:
|
||
<br>
|
||
<ul>
|
||
<li>Value(<devicename>)<br>
|
||
returns the state of the device (the string you see in paranthesis in
|
||
the output of the list command).
|
||
</li><br>
|
||
<li>OldValue(<devicename>)
|
||
<li>OldTimestamp(<devicename>)<br>
|
||
returns the old value/timestamp of the device.
|
||
</li><br>
|
||
<li>
|
||
ReadingsVal(<devicename>,<reading>,<defaultvalue>)<br>
|
||
Return the reading (the value in the Readings section of "list device")
|
||
</li><br>
|
||
<li>
|
||
AttrVal(<devicename>,<attribute>,<defaultvalue>)<br>
|
||
Return the attribute of the device
|
||
<br><br>
|
||
{ Value("wz") }<br>
|
||
{ OldValue("wz") }<br>
|
||
{ time_str2num(OldTimestamp("wz")) }<br>
|
||
{ ReadingsVal("wz", "measured-temp", "20")+0 }<br>
|
||
{ ReadingsTimestamp("wz", "measured-temp", 0)}<br>
|
||
{ AttrVal("wz", "room", "none") }<br>
|
||
</li><br>
|
||
<li>
|
||
InternalVal(<devicename>,<property>,<defaultvalue>)
|
||
<br>
|
||
Return the internal value (the value in the Internals section of "list
|
||
device").
|
||
</li><br>
|
||
</ul>
|
||
|
||
|
||
<li>
|
||
By using the 99_SUNRISE_EL.pm module, you have access to the following
|
||
functions: <br>
|
||
<ul>
|
||
sunset($offset, $min, $max)<br>
|
||
sunrise($offset, $min, $max)<br>
|
||
isday()<br>
|
||
</ul>
|
||
offset is in seconds, and the format of min/max is "HH:MM" or "HH:MM:SS".
|
||
isday returns 1 if the sun is visible, and 0 else.
|
||
</li>
|
||
|
||
<br>
|
||
<br>
|
||
|
||
<a name="gnuplot-syntax"></a>
|
||
<h3>gnuplot file syntax</h3>
|
||
|
||
The .gplot files are also used by the <a href="#FHEMWEB">FHEMWEB</a>/SVG module
|
||
when the <a href="#plotmode">plotmode</a> attribute is set to SVG. In this case
|
||
only a subset of the .gnuplot attributes are used, and some lines have special
|
||
meanings: the difference will be explained in this chapter. See also <a
|
||
href="http://fhemwiki.de/wiki/Creating_Plots">this</a> fhemwiki entry on
|
||
creating logs.<br>
|
||
Following is a minimal .gplot definition (valid only for plotmode SVG):<br>
|
||
<pre>
|
||
set terminal size <SIZE>
|
||
#FileLog 4:::
|
||
plot title 'Temperature' with lines
|
||
</pre>
|
||
The .gnuplot file consists of 3 parts:
|
||
<ul>
|
||
<li>set commands<br>
|
||
Following sets are recognized:
|
||
<ul>
|
||
<li>terminal, only the size parameter.<br>
|
||
This is usually set to <SIZE>, which is replaced by the <a
|
||
href="#plotsize">plotsize</a> attribute of the FHEMWEB or weblink
|
||
instance.</li>
|
||
|
||
<li>title<br>
|
||
Usually set to <TL> which is replace by the weblink <a
|
||
href="#title">title</a> attribute, or to <Lx>, which is replaced
|
||
by the weblink <a href="#label">label</a> attribute.</li>
|
||
|
||
<li>ylabel,y2label<br>
|
||
Left and right labels, printed vertically. Are also subject to label
|
||
replacement.</li>
|
||
|
||
<li>yrange,y2range<br>
|
||
Specify the range of the left and right axis. Examples:<br>
|
||
<ul>
|
||
set yrange [-0.1:1.1]<br>
|
||
set y2range [0:]<br>
|
||
</ul>
|
||
</li>
|
||
<li>ytics,y2tics<br>
|
||
the label for the left/right axis tics. Examples:<br>
|
||
<ul>
|
||
set ytics ("on" 0, "off" 1)<br>
|
||
set y2tics<br>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<br>
|
||
|
||
<li>#FileLog entries<br>
|
||
Each line from the plot section must have one corresponding #FileLog
|
||
line. For the syntax see the column_spec paragraph of the <a
|
||
href="#FileLogget">Filelog get</a> description.
|
||
Note that for SVG plots the first column of the input file always has to
|
||
be in the standard fhem timestamp format (YYYY-MM-DD_HH:MM:SS)
|
||
</li>
|
||
<br>
|
||
|
||
<li>plot entries<br>
|
||
There is always one plot command with comma separated argument-blocks.
|
||
Each argument-block represents one line, and has its own parameters.
|
||
Following parameters are recognized:
|
||
<ul>
|
||
<li>axes x1y1 / x1y2<br>
|
||
tells the program to assign the current line to one of the two axes
|
||
(left or right).
|
||
</li>
|
||
<li>title<br>
|
||
Caption of the line. Whan clicking on this title, a small javascript
|
||
program will change the title to the min/max and last values of the plot,
|
||
will enable copying this line or pasting an already copied one (the
|
||
existing scale of the plot wont'be changed, only the pasted line will
|
||
be scaled), and other lines of the plot will temporarily be hidden.
|
||
</li>
|
||
<li>with <linetype><br>
|
||
Specify the line type. Following types are recognized: points,
|
||
steps, fsteps, histeps and lines. Everything unknown will be mapped to
|
||
the type lines.
|
||
</li>
|
||
<li>ls <linestyle><br>
|
||
The linestyle defaults to l0 for the first line, l1 for the second, and
|
||
so on. It is defined in the svg_style.css file. There are two sets
|
||
defined here: l0-l8 and l0fill-l6fill. The second set must be specified
|
||
explicitly. If the name of the linestyle contains the word fill, then
|
||
plots of the lineytype "lines" will have an additional starting and
|
||
ending segment, so that filling is done correctly.<br>
|
||
See the SVG spec for details of this CSS file.
|
||
Note: if you plan to use this attribute, you have to specify it for all
|
||
the lines (attribute-blocks) in the plot command.
|
||
</li>
|
||
<li>lw <linewidth><br>
|
||
Sets the stroke-width style of the line. This attribute is deprecated,
|
||
the corresponding feature of the CSS file / (attribute ls) should be
|
||
used instead.
|
||
|
||
</li>
|
||
</ul>
|
||
</ul>
|
||
</li>
|
||
|
||
</body>
|
||
</html>
|