From f444a9f0c3a72c082b80860f8d2d675a7c69161e Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Mon, 28 Mar 2016 14:07:20 +0000 Subject: [PATCH] 10_OWserver, 10_OWDevice: moved NOTIFYDEV from _Initialize to _Define git-svn-id: https://svn.fhem.de/fhem/trunk@11137 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_OWServer.pm | 4 +++- fhem/FHEM/11_OWDevice.pm | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/10_OWServer.pm b/fhem/FHEM/10_OWServer.pm index 4b865ad0a..30b422004 100644 --- a/fhem/FHEM/10_OWServer.pm +++ b/fhem/FHEM/10_OWServer.pm @@ -107,7 +107,6 @@ OWServer_Initialize($) # Consumer $hash->{DefFn} = "OWServer_Define"; - $hash->{NOTIFYDEV} = "global"; $hash->{NotifyFn}= "OWServer_Notify"; $hash->{NotifyOrderPrefix}= "50a-"; $hash->{UndefFn} = "OWServer_Undef"; @@ -134,6 +133,9 @@ OWServer_Define($$) my $protocol = $a[2]; $hash->{fhem}{protocol}= $protocol; + + $hash->{NOTIFYDEV} = "global"; + if( $init_done ) { OWServer_OpenDev($hash); diff --git a/fhem/FHEM/11_OWDevice.pm b/fhem/FHEM/11_OWDevice.pm index f6b675a27..c38a804cd 100644 --- a/fhem/FHEM/11_OWDevice.pm +++ b/fhem/FHEM/11_OWDevice.pm @@ -355,7 +355,6 @@ OWDevice_Initialize($) $hash->{GetFn} = "OWDevice_Get"; $hash->{SetFn} = "OWDevice_Set"; $hash->{DefFn} = "OWDevice_Define"; - $hash->{NOTIFYDEV} = "global"; $hash->{NotifyFn} = "OWDevice_Notify"; $hash->{NotifyOrderPrefix}= "50b-"; $hash->{UndefFn} = "OWDevice_Undef"; @@ -666,6 +665,8 @@ OWDevice_Define($$) $hash->{fhem}{alerting}= $alerting; Log3 $name, 5, "$name: alerting: $alerting"; + $hash->{NOTIFYDEV} = "global"; + if( $init_done ) { OWDevice_InitValues($hash); OWDevice_UpdateValues($hash) if(defined($hash->{fhem}{interval}));