From 19ee5f15eb2176adf5b5023357f66e573dd4d9d5 Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 18 Dec 2021 15:33:01 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 24 +++++++++++++----------- scripts/lib/scenes.php | 4 +++- scripts/lib/wol.php | 7 ++++++- scripts/wcvmc.php | 3 +++ 4 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 scripts/wcvmc.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 72f4855..b702e10 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,10 @@ + - - + + diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index e513067..d48b855 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -1213,6 +1213,8 @@ function checkWCVMC() { $offtime = getState('wcVMCOff', -1); $time = time(); + echo 'on : ' . getState('lastVMCOn') . '
'; + echo 'off : ' . $offtime . '
now : ' . $time . ' '; if ($offtime == -1 || $offtime > $time || getState('lastVMCOn') > $offtime) { return; } @@ -1238,7 +1240,7 @@ function alert() if (getNightMode()) { return; } - + execScene('home/doalert'); $rep = 1 * 2; diff --git a/scripts/lib/wol.php b/scripts/lib/wol.php index c5fbd81..97c207e 100644 --- a/scripts/lib/wol.php +++ b/scripts/lib/wol.php @@ -7,5 +7,10 @@ function wol($device) $mac = $devices[$device]['mac']; `wakeonlan -i $ip $mac`; - freeboxWOL($mac); + try { + freeboxWOL($mac); + }catch (Exception $e){ + + } + } \ No newline at end of file diff --git a/scripts/wcvmc.php b/scripts/wcvmc.php new file mode 100644 index 0000000..6450f2e --- /dev/null +++ b/scripts/wcvmc.php @@ -0,0 +1,3 @@ +