当前位置: 首页>>代码示例>>PHP>>正文


PHP IPS_SetHidden函数代码示例

本文整理汇总了PHP中IPS_SetHidden函数的典型用法代码示例。如果您正苦于以下问题:PHP IPS_SetHidden函数的具体用法?PHP IPS_SetHidden怎么用?PHP IPS_SetHidden使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IPS_SetHidden函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Entertainment_SetRoomControlVisibility

	function Entertainment_SetRoomControlVisibility($RoomControlId, $Value) {
	   $RoomName     = IPS_GetName(IPS_GetParent($RoomControlId));
	   $RoomConfig   = get_RoomConfiguration();
	   $ControlName  = IPS_GetName($RoomControlId);
	   $WFRoomName   = $RoomConfig[$RoomName][c_Property_Name];
	   if ($WFRoomName=="") return;
	   $WFRoomId     = IPS_GetCategoryIDByName($WFRoomName, c_ID_WebFrontRoomes);

      $WFControlId = false;
		$ChildrenIds = IPS_GetChildrenIDs($WFRoomId);
		foreach($ChildrenIds as $ChildrenIdx => $ChildrenId) {
		   if (IPS_LinkExists($ChildrenId)) {
		      if (IPS_GetName($ChildrenId)==$ControlName) {
		         $WFControlId = $ChildrenId;
		      }
			} else {
				$WFControlId = @IPS_GetLinkIDByName($ControlName, $WFRoomId);
			}
		}

		if ($WFControlId!==false) {
			$WFControl=IPS_GetObject($WFControlId);
			if ($WFControl['ObjectIsHidden']<> !$Value) {
				IPS_SetHidden($WFControlId, !$Value);
			}
		}

	}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:28,代码来源:Entertainment_Source.inc.php

示例2: RegisterTimer

  protected function RegisterTimer($ident, $interval, $script) {
    $id = @IPS_GetObjectIDByIdent($ident, $this->InstanceID);

    if ($id && IPS_GetEvent($id)['EventType'] <> 1) {
      IPS_DeleteEvent($id);
      $id = 0;
    }

    if (!$id) {
      $id = IPS_CreateEvent(1);
      IPS_SetParent($id, $this->InstanceID);
      IPS_SetIdent($id, $ident);
    }

    IPS_SetName($id, $ident);
    IPS_SetHidden($id, true);
    IPS_SetEventScript($id, "\$id = \$_IPS['TARGET'];\n$script;");

    if (!IPS_EventExists($id)) throw new Exception("Ident with name $ident is used for wrong object type");

    if (!($interval > 0)) {
      IPS_SetEventCyclic($id, 0, 0, 0, 0, 1, 1);
      IPS_SetEventActive($id, false);
    } else {
      IPS_SetEventCyclic($id, 0, 0, 0, 0, 1, $interval);
      IPS_SetEventActive($id, true);
    }
  }
开发者ID:Vansdan,项目名称:SymconHUE,代码行数:28,代码来源:module.php

示例3: Create

 /**
  * overload internal IPS_Create($id) function
  */
 public function Create()
 {
     parent::Create();
     //Hint: $this->debug will not work in this stage! must use IPS_LogMessage
     //props
     $this->RegisterPropertyString('Category', 'CUL/CUx Devices');
     $this->RegisterPropertyInteger('ParentCategory', 0);
     //parent cat is root
     $this->RegisterPropertyBoolean('AutoCreate', true);
     $this->RegisterPropertyBoolean('Debug', false);
     $this->RegisterPropertyBoolean('Active', false);
     $this->RegisterPropertyBoolean('UseOW', false);
     //status Vars
     $this->RegisterVariableString('Buffer', 'Buffer', "", -1);
     IPS_SetHidden($this->GetIDForIdent('Buffer'), true);
     $this->RegisterVariableString('LastUpdate', 'Last Update', "", -2);
     IPS_SetHidden($this->GetIDForIdent('LastUpdate'), true);
     $this->RegisterVariableString('AuxMessage', 'Last System Message', "", 1);
     $this->RegisterVariableString('Version', 'Version', "", 2);
     $this->RegisterVariableString('Modus', 'Modus', "", 2);
     $this->RegisterVariableInteger('Errors', 'Errors', 0, 3);
     //reinit timer
     $this->RegisterTimer('ReInit', 58000, $this->module_data["prefix"] . '_ReInitEvent($_IPS[\'TARGET\']);');
     //call init if ready and activated
     if (IPS_GetKernelRunlevel() == self::KR_READY) {
         if ($this->isActive()) {
             $this->SetStatus(self::ST_AKTIV);
             //$this->init();
         } else {
             $this->SetStatus(self::ST_INACTIV);
         }
     }
 }
