From 7ece43d34a1be44ec9ba1365a743a16e3b9483d4 Mon Sep 17 00:00:00 2001 From: andi291 <> Date: Tue, 5 Jun 2018 19:20:06 +0000 Subject: [PATCH] 10_KNX.pm: Added workaround for STATE git-svn-id: https://svn.fhem.de/fhem/trunk@16822 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_KNX.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/10_KNX.pm b/fhem/FHEM/10_KNX.pm index af9548d74..d84223b44 100644 --- a/fhem/FHEM/10_KNX.pm +++ b/fhem/FHEM/10_KNX.pm @@ -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.&
Define
d
efine <name> KNX <group>:<DPT>:[gadName]:[set|get|readonly]:[nosuffix] [<group>:<DPT> ..] [IODev]
Important: a KNX device needs at least one concrete DPT. Please refer to available DPT. Otherwise the system cannot en- or decode the messages.
- Devices defined by autocreate have to be reworked with the suitable dpt. Otherwise they won't be able to work productively.
Examples:
define lamp1 KNX 0/10/11:dpt1:readonly+
arr lamp1 webCmd on:off+
attr lamp1 devStateIcon on::off off::on+
define lamp2 KNX 0/10/12:dpt1:steuern 0/10/13:dpt1.001:status
define lamp3 KNX 0A0D:dpt1.003 myTul
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). 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.