2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 22:26:04 +00:00

10_KNX.pm: Added workaround for STATE

git-svn-id: https://svn.fhem.de/fhem/trunk@16822 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
andi291 2018-06-05 19:20:06 +00:00
parent bce3298e0d
commit 7ece43d34a

View File

@ -20,11 +20,8 @@
# ABU 20180604 Set dpt17-offset to "0", added examples
# ABU 20180605 Added dpt18, tuned doku
# ABU 20180605 Corrected dpt18
#TODO Prio 1:
#
#TODO Prio 2:
#Thread nochmal nach Features durchsuchen
# ABU 20180605 Added example for autogenerated devices
# ABU 20180605 Added workaround for STATE
package main;
@ -1010,7 +1007,9 @@ KNX_State($$$$) {
$value =~ s/^\s+|\s+$//gi;
$reading =~ s/^\s+|\s+$//gi;
$reading = $reading if ($reading =~ m/state/i);
#$reading = $reading if ($reading =~ m/state/i);
#workaround for STATE in capitol letters (caused by unknown external function)
$reading = "state" if ($reading =~ m/state/i);
Log3 ($name, 5, "state $name: update $reading with value: $value");
@ -2043,9 +2042,13 @@ The reading <state> will be updated with the last sent or received value.&
<p><strong>Define</strong></p>
<p><code>d</code><code>efine &lt;name&gt; KNX &lt;group&gt;:&lt;DPT&gt;:[gadName]:[set|get|readonly]:[nosuffix] [&lt;group&gt;:&lt;DPT&gt; ..] [IODev]</code></p>
<p><strong>Important:&nbsp;a KNX device needs at least one&nbsp;concrete DPT. Please refer to <a href="#KNXdpt">available DPT</a>. Otherwise the system cannot en- or decode the messages.</strong><br />
<strong> Devices defined by autocreate have to be reworked with the suitable dpt. Otherwise they won't be able to work productively.</strong></p>
<strong>Devices defined by autocreate have to be reworked with the suitable dpt. Otherwise they won't be able to work productively.</strong></p>
<strong>Unless older versions the on-off command and the clickable bulb are not shown in the webfrontend out-of-the box. You have to add webCmd and devStateIcon. See examples...</strong></p>
<p>Examples:</p>
<pre style="padding-left: 30px;">define lamp1 KNX 0/10/11:dpt1:readonly</pre>
<pre style="padding-left: 30px;">arr lamp1 webCmd on:off</pre>
<pre style="padding-left: 30px;">attr lamp1 devStateIcon on::off off::on</pre>
<br>
<pre style="padding-left: 30px;">define lamp2 KNX 0/10/12:dpt1:steuern 0/10/13:dpt1.001:status</pre>
<pre style="padding-left: 30px;">define lamp3 KNX 0A0D:dpt1.003 myTul</pre>
<p>The &lt;group&gt; parameters are either a group name notation (0-15/0-15/0-255) or the hex representation of the value (0-f0-f0-ff). All of the defined groups can be used for bus-communication. It is not allowed to have the same group more then once in one device. You can have several devices containing the same adresses.<br />