开发者ID:Tommi2Day,项目名称:ipsymcon-phpmodule-by-Tommi,代码行数:36,代码来源:module.php

示例4: ApplyChanges

    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

    }
开发者ID:Bernd-J,项目名称:BJs_IPS_Tutorialmodules,代码行数:30,代码来源:module.php

示例5: ApplyChanges

 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();
 }
开发者ID:IQLiving,项目名称:IQLFeiertage,代码行数:11,代码来源:module.php

示例6: ApplyChanges

 public function ApplyChanges()
 {
     parent::ApplyChanges();
     $this->RegisterVariableInteger("TransmitStatus", "TransmitStatus", "", -3);
     $this->RegisterVariableInteger("FrameID", "FrameID", "", -2);
     IPS_SetHidden($this->GetIDForIdent('TransmitStatus'), true);
     IPS_SetHidden($this->GetIDForIdent('FrameID'), true);
     if ($this->ReadPropertyString('NodeName') == '') {
         $this->SetSummary(202);
     } else {
         $this->SetStatus(102);
     }
     $this->SetSummary($this->ReadPropertyString('NodeName'));
 }
开发者ID:Nall-chan,项目名称:IPSXBeeZigBee,代码行数:14,代码来源:module.php

示例7: ApplyChanges

 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     if ($this->ReadPropertyString('Bus') == '') {
         $this->SetStatus(202);
     } else {
         $this->SetStatus(102);
     }
     $this->RegisterVariableString('Monitordaten', 'Monitordaten', '', -4);
     IPS_SetHidden($this->GetIDForIdent('Monitordaten'), true);
     $this->RegisterVariableString('EinstellPar', 'EinstellPar', '', -4);
     IPS_SetHidden($this->GetIDForIdent('EinstellPar'), true);
     $this->RegisterProfile('Minutes', '2', '', '', ' m', 0, 0, 0);
     $this->RegisterProfile('Hours', '2', '', '', ' h', 0, 0, 0);
     $this->RegisterProfile('Watt', '2', '', '', ' kWh', 0, 0, 0);
     $this->RegisterProfile('Waerme', '2', '', '', ' Wh', 0, 0, 0);
     $this->RegisterProfile('Version', '3', '', 'V ', '', 0, 0, 0);
     $this->RegisterProfile('Flow', '2', '', '', ' l/h', 0, 0, 0);
 }
开发者ID:hermanthegerman2,项目名称:Logamatic4000,代码行数:20,代码来源:module.php

示例8: Entertainment_SetRoomVisible

	function Entertainment_SetRoomVisible($PowerId, $Value) {
	   $RoomConfig   = get_RoomConfiguration();
	   $RoomId        = IPS_GetParent($PowerId);
	   $RoomName      = IPS_GetName($RoomId);
	   $WFRoomName   = $RoomConfig[$RoomName][c_Property_Name];
	   if ($WFRoomName=="") return;
	   $WFRoomId     = IPS_GetCategoryIDByName($WFRoomName, c_ID_WebFrontRoomes);

		$ChildrenIds = IPS_GetChildrenIDs($WFRoomId);
		foreach($ChildrenIds as $ChildrenIdx => $ChildrenId) {
		   if (IPS_LinkExists($ChildrenId)) {
			   $LinkData = IPS_GetLink($ChildrenId);
			   $LinkedChildId = $LinkData["LinkChildID"];
		  		if ($LinkedChildId <> $PowerId) {
		    		IPSLogger_Trc(__file__, 'Set Control "'.IPS_GetName($ChildrenId).'" of Room "'.IPS_GetName($RoomId).'" Visible='.bool2OnOff($Value));
		  			IPS_SetHidden($ChildrenId, !$Value);
		  		}
			} else {
		  	   $GroupSwitchId = get_ControlIdByRoomId($RoomId, c_Control_Group);
		 		IPS_SetHidden($ChildrenId, !GetValue($GroupSwitchId) or !$Value);
			}
		}
	}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:23,代码来源:Entertainment_Room.inc.php

