コード例 #1
0
ファイル: module.php プロジェクト: mcbeyel/IPSLocative
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $sid = $this->RegisterScript("Hook", "Hook", "<? //Do not delete or modify.\ninclude(IPS_GetKernelDirEx().\"scripts/__ipsmodule.inc.php\");\ninclude(\"../modules/IPSLocative/Module/module.php\");\n(new Locative(" . $this->InstanceID . "))->ProcessHookData();");
     $this->RegisterHook("/hook/locative", $sid);
 }
コード例 #2
0
    public function ApplyChanges()
    {
        //Never delete this line!
        parent::ApplyChanges();
        $this->RegisterVariableString("BufferIN", "BufferIN", "", -7);
        $this->RegisterVariableString("Dataset", "Dataset", "", -6);
        $this->RegisterVariableInteger("Sensoren", "Sensoren", "", -5);
        IPS_SetHidden($this->GetIDForIdent('BufferIN'), true);
        IPS_SetHidden($this->GetIDForIdent('Dataset'), true);
        $this->RegisterVariableString("Sensor1_ROM", "Sensor1_ROM", "", 5);
        $Sensor1_ROMID = $this->GetIDForIdent("Sensor1_ROM");
        $this->RegisterVariableString("Sensor1_Typ", "Sensor1_Typ", "", 6);
        $Sensor1_TypID = $this->GetIDForIdent("Sensor1_Typ");
        $this->RegisterVariableFloat("Sensor1_Temp", "Sensor1_Temp", "~Temperature", 7);
        $Sensor1_TempID = $this->GetIDForIdent("Sensor1_Temp");
        $this->RegisterVariableString("Sensor2_ROM", "Sensor2_ROM", "", 8);
        $Sensor2_ROMID = $this->GetIDForIdent("Sensor2_ROM");
        $this->RegisterVariableString("Sensor2_Typ", "Sensor2_Typ", "", 9);
        $Sensor2_TypID = $this->GetIDForIdent("Sensor2_Typ");
        $this->RegisterVariableFloat("Sensor2_Temp", "Sensor2_Temp", "~Temperature", 10);
        $Sensor2_TempID = $this->GetIDForIdent("Sensor2_Temp");
        $this->RegisterVariableString("Sensor3_ROM", "Sensor3_ROM", "", 11);
        $Sensor3_ROMID = $this->GetIDForIdent("Sensor3_ROM");
        $this->RegisterVariableString("Sensor3_Typ", "Sensor3_Typ", "", 12);
        $Sensor3_TypID = $this->GetIDForIdent("Sensor3_Typ");
        $this->RegisterVariableFloat("Sensor3_Temp", "Sensor3_Temp", "~Temperature", 13);
        $Sensor3_TempID = $this->GetIDForIdent("Sensor3_Temp");
//        IPS_SetParent($Sensor1_ROMID, $Dummymodul_1_ID); // Instanz einsortieren unter dem Objekt

    }
コード例 #3
0
ファイル: module.php プロジェクト: Vansdan/IPSModules
		public function ApplyChanges()
		{
			//Never delete this line!
			parent::ApplyChanges();
			
			$this->RegisterProfileIntegerEx("MessageType.E2", "Mail", "", "", Array(
				Array(0, "Ja/Nein", "", -1),
				Array(1, "Info", "", -1),
				Array(2, "Warnung", "", -1),
				Array(3, "Kritisch", "", -1),
			));
			
			$this->RegisterVariableBoolean("power", "Status", "~Switch");
			$this->EnableAction("power");
      
			$this->RegisterVariableInteger("messagetype", "Nachrichtentyp", "MessageType.E2");
			$this->EnableAction("messagetype");
			$this->RegisterVariableString("message", "Nachricht", "~TextBox");
			$this->EnableAction("message");
			
			$this->RegisterVariableString("program", "Programm", "~String");
			$this->RegisterVariableString("show", "Sendung", "~String");
			$this->RegisterVariableString("description", "Beschreibung", "~TextBox");
			
			$this->RegisterScript("update", "Aktualisieren", "<?\n\nE2_RequestUpdate(IPS_GetParent(\$_IPS['SELF']));\n\n?>", 0);
		}
