function Entertainment_SetDevicePowerByDeviceName($DeviceName, $Value, $MessageType=c_MessageType_Action) {
		IPSLogger_Trc(__file__, 'Handle Device Power for "'.$DeviceName.'" '.bool2OnOff($Value));
		$PowerId = get_ControlIdByDeviceName($DeviceName, c_Control_DevicePower, false);
		if ($PowerId!==false) {
		   if (!is_bool($Value)) { 												/*Toggle Power Value*/
      		$Value = !GetValue($PowerId);
				IPSLogger_Dbg(__file__, "Toogle Device Power for '$DeviceName' to ".bool2OnOff($Value));
   		}
			if (GetValue($PowerId) <> $Value) {
				IPSLogger_Inf(__file__, 'Set Device Power for "'.$DeviceName.'" '.bool2OnOff($Value));
				if ($Value) {
					Entertainment_SendDataByDeviceName($DeviceName, c_Control_DevicePower,
																	array(c_Property_CommPowerOn, c_Property_CommPower), $MessageType);
				} else {
					Entertainment_SendDataByDeviceName($DeviceName, c_Control_DevicePower,
																	array(c_Property_CommPowerOff, c_Property_CommPower), $MessageType);
				}
				SetValue($PowerId, $Value);
				Entertainment_Connect($DeviceName, $Value, true);
				Entertainment_SetDeviceControlByDeviceName($DeviceName, c_Control_Muting, false);
		      Entertainment_SetRoomPowerByDeviceName($DeviceName, $Value);
			}
		}
	}
<?
	/**@ingroup entertainment
	 * @{
	 *
	 * @file          Entertainment_ConnectAsynchron.ips.php
	 * @author        Andreas Brauneis
	 * @version
	 * Version 2.50.1, 31.01.2012<br/>
	 *
	 * Herstellen einer Geräte Verbindung im asynchronen Modus.
	 *
	 * Dieses Script wird gegebenenfalls von Entertainment_Connect.inc.php durch Verwendung von
	 * IPS_Execute aufgerufen, um asynchron eine Verbindung aufzubauen.
	 *
	 */
	include_once "Entertainment_Connect.inc.php";

 	Entertainment_Connect($DeviceName, $Value);

  /** @}*/
?>