/**
  * overload internal IPS_ApplyChanges($id) function
  */
 public function ApplyChanges()
 {
     // Diese Zeile nicht loeschen
     parent::ApplyChanges();
     if (IPS_GetKernelRunlevel() == self::KR_READY) {
         if ($this->HasActiveParent()) {
             $this->SetStatus(self::ST_AKTIV);
         } else {
             $this->SetStatus(self::ST_NOPARENT);
         }
         //check status
     }
     //must be here!!
     $this->SetStatusVariables();
     //Update Variables
 }
 /**
  * Data Interface tp Parent (IO-TX)
  * Forward commands to IO Instance
  * @param String $Data
  * @return bool
  */
 private function SendText($Data)
 {
     $res = false;
     $json = json_encode(array("DataID" => $this->module_interfaces['IO-TX'], "Buffer" => utf8_encode($Data)));
     if ($this->HasActiveParent()) {
         $this->debug(__FUNCTION__, $Data);
         $res = parent::SendDataToParent($json);
     } else {
         $this->debug(__FUNCTION__, 'No Parent');
     }
     return $res;
 }
 /**
  * overload internal IPS_ApplyChanges($id) function
  */
 public function ApplyChanges()
 {
     // Diese Zeile nicht loeschen
     parent::ApplyChanges();
     if ($this->isActive()) {
         $this->SetStatus(self::ST_AKTIV);
         $i = $this->GetUpdateInterval();
         $this->SetTimerInterval('Update', $i * 1000);
         //ms
         $this->init();
     } else {
         $this->SetStatus(self::ST_INACTIV);
         $this->SetTimerInterval('Update', 0);
     }
 }
 /**
  * overloaded function to maintain variables and timer
  */
 protected function SetStatusVariables()
 {
     parent::SetStatusVariables();
     $caps = $this->GetCaps();
     if (count($caps) < 1) {
         return;
     }
     if (!isset($caps['Timer'])) {
         $tid = @IPS_GetEventIDByName("DeviceTimer", $this->InstanceID);
         if ($tid > 0) {
             IPS_LogMessage(__CLASS__, __FUNCTION__ . "Drop DeviceTimer ({$tid})");
             IPS_DeleteEvent($tid);
         }
     }
 }
 /**
  * Data Interface to Childs
  * @param $Data
  */
 public function SendDataToChildren($Data)
 {
     parent::SendDataToChildren($Data);
 }
 /**
  * Forward command to Splitter parent
  * @param $Data
  * @return bool
  */
 public function SendDataToParent($Data)
 {
     $json = json_encode($Data);
     $this->debug(__FUNCTION__, $json);
     $res = parent::SendDataToParent($json);
     return $res;
 }