<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/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" 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/lib/router.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/router.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/music.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/music.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/rooms/medium/salon.jpg" beforeDir="false" afterPath="$PROJECT_DIR$/images/rooms/medium/salon.jpg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/rooms/originaux/salon.jpg" beforeDir="false" afterPath="$PROJECT_DIR$/images/rooms/originaux/salon.jpg" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/images/rooms/small/salon.jpg" beforeDir="false" afterPath="$PROJECT_DIR$/images/rooms/small/salon.jpg" 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/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="Make" enabled="true" />
</method>
</configuration>
+ <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
+ <option name="arquillianRunConfiguration">
+ <value>
+ <option name="containerStateName" value="" />
+ </value>
+ </option>
+ <option name="TEST_OBJECT" value="class" />
+ <method v="2">
+ <option name="Make" enabled="true" />
+ </method>
+ </configuration>
<configuration default="true" type="ArquillianTestNG" factoryName="">
<option name="arquillianRunConfiguration">
<value>
<workItem from="1618740509693" duration="14198000" />
<workItem from="1618947923152" duration="2016000" />
<workItem from="1619079821781" duration="1188000" />
- <workItem from="1619120393111" duration="2277000" />
- </task>
- <task id="LOCAL-00423" summary=".">
- <created>1608196291044</created>
- <option name="number" value="00423" />
- <option name="presentableId" value="LOCAL-00423" />
- <option name="project" value="LOCAL" />
- <updated>1608196291044</updated>
+ <workItem from="1619120393111" duration="2877000" />
+ <workItem from="1619342303709" duration="4190000" />
</task>
<task id="LOCAL-00424" summary=".">
<created>1608294905553</created>
<option name="project" value="LOCAL" />
<updated>1618989464530</updated>
</task>
- <option name="localTasksCounter" value="472" />
+ <task id="LOCAL-00472" summary=".">
+ <created>1619248801662</created>
+ <option name="number" value="00472" />
+ <option name="presentableId" value="LOCAL-00472" />
+ <option name="project" value="LOCAL" />
+ <updated>1619248801663</updated>
+ </task>
+ <option name="localTasksCounter" value="473" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
$shortcuts['music'] = [
['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
- ['type' => 'light', 'scene' => 'home/music/synchro/soiree', 'label' => 'Synchro Soirée'],
+ ['type' => 'sub', 'label' => 'Synchro', 'sub' => 'synchro'],
['type' => 'sub', 'label' => 'Radios', 'sub' => 'radio'],
['type' => 'sub', 'label' => 'Musique', 'sub' => 'playlists'],
['type' => 'sub', 'label' => 'Ambiance', 'sub' => 'ambiance'],
];
+$shortcuts['sub-synchro'] = [
+ ['type' => 'back', 'label' => 'Synchro'],
+ ['type' => 'light', 'scene' => 'home/music/synchro/soiree', 'label' => 'Soirée'],
+ ['type' => 'light', 'scene' => 'home/music/synchro/salon-cuisine', 'label' => 'Salon Cuisine'],
+ ['type' => 'light', 'scene' => 'home/music/synchro/chambre-sdb', 'label' => 'Chambre SDB'],
+ ['type' => 'light', 'scene' => 'home/music/synchro/all', 'label' => 'Tout'],
+ ['type' => 'light', 'scene' => 'home/music/synchro/bureau-wc', 'label' => 'Bureau WC'],
+ ['type' => 'light', 'scene' => 'home/music/synchro/off', 'label' => 'Off'],
+];
+
if ($podcasts !== false) {
$shortcuts['music'][] = ['type' => 'sub', 'label' => 'Podcasts', 'sub' => 'podcasts'];
}
\ No newline at end of file
['type' => 'ecomode', 'mode' => '1'],
],
'home/music/synchro/soiree' => [
- ['type' => 'function', 'function' => 'synchroSoiree'],
+ ['type' => 'function', 'function' => 'syncMusic', 'args' => [['Salon', 'Cuisine', 'Bureau', 'WC']]],
+ ],
+ 'home/music/synchro/salon-cuisine' => [
+ ['type' => 'function', 'function' => 'syncMusic', 'args' => [['Salon', 'Cuisine']]],
+ ],
+ 'home/music/synchro/all' => [
+ ['type' => 'function', 'function' => 'syncMusic', 'args' => [['Salon', 'Cuisine', 'Bureau', 'WC', 'Chambre', 'SDB']]],
+ ],
+ 'home/music/synchro/chambre-sdb' => [
+ ['type' => 'function', 'function' => 'syncMusic', 'args' => [['Chambre', 'SDB']]],
+ ],
+ 'home/music/synchro/bureau-wc' => [
+ ['type' => 'function', 'function' => 'syncMusic', 'args' => [['Bureau', 'WC']]],
+ ],
+ 'home/music/synchro/off' => [
+ ['type' => 'function', 'function' => 'stopAllSqueezebox'],
],
'salon/projector/on' => [
['type' => 'function', 'function' => 'epson', 'args' => [true, true]],
'home/hueoff' => [
['type' => 'hue', 'group' => 17, 'scene' => ['on' => false, 'brightness' => 0, 'effect' => 'none']],
],
- 'sdb/radio/sync/salon' => [
- //['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']]]
- ],
'wc/on' => [
['type' => 'function', 'function' => 'wcOn'],
],
function stopSqueezeboxPlayer($player, $stopIfSync = true, $devices = true)
{
- if (!$stopIfSync && getState('syncsoiree') == '1') {
+ if (!$stopIfSync && isSynced($player)) {
return;
}
foreach ($squeezeboxPlayers as $squeezeboxPlayer) {
stopSqueezebox($squeezeboxPlayer);
}
- setState('syncsoiree', '0');
+ squeezeEmptySynced();
}
function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = true)
{
- if (!$playIfSync && getState('syncsoiree') == '1') {
+ if (!$playIfSync && isSynced($player)) {
echo 'sync enabled';
return;
}
}
}
-
-function _squeezePlay($player = '', $volume = null)
+function squeezePlayerOn($player)
{
global $squeezeboxPlayers;
$player = _player($player);
- if (null === $player) {
- echo 'player null';
- return;
- }
-
if ($player == $squeezeboxPlayers['Salon']) {
- denonAVROn('AUX');
+ denonAVROn('AUX');
} else if ($player == $squeezeboxPlayers['Salle de bains']) {
execScene('sdb/ampli/on');
} else if ($player == $squeezeboxPlayers['Bureau']) {
} else if ($player == $squeezeboxPlayers['Chambre']) {
denon(true);
}
+}
+
+function _squeezePlay($player = '', $volume = null)
+{
+
+ if (null === $player) {
+ echo 'player null';
+ return;
+ }
+
+ squeezePlayerOn($player);
if (null !== $volume) {
if (config('VOLUME_DEVICE') == 'SqueezeboxPlayer') {
function synchroSoiree()
{
- harmonyActivity('musique');
+ syncMusic(['Salon', 'WC', 'Chambre', 'Bureau', 'Cuisine']);
+}
- $devices = ['WC', 'Chambre', 'Bureau', 'Cuisine'];
- $salon = _player('Salon');
- foreach ($devices as $device) {
- $player = _player($device);
- squeezeRequest('sync ' . $player, $salon);
+
+function syncMusic($players)
+{
+ global $squeezeboxPlayers;
+ $first = true;
+
+ foreach ($players as $player) {
+ $player = _player($player);
+ if ($player === $squeezeboxPlayers['WC']) {
+
+ }
+ squeezePlayerOn($player);
+ if ($first) {
+ $firstPlayer = $player;
+ $first = false;
+ continue;
+ }
+ squeezeRequest('sync ' . $player, $firstPlayer);
squeezeRequest('power 1', $player);
+ squeezeAddSynced($player);
}
- squeezeRequest('play', 'salon');
+ squeezeRequest('play', $firstPlayer);
+}
- setState('syncsoiree', '1');
+function squeezeAddSynced($player)
+{
+ $player = _player($player);
+ $synced = getState('squeezesynced', []);
+ if (!in_array($player, $synced)) {
+ $synced[] = $player;
+ }
+ setState('squeezesynced', $synced);
+}
+
+function squeezeEmptySynced()
+{
+ setState('squeezesynced', []);
}
+function isSynced($player)
+{
+ $player = _player($player);
+ $synced = getState('squeezesynced', []);
+ return in_array($player, $synced);
+}
function getSqueezeFavorites($root = 0, $app = 'favorites', $level = 0)
{
bottom: 4.41vh;
font-size: 5.39vh;
}
-#mainnav a {
+#mainnav a,
+#mainnav div {
text-align: center;
display: block;
z-index: 100;
text-shadow: 1px 1px rgba(0, 0, 0, 0.5);
margin: 0.2em 0;
}
-#mainnav a .fa-tv {
- -webkit-transform: scaleX(0.85);
- transform: scaleX(0.85);
- -webkit-transform-origin: 0 0;
- transform-origin: 0 0;
-}
-#mainnav a .fa-coffee {
- -webkit-transform: scaleX(0.85);
- transform: scaleX(0.85);
- -webkit-transform-origin: 0 0;
- transform-origin: 0 0;
-}
.fit {
transform-origin: 0 0;
-webkit-transform-origin: 0 0;
#mainnav {
- a {
+ a, div {
text-align: center;
display: block;
z-index: 100;
color: #fff;
text-shadow: 1px 1px rgba(0, 0, 0, 0.5);
margin: 0.2em 0;
-
- .fa-tv {
- -webkit-transform: scaleX(0.85);
- transform: scaleX(0.85);
-
- -webkit-transform-origin: 0 0;
- transform-origin: 0 0;
- }
-
- .fa-coffee {
- -webkit-transform: scaleX(0.85);
- transform: scaleX(0.85);
-
- -webkit-transform-origin: 0 0;
- transform-origin: 0 0;
- }
}
}
z-index: 1;
}
-[data-remote-command]{
+[data-remote-command] {
cursor: pointer;
}
color: #fff;
background-color: rgba(0, 0, 0, 0.5);
height: 12.4em;
- cursor:pointer;
+ cursor: pointer;
}
&.closed {