git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1680 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -107,6 +107,9 @@
|
||||
<a href="#M232">M232</a>
|
||||
<a href="#M232Counter">M232Counter</a>
|
||||
<a href="#M232Voltage">M232Voltage</a>
|
||||
<a href="#MSG">MSG</a>
|
||||
<a href="#MSGFile">MSGFile</a>
|
||||
<a href="#MSGMail">MSGMail</a>
|
||||
<a href="#NetIO230B">NetIO230B</a>
|
||||
<a href="#OREGON">OREGON</a>
|
||||
<a href="#OWFS">OWFS</a>
|
||||
@@ -4426,6 +4429,223 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
|
||||
</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>
|
||||
<a name="MSGMailVattr"></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="LUXTRONIK2"></a>
|
||||
<h3>LUXTRONIK2</h3>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user