add support for Signalbot in database
add commandref thanks to Beta-User
This commit is contained in:
parent
e4e366d817
commit
c2a84d3057
37
75_MSG.pm
37
75_MSG.pm
@ -2467,26 +2467,47 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i
|
|||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
=item command
|
=item command
|
||||||
=item summary dynamic routing of messages to FHEM devices and modules
|
=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
|
=item summary_DE dynamisches Routing für Nachrichten an FHEM Geräte und Module
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="MSG"></a>
|
<a id="MSG"></a>
|
||||||
<h3>msg</h3>
|
<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 [<type>] [<@device>|<e-mail address>] [<priority>] [|<title>|] <message></code>
|
<code>msg [<type>] [<@device>|<e-mail address>] [<priority>] [|<title>|] <message></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>
|
<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>
|
<br>
|
||||||
No documentation here yet, sorry.<br>
|
</ul>
|
||||||
<a href="http://forum.fhem.de/index.php/topic,39983.0.html">FHEM Forum</a>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
=end html
|
=end html
|
||||||
=begin html_DE
|
=begin html_old_DE
|
||||||
|
|
||||||
<a name="MSG"></a>
|
<a id="MSG"></a>
|
||||||
<h3>msg</h3>
|
<h3>msg</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<code>msg [<type>] [<@device>|<e-mail address>] [<priority>] [|<title>|] <message></code>
|
<code>msg [<type>] [<@device>|<e-mail address>] [<priority>] [|<title>|] <message></code>
|
||||||
@ -2497,7 +2518,7 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
=end html_DE
|
=end html_old_DE
|
||||||
|
|
||||||
=for :application/json;q=META.json 75_MSG.pm
|
=for :application/json;q=META.json 75_MSG.pm
|
||||||
{
|
{
|
||||||
|
28
msgSchema.pm
28
msgSchema.pm
@ -201,12 +201,6 @@ my $db = {
|
|||||||
'Low' => 'set %DEVICE% message %MSG%',
|
'Low' => 'set %DEVICE% message %MSG%',
|
||||||
},
|
},
|
||||||
|
|
||||||
'Matrix' => {
|
|
||||||
'Normal' => 'set %DEVICE% msg %MSG%',
|
|
||||||
'High' => 'set %DEVICE% msg %MSG%',
|
|
||||||
'Low' => 'set %DEVICE% msg %MSG%',
|
|
||||||
},
|
|
||||||
|
|
||||||
'Pushover' => {
|
'Pushover' => {
|
||||||
'Normal' =>
|
'Normal' =>
|
||||||
'set %DEVICE% %Pushover_MTYPE% title=\'%TITLE%\' device=\'%RECIPIENT%:%TERMINAL%\' priority=%PRIORITY% url_title="%URLTITLE%" message=\'%MSG%\'',
|
'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' => {
|
'yowsup' => {
|
||||||
'Normal' => 'set %DEVICE% send %RECIPIENT% %MSG%',
|
'Normal' => 'set %DEVICE% send %RECIPIENT% %MSG%',
|
||||||
'High' => 'set %DEVICE% send %RECIPIENT% %MSG%',
|
'High' => 'set %DEVICE% send %RECIPIENT% %MSG%',
|
||||||
@ -476,6 +490,8 @@ sub get {
|
|||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
=encoding utf8
|
=encoding utf8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user