-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeatingControl_Installation.ips.php
32 lines (24 loc) · 1.81 KB
/
HeatingControl_Installation.ips.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?
include_once "IPSLogger.ips.php";
include_once "IPSInstaller.ips.php";
echo "--- Installing HeatingControl ----------------------------------------------------------\n";
$RoomsPath = "ROOMS";
$ProgramPath = "Program.TemperatureControl";
echo "--- Creating Categories ----------------------------------------------------------\n";
$CategoryIdRoot = CreateCategoryPath($ProgramPath);
$CategoryIdControl = CreateCategory('Control', $CategoryIdRoot, 10);
$CategoryIdState = CreateCategory('State', $CategoryIdRoot, 20);
$CategoryIdRooms = CreateCategoryPath($RoomsPath);
echo "--- Adding Scripts ------------------------------------------------------------------------ \n";
IPS_SetParent($IPS_SELF, $CategoryIdControl);
$ScriptIdPresence = CreateScript('PresenceSwitcher', 'HeatingControl_PresenceSwitch.ips.php', $CategoryIdControl, 11);
$ScriptIdIgnoreWindow = CreateScript('IgnoreWindow', 'HeatingControl_IgnoreWindow.ips.php', $CategoryIdControl, 12);
SetVariableConstant("s_ID_IgnoreWindow", $ScriptIdIgnoreWindow, "HeatingControl\Homematic_Constants.ips.php");
echo "--- Adding presence control ----------------------------------------------------------\n";
$ControlIdPresence = CreateVariable("Presence", 0 /*Boolean*/, $CategoryIdRooms, 10, 'Presence_Editable', $ScriptIdPresence, null, 'Motion');
echo "--- Register Variable Constants --------------------------------------------------------\n";
SetVariableConstant("c_ID_state", $CategoryIdState, "HeatingControl\Homematic_Constants.ips.php");
SetVariableConstant("c_ID_rooms", $CategoryIdRooms, "HeatingControl\Homematic_Constants.ips.php");
SetVariableConstant("c_ID_presence", $ControlIdPresence, "HeatingControl\Homematic_Constants.ips.php");
echo "--- Installation successfully finished !!! ----------------------------------------------\n";
?>