コード例 #4
0
ファイル: module.php プロジェクト: BayaroX/BY_BatterieMonitor
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     //Variablenprofil erstellen
     $this->RegisterProfileBooleanEx("BMON.NeinJa", "Battery", "", "", array(array(false, "Nein", "Battery", 0xff00), array(true, "Ja", "Warning", 0xff0000)));
     //Fehlerhafte Konfiguration melden
     if ($this->ReadPropertyBoolean("PushMsgAktiv") === true and $this->ReadPropertyInteger("WebFrontInstanceID") == "") {
         $this->SetStatus(201);
     } elseif ($this->ReadPropertyBoolean("EMailMsgAktiv") === true and $this->ReadPropertyInteger("SmtpInstanceID") == "") {
         $this->SetStatus(202);
     } elseif ($this->ReadPropertyBoolean("EigenesSkriptAktiv") === true and $this->ReadPropertyInteger("EigenesSkriptID") == "") {
         $this->SetStatus(203);
     } elseif ($this->ReadPropertyBoolean("PushMsgAktiv") === false and $this->ReadPropertyBoolean("EMailMsgAktiv") === false and $this->ReadPropertyBoolean("EigenesSkriptAktiv") === false and $this->ReadPropertyBoolean("BatterieBenachrichtigungCBOX") === true) {
         $this->SetStatus(204);
     } else {
         $this->SetStatus(102);
     }
     //Variablen anlegen und einstellen
     $this->RegisterVariableInteger("BatteryAktorsAnzahlVAR", "Batterie Aktoren - Gesamt");
     $this->RegisterVariableInteger("BatteryLowAnzahlVAR", "Batterie Aktoren - Leer");
     $this->RegisterVariableBoolean("BatteryLowExistVAR", "Batterie Aktoren - Leere vorhanden", "BMON.NeinJa");
     $this->RegisterVariableString("TabelleBatteryAlleVAR", "Tabelle - Batterie Aktoren ALLE", "~HTMLBox");
     $this->RegisterVariableString("TabelleBatteryLowVAR", "Tabelle - Batterie Aktoren LEER", "~HTMLBox");
     IPS_SetIcon($this->GetIDForIdent("BatteryAktorsAnzahlVAR"), "Battery");
     IPS_SetIcon($this->GetIDForIdent("BatteryLowAnzahlVAR"), "Battery");
     IPS_SetIcon($this->GetIDForIdent("BatteryLowExistVAR"), "Battery");
     IPS_SetIcon($this->GetIDForIdent("TabelleBatteryAlleVAR"), "Battery");
     IPS_SetIcon($this->GetIDForIdent("TabelleBatteryLowVAR"), "Battery");
     //Timer erstellen
     $this->SetTimerInterval("BMON_UpdateTimer", $this->ReadPropertyInteger("Intervall"));
     //Update
     $this->Update();
 }
