/**
	 *
	 * Callback Funktion, die vor dem behandeln eines Events aufgerufen wird
	 *
	 * @return boolean Funktions Ergebnis, bei false wird das Event NICHT weitergereicht
	 */
	function IPSMessageHandler_BeforeHandleEvent($variable, $value, IPSComponent $component, IPSModule $module) {
		switch($variable) {
			// Taster zur Ansteuerung der Markisen
			case 59542: /*InpS2*/
			case 37689: /*InpS6*/ 
			case 56752: /*InpS3*/ 
			case 52590: /*InpS7*/ 

			// Taster zur Steuerung der Terrassenbeleuchtung
			case 12456: /*InpS1*/ 
			case 37693: /*InpS5*/ 
			case 57359: /*InpL1*/ 
			case 55574: /*InpL5*/ 

			// Taster zur Ansteuerung von Audio Terrasse
			case 51018: /*InpS4*/   /*Volume-*/
			case 44967: /*InpS8*/   /*Volume+*/
			case 31397: /*InpL6*/   /*Source*/
			case 33116: /*InpL3*/   /*Previous Titel*/
			case 48165: /*InpL7*/   /*Next Titel*/
			case 35556: /*InpL4*/   /*PowerOff*/
			case 43222: /*InpL8*/   /*PowerOn*/
				if (GetValue(42673)==0) {
					return true; // Nur bei Anwesenheit
				} else {
					IPSLogger_Not(__file__, 'Terrassentaster bei Abwesenheit aktiviert ...!!!', 2);
					return false;
				}
				break;
			default:
				return true;
		}
		return true;
	}
	}

	Register_PhpErrorHandler($moduleManager);

	
	// ----------------------------------------------------------------------------------------------------------------------------
	// Some Tests
	// ----------------------------------------------------------------------------------------------------------------------------
	IPSUtils_Include ("IPSLogger.inc.php", "IPSLibrary::app::core::IPSLogger");

	//  Some Test Messages
	IPSLogger_Fat(__file__, 'Test for a Fatal Error');
	IPSLogger_Err(__file__, 'Test for a Error ...');
	IPSLogger_Wrn(__file__, 'Test for a Warning');
	IPSLogger_Not(__file__, 'Test for a Notification with Priority 0 (High)');
	IPSLogger_Not(__file__, 'Test for a Notification with Priority 10 (Low)');
 	IPSLogger_Inf(__file__, 'Test for a Information Message ...');
 	IPSLogger_Dbg(__file__, 'Test for a Debug Message ...');
 	IPSLogger_Com(__file__, 'Test for a Communication Message ...');
 	IPSLogger_Trc(__file__, 'Test for a Trace Message ...');
 	IPSLogger_Tst(__file__, 'Test for a Test Message ...');

	// ------------------------------------------------------------------------------------------------
	function Register_PhpErrorHandler($moduleManager) {
		$file = IPS_GetKernelDir().'scripts\\__autoload.php';

		if (!file_exists($file)) {
			throw new Exception($file.' could NOT be found!', E_USER_ERROR);
		}
		$FileContent = file_get_contents($file);