public function Update() { //Anzahl IPS Events ermitteln $this->SetValueInteger("IPSEvents", count(IPS_GetEventList())); //Anzahl IPS Instanzen ermitteln $this->SetValueInteger("IPSInstanzen", count(IPS_GetInstanceList())); //Anzahl IPS Kategorien ermitteln $this->SetValueInteger("IPSKategorien", count(IPS_GetCategoryList())); //Anzahl IPS Links ermitteln $this->SetValueInteger("IPSLinks", count(IPS_GetLinkList())); //Anzahl IPS Module ermitteln $this->SetValueInteger("IPSModule", count(IPS_GetModuleList())); //Anzahl IPS Objekte ermitteln $this->SetValueInteger("IPSObjekte", count(IPS_GetObjectList())); //Anzahl IPS Profile ermitteln $this->SetValueInteger("IPSProfile", count(IPS_GetVariableProfileList())); //Anzahl IPS Skripte ermitteln $this->SetValueInteger("IPSSkripte", count(IPS_GetScriptList())); //Anzahl IPS Variablen ermitteln $this->SetValueInteger("IPSVariablen", count(IPS_GetVariableList())); //Anzahl IPS Variablen ermitteln $this->SetValueInteger("IPSMedien", count(IPS_GetMediaList())); //Anzahl IPS Librarys ermitteln $this->SetValueInteger("IPSLibrarys", count(IPS_GetLibraryList())); // Groesse des Script-Verzeichnis $this->SetValueFloat("IPSScriptDirSize", $this->GetDirSize(IPS_GetKernelDir() . "scripts")); // Groesse des Log-Verzeichnis $this->SetValueFloat("IPSLogDirSize", $this->GetDirSize(IPS_GetLogDir())); // Groesse des Datenbank-Verzeichnis $this->SetValueFloat("IPSDBSize", $this->GetDirSize(IPS_GetKernelDir() . "db")); //Letzter IPS-Start $this->SetValueInteger("IPSStartTime", IPS_GetUptime()); }
public function Update() { //Anzahl IPS Events ermitteln $this->SetValueInteger("IPSEvents", count(IPS_GetEventList())); //Anzahl IPS Instanzen ermitteln $this->SetValueInteger("IPSInstanzen", count(IPS_GetInstanceList())); //Anzahl IPS Kategorien ermitteln $this->SetValueInteger("IPSKategorien", count(IPS_GetCategoryList())); //Anzahl IPS Links ermitteln $this->SetValueInteger("IPSLinks", count(IPS_GetLinkList())); //Anzahl IPS Module ermitteln $this->SetValueInteger("IPSModule", count(IPS_GetModuleList())); //Anzahl IPS Objekte ermitteln $this->SetValueInteger("IPSObjekte", count(IPS_GetObjectList())); //Anzahl IPS Profile ermitteln $this->SetValueInteger("IPSProfile", count(IPS_GetVariableProfileList())); //Anzahl IPS Skripte ermitteln $this->SetValueInteger("IPSSkripte", count(IPS_GetScriptList())); //Anzahl IPS Variablen ermitteln $this->SetValueInteger("IPSVariablen", count(IPS_GetVariableList())); //Anzahl IPS Variablen ermitteln $this->SetValueInteger("IPSMedien", count(IPS_GetMediaList())); //Anzahl IPS Librarys ermitteln $this->SetValueInteger("IPSLibrarys", count(IPS_GetLibraryList())); // Groesse des Script-Verzeichnis $this->SetValueInteger("IPSScriptDirSize", $this->GetDirSize(IPS_GetKernelDir() . "scripts")); // Groesse des Log-Verzeichnis $this->SetValueInteger("IPSLogDirSize", $this->GetDirSize(IPS_GetLogDir())); // Groesse des Datenbank-Verzeichnis $this->SetValueInteger("IPSDBSize", $this->GetDirSize(IPS_GetKernelDir() . "db")); //Letzter IPS-Start $this->SetValueInteger("IPSStartTime", IPS_GetKernelStartTime()); //Subscription Ablaufdatum $Benutzername = $this->ReadPropertyString("IPSForumBenutzer"); $Passwort = $this->ReadPropertyString("IPSForumPasswort"); if (strlen($Benutzername) > 0 and strlen($Passwort) > 0) { $page = $this->vBulletinLoginIPS($Benutzername, $Passwort); preg_match('|Subskription bis:.(.*)\\W|', $page, $SubscriptionMatch); if ($SubscriptionMatch) { $SubscriptionAblaufdatumX = $SubscriptionMatch[1]; $SubscriptionAblaufdatum = trim(strip_tags($SubscriptionAblaufdatumX)); $SubscriptionAblaufdatum = date_create_from_format('d.m.y', $SubscriptionAblaufdatum); $SubscriptionAblaufdatumUnix = strtotime($SubscriptionAblaufdatum->format('d.m.Y')); $this->SetValueInteger("SubscriptionAblaufVAR", $SubscriptionAblaufdatumUnix); } preg_match('|Version:.(.*).#(.*)|', $page, $VersionMatch); if ($VersionMatch) { $VersionMatchV = $VersionMatch[1]; $VersionMatchB = $VersionMatch[2]; $VersionMatchV = trim(strip_tags($VersionMatchV)); $VersionMatchB = trim(strip_tags($VersionMatchB)); $VersionALL = $VersionMatchV . " #" . $VersionMatchB; $this->SetValueString("IPSVersion", $VersionALL); $this->SetValueFloat("IPSVersionMain", (double) $VersionMatchV); $this->SetValueInteger("IPSVersionBuild", (int) $VersionMatchB); } } }
private function Logging($Text) { if ($this->ReadPropertyBoolean("Logging") == false) { return; } $ordner = IPS_GetLogDir() . "Withings"; if (!is_dir($ordner)) { mkdir($ordner); } if (!is_dir($ordner)) { return; } $time = date("d.m.Y H:i:s"); $logdatei = IPS_GetLogDir() . "Withings/Withings.log"; $datei = fopen($logdatei, "a+"); fwrite($datei, $time . " " . $Text . chr(13)); fclose($datei); }
/** * Constructor * @param integer $InstanceID * @param string $json_file Path to module.json */ public function __construct($InstanceID, $json_file) { parent::__construct($InstanceID); $json = @file_get_contents($json_file); $data = @json_decode($json, true); $this->module_data = $data; $this->name = $data["name"]; if (!isset($this->name)) { IPS_LogMessage(__CLASS__, "Reading Moduldata from module.json failed!"); return false; } $this->DEBUGLOG = IPS_GetLogDir() . "/" . $data["name"] . "debug.log"; return true; }