コード例 #5
0
ファイル: module.php プロジェクト: BayaroX/BY_IPSInformations
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     //Variablenprofil erstellen
     $this->RegisterProfileInteger("IPSInfo.MB", "", "", " MB", "0", "10240", "1");
     //Variablen erstellen
     $this->RegisterVariableString("IPSVersion", "IPS Version");
     $this->RegisterVariableFloat("IPSVersionMain", "IPS Version Main");
     $this->RegisterVariableInteger("IPSVersionBuild", "IPS Version Build");
     $this->RegisterVariableInteger("IPSEvents", "IPS Events");
     $this->RegisterVariableInteger("IPSInstanzen", "IPS Instanzen");
     $this->RegisterVariableInteger("IPSKategorien", "IPS Kategorien");
     $this->RegisterVariableInteger("IPSLinks", "IPS Links");
     $this->RegisterVariableInteger("IPSModule", "IPS Module");
     $this->RegisterVariableInteger("IPSObjekte", "IPS Objekte");
     $this->RegisterVariableInteger("IPSProfile", "IPS Profile");
     $this->RegisterVariableInteger("IPSSkripte", "IPS Skripte");
     $this->RegisterVariableInteger("IPSVariablen", "IPS Variablen");
     $this->RegisterVariableInteger("IPSMedien", "IPS Medien");
     $this->RegisterVariableInteger("IPSLibrarys", "IPS Bibliotheken");
     $this->RegisterVariableInteger("IPSScriptDirSize", "IPS Skripte in MB", "IPSInfo.MB");
     $this->RegisterVariableInteger("IPSLogDirSize", "IPS Logs in MB", "IPSInfo.MB");
     $this->RegisterVariableInteger("IPSDBSize", "IPS Datenbank in MB", "IPSInfo.MB");
     $this->RegisterVariableInteger("IPSStartTime", "Letzter IPS-Start", "~UnixTimestamp");
     $this->RegisterVariableInteger("SubscriptionAblaufVAR", "IPS Subscription - Ablaufdatum", "~UnixTimestamp");
     $this->Update();
     $this->SetTimerInterval("ReadSysInfo", $this->ReadPropertyInteger("Intervall"));
 }
コード例 #6
0
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     // ITFamilyCode und ITDeviceCode prüfen
     $ITFamilyCode = $this->ReadPropertyString('ITFamilyCode');
     $ITDeviceCode = $this->ReadPropertyString('ITDeviceCode');
     $LearnITCode = $this->ReadPropertyBoolean('LearnITCode');
     if ($LearnITCode) {
         $this->Learn();
     } elseif ($ITFamilyCode == '' or $ITDeviceCode == '') {
         // Status Error Felder dürfen nicht leer sein
         $this->SetStatus(202);
     } else {
         //Eingabe überprüfen
         if (strlen($ITFamilyCode) < 1 or strlen($ITFamilyCode) > 1) {
             $this->SetStatus(203);
         } elseif (strlen($ITDeviceCode) < 1 or strlen($ITDeviceCode) > 2) {
             $this->SetStatus(204);
         } elseif (!ctype_digit($ITDeviceCode)) {
             $this->SetStatus(205);
         } else {
             // Status aktiv
             $this->SetStatus(102);
             $this->SetupVar();
             $this->SetupProfiles();
         }
     }
     //Beschreibung in Modulsfeld setzen
     //IPS_SetInfo(47381, "Intertechno mit AIO Gateway schalten");
 }
コード例 #7
0
ファイル: module.php プロジェクト: Charykun/SymconOneWireLan
 /**
  * ApplyChanges
  */
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     switch ($this->ReadPropertyInteger("DataType")) {
         case 0:
             //DS18B20
             $this->RegisterVariableInteger("Health", "Health", "", 0);
             $this->RegisterVariableFloat("Temp", "Temperature", "~Temperature", 1);
             $this->UnregisterVariable("Vdd");
             $this->UnregisterVariable("Vad");
             $this->UnregisterVariable("Vsense");
             break;
         case 2:
             //DS18S20
             $this->RegisterVariableInteger("Health", "Health", "", 0);
             $this->RegisterVariableFloat("Temp", "Temperature", "~Temperature", 1);
             $this->UnregisterVariable("Vdd");
             $this->UnregisterVariable("Vad");
             $this->UnregisterVariable("Vsense");
             break;
         case 1:
             //DS2438
             $this->RegisterVariableInteger("Health", "Health", "", 0);
             $this->RegisterVariableFloat("Temp", "Temperature", "~Temperature", 1);
             $this->RegisterVariableFloat("Vdd", "Vdd", "~Volt", 2);
             $this->RegisterVariableFloat("Vad", "Vad", "~Volt", 3);
             $this->RegisterVariableFloat("Vsense", "Vsense", "mV", 4);
             break;
     }
 }
