What can we improve?




Requires: IP-Symcon >= 4.4

boolean IPS_SetEventConditionTimeRule (integer $EventID, integer $ConditionID, integer $RuleID, integer $Comparison, integer $Hour, integer $Minute, integer $Second)


EventID ID of the event to be changed
ConditionID ID of the condition that contains the rule
RuleID Unique ID for this group. IDs need to be unique for this condition only.
Value Description
0 ==
1 !=
2 >
3 >=
4 <
5 <=
Hour Hour value (0..23) with which the current time is compared
Minute Minute value (0..59) with which the current time is compared
Second Second value (0..59) with which the current time is compared


If the command succeeds, it returns TRUE, otherwise FALSE.


This function modifies the rule with the ID RuleID of the condition with the ID ConditionID of the event with the ID EventID. The rule compares the current time with the Hours, Minutes and Seconds, according to the comparison operation Comparison. If there is no rule with the ID RuleID, one will be created.

If one of the values Hour, Minute or Second < 0, the rule with the ID RuleID will be deleted.

Which rule ID contains which rule can be looked up via IPS_GetEvent.


// 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);
Deutsche Webseite verfügbar
Go to cart
Any questions?