From 745dfea40a33519a1bae0c39940cb42ac8085e5b Mon Sep 17 00:00:00 2001 From: dietmar63 <> Date: Mon, 19 Jan 2015 19:26:14 +0000 Subject: [PATCH] 98_WOL: reair for [Mon Jan 19 08:10:51 2015] fhem.pl: Undefined subroutine &main::myRemoveInternalTimer called at ./FHEM/98_WOL.pm line 306, <$fh> line 2986. git-svn-id: https://svn.fhem.de/fhem/trunk@7629 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_WOL.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/98_WOL.pm b/fhem/FHEM/98_WOL.pm index 9d2091698..756afa825 100644 --- a/fhem/FHEM/98_WOL.pm +++ b/fhem/FHEM/98_WOL.pm @@ -28,6 +28,11 @@ use Time::HiRes qw(gettimeofday); ################################################################################ sub WOL_Initialize($) { my ($hash) = @_; + + if(!$modules{Twilight}{LOADED} && -f "$attr{global}{modpath}/FHEM/59_Twilight.pm") { + my $ret = CommandReload(undef, "59_Twilight"); + Log3 undef, 1, $ret if($ret); + } $hash->{SetFn} = "WOL_Set"; $hash->{DefFn} = "WOL_Define"; @@ -417,10 +422,10 @@ So, for example a Buffalo NAS can be kept awake. attr wol shutdownCmd "/bin/echo "Teatime" > /dev/console" # shell command
  • attr <name> interval <seconds> -
    defines the time between two checks by a ping if state of <name> is on By using 0 as parametr for interval you can switch off checking the device.
  • -
  • attr <name> useUdpBroadcast <> +
    defines the time between two checks by a ping if state of <name> is on. By using 0 as parameter for interval you can switch off checking the device.
  • +
  • attr <name> useUdpBroadcast <broardcastAdress>
    When using UDP then the magic packet can be send to one of the broardcastAdresses (x.x.x.255, x.x.255.255, x.255.255.255) instead of the target host address. - Try using this, when you are trying to wake up a machine in your own subnet and the wakekup with the target adress is instable or doesn't work.
  • + Try using this, when you want to wake up a machine in your own subnet and the wakekup with the target adress is instable or doesn't work.