コード例 #8
0
ファイル: module.php プロジェクト: Seb0815/ips4Windows
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $sid = $this->RegisterScript("ips4WinDeviceHook", "ips4WinDeviceHook", "<? //Do not delete or modify.\ninclude(IPS_GetKernelDirEx().\"scripts/__ipsmodule.inc.php\");\ninclude(\"../modules/ips4Windows/ips4WinDeviceRegistration/module.php\");\n(new ips4WinDeviceRegistration(" . $this->InstanceID . "))->ProcessHookData();");
     $this->RegisterHook("/hook/ips4WinDeviceReg", $sid);
 }
コード例 #9
0
ファイル: module.php プロジェクト: Bonox1/SymconMisc
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterProfileIntegerEx("Status.SONOS", "Information", "", "", array(array(0, "Prev", "", -1), array(1, "Play", "", -1), array(2, "Pause", "", -1), array(3, "Next", "", -1)));
     $this->RegisterProfileInteger("Volume.SONOS", "Intensity", "", " %", 0, 100, 1);
     //Build Associations according to user settings
     include __DIR__ . "/radio_stations.php";
     $Associations = array();
     $AvailableStations = get_available_stations();
     $WebFrontStations = $this->ReadPropertyString("WebFrontStations");
     $WebFrontStationsArray = explode(",", $WebFrontStations);
     $FavoriteStation = $this->ReadPropertyString("FavoriteStation");
     $Value = 0;
     foreach ($AvailableStations as $key => $val) {
         if (in_array($val['name'], $WebFrontStationsArray) || $WebFrontStations === "<alle>") {
             if ($val['name'] === $FavoriteStation) {
                 $Color = 0xfcec00;
             } else {
                 $Color = -1;
             }
             $Associations[] = array($Value++, $val['name'], "", $Color);
         }
     }
     if (IPS_VariableProfileExists("Radio.SONOS")) {
         IPS_DeleteVariableProfile("Radio.SONOS");
     }
     $this->RegisterProfileIntegerEx("Radio.SONOS", "Speaker", "", "", $Associations);
     $this->RegisterVariableInteger("Status", "Status", "Status.SONOS");
     $this->EnableAction("Status");
     $this->RegisterVariableInteger("Volume", "Volume", "Volume.SONOS");
     $this->EnableAction("Volume");
     $this->RegisterVariableInteger("Radio", "Radio", "Radio.SONOS");
     $this->EnableAction("Radio");
 }
コード例 #10
0
ファイル: module.php プロジェクト: paresy/paresyMisc
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterVariableInteger("WasteTime", "Restmuell", "~UnixTimestamp");
     $this->RegisterVariableInteger("BioTime", "Biotonne", "~UnixTimestamp");
     $this->RegisterVariableInteger("PaperTime", "Papiertonne", "~UnixTimestamp");
 }
コード例 #11
0
ファイル: module.php プロジェクト: Vansdan/IPSPhoenixILC
 public function ApplyChanges() {
   parent::ApplyChanges();
   $stateId = $this->RegisterVariableBoolean("STATE", "Zustand", "~Switch", 1);
   $this->EnableAction("STATE");
   $serviceNameId = $this->RegisterVariableString("SERVICE_NAME", "Servicename", "", 3);
   $serviceReferenceId = $this->RegisterVariableString("SERVICE_REFERENCE", "Servicereferenz", "", 4);
   $this->RegisterTimer('INTERVAL', $this->ReadPropertyInteger('UpdateInterval'), 'E2_RequestData($id)');
 }
コード例 #12
0
ファイル: module.php プロジェクト: Bonox1/SymconMisc
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterVariableInteger("RainValue", "Regenwert");
     //$this->RegisterMediaImage("RadarImage", "Radarbild", $this->imagePath);
     //$this->RegisterEventCyclic("UpdateTimer", "Automatische aktualisierung", 15);
 }
