<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$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" 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/freebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/freebox.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/harmony.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/harmony.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/hue.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/hue.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.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/off.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/off.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$/servers/hue.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/hue.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/pcgames.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/pcgames.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/share.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/share.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/squeeze.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/squeeze.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/servers/logcat.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/logcat.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1610959093755" duration="202000" />
<workItem from="1611259485798" duration="169000" />
<workItem from="1611260007715" duration="594000" />
- <workItem from="1611336541554" duration="1183000" />
- </task>
- <task id="LOCAL-00387" summary=".">
- <created>1605188063167</created>
- <option name="number" value="00387" />
- <option name="presentableId" value="LOCAL-00387" />
- <option name="project" value="LOCAL" />
- <updated>1605188063167</updated>
+ <workItem from="1611336541554" duration="1485000" />
+ <workItem from="1611428507149" duration="1044000" />
+ <workItem from="1611582691581" duration="2261000" />
+ <workItem from="1611585304162" duration="581000" />
</task>
<task id="LOCAL-00388" summary=".">
<created>1605188139134</created>
<option name="project" value="LOCAL" />
<updated>1610959164385</updated>
</task>
- <option name="localTasksCounter" value="436" />
+ <task id="LOCAL-00436" summary=".">
+ <created>1611337927836</created>
+ <option name="number" value="00436" />
+ <option name="presentableId" value="LOCAL-00436" />
+ <option name="project" value="LOCAL" />
+ <updated>1611337927836</updated>
+ </task>
+ <option name="localTasksCounter" value="437" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
config('ROOM', 'bureau');
config('SQUEEZEBOX_PLAYER', 'Bureau');
config('VIDEOPLAYER', 'mediarasp');
-config('VOLUME', 85);
-config('VOLUME_DEVICE', 'shield');
+config('VOLUME_DEVICE', 'harmony');
config('SLEEPTYPE', 'screensaver');
config('SCREENSAVER', 'suncurve');
config('SLEEPSCREEN', 15);
return;
}
if ($currentActivity == 'musique') {
- setPlaying('squeezebox', 'salon');
+ setPlaying('squeezebox', 'bureau');
} else if ($currentActivity == 'poweroff' || $currentActivity == 'off') {
- setPlaying('mycanal', 'salon');
- harmonyDeviceCommand('videoprojecteur-epson', 'power-off');
+ setPlaying('mycanal', 'bureau');
+ harmonyDeviceCommand('sony-projecteur', 'power-off');
}
if ($currentActivity === 'poweroff' || $currentActivity === 'off' || $currentActivity === 'musique') {
- harmonyDeviceCommand('videoprojecteur-epson', 'power-off');
+ harmonyDeviceCommand('sony-projecteur', 'power-off');
} else {
- harmonyDeviceCommand('videoprojecteur-epson', 'power-on');
+ harmonyDeviceCommand('sony-projecteur', 'power-on');
}
}
off('salon');
break;
case 'Move':
- if (getCurrentHarmonyActivity() != 'musique') {
- _remoteCmd('pause', 'salon');
- }
+ _remoteCmd('pause', 'salon');
break;
case 'Clock_Wise':
- volume(3,'+');
+ volume(3, '+');
break;
case 'Anti_Clock_Wise':
- volume(3,'-');
+ volume(3, '-');
break;
case 'Tap':
- if (getCurrentHarmonyActivity() == 'poweroff') {
- squeezePlayByName('FIP', $squeezeboxPlayers['Salon']);
- } else if (getCurrentHarmonyActivity() == 'musique') {
- stopHarmony();
- }
+ squeezePlayByName('FIP', $squeezeboxPlayers['Salon']);
break;
case 'Alert':
default:
off('bureau');
break;
case 'Clock_Wise':
- volume(5, '+');
+ volume(3, '+');
break;
case 'Anti_Clock_Wise':
- volume(5, '-');
+ volume(3, '-');
break;
case 'Tap':
- squeezePlayByName('Samba', $squeezeboxPlayers['Bureau']);
+ if (getCurrentHarmonyActivity() == 'poweroff') {
+ squeezePlayByName('Samba', $squeezeboxPlayers['Bureau']);
+ } else if (getCurrentHarmonyActivity() == 'musique') {
+ stopHarmony();
+ }
break;
case 'Alert':
default:
function freeboxChannel($channel)
{
- if (config('DEVICE') === 'salon') {
+ if (config('DEVICE') === 'bureau') {
$currentActivity = getCurrentHarmonyActivity();
harmonyActivity('tv');
}
}
$keys = array_merge(array('home', 'pause=2', 'home', 'pause=1', 'home', 'left', 'right', 'home'), $commands);
- if (config('DEVICE') === 'salon') {
+ if (config('DEVICE') === 'bureau') {
if ($currentActivity != 'tv') {
sleep(50);
}
<?php
-function harmonyRequest($uri, $method = 'GET', $hub = 'salon')
+function harmonyRequest($uri, $method = 'GET', $hub = 'bureau')
{
global $harmonyClient;
function harmonyActivity($activity)
{
if ($activity == 'poweroff' || $activity == 'off') {
- setPlaying('mycanal', 'salon');
+ setPlaying('mycanal', 'bureau');
}
$wait = 0;
$current = getCurrentHarmonyActivity();
ecoMode('0');
}
if ($activity === 'musique' || $activity === 'tv') {
- shieldWakeup('salon');
+ shieldWakeup('bureau');
}
$res = harmonyRequest('activities/' . $activity, 'POST');
if ($wait > 0) {
sleep($wait);
}
if ($activity == 'tv') {
- execScene('salon/cinema');
- runAtEnd('sleep(15);harmonyDeviceCommand(\'videoprojecteur-epson\', \'power-on\');');
+ runAtEnd('sleep(15);harmonyDeviceCommand(\'sony-projecteur\', \'power-on\');');
}
return $res;
}
return array('groups' => $hue->getGroups(), 'scenes' => $hue->getScenes(), 'lights' => $hue->getLights());
}
-function hueCommand($action, $transitionTime, $repeat = 2)
+function hueCommand($action, $transitionTime)
{
$redis = connectRedis();
$queue = $redis->igbget('hue_queue');
}
$command = $action;
$command['transitionTime'] = $transitionTime;
- $command['repeat'] = $repeat;
$queue[] = $command;
$redis->igbset('hue_queue', $queue);
$redis->publish('hue_event', 'handle_queue');
if ((($p === 'netflix' || $p === 'tv') && config('TVPLAYER') === 'shield') || config('VIDEOPLAYER') === 'shield') {
return shieldRemoteCommand($cmd, $device);
- } else if ($device == 'salon') {
+ } else if ($device == 'bureau') {
switch (getCurrentHarmonyActivity()) {
- case 'media':
- return remoteCmdMedia($cmd, $device);
- case 'musique-radio':
+ case 'musique':
return remoteCmdSalonMusique($cmd);
case 'tv':
return remoteCmdSalonTV($cmd);
global $squeezeboxPlayers;
if ($device == 'salon') {
stopSqueezebox('Salon');
- harmonyActivity('tv');
} else if ($device == 'bureau') {
execScene('bureau/media/play');
+ harmonyActivity('tv');
stopSqueezebox($squeezeboxPlayers['Bureau']);
if (!isAlive('bureau')) {
sleep(60);
}
- irsend('bureau', 'Projector', 'PowerOn');
- sshRunCommand('/usr/local/bin/soundtohdmi', 'bureau', true, true);
} else if ($device == 'sdb') {
execScene('sdb/ampli/on');
}
function offSalon()
{
- stopHarmony();
shieldKillAll('salon');
shieldSleep('salon');
}
function offBureau()
{
- execScene('bureau/media/stop');
+ stopHarmony();
+ shieldKillAll('bureau');
+ shieldSleep('bureau');
}
function offSdb()
['type' => 'function', 'function' => 'synchroSoiree'],
],
'salon/on' => [
- ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO'],
+ ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO','repeat'=>2],
//['type' => 'insteon', 'command' => '0?113=I=0=0'],
['type' => 'scene', 'scene' => 'salon/cheminee', 'delay' => 1],
],
// ['type' => 'insteon', 'command' => '0?1111=I=0=0'],
],
'salon/cineclub' => [
- ['type' => 'hue', 'group' => $salon, 'scene' => 'xpCjXtV3u7O1kYu'],
+ ['type' => 'hue', 'group' => $salon, 'scene' => 'xpCjXtV3u7O1kYu','repeat'=>2],
['type' => 'scene', 'scene' => 'salon/cinemabase'],
],
'salon/cinema' => [
- ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35'],
+ ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35','repeat'=>2],
['type' => 'scene', 'scene' => 'salon/cinemabase'],
],
'salon/tamise' => [
['type' => 'ecomode', 'mode' => '0'],
- ['type' => 'hue', 'group' => $salon, 'scene' => 'RbjnIcLtcDuHbfU'],
+ ['type' => 'hue', 'group' => $salon, 'scene' => 'RbjnIcLtcDuHbfU','repeat'=>2],
// ['type' => 'insteon', 'command' => '0?1130=I=0=0'],
['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.8]],
],
['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']],
],
'salon/media/play' => [
- ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ['tv']],
+
],
'salon/fan/on' => [
['type' => 'domoticz', 'device' => '478', 'command' => true],
['type' => 'scene', 'scene' => 'bureau/rideaux/close'],
['type' => 'scene', 'scene' => 'bureau/off'],
['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
- ['type' => 'ir', 'room' => 'bureausun', 'device' => 'Projector', 'command' => 'PowerOn'],
+ //['type' => 'ir', 'room' => 'bureausun', 'device' => 'Projector', 'command' => 'PowerOn'],
+ ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ['tv']],
['type' => 'scene', 'scene' => 'bureau/sound/on'],
],
'bureau/media/stop' => [
['type' => 'hue', 'group' => 17, 'scene' => ['on' => false, 'brightness' => 0, 'effect' => 'none']],
],
'sdb/radio/sync/salon' => [
- ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ["musique"]],
+ //['type' => 'function', 'function' => 'harmonyActivity', 'args' => ["musique"]],
['type' => 'function', 'function' => 'squeezeRequest', 'args' => ['sync ' . $squeezeboxPlayers['Salon'], $squeezeboxPlayers['Salle de bains']], 'wait' => 1],
['type' => 'function', 'function' => 'squeezeRequest', 'args' => ['power 1', $squeezeboxPlayers['Salon']]],
['type' => 'function', 'function' => 'squeezeRequest', 'args' => ['play', $squeezeboxPlayers['Salon']]]
if ($device['id'] === 'salon') {
stopPlayersIn('salon', true, false);
- if ($onlySound) {
- harmonyActivity('musique');
- } else {
- harmonyActivity('tv');
- }
+
} else if ($device['id'] === 'bureau' || $device['id'] === 'bureausun') {
stopPlayersIn('bureau', true, false);
if ($onlySound) {
- execScene('bureau/sound/on');
+ harmonyActivity('musique');
} else {
+ harmonyActivity('tv');
execScene('bureau/media/play');
}
}
if ($devices) {
$room = getRoomBySqueezeboxPlayer($player);
if ($room == 'salon') {
- harmonyActivity('off');
+
} else if ($room === 'sdb') {
execScene('sdb/ampli/off');
} else if ($room === 'bureau') {
- execScene('bureau/sound/off');
+ if (getCurrentHarmonyActivity() === 'musique') {
+ harmonyActivity('off');
+ }
} else if ($room === 'chambre') {
denon(false);
}
if ($player == $squeezeboxPlayers['Salon']) {
setState('maskShieldSalonWakeup', '1');
- harmonyActivity('musique');
+
} else if ($player == $squeezeboxPlayers['Salle de bains']) {
execScene('sdb/ampli/on');
} else if ($player == $squeezeboxPlayers['Bureau']) {
- execScene('bureau/sound/on');
+ harmonyActivity('musique');
setState('maskShieldBureauWakeup', '1');
} else if ($player == $squeezeboxPlayers['Chambre']) {
denon(true);
function synchroSoiree()
{
harmonyActivity('musique');
- exec('bureau/sound/on');
$devices = ['WC', 'Chambre', 'Bureau', 'Cuisine'];
$salon = _player('Salon');
<?php
require_once "import.php";
-if (config('DEVICE') == 'salon') {
+if (config('DEVICE') == 'bureau') {
harmonyActivity('tv');
}
if (strpos($content, 'http') === 0) {
$u = parse_url($content);
if ($u['host'] == 'open.spotify.com') {
- if ($device == 'salon') {
+ if ($device == 'bureau') {
harmonyActivity('musique');
}
$p = explode('/', trim($u['path'], '/'));
} elseif ($_GET['player'] == 'Salle de bains') {
execScene('sdb/ampli/on');
} else if ($_GET['player'] === 'Bureau') {
- execScene('bureau/sound/on');
setState('maskShieldBureauWakeup', '1');
+ print_r(harmonyActivity("musique"));
}
setPlaying('squeezebox');
} else {
} else {
if (getSqueezePlayerStatus($squeezePlayer) <= 0) {
shieldRunActivity($device);
- } else {
- execScene('bureau/sound/on');
}
}
},
'WindowManager: handleComboKeys keyCode: 25, keyAction: 1' => function () use ($device) {
- if ($device === 'salon') {
+ if ($device === 'bureau') {
echo 'volume-down' . "\n";
volume('3', '-', 'harmony');
}
},
'WindowManager: handleComboKeys keyCode: 24, keyAction: 1' => function () use ($device) {
- if ($device === 'salon') {
+ if ($device === 'bureau') {
echo 'volume-up' . "\n";
volume('3', '+', 'harmony');
}