13.07.2015 Aufrufe

Download - IP-Symcon

Download - IP-Symcon

Download - IP-Symcon

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

$ids = <strong>IP</strong>S_GetInstanceListByModuleID("{A151ECE9-D733-4FB9-AA15-7F7DD10C58AF}");if(sizeof($ids) == 0)die("Keine HomeMatic Socket Instanz gefunden!");$msgs = HM_ReadServiceMessages($ids[0]);if($msgs === false)die("Verbindung zur CCU fehlgeschlagen");if(sizeof($msgs) == 0)$str .= "Keine Servicemeldungen!";foreach($msgs as $msg){if(array_key_exists($msg['Message'], $texte)) {$text = $texte[$msg['Message']];} else {$text = $msg['Message'];}$id = GetInstanceIDFromHMID($msg['Address']);if(<strong>IP</strong>S_InstanceExists($id)) {$name = <strong>IP</strong>S_GetLocation($id);} else {$name = "Gerät nicht in <strong>IP</strong>-<strong>Symcon</strong> eingerichtet";}}$str .= "".$name."".$msg['Address']."".$text."";$str .= "";$vid = CreateVariableByName($parentID, "Content", 3);<strong>IP</strong>S_SetIcon($vid, "Information");<strong>IP</strong>S_SetVariableCustomProfile($vid, "~HTMLBox");SetValue($vid, $str);function GetInstanceIDFromHMID($sid){$ids = <strong>IP</strong>S_GetInstanceListByModuleID("{EE4A81C6-5C90-4DB7-AD2F-F6BBD521412E}");foreach($ids as $id){$a = explode(":", HM_GetAddress($id));$b = explode(":", $sid);if($a[0] == $b[0]){return $id;}}return 0;}function CreateVariableByName($id, $name, $type){$vid = @<strong>IP</strong>S_GetVariableIDByName($name, $id);if($vid === false){$vid = <strong>IP</strong>S_CreateVariable($type);<strong>IP</strong>S_SetParent($vid, $id);<strong>IP</strong>S_SetName($vid, $name);

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!