コード例 #13
0
 public function ApplyChanges()
 {
     parent::ApplyChanges();
     //		$suffix=str_ireplace(array('module','_'),'',get_class($this));
     $this->RegisterProfileBooleanEx("RPC.OnlineState", "Information", "", "", array(array(false, "offline", "", -1), array(true, "online", "", -1)));
     $this->RegisterVariableBoolean("OnlineState", "Online Status", "RPC.OnlineState", 9);
     $this->RegisterProfileBooleanEx("RPC.OnOff", "Information", "", "", array(array(false, "Aus", "", -1), array(true, "Ein", "", -1)));
 }
コード例 #14
0
ファイル: module.php プロジェクト: Vansdan/IQLFeiertage
	public function ApplyChanges() {
		//Never delete this line!
		parent::ApplyChanges();
		
		$this->RegisterVariableBoolean("IsHoliday", "Is Holiday");
		$this->RegisterVariableString("Holiday", "Feiertag");
		//$this->RegisterEventCyclic("UpdateTimer", "Automatische aktualisierung", 15);
	}
コード例 #15
0
ファイル: module.php プロジェクト: TierFreund/IpsModules
 public function ApplyChanges()
 {
     parent::ApplyChanges();
     $this->RegisterVariableBoolean('STATE', 'Status', "~Switch");
     $this->RegisterVariableInteger('BRIGHTNESS', 'Helligkeit', "~Intensity.100");
     $this->EnableAction('STATE');
     $this->EnableAction('BRIGHTNESS');
     $this->UpdateLinks();
 }
コード例 #16
0
ファイル: module.php プロジェクト: symcon/SymconLJ
		public function ApplyChanges()
		{
			//Never delete this line!
			parent::ApplyChanges();
			
			//Connect to available splitter or create a new one
			$this->ConnectParent("{1C902193-B044-43B8-9433-419F09C641B8}");
			
		}
コード例 #17
0
ファイル: module.php プロジェクト: symcon/SymconBC
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterVariableFloat("Volt", "Volt", "Volt.230", 1);
     $this->RegisterVariableFloat("Ampere", "Ampere", "Ampere.16", 2);
     $this->RegisterVariableFloat("Watt", "Watt", "Watt.14490", 3);
     $this->RegisterVariableFloat("kWh", "Total kWh", "Electricity", 4);
     $this->SetTimerInterval("Poller", $this->ReadPropertyInteger("Poller"));
 }
コード例 #18
0
 public function ApplyChanges()
 {
     parent::ApplyChanges();
     $this->RegisterVariableBoolean("IsSchoolHoliday", "Sind Ferien ?");
     $this->RegisterVariableString("SchoolHoliday", "Ferien");
     // 15 Minuten Timer
     $this->RegisterTimer("UpdateSchoolHolidays", 15 * 60 * 1000, 'SCHOOL_Update($_IPS[\'TARGET\']);');
     // Nach übernahme der Einstellungen oder IPS-Neustart einmal Update durchführen.
     $this->Update();
 }
コード例 #19
0
ファイル: module.php プロジェクト: Vansdan/SymconTest
		public function ApplyChanges()
		{
			//Never delete this line!
			parent::ApplyChanges();
			
			//Lets register a variable with action
			$this->RegisterVariableInteger("TestVariable", "Test", "~Intensity.100");
			$this->EnableAction("TestVariable");
			
		}
コード例 #20
0
ファイル: module.php プロジェクト: Nall-chan/paresyMisc
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterVariableInteger("WasteTime", "Restmuell", "~UnixTimestamp");
     $this->RegisterVariableInteger("BioTime", "Biotonne", "~UnixTimestamp");
     $this->RegisterVariableInteger("PaperTime", "Papiertonne", "~UnixTimestamp");
     $this->RegisterTimer("RequestInfo", 0, 'EL_RequestInfo($_IPS[\'TARGET\']);');
     $this->RequestInfo();
 }
コード例 #21
0
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     //Variable erstellen
     $HTMLBox_VarID = $this->RegisterVariableString("HTMLBoxTabelle", "Tabelle", "~HTMLBox");
     IPS_SetIcon($HTMLBox_VarID, "Database");
     $this->Update();
     $this->SetTimerInterval("UpdateTabelle", $this->ReadPropertyInteger("Intervall"));
 }