示例9: ApplyChanges

 public function ApplyChanges()
 {
     // Diese Zeile nicht löschen
     parent::ApplyChanges();
     if (strlen($this->ReadPropertyString("API")) == 16) {
         //Instanz ist aktiv
         $this->SetStatus(102);
         //Script + Timer
         $UpdateInterval = $this->ReadPropertyInteger("UpdateInterval");
         IPS_LogMessage($_IPS['SELF'], "Update Interval " . $UpdateInterval . " Minuten");
         $UpdateWeatherScriptID = @$this->GetIDForIdent("_updateWeather");
         if ($UpdateWeatherScriptID === false) {
             $UpdateWeatherScriptID = $this->RegisterScript("_updateWeather", "_updateWeather", file_get_contents(__DIR__ . "/_updateWeather.php"), 99);
         } else {
             IPS_SetScriptContent($UpdateWeatherScriptID, file_get_contents(__DIR__ . "/_updateWeather.php"));
         }
         IPS_SetHidden($UpdateWeatherScriptID, true);
         IPS_SetScriptTimer($UpdateWeatherScriptID, $UpdateInterval);
     } else {
         //Instanz ist inaktiv
         $this->SetStatus(104);
     }
 }
开发者ID:tobiber,项目名称:SymconWundergroundWeather,代码行数:23,代码来源:module.php

示例10: SetHidden

	protected function SetHidden($Ident, $value)
	{
		$id = $this->GetIDForIdent($Ident);
		IPS_SetHidden($id, $value);
	}
开发者ID:xan-it,项目名称:symcon-milight,代码行数:5,代码来源:module.php

示例11: CreateDevices

 private function CreateDevices()
 {
     // Create Variables Profiles
     // From Foobot: ["time","pm","tmp","hum","co2","voc","allpollu"],"units":["s","ugm3","C","pc","ppm","ppb","%"] [1445275154,45.449997,25.754375,39.512215,1033.0,286.0,62.60714]
     $this->RegisterProfileIntegerEx("Pollutant.Co2", "Gauge", "", " ppm", array(array(0, "%d", "", 0xff00), array(1000, "%d", "", 0xffff00), array(2000, "%d", "", 0xff0000)));
     $this->RegisterProfileFloatEx("Pollutant.PM", "Gauge", "", " uG/m3", array(array(0, "%.1f", "", 0xff00), array(25, "%.1f", "", 0xff0000)));
     $this->RegisterProfileIntegerEx("Pollutant.VC", "Gauge", "", " ppb", array(array(0, "%d", "", 0xff00), array(500, "%d", "", 0xff0000)));
     $this->RegisterProfileFloatEx("Pollutant.GPI", "Gauge", "", " %", array(array(0, "%.1f", "", 0xff00), array(50, "%.1f", "", 0xffff00), array(100, "%.1f", "", 0xff0000)));
     // Get Foobot devices from API and loop on them to create Instances and Variables
     $devices = $this->GetDevices();
     if ($devices !== false) {
         //foreach ($devices as $device) {	// Prepared for multiple Foobot devices support - to be tested
         // Create a dummy Instance for each Foobot Sensor if it does not exist already
         if (!$this->deviceInstanceExists($devices->name)) {
             $FBdeviceModuleID = IPS_CreateInstance("{485D0419-BE97-4548-AA9C-C083EB82E61E}");
             IPS_SetName($FBdeviceModuleID, $devices->name);
             IPS_SetParent($FBdeviceModuleID, $this->InstanceID);
             $this->RegisterVariableString("Uuid", "Device UUID", "~String", 1);
             SetValue($this->GetIDForIdent('Uuid'), $devices->uuid);
             IPS_SetHidden($this->GetIDForIdent('Uuid'), true);
             IPS_SetParent($this->GetIDForIdent('Uuid'), $FBdeviceModuleID);
             $this->RegisterVariableString("Mac", "Device Mac", "~String", 2);
             SetValue($this->GetIDForIdent('Mac'), $devices->mac);
             IPS_SetHidden($this->GetIDForIdent('Mac'), true);
             IPS_SetParent($this->GetIDForIdent('Mac'), $FBdeviceModuleID);
             // Create Variables
             $this->RegisterVariableInteger("Co2", "Carbon Dioxide", "Pollutant.Co2", 10);
             IPS_SetParent($this->GetIDForIdent('Co2'), $FBdeviceModuleID);
             $this->RegisterVariableInteger("Voc", "Volatile compounds", "Pollutant.VC", 11);
             IPS_SetParent($this->GetIDForIdent('Voc'), $FBdeviceModuleID);
             $this->RegisterVariableFloat("Pm", "PM2.5", "Pollutant.PM", 12);
             IPS_SetParent($this->GetIDForIdent('Pm'), $FBdeviceModuleID);
             $this->RegisterVariableFloat("Allpollu", "Global Pollution Index", "Pollutant.GPI", 13);
             IPS_SetParent($this->GetIDForIdent('Allpollu'), $FBdeviceModuleID);
             $this->RegisterVariableFloat("Tmp", "Temperature", "~Temperature", 14);
             IPS_SetParent($this->GetIDForIdent('Tmp'), $FBdeviceModuleID);
             $this->RegisterVariableFloat("Hum", "Humidity", "~Humidity.F", 15);
             IPS_SetParent($this->GetIDForIdent('Hum'), $FBdeviceModuleID);
         }
         //}	// End of loop on devices
         return true;
     } else {
         $this->SetStatus(203);
         if ($this->debug) {
             IPS_LogMessage("FOOBOT Module", "ERROR: No Foobot Devices have been found!");
         }
         return false;
     }
 }
