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}));