コード例 #22
0
ファイル: module.php プロジェクト: Seb0815/ips4Windows
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $vid = $this->RegisterVariableString("ips4WinCortanaVoiceCommands", "CortanaVoiceCommands", "", 0);
     $this->id = $vid;
     $this->RegisterScript("ips4WinCortanaVoiceCommandsScript", "ips4WinCortanaSprachbefehle", "<? //Do not delete or modify.\ninclude(IPS_GetKernelDirEx().\"scripts/__ipsmodule.inc.php\");\ninclude(\"../modules/ips4Windows/ips4WinCortana/module.php\");\n\n\$ips4WinCortana = new ips4WinCortana(" . $vid . ");\n\n//Your code goes here...\n\n\$ips4WinCortana->EnableDebug(true);\n\n //you can add up to 100 sections (called Commands, each need a unique name like Block1\\/Block2 or what ever you like)\n //each section can have up to 10 speach commands and include multiple PhraseLists (like {room}) entries\n\$ips4WinCortana->AddVoiceCommand(\"Block1\",\"schalte das Licht im {room} {action}\");\n\$ips4WinCortana->AddVoiceCommand(\"Block2\",\"{action} das Rollo im {room}\");\n\n //each section needs a Feedback and Example entry. Feedback is used when command was processed from Cortana\n //Example will shown, when user asks Cortana \"What can I say?/Was kann ich sagen?\"\n\$ips4WinCortana->AddCommandExample(\"Block1\",\"schalte das Licht im Wohnzimmer an\");\n\$ips4WinCortana->AddCommandExample(\"Block2\",\"schliesse das Rollo im Büro\");\n\n\$ips4WinCortana->AddCommandFeedback(\"Block1\",\"ok, ich verarbeite deinen Befehl\");\n\$ips4WinCortana->AddCommandFeedback(\"Block2\",\"ich arbeite dran\");\n\n //you can add multiple PhraseLists with an total of max. 2000 entries\n\$ips4WinCortana->AddActionPhraseCommand(\"action\",\"öffne\");\n\$ips4WinCortana->AddActionPhraseCommand(\"action\",\"schliesse\");\n\$ips4WinCortana->AddActionPhraseCommand(\"action\",\"an\");\n\$ips4WinCortana->AddActionPhraseCommand(\"action\",\"aus\");\n\$ips4WinCortana->AddActionPhraseCommand(\"room\",\"Wohnzimmer\");\n\$ips4WinCortana->AddActionPhraseCommand(\"room\",\"Büro\");\n\n //ProcessData will convert all the entries to something readable for ips4Windows App\n\$ips4WinCortana->ProcessData();");
     $sid = $this->RegisterScript("ips4WinCortanaHook", "ips4WinCortanaHook", "<? //Do not delete or modify.\ninclude(IPS_GetKernelDirEx().\"scripts/__ipsmodule.inc.php\");\ninclude(\"../modules/ips4Windows/ips4WinCortana/module.php\");\n\$ips4WinCortana = new ips4WinCortana(" . $this->InstanceID . ");\n\$ips4WinCortana->ProcessHookData();\nif (\$_POST['ips4Command'] != \"GetConfig\")\n{\n\n//Your code goes here...\n\n\$resultArray = \$ips4WinCortana->GetCortanaResult();\n//\$resultArray has all the data from Cortana\n//textSpoken - full message captured by Cortana\n//CommandName - Command of textSpoken line, user defined in ips4CortanaSprachbefehle script (aka section)\n//action - used entry from PhraseList defined in ips4CortanaSprachbefehle script\n//room - used entry from PhraseList defined in ips4CortanaSprachbefehle script\n//feedback - if you used SendFeedbackVerify or SendFeedbackVerifyDetailed you will get the result from this commands, multiple iteration will be added with \"#+#\" as seperator. Use explode ( \"#+#\" , \$resultArray->feedback) to work with the result array\nIPS_LogMessage(\"WebHook Cortana\", print_r(\$resultArray, true));\n//do something useful\n//...\n//Cortana waits for feedback, otherwise the request will timeout in seconds and shows an error\n//Options: sucess - SendFeedbackSuccess(Msg), failure - SendFeedbackFailure(Msg)\n//verify with yes/no - SendFeedbackVerify(Msg), verify with more option - SendFeedbackVerifyDetailed(Msg, ListofOptions as array)\n\$result = \$ips4WinCortana->SendFeedbackSuccess(\"Erfolgreich ausgeführt\");\n//last line of the script must be an echo result\necho \$result;\n}");
     $this->RegisterHook("/hook/ips4WinCortana", $sid);
 }
