From: Vincent Date: Wed, 20 Nov 2019 00:44:15 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=69d4d531cc382f6ae83401d3b8537c4890029408;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 15b9b0e..8d9c643 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,10 @@ - - - - + + diff --git a/scripts/cron/cron.php b/scripts/cron/cron.php index b2ac249..692d60a 100644 --- a/scripts/cron/cron.php +++ b/scripts/cron/cron.php @@ -72,11 +72,7 @@ function cronRooms($cronmin) function cronBackyard($cronmin) { - if (isDay()) { - domoticzSwitch(679,true); - } else { - domoticzSwitch(679,false); - } + domoticzSwitch(679, isDay()); // Projecteurs cour } function cronMediaLibrary($cronmin) diff --git a/scripts/domoticz_device_event.php b/scripts/domoticz_device_event.php index 21680be..85abaa1 100644 --- a/scripts/domoticz_device_event.php +++ b/scripts/domoticz_device_event.php @@ -2,6 +2,35 @@ require_once "import.php"; -if ($_GET['device'] == 480) { +if ($_GET['hardware'] == 'rflink' && $_GET['device'] == 480) { chambreToggle(); +} +if ($_GET['hardware'] == 'zigate' && $_GET['device'] == 8) { + // Cube + switch ($_GET['state']) { + case 'Shake': + execScene('home/alert'); + break; + case 'Flip_90': + execScene('salon/cinema'); + break; + case 'Flip_180': + execScene('salon/on'); + break; + case 'Free_Fall': + execScene('salon/off'); + break; + case 'Move': + _remoteCmd('play', 'salon'); + break; + case 'Clock_Wise': + _remoteCmd('forward', 'salon'); + break; + case 'Anti_Clock_Wise': + _remoteCmd('rewind', 'salon'); + break; + case 'Alert': + case 'Tap': + break; + } } \ No newline at end of file diff --git a/scripts/lib/mediarasp.php b/scripts/lib/mediarasp.php index e03c1ec..e2fb252 100644 --- a/scripts/lib/mediarasp.php +++ b/scripts/lib/mediarasp.php @@ -2,6 +2,10 @@ $mediaraspclient = null; +function _removeCmd($cmd,$device){ + +} + function remoteCmd($cmd, $device) { $cmd = mb_strtolower($cmd);