<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/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/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" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1611609259944" duration="949000" />
<workItem from="1611653492674" duration="2030000" />
<workItem from="1611656202680" duration="499000" />
- <workItem from="1611669724998" duration="1948000" />
- </task>
- <task id="LOCAL-00393" summary=".">
- <created>1605428228628</created>
- <option name="number" value="00393" />
- <option name="presentableId" value="LOCAL-00393" />
- <option name="project" value="LOCAL" />
- <updated>1605428228628</updated>
+ <workItem from="1611669724998" duration="1966000" />
+ <workItem from="1611688928707" duration="1220000" />
+ <workItem from="1611783609082" duration="599000" />
+ <workItem from="1611911107099" duration="499000" />
</task>
<task id="LOCAL-00394" summary=".">
<created>1605431702382</created>
<option name="project" value="LOCAL" />
<updated>1611656702791</updated>
</task>
- <option name="localTasksCounter" value="442" />
+ <task id="LOCAL-00442" summary=".">
+ <created>1611683302030</created>
+ <option name="number" value="00442" />
+ <option name="presentableId" value="LOCAL-00442" />
+ <option name="project" value="LOCAL" />
+ <updated>1611683302030</updated>
+ </task>
+ <option name="localTasksCounter" value="443" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
$home = 15;
$alert = 16;
-$chambrefan = 2061;
+$chambrefan = 2724;
$scenes = [
'chambre/matin' => [
['type' => 'function', 'function' => 'synchroSoiree'],
],
'salon/on' => [
- ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO','repeat'=>2],
+ ['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','repeat'=>2],
+ ['type' => 'hue', 'group' => $salon, 'scene' => 'xpCjXtV3u7O1kYu', 'repeat' => 2],
['type' => 'scene', 'scene' => 'salon/cinemabase'],
],
'salon/cinema' => [
- ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35','repeat'=>2],
+ ['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','repeat'=>2],
+ ['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' => 'ecomode', 'mode' => '0'],
['type' => 'function', 'function' => 'wakeupPC', 'args' => ['avion']],
],
+ 'bureau/cinema' => [
+ ['type' => 'scene', 'scene' => 'bureau/base/off'],
+ ['type' => 'hue', 'group' => $bureau, 'scene' => '7mofVclWdtvpVyt'],
+ ],
'bureau/lumineux' => [
['type' => 'hue', 'group' => $bureau, 'scene' => 'SdXwtZu5PCDjK2h'],
['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lumineux'],
['type' => 'scene', 'scene' => 'bureau/base/on'],
['type' => 'scene', 'scene' => 'bureau/screens/on'],
],
- 'bureau/off' => [
+ 'bureau/base/off' => [
['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
- ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false, 'brightness' => 0)],
['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'],
['type' => 'scene', 'scene' => 'bureau/sleeppc'],
],
+ 'bureau/off' => [
+ ['type' => 'scene', 'scene' => 'bureau/base/off'],
+ ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false, 'brightness' => 0)],
+
+ ],
'bureau/sound/on' => [
['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => true, 'priority' => true],
],
['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => false],
],
'bureau/media/play' => [
+ ['type' => 'state', 'key' => 'bureauPlaying', 'value' => '1'],
['type' => 'scene', 'scene' => 'bureau/screen/down'],
['type' => 'scene', 'scene' => 'bureau/rideaux/close'],
- ['type' => 'scene', 'scene' => 'bureau/off'],
+ ['type' => 'scene', 'scene' => 'bureau/cinema'],
['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
//['type' => 'ir', 'room' => 'bureausun', 'device' => 'Projector', 'command' => 'PowerOn'],
['type' => 'function', 'function' => 'harmonyActivity', 'args' => ['tv']],
['type' => 'scene', 'scene' => 'bureau/sound/on'],
+
],
'bureau/media/stop' => [
+ ['type' => 'state', 'key' => 'bureauPlaying', 'value' => '0'],
['type' => 'scene', 'scene' => 'bureau/screen/up'],
['type' => 'scene', 'scene' => 'bureau/rideaux/open'],
['type' => 'scene', 'scene' => 'bureau/auto'],
setState('syncsoiree', '0');
}
+
function getSqueezePlayerStatus($player = '')
{
$res = _squeezeRequest('mode ?', $player);
}
}
+function squeezeResume($player = '')
+{
+ $player = _squeezePlay($player, null);
+ squeezeRequest('play', $player);
+}
+
function squeezeRequest($params, $player = '')
{
$redis = connectRedis();
function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = true)
{
- global $squeezeboxPlayers;
+
if (!$playIfSync && getState('syncsoiree') == '1') {
echo 'sync enabled';
return;
global $allmusics;
$m = $allmusics[$musicName];
+ $player = _squeezePlay($player, $volume);
+ squeezeRequest('pause', $player);
+
+ foreach ($m['commands'] as $command) {
+ echo $player . ':' . $command . '<br />';
+ squeezeRequest($command, $player);
+ }
+}
+
+
+function _squeezePlay($player = '', $volume = null)
+{
+ global $squeezeboxPlayers;
$player = _player($player);
if (null === $player) {
echo 'player null';
} else if ($player == $squeezeboxPlayers['Chambre']) {
denon(true);
}
- squeezeRequest('pause', $player);
+
if (null !== $volume) {
if (config('VOLUME_DEVICE') == 'SqueezeboxPlayer') {
$squeezeVolume = $volume;
echo 'volume ' . $squeezeVolume;
squeezeVolume($squeezeVolume, '', $player);
}
- foreach ($m['commands'] as $command) {
- echo $player . ':' . $command . '<br />';
- squeezeRequest($command, $player);
- }
+ return $player;
}
function _player($player = null)