コード例 #23
0
ファイル: module.php プロジェクト: IQLiving/IQLFeiertage
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterVariableBoolean("IsHoliday", "Is Holiday");
     $this->RegisterVariableString("Holiday", "Feiertag");
     $this->SetTimerInterval("UpdateTimer", $this->ReadPropertyInteger("timerinterval") * 60 * 60 * 1000);
     // Set Hidden
     IPS_SetHidden($this->GetIDForIdent("IsHoliday"), true);
     $this->Update();
 }
コード例 #24
0
ファイル: module.php プロジェクト: mcbeyel/IPSAbsence
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $groups = $this->ReadPropertyInteger("Groups");
     for ($i = 0; $i < $groups; $i++) {
         $this->createGroupWithID("Action Group " . $i, "group_" . $i, $this->InstanceID);
     }
     $active = $this->ReadPropertyBoolean("Active");
     $this->SetTimerInterval("AbsenceTimer", $active ? 1000 : 0);
 }
コード例 #25
0
ファイル: module.php プロジェクト: Vansdan/SymconHUE
  public function ApplyChanges() {
    $this->Host = "";
    $this->User = "";
    $this->CategoryLights = 0;

    parent::ApplyChanges();

    $this->RegisterTimer('UPDATE', $this->ReadPropertyString('UpdateInterval'), 'HUE_SyncStates($id)');

    $this->ValidateConfiguration();
  }
コード例 #26
0
ファイル: module.php プロジェクト: Nall-chan/IQLFeiertage
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $this->RegisterVariableBoolean("IsHoliday", "Is Holiday");
     $this->RegisterVariableString("Holiday", "Feiertag");
     // 15 Minuten Timer
     $this->RegisterTimer("UpdateIQLFeiertage", 15 * 60, 'IQLFT_Update($_IPS[\'TARGET\']);');
     // Nach übernahme der Einstellungen oder IPS-Neustart einmal Update durchführen.
     $this->Update();
     //$this->RegisterEventCyclic("UpdateTimer", "Automatische aktualisierung", 15);
 }
コード例 #27
0
ファイル: module.php プロジェクト: tobiber/SymconTimer
 public function ApplyChanges()
 {
     // Diese Zeile nicht löschen
     parent::ApplyChanges();
     // Wenn API gesetzt, dann Script aktiv schalten
     if (strlen($this->ReadPropertyString("TimerEventObject")) > 0) {
         //Instanz ist aktiv
         $this->SetStatus(102);
     } else {
         //Instanz ist inaktiv
         $this->SetStatus(104);
     }
 }