开发者ID:naphane,项目名称:IPSFoobot,代码行数:49,代码来源:module.php

示例12: ApplyChanges

 public function ApplyChanges()
 {
     //Never delete this line!
     parent::ApplyChanges();
     $ChangeParentSetting = false;
     $Open = $this->ReadPropertyBoolean('Open');
     $NewState = IS_ACTIVE;
     if (!$Open) {
         $NewState = IS_INACTIVE;
     }
     if ($this->ReadPropertyString('Host') == '') {
         if ($Open) {
             $NewState = IS_EBASE + 2;
             $Open = false;
         }
     }
     if ($this->ReadPropertyString('Port') == '') {
         if ($Open) {
             $NewState = IS_EBASE + 2;
             $Open = false;
         }
     }
     // Zwangskonfiguration des ClientSocket
     $ParentID = $this->GetParent();
     if ($ParentID > 0) {
         if (IPS_GetProperty($ParentID, 'Host') != $this->ReadPropertyString('Host')) {
             IPS_SetProperty($ParentID, 'Host', $this->ReadPropertyString('Host'));
             //                $ChangeParentSetting = true;
         }
         if (IPS_GetProperty($ParentID, 'Port') != $this->ReadPropertyInteger('Port')) {
             IPS_SetProperty($ParentID, 'Port', $this->ReadPropertyInteger('Port'));
             //                $ChangeParentSetting = true;
         }
         // Keine Verbindung erzwingen wenn Host leer ist, sonst folgt später Exception.
         if ($Open) {
             $Open = @Sys_Ping($this->ReadPropertyString('Host'), 500);
             if (!$Open) {
                 $NewState = IS_EBASE + 3;
             }
         }
         if (IPS_GetProperty($ParentID, 'Open') != $Open) {
             IPS_SetProperty($ParentID, 'Open', $Open);
             //                $ChangeParentSetting = true;
         }
         if (IPS_HasChanges($ParentID)) {
             @IPS_ApplyChanges($ParentID);
             if (!$this->HasActiveParent($ParentID) and $Open) {
                 $NewState = IS_EBASE + 3;
             }
         }
     } else {
         if ($Open) {
             $NewState = IS_INACTIVE;
             $Open = false;
         }
     }
     // Eigene Profile
     $this->RegisterProfileIntegerEx("Scanner.SqueezeboxServer", "Gear", "", "", array(array(0, "Standby", "", -1), array(1, "Abbruch", "", -1), array(2, "Scan", "", -1), array(3, "Nur Playlists", "", -1), array(4, "Vollständig", "", -1)));
     $this->RegisterProfileInteger("PlayerSelect" . $this->InstanceID . ".SqueezeboxServer", "Speaker", "", "", 0, 0, 0);
     // Eigene Variablen
     $this->RegisterVariableInteger("RescanState", "Scanner", "Scanner.SqueezeboxServer", 1);
     $this->RegisterVariableString("RescanInfo", "Rescan Status", "", 2);
     $this->RegisterVariableString("RescanProgress", "Rescan Fortschritt", "", 3);
     $this->EnableAction("RescanState");
     $this->RegisterVariableInteger("PlayerSelect", "Player wählen", "PlayerSelect" . $this->InstanceID . ".SqueezeboxServer", 4);
     $this->EnableAction("PlayerSelect");
     $this->RegisterVariableString("Playlists", "Playlisten", "~HTMLBox", 5);
     // Eigene Scripte
     $ID = $this->RegisterScript("WebHookPlaylist", "WebHookPlaylist", $this->CreateWebHookScript(), -8);
     IPS_SetHidden($ID, true);
     if (IPS_GetKernelRunlevel() == KR_READY) {
         $this->RegisterHook('/hook/LMSPlaylist' . $this->InstanceID, $ID);
     }
     $ID = $this->RegisterScript('PlaylistDesign', 'Playlist Config', $this->CreatePlaylistConfigScript(), -7);
     IPS_SetHidden($ID, true);
     //Workaround für persistente Daten der Instanz
     $this->RegisterVariableString("BufferIN", "BufferIN", "", -3);
     $this->RegisterVariableString("BufferOUT", "BufferOUT", "", -2);
     $this->RegisterVariableBoolean("WaitForResponse", "WaitForResponse", "", -1);
     IPS_SetHidden($this->GetIDForIdent('BufferIN'), true);
     IPS_SetHidden($this->GetIDForIdent('BufferOUT'), true);
     IPS_SetHidden($this->GetIDForIdent('WaitForResponse'), true);
     // Wenn wir verbunden sind, am LMS mit listen anmelden für Events
     if ($Open and $this->HasActiveParent($ParentID)) {
         switch (IPS_GetKernelRunlevel()) {
             case KR_READY:
                 $hasNewState = $this->SetStatus($NewState);
                 if ($NewState == IS_ACTIVE and $hasNewState === true) {
                     try {
                         $Data = new LMSData("listen", "1");
                         $this->SendLMSData($Data);
                         $this->RefreshPlayerList();
                         $Data = new LMSData("rescan", "?", false);
                         $this->SendLMSData($Data);
                     } catch (Exception $exc) {
                         trigger_error($exc->getMessage(), $exc->getCode());
                         return false;
                     }
                     $DevicesIDs = IPS_GetInstanceListByModuleID("{118189F9-DC7E-4DF4-80E1-9A4DF0882DD7}");
                     foreach ($DevicesIDs as $Device) {
//.........这里部分代码省略.........
开发者ID:Nall-chan,项目名称:IPSSqueezeBox,代码行数:101,代码来源:module.php

示例13: SetHiddenOrDisabled

 protected function SetHiddenOrDisabled($ObjectID, $Value)
 {
     if (IPS_GetObject($ObjectID)["ObjectIsHidden"] != $Value) {
         IPS_SetHidden($ObjectID, $Value);
     }
 }
开发者ID:Nall-chan,项目名称:IPSDynamicVisuControl,代码行数:6,代码来源:module.php

示例14: SetValue

  public function SetValue($key, $value) {
    $stateId = IPS_GetObjectIDByIdent('STATE', $this->InstanceID);
    $cmId = IPS_GetObjectIDByIdent('COLOR_MODE', $this->InstanceID);
    $ctId = @IPS_GetObjectIDByIdent('COLOR_TEMPERATURE', $this->InstanceID);
    $briId = IPS_GetObjectIDByIdent('BRIGHTNESS', $this->InstanceID);
    $satId = @IPS_GetObjectIDByIdent('SATURATION', $this->InstanceID);
    $hueId = @IPS_GetObjectIDByIdent('HUE', $this->InstanceID);
    $colorId = @IPS_GetObjectIDByIdent('COLOR', $this->InstanceID);

    $stateValue = GetValueBoolean($stateId);
    $cmValue = $cmId ? GetValueInteger($cmId) : 0;
    $ctValue = $ctId ? (500 - round(347 * GetValueInteger($ctId) / 100)) : 0;
    $briValue = round(GetValueInteger($briId)*2.54);
    $satValue = $satId ? round(GetValueInteger($satId)*2.54) : 0;
    $hueValue = $hueId ? GetValueInteger($hueId) : 0;
    $colorValue = $colorId ? GetValueInteger($colorId) : 0;

    switch ($key) {
      case 'STATE':
        $stateNewValue = $value;
        break;
      case 'COLOR':
        $colorNewValue = $value;
        $stateNewValue = true;
        $hex = str_pad(dechex($value), 6, 0, STR_PAD_LEFT);
        $hsv = $this->HEX2HSV($hex);
        SetValueInteger($colorId, $value);
        $hueNewValue = $hsv['h'];
        $briNewValue = $hsv['v'];
        $satNewValue = $hsv['s'];
        $cmNewValue = 0;
        break;
      case 'BRIGHTNESS':
        $briNewValue = $value;
        $stateNewValue = true;
        if (IPS_GetProperty($this->InstanceID, 'LightFeatures') != 3) {
          if ($cmValue == '0') {
            $newHex = $this->HSV2HEX($hueValue, $satValue, $briNewValue);
            SetValueInteger($colorId, hexdec($newHex));
            $hueNewValue = $hueValue;
            $satNewValue = $satValue;
          } else {
            $ctNewValue = $ctValue;
          }
        }
        break;
      case 'SATURATION':
        $cmNewValue = 0;
        $satNewValue = $value;
        $stateNewValue = true;
        $newHex = $this->HSV2HEX($hueValue, $satNewValue, $briValue);
        SetValueInteger($colorId, hexdec($newHex));
        $hueNewValue = $hueValue;
        $briNewValue = $briValue;
        break;
      case 'COLOR_TEMPERATURE':
        $cmNewValue = 1;
        $ctNewValue = $value;
        $briNewValue = $briValue;
        break;
      case 'COLOR_MODE':
        $cmNewValue = $value;
        $stateNewValue = true;
        if ($cmNewValue == 1) {
          $ctNewValue = $ctValue;
          IPS_SetHidden($colorId, true);
          IPS_SetHidden($ctId, false);
          IPS_SetHidden($satId, true);
        } else {
          $hueNewValue = $hueValue;
          $satNewValue = $satValue;
          $briNewValue = $briValue;
          $newHex = $this->HSV2HEX($hueValue, $satValue, $briValue);
          SetValueInteger($colorId, hexdec($newHex));
          IPS_SetHidden($colorId, false);
          IPS_SetHidden($ctId, true);
          IPS_SetHidden($satId, false);
        }
        break;
    }

    $changes = array();
    if (isset($stateNewValue)) {
      SetValueBoolean($stateId, $stateNewValue);
      $changes['on'] = $stateNewValue;
    }
    if (isset($hueNewValue)) {
      SetValueInteger($hueId, $hueNewValue);
      $changes['hue'] = $hueNewValue;
    }
    if (isset($satNewValue)) {
      SetValueInteger($satId, round($satNewValue * 100 / 254));
      $changes['sat'] = $satNewValue;
    }
    if (isset($briNewValue)) {
      SetValueInteger($briId, round($briNewValue * 100 / 254));
      $changes['bri'] = $briNewValue;
    }
    if (isset($ctNewValue)) {
      SetValueInteger($ctId, 100 - round(($ctNewValue - 153) * 100 / 347));
//.........这里部分代码省略.........
开发者ID:Vansdan,项目名称:SymconHUE,代码行数:101,代码来源:module.php

示例15: IPS_SetParent

                        IPS_SetParent($LnkID, $Functions[utf8_decode((string) $Function['Name'])]);
                    }
                } else {
                    IPS_SetHidden($Var, true);
                }
                if (in_array($Obj['ObjectIdent'], $Emulate)) {
                    IPS_SetProperty($HMDevice, 'EmulateStatus', true);
                    usleep(50000);
                    IPS_ApplyChanges($HMDevice);
                }
                if (in_array($Obj['ObjectIdent'], $RequestState)) {
                    @HM_RequestStatus($HMDevice, $Obj['ObjectIdent']);
                }
            }
            if ($DeviceHidden) {
                IPS_SetHidden($HMDevice, true);
            }
        }
        $HMNewAdresses[] = (string) $Channel['Address'];
    }
    /* if (!isset($HMNewAdresses))
       die("Keine neuen Geräte gefunden!");
       var_dump($HMNewAdresses); */
}
function ReadCCUInterfaces($ip)
{
    $Script = '
string index;                              ! Indexvariable
WriteLine("<xml>");
string SysVars=dom.GetObject(ID_INTERFACES).EnumUsedIDs();
foreach (index, SysVars)
开发者ID:Nall-chan,项目名称:HomematicEasyInstall,代码行数:31,代码来源:Script.php


注:本文中的IPS_SetHidden函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。