2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 06:48:43 +00:00

all: NOTIFYDEV fix

git-svn-id: https://svn.fhem.de/fhem/trunk@9191 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-09-01 20:29:24 +00:00
parent e6a46ee440
commit 205e4471ee
6 changed files with 12 additions and 6 deletions

View File

@ -35,7 +35,6 @@ sub HUEBridge_Initialize($)
#Consumer
$hash->{DefFn} = "HUEBridge_Define";
$hash->{NOTIFYDEV} = "global";
$hash->{NotifyFn} = "HUEBridge_Notify";
$hash->{SetFn} = "HUEBridge_Set";
$hash->{GetFn} = "HUEBridge_Get";
@ -129,6 +128,8 @@ HUEBridge_Define($$)
$hash->{helper}{count} = $modules{$hash->{TYPE}}{helper}{count}++;
}
$hash->{NOTIFYDEV} = "global";
if( $init_done ) {
HUEBridge_OpenDev( $hash ) if( !AttrVal($name, "disable", 0) );
}

View File

@ -32,7 +32,6 @@ mailcheck_Initialize($)
$hash->{ReadFn} = "mailcheck_Read";
$hash->{DefFn} = "mailcheck_Define";
$hash->{NOTIFYDEV} = "global";
$hash->{NotifyFn} = "mailcheck_Notify";
$hash->{UndefFn} = "mailcheck_Undefine";
#$hash->{SetFn} = "mailcheck_Set";
@ -101,6 +100,8 @@ mailcheck_Define($$)
$hash->{HAS_GPG} = $mailcheck_hasGPG;
$hash->{HAS_MIME} = $mailcheck_hasMIME;
$hash->{NOTIFYDEV} = "global";
if( $init_done ) {
mailcheck_Disconnect($hash);
mailcheck_Connect($hash);

View File

@ -17,7 +17,6 @@ yowsup_Initialize($)
$hash->{ReadFn} = "yowsup_Read";
$hash->{DefFn} = "yowsup_Define";
$hash->{NOTIFYDEV} = "global";
$hash->{NotifyFn} = "yowsup_Notify";
$hash->{UndefFn} = "yowsup_Undefine";
$hash->{ShutdownFn} = "yowsup_Shutdown";
@ -68,6 +67,8 @@ yowsup_Define($$)
$hash->{NAME} = $name;
$hash->{NOTIFYDEV} = "global";
if( $init_done ) {
yowsup_Disconnect($hash);
yowsup_Connect($hash);

View File

@ -33,7 +33,6 @@ harmony_Initialize($)
$hash->{ReadFn} = "harmony_Read";
$hash->{DefFn} = "harmony_Define";
$hash->{NOTIFYDEV} = "global";
$hash->{NotifyFn} = "harmony_Notify";
$hash->{UndefFn} = "harmony_Undefine";
$hash->{SetFn} = "harmony_Set";
@ -92,6 +91,8 @@ harmony_Define($$)
#$attr{$name}{nossl} = 1 if( !$init_done && harmony_isFritzBox() );
$hash->{NOTIFYDEV} = "global";
if( $init_done ) {
harmony_connect($hash) if( !defined($hash->{id}) );
}

View File

@ -16,7 +16,6 @@ CO20_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "CO20_Define";
$hash->{NOTIFYDEV} = "global";
$hash->{NotifyFn} = "CO20_Notify";
$hash->{UndefFn} = "CO20_Undefine";
$hash->{SetFn} = "CO20_Set";
@ -54,6 +53,8 @@ CO20_Define($$)
$hash->{seq2} = 0x67;
$hash->{seq4} = 0x0001;
$hash->{NOTIFYDEV} = "global";
if( $init_done ) {
CO20_Disconnect($hash);
CO20_Connect($hash);

View File

@ -26,7 +26,6 @@ netatmo_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "netatmo_Define";
$hash->{NOTIFYDEV} = "global";
$hash->{NotifyFn} = "netatmo_Notify";
$hash->{UndefFn} = "netatmo_Undefine";
$hash->{SetFn} = "netatmo_Set";
@ -170,6 +169,8 @@ netatmo_Define($$)
$hash->{STATE} = "Initialized";
$hash->{NOTIFYDEV} = "global";
if( $init_done ) {
netatmo_connect($hash) if( $hash->{SUBTYPE} eq "ACCOUNT" );
netatmo_initDevice($hash) if( $hash->{SUBTYPE} eq "DEVICE" );