patch-CoolTux #1

Merged
marko merged 3 commits from patch-CoolTux into dev 2023-01-05 06:21:35 +00:00
2 changed files with 51 additions and 14 deletions
Showing only changes of commit c2a84d3057 - Show all commits

View File

@ -2467,26 +2467,47 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i
1;
__END__
=pod
=item command
=item summary dynamic routing of messages to FHEM devices and modules
=item summary_DE dynamisches Routing für Nachrichten an FHEM Geräte und Module
=begin html
<a name="MSG"></a>
<a id="MSG"></a>
<h3>msg</h3>
<ul>
<p>For documentation in german see <a href="http://forum.fhem.de/index.php/topic,39983.0.html">FHEM Forum</a> or <a href="https://wiki.fhem.de/wiki/Msg">FHEM Wiki</a></p>
Syntax is:<br>
<code>msg [&lt;type&gt;] [&lt;@device&gt;|&lt;e-mail address&gt;] [&lt;priority&gt;] [|&lt;title&gt;|] &lt;message&gt;</code>
<br><br>
Except for <i>message</i> all parameters are optional, for configuration of the entire messageing logics see also <a href="#msgConfig">msgConfig</a>.<br>
<br>
Basic idea behind the command (and msgConfig) is to establish a central logic for dispatching messages to be sent to the user, so e.g. in case an address of an recipient changes, you only have to change one single point in your entire configuration.<br>
Parameters are as follows:<br>
<ul>
<li>type<br>
Is optional and one of <i>text</i>, <i>audio</i>, <i>light</i> or <i>screen</i>. If ommitted, it defaults to <i>text</i>.<br>
You may provide more than one type by providing a comma-seperated list.
</li>
<li>@device or e-mail address<br>
For <i>@device</i> you may opt for any instance of a messenger service available in <i>mscConfig</i>, by default <a href="#Pushover">Pushover</a> will be used (if available). <br>
For emailing, per default <code>system()</code> command per <code>/usr/bin/mail</code> is issued.
You may provide more than one recipent by providing a comma-seperated list here (also mixed).
</li>
<li>priority<br>
Is also optional. You may any (nummeric) value understood by your addressed messaging device, good idea is to use values common in the Pushover API (-2 to 2).
</li>
<li>title<br>
Is also optional, but when given, it has to be enclosed in <i>pipe</i> characters.
</li>
<br>
No documentation here yet, sorry.<br>
<a href="http://forum.fhem.de/index.php/topic,39983.0.html">FHEM Forum</a>
</ul>
</ul>
=end html
=begin html_DE
=begin html_old_DE
<a name="MSG"></a>
<a id="MSG"></a>
<h3>msg</h3>
<ul>
<code>msg [&lt;type&gt;] [&lt;@device&gt;|&lt;e-mail address&gt;] [&lt;priority&gt;] [|&lt;title&gt;|] &lt;message&gt;</code>
@ -2497,7 +2518,7 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i
</ul>
=end html_DE
=end html_old_DE
=for :application/json;q=META.json 75_MSG.pm
{

View File

@ -201,12 +201,6 @@ my $db = {
'Low' => 'set %DEVICE% message %MSG%',
},
'Matrix' => {
'Normal' => 'set %DEVICE% msg %MSG%',
'High' => 'set %DEVICE% msg %MSG%',
'Low' => 'set %DEVICE% msg %MSG%',
},
'Pushover' => {
'Normal' =>
'set %DEVICE% %Pushover_MTYPE% title=\'%TITLE%\' device=\'%RECIPIENT%:%TERMINAL%\' priority=%PRIORITY% url_title="%URLTITLE%" message=\'%MSG%\'',
@ -312,6 +306,26 @@ my $db = {
},
},
'Signalbot' => {
'Normal' => 'set %DEVICE% %Signalbot_MTYPE% %RECIPIENT% %MSG%',
'High' => 'set %DEVICE% %Signalbot_MTYPE% %RECIPIENT% %MSG%',
'Low' => 'set %DEVICE% %Signalbot_MTYPE% %RECIPIENT% %MSG%',
'defaultValues' => {
'Normal' => {
'RECIPIENT' => '',
'Signalbot_MTYPE' => 'send',
},
'High' => {
'RECIPIENT' => '',
'Signalbot_MTYPE' => 'send',
},
'Low' => {
'RECIPIENT' => '',
'Signalbot_MTYPE' => 'send',
},
},
},
'yowsup' => {
'Normal' => 'set %DEVICE% send %RECIPIENT% %MSG%',
'High' => 'set %DEVICE% send %RECIPIENT% %MSG%',
@ -476,6 +490,8 @@ sub get {
1;
__END__
=pod
=encoding utf8