From ead3345b555bcf34b24fb6fd82fd43524b1112bd Mon Sep 17 00:00:00 2001
From: rudolfkoenig <>
Date: Wed, 4 Jan 2017 14:58:28 +0000
Subject: [PATCH] FHEM2FHEM.pm: generate readings for local devices (Forum
#62369) fhem.pl: create NOTIFYDEF only for "real" devices
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12954 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
FHEM/93_FHEM2FHEM.pm | 19 ++++++++++++++-----
fhem.pl | 12 ++++++++----
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/FHEM/93_FHEM2FHEM.pm b/FHEM/93_FHEM2FHEM.pm
index e9523c2c9..0ccb0f8f7 100755
--- a/FHEM/93_FHEM2FHEM.pm
+++ b/FHEM/93_FHEM2FHEM.pm
@@ -156,7 +156,6 @@ FHEM2FHEM_Read($)
Log3 $name, 4, "$name: $rmsg";
if(!$defs{$name}) {
- #LoadModule($type); Why do we need this line?
$defs{$name}{NAME} = $name;
$defs{$name}{TYPE} = $type;
$defs{$name}{STATE} = $msg;
@@ -166,7 +165,11 @@ FHEM2FHEM_Read($)
delete($defs{$name});
} else {
- DoTrigger($name, $msg);
+ if($msg =~ m/^([^:]*): (.*)$/) {
+ readingsSingleUpdate($defs{$name}, $1, $2, 1);
+ } else {
+ DoTrigger($name, $msg);
+ }
}
@@ -362,8 +365,10 @@ FHEM2FHEM_Set($@)
FHEM. It is possible to create a device with the same name on both FHEM
instances, but if both of them receive the same event (e.g. because both
of them have a CUL attached), then all associated FileLogs/notifys will be
- triggered twice.
-
+ triggered twice.
+ If the remote device is created with the same name locally (e.g. as dummy),
+ then the local readings are also updated.
+