コード例 #28
0
ファイル: module.php プロジェクト: BayaroX/BY_HostMonitor
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     //Variablenprofil erstellen
     $this->RegisterProfileBooleanEx("HMON.OfflineOnline", "Network", "", "", array(array(false, "Offline", "", 0xff0000), array(true, "Online", "", 0xff00)));
     if ($this->ReadPropertyString("HostName") != "" and $this->ReadPropertyString("HostAdresse") != "") {
         //Status setzen
         $this->SetStatus(102);
         //Variablen erstellen
         $this->RegisterVariableBoolean("HostStatus", "Host - Status", "HMON.OfflineOnline");
         $this->RegisterVariableBoolean("HostBenachrichtigungsFlag", "Tmp");
         IPS_SetHidden($this->GetIDForIdent("HostBenachrichtigungsFlag"), true);
         $this->RegisterVariableInteger("HostLastOnline", "Host - Zuletzt online", "~UnixTimestamp");
         IPS_SetIcon($this->GetIDForIdent("HostLastOnline"), "Calendar");
         //Logging aktivieren
         if ($this->ReadPropertyBoolean("LoggingAktiv") === true) {
             $ArchiveHandlerID = IPS_GetInstanceListByModuleID('{43192F0B-135B-4CE7-A0A7-1475603F3060}')[0];
             AC_SetLoggingStatus($ArchiveHandlerID, $this->GetIDForIdent("HostStatus"), true);
             IPS_ApplyChanges($ArchiveHandlerID);
         } else {
             $ArchiveHandlerID = IPS_GetInstanceListByModuleID('{43192F0B-135B-4CE7-A0A7-1475603F3060}')[0];
             AC_SetLoggingStatus($ArchiveHandlerID, $this->GetIDForIdent("HostStatus"), false);
             IPS_ApplyChanges($ArchiveHandlerID);
         }
         //Timer erstellen
         $this->SetTimerInterval("HMON_UpdateTimer", $this->ReadPropertyInteger("Intervall"));
         $this->SetTimerByIdent_InSekunden("HMON_BenachrichtigungOfflineTimer", false);
         IPS_SetHidden($this->GetIDForIdent("HMON_BenachrichtigungOfflineTimer"), true);
         //Update
         $this->Update();
     } else {
         $this->SetStatus(206);
     }
     //Fehlerhafte Konfiguration melden
     if ($this->ReadPropertyBoolean("PushMsgAktiv") === true and $this->ReadPropertyInteger("WebFrontInstanceID") == "") {
         $this->SetStatus(201);
     }
     if ($this->ReadPropertyBoolean("EMailMsgAktiv") === true and $this->ReadPropertyInteger("SmtpInstanceID") == "") {
         $this->SetStatus(202);
     }
     if ($this->ReadPropertyBoolean("EigenesSkriptAktiv") === true and $this->ReadPropertyInteger("EigenesSkriptID") == "") {
         $this->SetStatus(203);
     }
     if ($this->ReadPropertyBoolean("PushMsgAktiv") === false and $this->ReadPropertyBoolean("EMailMsgAktiv") === false and $this->ReadPropertyBoolean("EigenesSkriptAktiv") === false and $this->ReadPropertyBoolean("OfflineBenachrichtigung") === true) {
         $this->SetStatus(204);
     }
     if ($this->ReadPropertyBoolean("OfflineBenachrichtigung") === false and $this->ReadPropertyBoolean("OnlineBenachrichtigung") === true) {
         $this->SetStatus(205);
     }
 }
コード例 #29
0
ファイル: module.php プロジェクト: Bonox1/IPS_Modules
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     // 			$this->RegisterProfileIntegerEx("Status.SONOS", "Information", "", "", Array(
     // 				Array(0, "Prev", "", -1),
     // 				Array(1, "Play", "", -1),
     // 				Array(2, "Pause", "", -1),
     // 				Array(3, "Next", "", -1)
     // 			));
     // 			$this->RegisterProfileInteger("Volume.SONOS", "Intensity", "", " %", 0, 100, 1);
     $this->RegisterVariableBoolean("status", "Status", "Switch");
     $this->EnableAction("status");
 }
コード例 #30
0
ファイル: module.php プロジェクト: Nall-chan/IPSVoiceRSS
 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     if (trim($this->ReadPropertyString('Apikey')) == "") {
         $this->SetStatus(104);
     } else {
         $this->SetStatus(102);
     }
     if (trim($this->ReadPropertyString('Apikey')) != $this->ReadPropertyString('Apikey')) {
         @IPS_SetProperty($this->InstanceID, 'Apikey', trim($this->ReadPropertyString('Apikey')));
         @IPS_ApplyChanges($this->InstanceID);
     }
 }