What can we improve?

Documentation

(Edit)

IPS_GetEvent

Require: IP-Symcon >= 3.1

 array IPS_GetEvent (int $EventID) 

Parameters

EventID

ID of the event

Returns

The following information are available as key => value pairs:

Index   Type Description
CyclicDateType integer Date type. See IPS_SetEventCyclic
CyclicDateValue integer Date interval. See IPS_SetEventCyclic
CyclicDateDay integer Day of date. See IPS_SetEventCyclic
CyclicDateDayValue integer Day of date, interval. See IPS_SetEventCyclic
CyclicDateFrom array Unix Timestamp of the start day of the event, 0 = Always. See IPS_SetEventCyclicDateBounds
CyclicDateTo array Unix Timestamp of final day of the event, 0 = Never. See IPS_SetEventCyclicDateBounds
CyclicTimeType integer Time type. See IPS_SetEventCyclic
CyclicTimeValue integer Time interval. See IPS_SetEventCyclic
CyclicTimeFrom array Unix Timestamp of the start time for the event, 0 = Midnight. See IPS_SetEventCyclicTimeBounds
CyclicTimeTo array Unix timestamp of the end time for the event, 0 = Midnight. See IPS_SetEventCyclicTimeBounds
EventActionID string ID of the executed link: /service/dokumentation/grundlagen/automationen/ablaufplaene/actions text: Action)
EventActionParameters array Parameter of the executed link: /service/dokumentation/grundlagen/automationen/ablaufplaene/actions text: Action)
EventConditions array Array of conditions. See IPS_SetEventCondition and IPS_SetEventConditionRule
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.
EventActive boolean TRUE if the event is active
EventType integer Event Type: (0: trigger 1: cyclic)
LastRun float Unix timestamp of the last run, 0 = Never
NextRun float Unix timestamp of the next run, 0 = Never
ScheduleActions array Array of actions of the schedule. See IPS_SetEventScheduleActionEx
ScheduleGroups array Array of groups with switch points of the schedule. See IPS_SetEventScheduleGroup and IPS_SetEventScheduleGroupPoint
TriggerSubsequentExecution boolean Allow to run again in triggering without value change
TriggerType integer Value for the trigger type: See IPS_SetEventTrigger
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

Description

The command returns an array containing information about the event with the ID EventID.

Example

$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
)
*/