<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/remotecmd.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/remotecmd.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<item name="services root" type="e789fda9:ObjectUtils$Sentinel" />
<item name="com.intellij.execution.services.ServiceModel$ServiceGroupNode@6b2d7142" type="7427dc5b:ServiceModel$ServiceGroupNode" />
</path>
- <path>
- <item name="services root" type="e789fda9:ObjectUtils$Sentinel" />
- <item name="com.intellij.execution.services.ServiceModel$ServiceGroupNode@6b2d7142" type="7427dc5b:ServiceModel$ServiceGroupNode" />
- <item name="com.intellij.execution.services.ServiceModel$ServiceNode@3e99f178" type="9fbbdea:ServiceModel$ServiceNode" />
- </path>
</expand>
<select />
</treeState>
<workItem from="1574065436563" duration="754000" />
<workItem from="1574066213679" duration="8067000" />
<workItem from="1574273415760" duration="2973000" />
- <workItem from="1574323616439" duration="9643000" />
- </task>
- <task id="LOCAL-00198" summary=".">
- <created>1562746751936</created>
- <option name="number" value="00198" />
- <option name="presentableId" value="LOCAL-00198" />
- <option name="project" value="LOCAL" />
- <updated>1562746751936</updated>
+ <workItem from="1574323616439" duration="14023000" />
</task>
<task id="LOCAL-00199" summary=".">
<created>1562828700494</created>
<option name="project" value="LOCAL" />
<updated>1574340363978</updated>
</task>
- <option name="localTasksCounter" value="247" />
+ <task id="LOCAL-00247" summary=".">
+ <created>1574411352997</created>
+ <option name="number" value="00247" />
+ <option name="presentableId" value="LOCAL-00247" />
+ <option name="project" value="LOCAL" />
+ <updated>1574411352997</updated>
+ </task>
+ <option name="localTasksCounter" value="248" />
<servers />
</component>
<component name="TodoView">
<?php
+if ($_GET['device'] == '1033') {
+ $forceConfig = 'salon';
+}
require_once "import.php";
+
if ($_GET['device'] == 480) {
chambreToggle();
} else if ($_GET['device'] == 1033) {
execScene('salon/off');
break;
case 'Move':
- _remoteCmd('play', 'salon');
+ _remoteCmd('pause', 'salon');
break;
case 'Clock_Wise':
- _remoteCmd('forward', 'salon');
+ if (getCurrentHarmonyActivity() !== 'poweroff') {
+ harmonyRequest('commands/volume-up?repeat=3', 'POST');
+ }
break;
case 'Anti_Clock_Wise':
- _remoteCmd('rewind', 'salon');
+ if (getCurrentHarmonyActivity() !== 'poweroff') {
+ harmonyRequest('commands/volume-down?repeat=5', 'POST');
+ }
break;
case 'Tap':
if (getCurrentHarmonyActivity() == 'poweroff') {
default:
break;
}
-}
\ No newline at end of file
+}
+echo '1';
\ No newline at end of file
function getCurrentConfig()
{
- if (isset($_SERVER['HTTP_HOST']) && stristr($_SERVER['HTTP_HOST'], '.home.tortuga.enhydra.fr')) {
+ global $forceConfig;
+ if (!isset($forceConfig) && isset($_SERVER['HTTP_HOST']) && stristr($_SERVER['HTTP_HOST'], '.home.tortuga.enhydra.fr')) {
$e = explode('.', $_SERVER['HTTP_HOST']);
$_GET['c'] = array_shift($e);
}
+ if (isset($forceConfig)) {
+ $_GET['c'] = $forceConfig;
+ }
+
if (isset($_GET['c'])) {
setcookie('config', $_GET['c'], 0, '/');
$_COOKIE['config'] = $_GET['c'];
$mediaraspclient = null;
-function _removeCmd($cmd,$device){
-
+function _remoteCmd($cmd,$device){
+ // We first try to send it to salon raspberry before sending a less robust ir command
+ if (!remoteCmd($cmd, $device)) {
+ if ($device == 'salon') {
+ echo 'run '.$cmd.' with harmony';
+ harmonyRequest('commands/' . $cmd, 'POST');
+ }else{
+ echo 'ok';
+ }
+ }
}
function remoteCmd($cmd, $device)
['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['WC'], 65]],
],
'sdb/ampli/on' => [
- ['type' => 'hue', 'light' => $sdb_ampli, 'scene' => ['on' => true]],
+ ['type' => 'domoticz', 'device' => '1062', 'command' => true, 'priority' => true],
],
'sdb/ampli/off' => [
- ['type' => 'hue', 'light' => $sdb_ampli, 'scene' => ['on' => false]],
+ ['type' => 'domoticz', 'device' => '1062', 'command' => false, 'priority' => true],
],
'sdb/off' => [
['type' => 'state', 'key' => 'sdb', 'value' => 0],
['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['Salle de bains'], 65]],
],
'salon/freebox/on' => [
- ['type' => 'hue', 'light' => $freebox, 'scene' => ['on' => true]],
+ ['type' => 'domoticz', 'device' => '479', 'command' => true, 'priority' => true],
],
'salon/freebox/off' => [
- ['type' => 'hue', 'light' => $freebox, 'scene' => ['on' => false]],
+ ['type' => 'domoticz', 'device' => '479', 'command' => true, 'priority' => true],
],
'ecomode/basic' => [
['type' => 'scene', 'scene' => 'bureau/media/off'],// Media bureau
$_GET['device'] = config('DEVICE');
}
-// We first try to send it to salon raspberry before sending a less robust ir command
-if (!remoteCmd($cmd, $_GET['device'])) {
- if ($_GET['device'] == 'salon') {
- echo 'run '.$cmd.' with harmony';
- harmonyRequest('commands/' . $cmd, 'POST');
- }else{
- echo 'ok';
- }
-}
\ No newline at end of file
+_remoteCmd($cmd,$_GET['device']);
\ No newline at end of file