Script zum Erstellen von Räumen

Hier mal ein Script, mit dem man die Steuerelemente der verschiedenen Module zu raumbezogen im WebFront darstellen kann. Es wird ein eigenes „TabPane“ erzeugt und danach die einzelnen Räume mit Links zu den eigentlichen Modulen befüllt.


<?
	IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager');

	$categoryId_WebFront = CreateCategoryPath('Visualization.WebFront.Roomes');
	
	//Zum Löschen der bestehenden Struktur die folgenden 2 Zeilen auskommentieren.
	//EmptyCategory($categoryId_WebFront);
	//DeleteWFCItems(57215, 'RoomTP');

	// Wellness
	// ---------------------------------------------------------------------------------------------------------
	$categoryIdWellness = CreateCategory('Wellness', $categoryId_WebFront, 10);
	$categoryIdWellnessLeft  = CreateCategory('Left',  $categoryIdWellness, 10);
	$categoryIdWellnessRight = CreateCategory('Right', $categoryIdWellness, 10);

	CreateWFCItemTabPane   (57215, 'RoomTP',              'roottp',           80, '', 'Sofa');
	CreateWFCItemSplitPane (57215, 'RoomTPWellness',      'RoomTP',           10,  'Wellness', 'Drops', 1 /*Vertical*/, 400 /*Width*/, 0 /*Target=Pane1*/, 1/*UsePixel*/, 'true');
	CreateWFCItemCategory  (57215, 'RoomTPWellnessLeft',  'RoomTPWellness',   10, '', '', $categoryIdWellnessLeft   /*BaseId*/, 'false' /*BarBottomVisible*/);
	CreateWFCItemCategory  (57215, 'RoomTPWellnessRight', 'RoomTPWellness',   20, '', '', $categoryIdWellnessRight  /*BaseId*/, 'false' /*BarBottomVisible*/);

	$instanceId  = CreateDummyInstance("Lüftung", $categoryIdWellnessLeft, 10);
	CreateLink('Ventilation',  47210, $instanceId, 10);
	$instanceId  = CreateDummyInstance("Dampfdusche", $categoryIdWellnessLeft, 10);
	CreateLink('Sitzheizung', 36844 , $instanceId, 10);
	$instanceId  = CreateDummyInstance("Klima", $categoryIdWellnessLeft, 20);
	CreateLink('Temperatur',   IPSUtil_ObjectIDByPath('Hardware.1-Wire.TempFeuchte_Wellness.Temperatur'), $instanceId, 10);
	CreateLink('Feuchigkeit',  IPSUtil_ObjectIDByPath('Hardware.1-Wire.TempFeuchte_Wellness.Feuchtigkeit'), $instanceId, 20);
	$instanceId  = CreateDummyInstance("Beleuchtung", $categoryIdWellnessLeft, 30);
	CreateLink('Wand',      IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessWand'),        $instanceId, 10);
	CreateLinkByDestination('Helligkeit',IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessWand#Level'),  $instanceId, 20);
	CreateLink('Decke',     IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessDecke'),       $instanceId, 30);
	CreateLinkByDestination('Helligkeit',IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessDecke#Level'), $instanceId, 40);
	CreateLink('Sauna',     IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessSauna'),       $instanceId, 50);
	CreateLink('Dusche',    IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessDusche'),      $instanceId, 60);
	CreateLink('Ambiente',  IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Switches.WellnessAmbiente'),    $instanceId, 70);

	CreateLink('Licht Programm',  IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSLight.Programs.WellnessProgram'),    $categoryIdWellnessRight, 5);
	$instanceId  = CreateDummyInstance("Entertainment", $categoryIdWellnessRight, 10);
	CreateLink('Power',  IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Entertainment.Roomes.Wellness.Power'),           $instanceId, 10);
	CreateLink('Volume', IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Entertainment.Roomes.Wellness.Volume'),          $instanceId, 20);
	CreateLink('Source', IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Entertainment.Roomes.Wellness.Source'),          $instanceId, 30);
	CreateLink('Remote', IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Entertainment.Roomes.Wellness.Source Control'),  $instanceId, 40);

	$instanceId  = CreateDummyInstance("Sauna", $categoryIdWellnessRight, 20);
	CreateLink('Power',  IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Entertainment.Roomes.Sauna.Power'),    $instanceId, 10);
	CreateLink('Volume', IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Entertainment.Roomes.Sauna.Volume'),   $instanceId, 20);
?> 

Jetzt räume ich auch mal mein Webfront auf!

Du bist der Beste!!!

Vielen Dank