# Management of Events > Symcon documentation · English · generated on 2026-09-26 > Index: https://www.symcon.de/en/llms.txt Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ ## IPS_CreateEvent Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-createevent/ `int IPS_CreateEvent(int $EventType)` create a new event **Parameters** - `$EventType` (int) | Value | Description | | ----- | ------------------------------- | | 0 | creates a __"triggered"__ event | | 1 | creates a __"cyclical"__ event | **Returns** (int): ID of the newly created event | Value | Description | | ----- | ------------------------------- | | 0 | creates a __"triggered"__ event | | 1 | creates a __"cyclical"__ event | **Example** ```php $eid = IPS_CreateEvent(0); //triggered event IPS_SetEventTrigger($eid, 1, 15754); //On change of variable with ID 15 754 IPS_SetParent($eid, $_IPS['SELF']); //Assigning the event IPS_SetEventActive($eid, true); //Activate the event eid = IPS_CreateEvent(1); //triggered event IPS_SetEventCyclic($eid, 2, 1, 0, 3, 6); //Every day, every 6 hours IPS_SetEventCyclicDateBounds($eid, mktime(0, 0, 0, 12, 1, date("Y")), mktime(0, 0, 0, 12, 31,date("Y"))); //1.12 - 31.12 of every year IPS_SetEventCyclicTimeBounds($eid, mktime(15, 0, 0), mktime(23, 30, 0)); //15:00 till 23:30 IPS_SetParent($eid, $_IPS['SELF']); //Assigning the event IPS_SetEventActive($eid, true); //Activate the event // Required since IP-Symcon 6.0, if the event shall execute an automation (e.g. a PHP-Script) IPS_SetEventAction($eid, '{7938A5A2-0981-5FE0-BE6C-8AA610D654EB}', []); ``` ## IPS_DeleteEvent Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-deleteevent/ `bool IPS_DeleteEvent(int $EventID)` deletes an event **Parameters** - `$EventID` (int): ID of the event to be deleted **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the event to be deleted **Example** ```php IPS_DeleteEvent($EventID); ``` ## IPS_EventExists Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-eventexists/ `bool IPS_EventExists(int $EventID)` checks if an event exists **Parameters** - `$EventID` (int): ID of the event to be tested **Returns** (bool): If the EventID exists in the system, __TRUE__ is returned, otherwise __FALSE__. ID of the event to be tested **Example** ```php if (IPS_EventExists(34881)) echo "A event with this ID exists!"; ``` ## IPS_GetEvent Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-getevent/ `array IPS_GetEvent(int $EventID)` _Requires Symcon >= 3.1_ returns extensive information about an event **Parameters** - `$EventID` (int): ID of the event **Returns** (array): The following information are available as key => value pairs: | Index   | Type | Description | | ------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | __CyclicDateType__ | integer | Date type. See [IPS_SetEventCyclic](management-events.md) | | __CyclicDateValue__ | integer | Date interval. See [IPS_SetEventCyclic](management-events.md) | | __CyclicDateDay__ | integer | Day of date. See [IPS_SetEventCyclic](management-events.md) | | __CyclicDateDayValue__ | integer | Day of date, interval. See [IPS_SetEventCyclic](management-events.md) | | __CyclicDateFrom__ | array | Unix Timestamp of the start day of the event, 0 = Always. See [IPS_SetEventCyclicDateBounds](management-events.md) | | __CyclicDateTo__ | array | Unix Timestamp of final day of the event, 0 = Never. See [IPS_SetEventCyclicDateBounds](management-events.md) | | __CyclicTimeType__ | integer | Time type. See [IPS_SetEventCyclic](management-events.md) | | __CyclicTimeValue__ | integer | Time interval. See [IPS_SetEventCyclic](management-events.md) | | __CyclicTimeFrom__ | array | Unix Timestamp of the start time for the event, 0 = Midnight. See [IPS_SetEventCyclicTimeBounds](management-events.md) | | __CyclicTimeTo__ | array | Unix timestamp of the end time for the event, 0 = Midnight. See [IPS_SetEventCyclicTimeBounds](management-events.md) | | __EventActionID__ | string | ID of the executed [Action](../concepts/automations.md) | | __EventActionParameters__ | array | Parameter of the executed [Action](../concepts/automations.md) | | __EventConditions__ | array | Array of conditions. See [IPS_SetEventCondition](management-events.md) and [IPS_SetEventConditionRule](management-events.md) | | __EventID__ | integer | ID of the event | | __EventLimit__ | integer | Remaining number of executions. 0 = No Limit | | __EventScript__ | string | Always an empty string, since this field is only present for compatibility reasons. The execution is always controlled via the action, which is configured via [IPS_SetEventScheduleAction](management-events.md). | | __EventActive__ | boolean | TRUE if the event is active | | __EventType__ | integer | Event Type: (0: trigger 1: cyclic 2: schedule) | | __LastRun__ | float | Unix timestamp of the last run, 0 = Never | | __NextRun__ | float | Unix timestamp of the next run, 0 = Never | | __LastActionID__ | integer | Action ID from the weekly schedule of the last execution, 0 = No action was executed | | __NextActionID__ | integer | Action ID from the weekly schedule for the next execution, 0 = No action will be executed next time | | __ScheduleActions__ | array | Array of actions of the schedule. See [IPS_SetEventScheduleActionEx](management-events.md) | | __ScheduleGroups__ | array | Array of groups with switch points of the schedule. See [IPS_SetEventScheduleGroup](management-events.md) and [IPS_SetEventScheduleGroupPoint](management-events.md) | | __TriggerSubsequentExecution__ | boolean | Allow to run again in triggering without value change | | __TriggerType__ | integer | Value for the trigger type: See [IPS_SetEventTrigger](management-events.md) | | __TriggerValue__ | variant | Value that is used for the trigger check, depending on the used trigger type | | __TriggerVariableID__ | integer | VariableID to be used as a trigger | ID of the event **Example** ```php $EventID = 46413; $EventInfo = IPS_GetEvent($EventID); print_r($EventInfo); /* returns e.g.: Array ( [EventID] => 41227 [EventType] => 2 [EventActive] => 1 [EventLimit] => 0 [EventConditions] => Array ( [0] => Array ( [ID] => 0 [ParentID] => 0 [VariableRules] => Array ( [0] => Array ( [ID] => 1 [VariableID] => 29025 [Comparison] => 4 [Value] => 500 ) ) [DateRules] => Array ( [0] => Array ( [ID] => 0 [Comparison] => 0 [Value] => Array ( [Day] => 8 [Month] => 8 [Year] => 2001 ) ) [1] => Array(3) ( [ID] => 1 [Comparison] => 4 [Value] => Array ( [Day] => 1 [Month] => 1 [Year] => 2021 ) ) ) [TimeRules] => Array ( [0] => Array ( [ID] => 1 [Comparison] => 3 [Value] => Array ( [Hour] => 9 [Minute] => 0 [Second] => 0 ) ) [1] => Array ( [ID] => 2 [Comparison] => 5 [Value] => Array ( [Hour] => 17 [Minute] => 0 [Second] => 0 ) ) ) [DayOfTheWeekRules] => Array ( [0] => Array ( [ID] => 0 [Comparison] => 0 [Value] => 3 ) ) [Operation] => 1 ) ) [TriggerType] => 0 [TriggerVariableID] => 0 [TriggerValue] => [TriggerSubsequentExecution] => [CyclicDateType] => 0 [CyclicDateValue] => 0 [CyclicDateDay] => 0 [CyclicDateDayValue] => 0 [CyclicDateFrom] => Array ( [Day] => 0 [Month] => 0 [Year] => 0 ) [CyclicDateTo] => Array ( [Day] => 0 [Month] => 0 [Year] => 0 ) [CyclicTimeType] => 0 [CyclicTimeValue] => 0 [CyclicTimeFrom] => Array ( [Hour] => 0 [Minute] => 0 [Second] => 0 ) [CyclicTimeTo] => Array ( [Hour] => 0 [Minute] => 0 [Second] => 0 ) [ScheduleActions] => Array ( [0] => Array ( [ID] => 0 [Name] => Kalt [Color] => 255 [ScriptText] => [ActionID] => {3644F802-C152-464A-868A-242C2A3DEC5C} [ActionParameters] => Array ( [VALUE] => 2 ) ) [1] => Array ( [ID] => 1 [Name] => Warm [Color] => 16711680 [ScriptText] => [ActionID] => {3644F802-C152-464A-868A-242C2A3DEC5C} [ActionParameters] => Array ( [VALUE] => 0 ) ) ) [ScheduleGroups] => Array ( [0] => Array ( [ID] => 0 [Days] => 127 [Points] => Array ( [0] => Array ( [ID] => 13 [Start] => Array ( [Hour] => 0 [Minute] => 0 [Second] => 0 ) [ActionID] => 1 ) [1] => Array ( [ID] => 14 [Start] => Array ( [Hour] => 12 [Minute] => 0 [Second] => 0 ) [ActionID] => 0 ) ) ) ) [EventScript] => [LastRun] => 0 [NextRun] => 0 [LastActionID] => 0 [NextActionID] => 0 ) */ ``` ## IPS_GetEventIDByName Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-geteventidbyname/ `int IPS_GetEventIDByName(string $EventName, int $ParentID)` determines the ID of an event by its name **Parameters** - `$EventName` (string): Name of the event - `$ParentID` (int): Object whose child objects are searched for the event **Returns** (int): ID of the found event, otherwise FALSE. Object whose child objects are searched for the event **Example** ```php $EventID = @IPS_GetEventIDByName("TimerABC", $ParentID); if ($EventID === false) echo "Event not found!"; else echo "The Event ID is: ". $EventID; ``` ## IPS_GetEventList Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-geteventlist/ `array IPS_GetEventList()` returns a list of all existing events **Returns** (array): An array of integer values ​​of all IDs of the events in IP Symcon The command determines the IDs of all registered events in IP Symcon. The IDs are listed in an array. If no event exists, the array is empty. **Example** ```php $allEvents = IPS_GetEventList(); print_r($allEvents); /* returns e.g.: Array ( [0] => 37659 [1] => 18326 etc. ... ) */ ``` ## IPS_GetEventListByType Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-geteventlistbytype/ `array IPS_GetEventListByType(int $EventType)` returns a list of all events of a given type **Parameters** - `$EventType` (int) | Value | Description | | ----- | ------------------- | | 0 | __triggered event__ | | 1 | __cyclical event__ | **Returns** (array): An array of integer values of all IDs of the event of the type __EventType__ in IP Symcon. | Value | Description | | ----- | ------------------- | | 0 | __triggered event__ | | 1 | __cyclical event__ | **Example** ```php $allEvents = IPS_GetEventListByType(1); // list only cyclical events print_r($allEvents); /* returns e.g.: Array ( [0] => 37659 [1] => 18326 etc. … ) */ ``` ## IPS_IsConditionPassing Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-isconditionpassing/ `bool IPS_IsConditionPassing(string $Condition)` _Requires Symcon >= 6.1_ checks if a condition is fulfilled **Parameters** - `$Condition` (string): A list of JSON encoded conditions in the format of [SelectCondition](../developer/sdk-tools/sdk-php/configuration-forms.md) **Returns** (bool): __TRUE__, if the condition is fulfilled, otherwise __FALSE__ A list of JSON encoded conditions in the format of [SelectCondition](../developer/sdk-tools/sdk-php/configuration-forms.md) **Example** ```php if (IPS_IsConditionPassing($Condition)) { // Only do something if the condition is fulfilled }; ``` ## IPS_SetEventAction Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventaction/ `bool IPS_SetEventAction(int $EventID, string $ActionID, array $ActionParameters)` _Requires Symcon >= 6.0_ set the executed action **Parameters** - `$EventID` (int): ID of the event to be changed - `$ActionID` (string): ID of the executed action - `$ActionParameters` (array): List of Parameters for the executed action **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. List of Parameters for the executed action **Example** ```php // Multiply the target variable of the event by 3 IPS_SetEventAction($EreignisID, "{A3153696-013A-41B1-A001-5E8085D95465}", ["FACTOR" => 3]); // Execute the target automation of the event IPS_SetEventAction($EreignisID, "{7938A5A2-0981-5FE0-BE6C-8AA610D654EB}", []); ``` ## IPS_SetEventActive Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventactive/ `bool IPS_SetEventActive(int $EventID, bool $Active)` activates/deactivates an event **Parameters** - `$EventID` (int): ID of the event to be changed - `$Active` (bool): Indicates whether the event should be activated (__TRUE__) or deactivated (__FALSE__) **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Indicates whether the event should be activated (__TRUE__) or deactivated (__FALSE__) **Example** ```php IPS_SetEventActive($EventID, true); // Activates the event ``` ## IPS_SetEventCondition Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcondition/ `bool IPS_SetEventCondition(int $EventID, int $ConditionID, int $ParentID, int $Operation)` _Requires Symcon >= 4.4_ modifies the conditions of an event **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): Unique ID for this condition. The root condition needs to have the ID 0. The ID only needs to be unique for this event. - `$ParentID` (int): ID of the parent condition. On creation of the root condition, this parameter needs to be 0. - `$Operation` (int) | Value | Description | | ----- | -------------------------- | | 0 | AND | | 1 | OR | | 2 | NAND (not implemented yet) | | 3 | NOR (not implemented yet) | **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. | Value | Description | | ----- | -------------------------- | | 0 | AND | | 1 | OR | | 2 | NAND (not implemented yet) | | 3 | NOR (not implemented yet) | **Example** ```php // Create root condition with the operation OR for event with ID 12345 IPS_SetEventCondition(12345, 0, 0, 1); // Create a child condition with the operation AND IPS_SetEventCondition(12345, 1, 0, 0); // Delete child condition IPS_SetEventCondition(12345, 1, -1, 0); ``` ## IPS_SetEventConditionDateRule Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventconditiondaterule/ `bool IPS_SetEventConditionDateRule(int $EventID, int $ConditionID, int $RuleID, int $Comparison, int $Day, int $Month, int $Year)` _Requires Symcon >= 4.4_ modifies the rule of a condition of an event for date comparisons **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): ID of the condition that contains the rule - `$RuleID` (int): Unique ID for this group. IDs need to be unique for this condition only. - `$Comparison` (int) | Wert | Beschreibung | | ---- | ------------ | | 0 | == | | 1 | != | | 2 | > | | 3 | >= | | 4 | < | | 5 | <= | - `$Day` (int): Day with which the current date is compared - `$Month` (int): Month with which the current date is compared - `$Year` (int): Year with which the current date is compared **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Year with which the current date is compared **Example** ```php //Add an AND condition IPS_SetEventCondition(12345, 0, 0, 0) // Adds / modifies the rule with the ID 2 for the event with the ObjectID 12345 // It is the first half of the year -> current date < 01.07.2018 IPS_SetEventConditionDateRule(12345, 0, 2, 4, 1, 7, 2018); // Delete the rule with ID 1 IPS_SetEventConditionDateRule(12345, 0, 1, 0, -1, 0, 0); ``` ## IPS_SetEventConditionDayOfTheWeekRule Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventconditiondayoftheweekrule/ `bool IPS_SetEventConditionDayOfTheWeekRule(int $EventID, int $ConditionID, int $RuleID, int $Comparison, int $Weekday)` _Requires Symcon >= 5.2_ modifies the rule of a condition of an event for weekday comparisons **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): ID of the condition that contains the rule - `$RuleID` (int): Unique ID for this group. IDs need to be unique for this condition only. - `$Comparison` (int) | Value | Description | | ----- | ----------- | | 0 | == | | 1 | != | | 2 | > | | 3 | >= | | 4 | < | | 5 | <= | - `$Weekday` (int) | Value | Description | | ----- | ----------- | | 0 | Delete | | 1 | Monday | | 2 | Tuesday | | 3 | Wednesday | | 4 | Thursday | | 5 | Friday | | 6 | Saturday | | 7 | Sunday | **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. | Value | Description | | ----- | ----------- | | 0 | Delete | | 1 | Monday | | 2 | Tuesday | | 3 | Wednesday | | 4 | Thursday | | 5 | Friday | | 6 | Saturday | | 7 | Sunday | **Example** ```php //Add an AND condition IPS_SetEventCondition(12345, 0, 0, 0) // Adds / modifies the rule with the ID 2 for the event with the object ID 12345 // It is greater than or equal to Thursday i.e.: Thursday to Sunday included IPS_SetEventConditionDayOfTheWeekRule(12345, 0, 2, 3, 4); // Adds / modifies the rule with the ID 3 for the event with the object ID 12345 // It is unequal to Sunday IPS_SetEventConditionDayOfTheWeekRule(12345, 0, 3, 1, 7); // Delete the rule with ID 2 IPS_SetEventConditionDayOfTheWeekRule(12345, 0, 2, 0, 0); ``` ## IPS_SetEventConditionTimeRule Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventconditiontimerule/ `bool IPS_SetEventConditionTimeRule(int $EventID, int $ConditionID, int $RuleID, int $Comparison, int $Hour, int $Minute, int $Second)` _Requires Symcon >= 4.4_ modifies the rule of a condition of an event for time comparisons **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): ID of the condition that contains the rule - `$RuleID` (int): Unique ID for this group. IDs need to be unique for this condition only. - `$Comparison` (int) | Value | Description | | ----- | ----------- | | 0 | == | | 1 | != | | 2 | > | | 3 | >= | | 4 | < | | 5 | <= | - `$Hour` (int): Hour value (0..23) with which the current time is compared - `$Minute` (int): Minute value (0..59) with which the current time is compared - `$Second` (int): Second value (0..59) with which the current time is compared **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Second value (0..59) with which the current time is compared **Example** ```php // Create a root condition IPS_SetEventCondition(12345, 0, 0, 0); // Adds/modifies the rule with the ID 2 for the event with the object ID 12345 // It has to be exactly 10:30 p.m. for this rule to be met. IPS_SetEventConditionTimeRule(12345, 0, 2, 1, 22, 30, 0); // Delete the rule with ID 1 IPS_SetEventConditionTimeRule(12345, 0, 1, 0, -1, 0, 0); ``` ## IPS_SetEventConditionVariableDynamicRule Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventconditionvariabledynamicrule/ `bool IPS_SetEventConditionVariableDynamicRule(int $EventID, int $ConditionID, int $RuleID, int $VariableID, int $Comparison, int $CompareVariableID)` _Requires Symcon >= 6.1_ modify a static condition rule of an event for variable comparison **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): ID of the condition that contains the rule - `$RuleID` (int): Unique ID for this rule. IDs only need to be unique for this group. - `$VariableID` (int): ID of the checked variable - `$Comparison` (int) | Value | Description | | ----- | ----------- | | 0 | == | | 1 | != | | 2 | > | | 3 | >= | | 4 | < | | 5 | <= | - `$CompareVariableID` (int): ID of the variable that the value should be compared to **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the variable that the value should be compared to **Example** ```php // Create root condition for event with ID 12345 IPS_SetEventCondition(12345, 0, 0, 0); // Add a rule with ID 2: Variable 23456 < Variable 34567 IPS_SetEventConditionVariableDynamicRule(12345, 0, 2, 23456, 4, 34567); // Delete rule with ID 2 IPS_SetEventConditionVariableDynamicRule(12345, 0, 2, 0, 0, 0); ``` ## IPS_SetEventConditionVariableRule Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventconditionvariablerule/ `bool IPS_SetEventConditionVariableRule(int $EventID, int $ConditionID, int $RuleID, int $VariableID, int $Comparison, mixed $Value)` _Requires Symcon >= 4.4_ modify a condition rule of an event for variable comparison **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): ID of the condition that contains the rule - `$RuleID` (int): Unique ID for this rule. IDs only need to be unique for this group. - `$VariableID` (int): ID of the checked variable - `$Comparison` (int) | Value | Description | | ----- | ----------- | | 0 | == | | 1 | != | | 2 | > | | 3 | >= | | 4 | < | | 5 | <= | - `$Value` (mixed): Value the checked variable is compared to **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Value the checked variable is compared to **Example** ```php // Create root condition for event with ID 12345 IPS_SetEventCondition(12345, 0, 0, 0); // Add a rule with ID 2: Variable 23456 < 75 IPS_SetEventConditionVariableRule(12345, 0, 2, 23456, 4, 75); // Delete rule with ID 2 IPS_SetEventConditionVariableRule(12345, 0, 2, 0, 0, 0); ``` ## IPS_SetEventConditionVariableStaticRule Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventconditionvariablestaticrule/ `bool IPS_SetEventConditionVariableStaticRule(int $EventID, int $ConditionID, int $RuleID, int $VariableID, int $Comparison, mixed $Value)` _Requires Symcon >= 6.1_ modify a static condition rule of an event for variable comparison **Parameters** - `$EventID` (int): ID of the event to be changed - `$ConditionID` (int): ID of the condition that contains the rule - `$RuleID` (int): Unique ID for this rule. IDs only need to be unique for this group. - `$VariableID` (int): ID of the checked variable - `$Comparison` (int) | Value | Description | | ----- | ----------- | | 0 | == | | 1 | != | | 2 | > | | 3 | >= | | 4 | < | | 5 | <= | - `$Value` (mixed): Value the checked variable is compared to **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Value the checked variable is compared to **Example** ```php // Create root condition for event with ID 12345 IPS_SetEventCondition(12345, 0, 0, 0); // Add a rule with ID 2: Variable 23456 < 75 IPS_SetEventConditionVariableStaticRule(12345, 0, 2, 23456, 4, 75); // Delete rule with ID 2 IPS_SetEventConditionVariableStaticRule(12345, 0, 2, 0, 0, 0); ``` ## IPS_SetEventCyclic Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclic/ `bool IPS_SetEventCyclic(int $EventID, int $DateType, int $DateInterval, int $DateDay, int $DateDayInterval, int $TimeType, int $TimeInterval)` configures a cyclic event **Parameters** - `$EventID` (int): ID of the event to be changed - `$DateType` (int) | Value | Description | | ----- | -------------------------------------------------- | | 0 | No date type. Daily execution. | | 1 | Once. IPS_SetEventCyclicDateBounds for target date | | 2 | Daily | | 3 | Weekly | | 4 | Monthly | | 5 | Annually | - `$DateInterval` (int) | Value | Description | | ----- | ----------------------------- | | 0 | 0 (No Evaluation) | | 1 | 0 (No Evaluation) | | 2 | Every X days | | 3 | Every X weeks | | 4 | Every X months | | 5 | 1 = January ... 12 = December | - `$DateDay` (int) | Value | Description | | ----- | ---------------------------------------------------------------- | | 0 | 0 (No Evaluation) | | 1 | 0 (No Evaluation) | | 2 | 0 (No Evaluation) | | 3 | see table: Daily values ​​(desired daily values ​​must be added) | | 4 | see table: Daily values, 0 for every __Xth__ day of the month | | 5 | 0 (No Evaluation) | _Table: Daily values_ | Day | Value | | --------- | ----- | | Monday | 1 | | Tuesday | 2 | | Wednesday | 4 | | Thursday | 8 | | Friday | 16 | | Saturday | 32 | | Sunday | 64 | - `$DateDayInterval` (int) | Value | Description | | ----- | --------------------------------------------------------------------------------------- | | 0 | 0 (No Evaluation) | | 1 | 0 (No Evaluation) | | 2 | 0 (No Evaluation) | | 3 | 0 (No Evaluation) | | 4 | Every __Xth DateDay__ of the month or every __Xth__ day of the month if __DateDay__ = 0 | | 5 | Every __Xth__ day of the specified month | - `$TimeType` (int) | Value | Description | | ----- | ----------------------------------------------------------------------------------------- | | 0 | Once. [IPS_SetEventCyclicTimeBounds](management-events.md) for target time | | 1 | every second | | 2 | every minute | | 3 | hourly | - `$TimeInterval` (int) | Value | Description | | ----- | ------------------- | | 0 | 0 (No Evaluation) | | 1 | Every __X__ seconds | | 2 | Every __X__ minutes | | 3 | Every __X__ hours | **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. | Value | Description | | ----- | ------------------- | | 0 | 0 (No Evaluation) | | 1 | Every __X__ seconds | | 2 | Every __X__ minutes | | 3 | Every __X__ hours | **Example** ```php IPS_SetEventCyclic($eid, 2, 1, 0, 0, 3, 6); //Every day all 6 hours IPS_SetEventCyclic($eid, 0, 0, 0, 2, 2 ,2); //Every 2 minutes IPS_SetEventCyclic($eid, 3, 2, 1+4, 0, 0, 0); //Every 2 weeks at Monday+Wednesday IPS_SetEventCyclicTimeBounds($eid, mktime(15, 0, 0), 0); //always at 3 pm ``` ## IPS_SetEventCyclicDateBounds Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclicdatebounds/ `bool IPS_SetEventCyclicDateBounds(int $EventID, float $FromDate, float $ToDate)` set the start and end date of a cyclic event (deprecated) **Parameters** - `$EventID` (int): ID of the cyclic event to be changed - `$FromDate` (float): Date as a Unix timestamp - `$ToDate` (float): Date as a Unix timestamp **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Date as a Unix timestamp **Example** ```php //Assign no start/ end date to the event. IPS_SetEventCyclicDateBounds($EventID, 0, 0); ``` ## IPS_SetEventCyclicDateFrom Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclicdatefrom/ `bool IPS_SetEventCyclicDateFrom(int $EventID, int $Day, int $Month, int $Year)` _Requires Symcon >= 3.1_ sets the start date **Parameters** - `$EventID` (int): ID of the cyclic event to be changed - `$Day` (int): Start day (0, 1..31) - `$Month` (int): Start month (0, 1..12) - `$Year` (int): Start year (0, 1970..2038) **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Start year (0, 1970..2038) **Example** ```php //No start date for the event IPS_SetEventCyclicDateFrom($EventID, 0, 0, 0); ``` ## IPS_SetEventCyclicDateTo Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclicdateto/ `bool IPS_SetEventCyclicDateTo(int $EventID, int $Day, int $Month, int $Year)` _Requires Symcon >= 3.1_ sets the end date **Parameters** - `$EventID` (int): ID of the cyclic event to be changed - `$Day` (int): End day (0, 1..31) - `$Month` (int): End month (0, 1..12) - `$Year` (int): End year (0, 1970..2038) **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. End year (0, 1970..2038) **Example** ```php //Set 1st January 2020 as end date for the event IPS_SetEventCyclicDateTo($EventID, 1, 1, 2020); ``` ## IPS_SetEventCyclicTimeBounds Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclictimebounds/ `bool IPS_SetEventCyclicTimeBounds(int $EventID, float $FromTime, float $ToTime)` set the start and end time for a cyclic event (deprecated) **Parameters** - `$EventID` (int): ID of the cyclic event to be changed - `$FromTime` (float): Time as a Unix timestamp - `$ToTime` (float): Time as a Unix timestamp **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Time as a Unix timestamp **Example** ```php //Assign no start / end times to the event. IPS_SetEventCyclicTimeBounds($EventID, 0, 0); //Start event at 7:30 IPS_SetEventCyclicTimeBounds($EventID, mktime(7, 30, 0), 0); ``` ## IPS_SetEventCyclicTimeFrom Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclictimefrom/ `bool IPS_SetEventCyclicTimeFrom(int $EventID, int $Hour, int $Minute, int $Second)` _Requires Symcon >= 3.1_ set the start time **Parameters** - `$EventID` (int): ID of the cyclic event to be changed - `$Hour` (int): Start hour (0..23) - `$Minute` (int): Start minute (0..59) - `$Second` (int): Start second (0..59) **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Start second (0..59) **Example** ```php //Set 7:15:00 as start time IPS_SetEventCyclicTimeFrom($EventID, 7, 15, 0); ``` ## IPS_SetEventCyclicTimeTo Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventcyclictimeto/ `bool IPS_SetEventCyclicTimeTo(int $EventID, int $Hour, int $Minute, int $Second)` _Requires Symcon >= 3.1_ sets the end time **Parameters** - `$EventID` (int): ID of the cyclic event to be changed - `$Hour` (int): End hour (0..23) - `$Minute` (int): End minute (0..59) - `$Second` (int): End second (0..59) **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. End second (0..59) **Example** ```php //No end time for the event IPS_SetEventCyclicTimeTo($EventID, 0, 0, 0); ``` ## IPS_SetEventLimit Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventlimit/ `bool IPS_SetEventLimit(int $EventID, int $Number)` limits the amount of event calls **Parameters** - `$EventID` (int): ID of the event to be changed - `$Number` (int): The number of executions before the event is deactivated. 0 = No Limit **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. The number of executions before the event is deactivated. 0 = No Limit **Example** ```php IPS_SetEventLimit($EventID, 0); //No limitation ``` ## IPS_SetEventScheduleAction Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventscheduleaction/ `bool IPS_SetEventScheduleAction(int $EventID, int $ScheduleActionID, string $Name, int $Color, string $ScriptContent)` _Requires Symcon >= 3.2_ modifies the action table of a schedule event and set the action to "Execute PHP Code" **Parameters** - `$EventID` (int): ID of the event to be changed - `$ScheduleActionID` (int): Unique ID for this schedule action. The ID is used for sorting. IDs only need to be unique for this event. - `$Name` (string): Name of the given schedule action - `$Color` (int): Color value as HTML color code, e.g., 0x0000FF for blue - `$ScriptContent` (string): PHP code without PHP tags () **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. PHP code without PHP tags () **Example** ```php //Creation of actions IPS_SetEventScheduleAction($EventID, 0, "Warm", 0xFF0000, "FHT_SetTemperature(\$_IPS['TARGET'], 22.5);"); IPS_SetEventScheduleAction($EventID, 1, "Cold", 0x0000FF, "FHT_SetTemperature(\$_IPS['TARGET'], 17);"); IPS_SetEventScheduleAction($EventID, 2, "Eco", 0x00FF00, "FHT_SetTemperature(\$_IPS['TARGET'], 20);"); //Delete action with ID 2 IPS_SetEventScheduleAction($EventID, 2, "", 0, ""); ``` ## IPS_SetEventScheduleActionEx Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventscheduleactionex/ `bool IPS_SetEventScheduleActionEx(int $EventID, int $ScheduleActionID, string $Name, int $Color, string $ActionID, array $ActionParameters)` _Requires Symcon >= 6.0_ modifies the action table of a schedule event **Parameters** - `$EventID` (int): ID of the event to be changed - `$ScheduleActionID` (int): Unique ID for this schedule action. The ID is used for sorting. IDs only need to be unique for this event. - `$Name` (string): Name of the given schedule action - `$Color` (int): Color value as HTML color code, e.g., 0x0000FF for blue - `$ActionID` (string): ID of the executed action - `$ActionParameters` (array): List of Parameters for the executed action **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. List of Parameters for the executed action **Example** ```php //Creating schedule actions IPS_SetEventScheduleActionEx($EreignisID, 0, "Warm", 0xFF0000, "{3644F802-C152-464A-868A-242C2A3DEC5C}", ["VALUE" => 22.5]); IPS_SetEventScheduleActionEx($EreignisID, 1, "Cold", 0xFF0000, "{3644F802-C152-464A-868A-242C2A3DEC5C}", ["VALUE" => 17]); IPS_SetEventScheduleActionEx($EreignisID, 2, "Eco", 0xFF0000, "{3644F802-C152-464A-868A-242C2A3DEC5C}", ["VALUE" => 20]); //Delete schedule action with the ID 2 IPS_SetEventScheduleAction($EreignisID, 2, "", 0, "", []); ``` ## IPS_SetEventScheduleGroup Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventschedulegroup/ `bool IPS_SetEventScheduleGroup(int $EventID, int $GroupID, int $Days)` _Requires Symcon >= 3.2_ modifies the grouping of days for a schedule event **Parameters** - `$EventID` (int): ID of the event to be changed - `$GroupID` (int): Unique ID for this group. The ID is used for sorting. IDs only need to be unique for this event. - `$Days` (int): Sum of the day values that belong to the group. The day values are found in the table in [IPS_SetEventCyclic](management-events.md). **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Sum of the day values that belong to the group. The day values are found in the table in [IPS_SetEventCyclic](management-events.md). **Example** ```php //Create schedule event $EventID = IPS_CreateEvent(2); //Create groups IPS_SetEventScheduleGroup($EventID, 0, 31); //Mo - Fr (1 + 2 + 4 + 8 + 16) IPS_SetEventScheduleGroup($EventID, 1, 96); //Sa + Su (32 + 64) //Delete group with ID 1 IPS_SetEventScheduleGroup($EventID, 1, 0); ``` ## IPS_SetEventScheduleGroupPoint Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventschedulegrouppoint/ `bool IPS_SetEventScheduleGroupPoint(int $EventID, int $GroupID, int $PointID, int $StartHour, int $StartMinute, int $StartSecond, int $ActionID)` _Requires Symcon >= 3.2_ modify a switch point of the group of a schedule event **Parameters** - `$EventID` (int): ID of the event to be changed - `$GroupID` (int): Unique ID for this group. The ID is used for sorting. IDs only need to be unique for this event. - `$PointID` (int): Unique ID for this switch point. IDs only need to be unique for this group. - `$StartHour` (int): Start hour (0..23) - `$StartMinute` (int): Start minute (0..59) - `$StartSecond` (int): Start second (0..59) - `$ActionID` (int): ID of the action which should be executed at the start time. The ID needs to be valid. **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the action which should be executed at the start time. The ID needs to be valid. **Example** ```php //Create switch points for the group with ID 0 (= Mo - Fr) IPS_SetEventScheduleGroupPoint($EventID, 0, 0, 8, 0, 0, 0); //Call action with ID 0 (=Warm) at 8:00:00 IPS_SetEventScheduleGroupPoint($EventID, 0, 1, 22, 30, 0, 2); //Call action with ID 2 (=Eco) at 22:30:00 //Delete switch point with ID 1 from group with ID 0 (= Mo - Fr) IPS_SetEventScheduleGroupPoint($EventID, 0, 1, -1, -1, -1, 0); ``` ## IPS_SetEventScript Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventscript/ `bool IPS_SetEventScript(int $EventID, string $EventScript)` set the action to "Execute PHP Code" and define the code to be executed **Parameters** - `$EventID` (int): ID of the event to be changed - `$EventScript` (string): PHP code without PHP tags () **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. PHP code without PHP tags () **Example** ```php //Assign the script content to the event IPS_SetEventScript($EventID, "echo linked object: ".$_IPS['TARGET']); ``` ## IPS_SetEventTrigger Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventtrigger/ `bool IPS_SetEventTrigger(int $EventID, int $TriggerType, int $TriggerVariableID)` define the trigger for a trigger event **Parameters** - `$EventID` (int): ID of the event to be changed - `$TriggerType` (int) | Value | Description | | ----- | ----------------------------------------------------------------------------------------------------------------------------------------- | | 0 | On Variable Update | | 1 | On Variable Change | | 2 | On Limit Exceed - Value is determined by [IPS_SetEventTriggerValue](management-events.md) | | 3 | On Limit Drop - Value is determined by [IPS_SetEventTriggerValue](management-events.md) | | 4 | On specific Value - Value is determined by [IPS_SetEventTriggerValue](management-events.md) | - `$TriggerVariableID` (int): VariableID on whose change or update should be responded **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. VariableID on whose change or update should be responded **Example** ```php IPS_SetEventTrigger($EventID, 0, 12345); //OnUpdate for variable 12345 ``` ## IPS_SetEventTriggerSubsequentExecution Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventtriggersubsequentexecution/ `bool IPS_SetEventTriggerSubsequentExecution(string $EventID, bool $AllowSubsequentExecutions)` define if a trigger event should multiple times fir exceed/drop **Parameters** - `$EventID` (string): ID of the event to be changed - `$AllowSubsequentExecutions` (bool): __TRUE__ if permitted, otherwise __FALSE__ **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. __TRUE__ if permitted, otherwise __FALSE__ **Example** ```php IPS_SetEventTriggerSubsequentExecution($EventID, true); //Allow ``` ## IPS_SetEventTriggerValue Source: https://www.symcon.de/en/service/documentation/command-reference/management-events/ips-seteventtriggervalue/ `bool IPS_SetEventTriggerValue(int $EventID, mixed $TriggerValue)` set the value the trigger variable is compared to **Parameters** - `$EventID` (int): ID of the event to be changed - `$TriggerValue` (mixed): Value/ type, depending on TriggerVariableID **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Value/ type, depending on TriggerVariableID **Example** ```php IPS_SetEventTriggerValue($EventID, true); //Trigger only for​​ TRUE values ```