function Entertainment_SetVolume($Id, $Value, $MessageType=c_MessageType_Action) { $DeviceName = IPS_GetName(IPS_GetParent($Id)); if (!isDevicePoweredOnByDeviceName($DeviceName)) { return; } IPSLogger_Inf(__file__, 'Set Volume "'.$Value.'" for Device "'.$DeviceName.'"'); $Limit = get_DeviceControlConfigValue($DeviceName, c_Control_Volume, c_Property_Limit); if ($Limit!==false and $Value>$Limit) { IPSLogger_Dbg(__file__, "Limit Volume $Value-->$Limit for Device '$DeviceName'"); $Value = $Limit; } if (GetValue($Id) <> $Value) { SetValue($Id, $Value); Entertainment_SendDataByDeviceName($DeviceName, c_Control_Volume, array(c_Property_CommVol), $MessageType); Entertainment_SetRoomControlByDeviceControlId($Id, $Value); } }
<tr> <th id="rc_cmd_Simple" rc_name="topfieldsattype" rc_button="0" class="rc_button33" >Simple</th> </tr> <tr> <th id="rc_cmd_teletext" rc_name="TopfieldSat" rc_button="Teletext" class="rc_button33">Teletext</th> <th id="rc_cmd_audio" rc_name="TopfieldSat" rc_button="Audio" class="rc_button33">Audio</th> <th id="rc_cmd_format" rc_name="TopfieldSat" rc_button="Format" class="rc_button33">Format</th> </tr> </table> </div> <div id="containerRight"> <? IPSUtils_Include ("Entertainment.inc.php", "IPSLibrary::app::modules::Entertainment"); $Program = get_DeviceControlValue(c_Device_TopfieldSat, c_Control_Program); $Names = get_DeviceControlConfigValue(c_Device_TopfieldSat, c_Control_Program, c_Property_Names); $Codes = get_DeviceControlConfigValue(c_Device_TopfieldSat, c_Control_Program, c_Property_Codes); $Device = c_Device_TopfieldSat; ?> <table width=100%> <tr> <th id="rc_cmd_1" rc_program="0" rc_devicename="<?php echo $Device; ?> " class="rc_button33 <?php if ($Program == 0) { echo "rc_button_active"; } ?> "><?php echo $Names[0]; ?>
<meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0"> <link rel="stylesheet" type="text/css" href="iRemote.css" /> <?include "Remote_Sender.php"?> </head> <body> <div id="containerTop"> <? IPSUtils_Include ("Entertainment.ips.php", "IPSLibrary::app::modules::Entertainment"); $Program = get_DeviceControlValue(c_Device_YamahaTuner, c_Control_Program); $Names = get_DeviceControlConfigValue(c_Device_YamahaTuner, c_Control_Program, c_Property_Names); $Codes = get_DeviceControlConfigValue(c_Device_YamahaTuner, c_Control_Program, c_Property_Codes); $Device = c_Device_YamahaTuner; ?> <table width=100%> <tr> <th id="rc_cmd_prev" rc_program="prev" rc_devicename="<?php echo $Device; ?> " class="rc_button">Program -</th> <th id="rc_cmd_next" rc_program="next" rc_devicename="<?php echo $Device; ?> " class="rc_button">Program +</th> </tr> </table>
<meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0"> <link rel="stylesheet" type="text/css" href="iRemote.css" /> <?include "Remote_Sender.php"?> </head> <body> <div id="containerTop"> <? IPSUtils_Include ("Entertainment.ips.php", "IPSLibrary::app::modules::Entertainment"); $Program = get_DeviceControlValue(c_Device_OnkyoTuner, c_Control_Program); $Names = get_DeviceControlConfigValue(c_Device_OnkyoTuner, c_Control_Program, c_Property_Names); $Codes = get_DeviceControlConfigValue(c_Device_OnkyoTuner, c_Control_Program, c_Property_Codes2); $Device = c_Device_OnkyoTuner; ?> <table width=100%> <tr> <th id="rc_cmd_prev" rc_program="prev" rc_devicename="<?php echo $Device; ?> " class="rc_button">Program -</th> <th id="rc_cmd_next" rc_program="next" rc_devicename="<?php echo $Device; ?> " class="rc_button">Program +</th> </tr> </table>