essaye de faire ça :
Remplace le code php du plugin par celui ci
- Code : Tout sélectionner
<?
// Permet de recuperer les variables de l'ampli Yamaha.
$IP_Ampli = Getarg('IPAmpli');
$url="http://" .$IP_Ampli ."/YamahaRemoteControl/ctrl";
$get='<YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>';
$content = httpQuery($url,'POST',$post = $get, $oauth_token = NULL, $headers = NULL, $use_cookies = false, $ignore_errors = false);
$Power=xpath($content, '/YAMAHA_AV/Main_Zone/Basic_Status/Power_Control/Power') ;
$Volume=xpath($content,'(/YAMAHA_AV/Main_Zone/Basic_Status/Volume/Lvl/Val)*(-0.1)');
$Source=xpath($content,'/YAMAHA_AV/Main_Zone/Basic_Status/Input/Input_Sel');
$Output1 =xpath($content, '/YAMAHA_AV/Main_Zone/Basic_Status/Sound_Video/HDMI/Output/OUT_1');
$Output2 =xpath($content, '/YAMAHA_AV/Main_Zone/Basic_Status/Sound_Video/HDMI/Output/OUT_2');
if ($Output1=='On'){
$Output=' OUT_1';
};
if ($Output2=='On'){
$Output=' OUT_2';
};
$get='<YAMAHA_AV cmd="GET"><Spotify><Play_Info>GetParam</Play_Info></Spotify></YAMAHA_AV>';
$content = httpQuery($url,'POST',$post = $get, $oauth_token = NULL, $headers = NULL, $use_cookies = false, $ignore_errors = false);
$Artiste=xpath($content, '/YAMAHA_AV/Spotify/Play_Info/Meta_Info/Artist') ;
$Album=xpath($content, '/YAMAHA_AV/Spotify/Play_Info/Meta_Info/Album') ;
$Piste=xpath($content, '/YAMAHA_AV/Spotify/Play_Info/Meta_Info/Track') ;
$Etat =xpath($content, '/YAMAHA_AV/Spotify/Play_Info/Playback_Info') ;
if (strpos ($Artiste,"NO_VALUE")===false) {
saveVariable('ARTISTE', $Artiste);
saveVariable('ALBUM', $Album);
saveVariable('PISTE', $Piste);
} else{
$Artiste=loadVariable('ARTISTE');
$Album=loadVariable('ALBUM');
$Piste=loadVariable('PISTE');
};
// Generation du XML
sdk_header('text/xml');
$xml = '<?xml version="1.0" encoding="UTF-8"?>';
$xml .= '<Ampli_Yamaha>';
$xml .= '<status>ok</status>';
$xml .= '<power>' . $Power . '</power>';
$xml .= '<volume>' . $Volume . '</volume>';
$xml .= '<source>' . $Source . '</source>';
$xml .= '<artiste>' .$Artiste . '</artiste>';
$xml .= '<album>' . $Album . '</album>';
$xml .= '<piste>' . $Piste . '</piste>';
$xml .= '<etat>' . $Etat . '</etat>';
$xml .= '<output>' . $Output . '</output>';
$xml .= '</Ampli_Yamaha>';
echo $xml;
?>
et dans l'actionneur Yamaha source tu modifies le xpath
/Ampli_Yamaha/source
par
concat(/Ampli_Yamaha/source,/Ampli_Yamaha/output)
Tiens moi au jus, si ça marche pas on fera d'autres manip