\Patami\IPS\SystemIPS

IPS Wrapper Class.

Encapsulates IP Symcon's IPS_* functions.

Summary

Methods
Properties
Constants
GetKernelRunlevel()
IsKernelReady()
GetKernelDir()
GetScriptDir()
GetScriptsDirSize()
GetModulesDir()
GetModuleDir()
GetDatabaseDir()
GetDatabaseDirSize()
GetLogDir()
GetLogDirSize()
GetLogFileName()
GetKernelVersion()
GetKernelStartTime()
Is64Bit()
LogMessage()
FunctionExists()
GetFunctionList()
GetFunctionCount()
Sleep()
GetValue()
SetValue()
GetValueFormatted()
GetValueBoolean()
SetValueBoolean()
GetValueInteger()
SetValueInteger()
GetValueFloat()
SetValueFloat()
GetValueString()
SetValueString()
ObjectExists()
GetObject()
GetObjectList()
GetObjectCount()
GetName()
SetName()
GetLocation()
SetIdent()
SetDisabled()
SetHidden()
SetIcon()
SetInfo()
IsChild()
GetParent()
SetParent()
HasChildren()
GetChildrenIds()
GetObjectIdByName()
GetObjectIdByIdent()
SetPosition()
GetConfiguration()
SetConfiguration()
GetConfigurationForm()
GetProperty()
SetProperty()
HasChanges()
ApplyChanges()
ResetChanges()
ConnectInstance()
DisconnectInstance()
GetCompatibleInstances()
GetCompatibleInstancesCount()
IsInstanceCompatible()
GetLibraryList()
GetLibraryCount()
GetLibrary()
LibraryExists()
GetLibraryModules()
GetModuleList()
GetModuleCount()
GetModuleListByType()
GetModuleCountByType()
GetModule()
GetModuleLibraryId()
ModuleExists()
GetCompatibleModules()
IsModuleCompatible()
CreateCategory()
DeleteCategory()
GetCategoryIdByName()
GetCategoryList()
GetCategoryCount()
CreateInstance()
DeleteInstance()
GetInstanceList()
GetInstanceCount()
GetInstance()
GetInstanceModuleId()
GetInstanceModuleName()
InstanceExists()
IsInstanceInitializing()
GetInstanceListByModuleId()
GetInstanceCountByModuleId()
GetInstanceListByModuleType()
GetInstanceCountByModuleType()
CreateVariable()
DeleteVariable()
VariableExists()
GetVariableList()
GetVariableCount()
GetVariable()
GetVariableUpdatedTimestamp()
GetVariableChangedTimestamp()
SetVariableCustomProfile()
SetVariableCustomAction()
GetVariableEventList()
GetVariableEventCount()
GetVariableProfileListByType()
GetVariableProfileCountByType()
GetVariableProfile()
VariableProfileExists()
CreateVariableProfile()
DeleteVariableProfile()
SetVariableProfileDigits()
SetVariableProfileValues()
SetVariableProfileText()
SetVariableProfileIcon()
SetVariableProfileAssociation()
CreateScript()
DeleteScript()
ScriptExists()
GetScriptList()
GetScriptCount()
GetScript()
GetScriptContent()
SetScriptContent()
GetScriptFile()
SetScriptFile()
GetScriptIdByFile()
GetScriptTimer()
SetScriptTimer()
RunScript()
RunScriptEx()
RunScriptWait()
RunScriptWaitEx()
RunScriptText()
RunScriptTextEx()
RunScriptTextWait()
RunScriptTextWaitEx()
CreateEvent()
DeleteEvent()
EventExists()
GetEvent()
GetEventIdByName()
GetEventList()
GetEventCount()
GetEventListByType()
GetEventCountByType()
SetEventActive()
SetEventCyclic()
SetEventCyclicDateFrom()
SetEventCyclicDateTo()
SetEventCyclicTimeFrom()
SetEventCyclicTimeTo()
SetEventLimit()
SetEventScheduleAction()
SetEventScheduleGroup()
SetEventScheduleGroupPoint()
SetEventScript()
SetEventTrigger()
SetEventTriggerSubsequentExecution()
SetEventTriggerValue()
CreateLink()
DeleteLink()
GetLink()
GetLinkIdByName()
GetLinkList()
GetLinkCount()
LinkExists()
SetLinkTargetId()
CreateMedia()
DeleteMedia()
GetMedia()
GetMediaContent()
SetMediaContent()
SetMediaFile()
GetMediaId()
GetMediaIdByFile()
GetMediaIdByName()
GetMediaList()
GetMediaCount()
GetMediaListByType()
GetMediaCountByType()
MediaExists()
SendMediaEvent()
SetMediaCached()
Execute()
ExecuteEx()
ExecuteWait()
ExecuteWaitEx()
SemaphoreEnter()
SemaphoreLeave()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

GetKernelRunlevel()

GetKernelRunlevel() : integer

Returns the runlevel of the IPS kernel.

Returns

integer —

The IPS kernel runlevel.

IsKernelReady()

IsKernelReady() : boolean

Checks if the IPS kernel is ready.

Returns

boolean —

True if the kernel is ready

GetKernelDir()

GetKernelDir() : string

Returns the full path of the IPS program directory.

Returns

string —

Full path of the IPS program directory.

GetScriptDir()

GetScriptDir() : string

Returns the full path of the directory where IPS stores user-defined scripts.

Returns

string —

Full path of the IPS scripts directory.

GetScriptsDirSize()

GetScriptsDirSize() : integer

Returns the size of the directory where IPS stores user-defined scripts.

Returns

integer —

Size of the directory in bytes.

GetModulesDir()

GetModulesDir() : string

Returns the full path of the directory where IPS stores the library Git repositories.

Returns

string —

Full path of the IPS modules directory.

GetModuleDir()

GetModuleDir(string  $name) : string

Returns the full path of the directory where the Git repository of an IPS module is stored.

Parameters

string $name

Key of the IPS library.

Returns

string —

Full path of the IPS module directory.

GetDatabaseDir()

GetDatabaseDir() : string

Returns the full path of the directory where IPS stores the database.

Returns

string —

Full path of the IPS database directory.

GetDatabaseDirSize()

GetDatabaseDirSize() : integer

Returns the size of the directory where IPS stores the database.

Returns

integer —

Size of the directory in bytes.

GetLogDir()

GetLogDir() : string

Returns the full path of the IPS log directory.

Returns

string —

Full path of the IPS log directory.

GetLogDirSize()

GetLogDirSize() : integer

Returns the size of the IPS log directory.

Returns

integer —

Size of the directory in bytes.

GetLogFileName()

GetLogFileName(string  $fileName) : string

Returns the full path of a log file in the IPS log directory.

Parameters

string $fileName

Name of the log file.

Returns

string —

Full path of the log file.

GetKernelVersion()

GetKernelVersion() : string

Returns the IPS version.

Returns

string —

IPS version.

GetKernelStartTime()

GetKernelStartTime() : integer

Returns the unix timestamp when IPS was started.

Returns

integer —

Unix timestamp when IPS was started.

Is64Bit()

Is64Bit() : boolean

Checks if the IPS binary is 32- or 64-bit.

Returns

boolean —

True if the IPS binary is 64-bit.

LogMessage()

LogMessage(string  $tag, string  $message) : boolean

Logs a message in the IPS log.

Parameters

string $tag

Name of the sender of the log (can be used as a category or similar).

string $message

The log message.

Returns

boolean —

True if messages was successfully added to the IPS log.

FunctionExists()

FunctionExists(string  $name) : boolean

Checks if an IPS instance function exists.

Parameters

string $name

Name of the IPS instance function.

Returns

boolean —

True if the instance function is registered.

GetFunctionList()

GetFunctionList(integer  $instanceId) : array

Returns a list of all functions registered by an instance.

Parameters

integer $instanceId

IPS object ID of the instance or 0 for all instances.

Returns

array —

List of all registered IPS functions.

GetFunctionCount()

GetFunctionCount(integer  $instanceId) : integer

Returns the number of all functions registered by an instance.

Parameters

integer $instanceId

IPS object ID of the instance or 0 for all instances.

Returns

integer —

Number of all registered IPS functions.

Sleep()

Sleep(integer  $waitTime) : boolean

Waits for the specified time.

Parameters

integer $waitTime

Number of milliseconds to wait.

Returns

boolean —

True if the function successfully waited for the specified time.

GetValue()

GetValue(integer  $objectId) : mixed

Returns the value of an IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

Returns

mixed —

Value of the variable.

SetValue()

SetValue(integer  $objectId, mixed  $value) : boolean

Sets the value of an IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

mixed $value

New value of the variable.

Returns

boolean —

True if the variable value was successfully updated.

GetValueFormatted()

GetValueFormatted(integer  $objectId) : string

Returns the formatted value of an IPS variable using the associated variable profile.

Parameters

integer $objectId

IPS object ID of the variable.

Returns

string —

Formatted value of the variable or NULL if an error occurred.

GetValueBoolean()

GetValueBoolean(integer  $objectId) : boolean

Returns the value of a boolean IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

Returns

boolean —

Value of the variable or NULL if the variable does not exist or is not a boolean variable.

SetValueBoolean()

SetValueBoolean(integer  $objectId, boolean  $value) : boolean

Sets the value of a boolean IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

boolean $value

New value of the variable.

Returns

boolean —

True if the variable value was successfully updated.

GetValueInteger()

GetValueInteger(integer  $objectId) : integer

Returns the value of an integer IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

Returns

integer —

Value of the variable or NULL if the variable does not exist or is not an integer variable.

SetValueInteger()

SetValueInteger(integer  $objectId, integer  $value) : boolean

Sets the value of an integer IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

integer $value

New value of the variable.

Returns

boolean —

True if the variable value was successfully updated.

GetValueFloat()

GetValueFloat(integer  $objectId) : float

Returns the value of a float IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

Returns

float —

Value of the variable or NULL if the variable does not exist or is not a float variable.

SetValueFloat()

SetValueFloat(integer  $objectId, integer  $value) : boolean

Sets the value of a float IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

integer $value

New value of the variable.

Returns

boolean —

True if the variable value was successfully updated.

GetValueString()

GetValueString(integer  $objectId) : float

Returns the value of a string IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

Returns

float —

Value of the variable or NULL if the variable does not exist or is not a string variable.

SetValueString()

SetValueString(integer  $objectId, integer  $value) : boolean

Sets the value of a string IPS variable.

Parameters

integer $objectId

IPS object ID of the variable.

integer $value

New value of the variable.

Returns

boolean —

True if the variable value was successfully updated.

ObjectExists()

ObjectExists(integer  $objectId) : boolean

Checks if an IPS object exists.

Parameters

integer $objectId

IPS object ID.

Returns

boolean —

True if the IPS object exists.

GetObject()

GetObject(integer  $objectId) : array

Returns information about an IPS object.

Parameters

integer $objectId

IPS object ID.

Returns

array —

Information about the IPS object or NULL if the object does not exist.

GetObjectList()

GetObjectList() : array

Returns the list of all IPS objects.

Returns

array —

IPS object IDs of all IPS objects.

GetObjectCount()

GetObjectCount() : integer

Returns the number of all IPS objects.

Returns

integer —

Number of all IPS objects.

GetName()

GetName(integer  $objectId) : string

Returns the name of an IPS object.

Parameters

integer $objectId

IPS object ID.

Returns

string —

Name of the IPS object or NULL if the object does not exist.

SetName()

SetName(integer  $objectId, string  $name) : boolean

Sets the name of an IPS object.

Parameters

integer $objectId

IPS object ID.

string $name

New name of the IPS object.

Returns

boolean —

True if the name was successfully updated.

GetLocation()

GetLocation(integer  $objectId) : string

Returns the location (the complete path) of an IPS object.

Parameters

integer $objectId

IPS object ID.

Returns

string —

Complete path of the IPS object or NULL if the object does not exist.

SetIdent()

SetIdent(integer  $objectId, string  $ident) : boolean

Sets the internal identifier of an IPS object.

Parameters

integer $objectId

IPS object ID.

string $ident

New internal identifier of the IPS object.

Returns

boolean —

True if the identifier was successfully updated.

SetDisabled()

SetDisabled(integer  $objectId, boolean  $disabled = true) : boolean

Disabled or enables an IPS object in the web frontend.

Parameters

integer $objectId

IPS object ID.

boolean $disabled

True to disable the object in the web frontend.

Returns

boolean —

True if the object was successfully updated.

SetHidden()

SetHidden(integer  $objectId, boolean  $hidden = true) : boolean

Hides or shows an IPS object in the web frontend.

Parameters

integer $objectId

IPS object ID.

boolean $hidden

True to hide the object in the web frontend.

Returns

boolean —

True if the object was successfully updated.

SetIcon()

SetIcon(integer  $objectId, string  $iconName) : boolean

Sets the icon of an IPS object.

Parameters

integer $objectId

IPS object ID.

string $iconName

File name of the icon without path and extension.

Returns

boolean —

True if the icon was successfully updated.

SetInfo()

SetInfo(integer  $objectId, string  $info) : boolean

Sets the info (data) of an IPS object.

Parameters

integer $objectId

IPS object ID.

string $info

Info text or data for the object.

Returns

boolean —

True if the info was successfully updated.

IsChild()

IsChild(integer  $objectId, integer  $parentId, boolean  $recursive) : boolean

Checks if an IPS object is a child of another IPS object.

Parameters

integer $objectId

IPS object ID.

integer $parentId

IPS object ID of the parent object.

boolean $recursive

True if the method should check more than one level towards the object tree root.

Returns

boolean —

True if the object is a child of the parent object.

GetParent()

GetParent(integer  $objectId) : integer

Returns the object ID of an IPS objects parent.

Parameters

integer $objectId

IPS object ID.

Returns

integer —

IPS object ID of the object's parent object.

SetParent()

SetParent(integer  $objectId, integer  $parentId) : boolean

Sets the parent object of an IPS object.

Parameters

integer $objectId

IPS object ID.

integer $parentId

IPS object ID of the new parent.

Returns

boolean —

True if the object was successfully assigned to the new parent object.

HasChildren()

HasChildren(integer  $objectId) : boolean

Check if the IPS object has child objects.

Parameters

integer $objectId

IPS object ID.

Returns

boolean —

True if the object has child objects.

GetChildrenIds()

GetChildrenIds(integer  $objectId) : array

Returns a list of all child object IDs of an IPS object.

Parameters

integer $objectId

IPS object ID.

Returns

array —

IPS object IDs of all children of the object or NULL if there was an error.

GetObjectIdByName()

GetObjectIdByName(string  $name, integer  $objectId) : integer

Returns the object ID of the first child object of an IPS object with the specified name.

Parameters

string $name

Name of the child object.

integer $objectId

IPS object ID of the parent object.

Returns

integer —

IPS object ID of the first child object with the name or false if no object with the name exists.

GetObjectIdByIdent()

GetObjectIdByIdent(string  $ident, integer  $objectId) : integer

Returns the object ID of the first child object of an IPS object with the specified identifier.

Parameters

string $ident

Identifier of the child object.

integer $objectId

IPS object ID of the parent object.

Returns

integer —

IPS object ID of the first child object with the identifier or false if no object with the identifier exists.

SetPosition()

SetPosition(integer  $objectId, integer  $position) : boolean

Sets the position of an IPS object.

Parameters

integer $objectId

IPS object ID.

integer $position

Position (index) of the object.

Returns

boolean —

True if the position of the object was successfully updated.

GetConfiguration()

GetConfiguration(integer  $instanceId) : string

Returns the JSON-encoded configuration of an IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

string —

JSON-encoded configuration of the instance.

SetConfiguration()

SetConfiguration(integer  $instanceId, string  $configuration) : boolean

Sets the JSON-encoded configuration of an IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

string $configuration

New JSON-encoded configuration of the instance.

Returns

boolean —

True if the configuration of the instance was successfully updated.

GetConfigurationForm()

GetConfigurationForm(integer  $instanceId) : string

Returns the JSON-encoded configuration form of an IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

string —

JSON-encoded configuration form of the instance.

GetProperty()

GetProperty(integer  $instanceId, string  $propertyName) : mixed

Returns the value of an configuration property of an IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

string $propertyName

Name of the configuration property.

Returns

mixed —

Value of the configuration property.

SetProperty()

SetProperty(integer  $instanceId, string  $propertyName, mixed  $value) : boolean

Sets the value of an configuration property of an IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

string $propertyName

Name of the configuration property.

mixed $value

Value of the configuration property.

Returns

boolean —

True if the value of the configuration property was successfully updated.

HasChanges()

HasChanges(integer  $instanceId) : boolean

Checks if an IPS instance has unsaved configuration changes.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the instance has unsaved configuration changes.

ApplyChanges()

ApplyChanges(integer  $instanceId) : boolean

Saves configuration changes of an IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the configuration changes were successfully saved and applied.

ResetChanges()

ResetChanges(integer  $instanceId) : boolean

Resets configuration changes of an IPS instance to the last saved configuration.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the configuration was successfully reset.

ConnectInstance()

ConnectInstance(integer  $instanceId, integer  $parentId) : boolean

Connects an IPS instance to its parent IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

integer $parentId

IPS object ID of the parent instance.

Returns

boolean —

True if the instance was successfully connected to the parent instance.

DisconnectInstance()

DisconnectInstance(integer  $instanceId) : boolean

Disconnects an IPS instance from its parent IPS instance.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the instance was successfully disconnected from the parent instance.

GetCompatibleInstances()

GetCompatibleInstances(integer  $instanceId) : array

Returns a list of all IPS instance IDs that are compatible to the given instance ID.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

array —

IPS instance IDs that are compatible to the instance.

GetCompatibleInstancesCount()

GetCompatibleInstancesCount(integer  $instanceId) : integer

Returns the number of IPS instances that are compatible to the given instance ID.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

integer —

Number of IPS instances that are compatible to the instance.

IsInstanceCompatible()

IsInstanceCompatible(integer  $instanceId, integer  $otherInstanceId) : boolean

Checks if two IPS instances are compatible to each other.

Parameters

integer $instanceId

IPS object ID of the instance.

integer $otherInstanceId

IPS object ID of the instance to be checked for compatibility.

Returns

boolean —

True if the two instances are compatible to each other. https://www.symcon.de/service/dokumentation/befehlsreferenz/instanzenverwaltung/verbindungen/ips-isinstancecompatible/

GetLibraryList()

GetLibraryList() : array

Returns the list of GUIDs of all loaded IPS libraries.

Returns

array —

All IPS library GUIDs.

GetLibraryCount()

GetLibraryCount() : integer

Returns the number of loaded IPS libraries.

Returns

integer —

Number of loaded IPS libraries.

GetLibrary()

GetLibrary(string  $libraryId) : array

Returns information about a loaded IPS library.

Parameters

string $libraryId

GUID of the IPS library.

Returns

array —

Attributes of the IPS library.

LibraryExists()

LibraryExists(string  $libraryId) : boolean

Checks if an IPS library is loaded.

Parameters

string $libraryId

GUID of the IPS library.

Returns

boolean —

True if the library is loaded.

GetLibraryModules()

GetLibraryModules(string  $libraryId) : array

Returns the list of GUIDs of all modules provided by a given IPS library.

Parameters

string $libraryId

GUID of the IPS library.

Returns

array —

IPS module GUIDs provided by the library.

GetModuleList()

GetModuleList() : array

Returns the list of GUIDs of all modules provided by all loaded IPS libraries.

Returns

array —

All IPS module GUIDs.

GetModuleCount()

GetModuleCount() : integer

Returns the number of modules provided by all loaded IPS libraries.

Returns

integer —

Number of modules.

GetModuleListByType()

GetModuleListByType(integer  $moduleType) : array

Returns the list of GUIDs of all modules of the given type provided by all loaded IPS libraries.

Parameters

integer $moduleType

Type of the module (see link).

Returns

array —

All IPS module GUIDs of the given type.

GetModuleCountByType()

GetModuleCountByType(integer  $moduleType) : integer

Returns the number of modules of the given type provided by all loaded IPS libraries.

Parameters

integer $moduleType

Type of the module.

Returns

integer —

Number of modules of the given type.

GetModule()

GetModule(string  $moduleId) : array

Returns information about an IPS module.

Parameters

string $moduleId

GUID of the IPS module.

Returns

array —

Attributes of the IPS module.

GetModuleLibraryId()

GetModuleLibraryId(string  $moduleId) : string|null

Returns the IPS library GUID of the IPS module.

Parameters

string $moduleId

GUID of the IPS module.

Returns

string|null —

IPS library GUID or null if there was an error.

ModuleExists()

ModuleExists(string  $moduleId) : boolean

Checks if the given IPS module exists.

Parameters

string $moduleId

GUID of the IPS module.

Returns

boolean —

True if the IPS module is loaded.

GetCompatibleModules()

GetCompatibleModules(string  $moduleId) : array

Returns a list of IPS module GUIDs that are compatible to the given IPS module GUID.

Parameters

string $moduleId

GUID of the IPS module.

Returns

array —

All compatible IPS module GUIDs.

IsModuleCompatible()

IsModuleCompatible(string  $moduleId, string  $otherModuleId) : boolean

Checks if two IPS modules are compatible to each other.

Parameters

string $moduleId

GUID of the IPS module.

string $otherModuleId

GUID of the IPS module to be check for compatibility.

Returns

boolean —

True if the two modules are compatible to each other.

CreateCategory()

CreateCategory() : integer

Creates a new IPS category object (folder) in the IPS object tree.

Returns

integer —

IPS object ID of the new category.

DeleteCategory()

DeleteCategory(integer  $categoryId) : boolean

Deletes an IPS category object.

Parameters

integer $categoryId

IPS object ID of the category.

Returns

boolean —

True if the category was successfully deleted.

GetCategoryIdByName()

GetCategoryIdByName(string  $name, integer  $parentId) : integer

Returns the IPS object ID of the first category object with the given name under the given IPS object.

Parameters

string $name

Name of the IPS category.

integer $parentId

IPS object ID of the parent object.

Returns

integer —

IPS object ID of the first matching category or false if no matching category was found.

GetCategoryList()

GetCategoryList() : array

Returns a list of IPS object IDs of all category objects.

Returns

array —

IPS object IDs of all category objects.

GetCategoryCount()

GetCategoryCount() : integer

Returns the number of IPS category objects.

Returns

integer —

Number of IPS category objects.

CreateInstance()

CreateInstance(string  $moduleId) : integer

Creates a new IPS instance object with the given GUID in the IPS object tree.

Parameters

string $moduleId

GUID of the IPS module.

Returns

integer —

IPS object ID of the new instance or null if it could not be created.

DeleteInstance()

DeleteInstance(integer  $instanceId) : boolean

Deletes an IPS instance object.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the instance was successfully deleted.

GetInstanceList()

GetInstanceList() : array

Returns the list of IPS object IDs of all IPS instance objects.

Returns

array —

IPS instance object IDs.

GetInstanceCount()

GetInstanceCount() : integer

Returns the number of IPS instance objects.

Returns

integer —

Number of IPS instance objects.

GetInstance()

GetInstance(integer  $instanceId) : array

Returns information about an IPS instance object.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

array —

Attributes of the IPS instance object.

GetInstanceModuleId()

GetInstanceModuleId(integer  $instanceId) : string|null

Returns the IPS module GUID of an IPS instance object.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

string|null —

IPS module GUID or null if there was an error.

GetInstanceModuleName()

GetInstanceModuleName(integer  $instanceId) : string|null

Returns the module name of an IPS instance object.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

string|null —

Module name or null if there was an error.

InstanceExists()

InstanceExists(integer  $instanceId) : boolean

Checks if an IPS instance object exists.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the IPS instance exists.

IsInstanceInitializing()

IsInstanceInitializing(integer  $instanceId) : boolean

Checks if an IPS instance is initializing.

This can be used to check if the instance is being created during IPS startup or module updates.

Parameters

integer $instanceId

IPS object ID of the instance.

Returns

boolean —

True if the IPS instance is initializing.

GetInstanceListByModuleId()

GetInstanceListByModuleId(string  $moduleId) : array

Returns the list of IPS object IDs of all instances with the given module GUID.

Parameters

string $moduleId

GUID of the IPS module.

Returns

array —

All IPS instance object IDs with the given module GUID.

GetInstanceCountByModuleId()

GetInstanceCountByModuleId(string  $moduleId) : integer

Returns the number of IPS instance objects with the given module GUID.

Parameters

string $moduleId

GUID of the IPS module.

Returns

integer —

Number of IPS instance objects with the given module GUID.

GetInstanceListByModuleType()

GetInstanceListByModuleType(integer  $moduleType) : array

Returns the list of IPS object IDs of all instances with the given type.

Parameters

integer $moduleType

Type of the instance (see link).

Returns

array —

All IPS instance object IDs with the given type.

GetInstanceCountByModuleType()

GetInstanceCountByModuleType(integer  $moduleType) : integer

Returns the number of IPS instance objects with the given type.

Parameters

integer $moduleType

Type of the instance.

Returns

integer —

Number of IPS instance objects with the given type.

CreateVariable()

CreateVariable(integer  $variableType) : integer

Creates a new IPS variable object of the given type.

Parameters

integer $variableType

Type of the variable.

Returns

integer —

IPS object ID of the new variable object or null if an error occurred.

DeleteVariable()

DeleteVariable(integer  $variableId) : boolean

Deletes an IPS variable object.

Parameters

integer $variableId

IPS object ID of the variable.

Returns

boolean —

True if the variable object was successfully deleted.

VariableExists()

VariableExists(integer  $variableId) : boolean

Checks if an IPS variable object exists.

Parameters

integer $variableId

IPS object ID of the variable.

Returns

boolean —

True if the variable object exists.

GetVariableList()

GetVariableList() : array

Returns a list of all IPS variable object IDs.

Returns

array —

IPS variable object IDs.

GetVariableCount()

GetVariableCount() : integer

Returns the number of all IPS variable objects.

Returns

integer —

Number of all IPS variable objects.

GetVariable()

GetVariable(integer  $variableId) : array

Returns information about an IPS variable object.

Parameters

integer $variableId

IPS object ID of the variable.

Returns

array —

Attributes of the IPS variable object.

GetVariableUpdatedTimestamp()

GetVariableUpdatedTimestamp(integer  $variableId) : integer

Returns the timestamp when the IPS variable object was last updated.

Parameters

integer $variableId

IPS object ID of the variable.

Returns

integer —

Timestamp when the IPS variable object was last updated.

GetVariableChangedTimestamp()

GetVariableChangedTimestamp(integer  $variableId) : integer

Returns the timestamp when the IPS variable object was last changed (a new value was set).

Parameters

integer $variableId

IPS object ID of the variable.

Returns

integer —

Timestamp when the IPS variable object was last changed.

SetVariableCustomProfile()

SetVariableCustomProfile(integer  $variableId, string  $name) : boolean

Sets the custom variable profile of an IPS variable object.

Parameters

integer $variableId

IPS object ID of the variable.

string $name

Name of the IPS variable profile.

Returns

boolean —

True if the variable profile was successfully assigned as the custom variable profile of the IPS variable object.

SetVariableCustomAction()

SetVariableCustomAction(integer  $variableId, integer  $scriptId) : boolean

Sets the custom actions script of an IPS variable object.

Parameters

integer $variableId

IPS object ID of the variable.

integer $scriptId

IPS object ID of the script that is called when the variable value is updated.

Returns

boolean —

True if the script was successfully assigned as the custom action script of the IPS variable object.

GetVariableEventList()

GetVariableEventList(integer  $variableId) : array

Returns all IPS event object IDs associated to an IPS variable object.

Parameters

integer $variableId

IPS object ID of the variable.

Returns

array —

IPS variable object IDs.

GetVariableEventCount()

GetVariableEventCount(integer  $variableId) : integer

Returns the number of IPS event objects associated to an IPS variable object.

Parameters

integer $variableId

IPS object ID of the variable.

Returns

integer —

Number of IPS event objects associated to the given IPS variable object.

GetVariableProfileListByType()

GetVariableProfileListByType(integer  $type) : array

Returns the names of all IPS variable profiles of the given type.

Parameters

integer $type

Type of the variable profile (see link).

Returns

array —

Names of all IPS variable profiles of the given type.

GetVariableProfileCountByType()

GetVariableProfileCountByType(integer  $type) : integer

Returns the number of IPS variable profiles of the given type.

Parameters

integer $type

Type of the variable profile.

Returns

integer —

Number of IPS variable profiles of the given type.

GetVariableProfile()

GetVariableProfile(string  $name) : array

Returns information about an IPS variable profile.

Parameters

string $name

Name of the IPS variable profile.

Returns

array —

Attributes of the IPS variable profile.

VariableProfileExists()

VariableProfileExists(string  $name) : boolean

Checks if an IPS variable profile exists.

Parameters

string $name

Name of the IPS variable profile.

Returns

boolean —

True if the IPS variable profile exists.

CreateVariableProfile()

CreateVariableProfile(string  $name, integer  $profileType) : boolean

Creates a new IPS variable profile of the given type.

Parameters

string $name

Name of the IPS variable profile.

integer $profileType

Type of the IPS variable profile (see link).

Returns

boolean —

True if the variable profile was successfully created.

DeleteVariableProfile()

DeleteVariableProfile(string  $name) : boolean

Deletes an IPS variable profile.

Parameters

string $name

Name of the IPS variable profile.

Returns

boolean —

True if the variable profile was successfully deleted.

SetVariableProfileDigits()

SetVariableProfileDigits(string  $name, integer  $numDigits) : boolean

Sets the number of decimal digits used when formatting a value with the specified IPS variable profile.

Parameters

string $name

Name of the IPS variable profile.

integer $numDigits

Number of decimal digits.

Returns

boolean —

True if the variable profile was successfully updated.

SetVariableProfileValues()

SetVariableProfileValues(string  $name, float  $minValue, float  $maxValue, float  $stepSize) : boolean

Sets the minimum und maximum value and the increment used when formatting a value with the specified IPS variable profile.

Parameters

string $name

Name of the IPS variable profile.

float $minValue

Smallest value.

float $maxValue

Largest value.

float $stepSize

Increment used for visualization.

Returns

boolean —

True if the variable profile was successfully updated.

SetVariableProfileText()

SetVariableProfileText(string  $name, string  $prefix, string  $suffix) : boolean

Sets the prefix und suffix texts used when formatting a value with the specified IPS variable profile.

Parameters

string $name

Name of the IPS variable profile.

string $prefix

Text used as a prefix before the formatted value.

string $suffix

Text used as a suffix after the formatted value.

Returns

boolean —

True if the variable profile was successfully updated.

SetVariableProfileIcon()

SetVariableProfileIcon(string  $name, string  $iconName) : boolean

Sets the default icon of the variable profile.

Parameters

string $name

Name of the IPS variable profile.

string $iconName

Name of the default icon.

Returns

boolean —

True if the variable profile was successfully updated.

SetVariableProfileAssociation()

SetVariableProfileAssociation(string  $profileName, float  $value, string  $name, string  $icon, string  $color) : boolean

Sets the name, icon and color of a specific value when formatting a value with the specified IPS variable profile.

The association will be deleted when the name and the icon are empty.

Parameters

string $profileName

Name of the IPS variable profile.

float $value

Value with which the name, icon and color should be associated.

string $name

Text to be used when formatting the value.

string $icon

Icon to be displayed when visualizing the variable.

string $color

Color to be used when visualizing the variable.

Returns

boolean —

True if the variable profile was successfully updated. https://www.symcon.de/service/dokumentation/befehlsreferenz/variablenverwaltung/variablenprofile/ips-setvariableprofileassociation/

CreateScript()

CreateScript(integer  $scriptType) : integer

Creates a new IPS script object.

Parameters

integer $scriptType

Type of the script (currently only 0 is supported for PHP scripts).

Returns

integer —

IPS object ID of the new script object.

DeleteScript()

DeleteScript(integer  $scriptId, boolean  $deleteFile = true) : boolean

Deletes an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

boolean $deleteFile

True if the script file should also be deleted.

Returns

boolean —

True if the script object (and file) was successfully deleted.

ScriptExists()

ScriptExists(integer  $scriptId) : boolean

Checks if an IPS script object exists.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

boolean —

True if the IPS script object exists.

GetScriptList()

GetScriptList() : array

Returns a list of all IPS script object IDs.

Returns

array —

IPS script object IDs.

GetScriptCount()

GetScriptCount() : integer

Returns the number of all IPS script objects.

Returns

integer —

Number of all IPS script objects.

GetScript()

GetScript(integer  $scriptId) : array

Returns information about an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

array —

Attributes of the IPS script object.

GetScriptContent()

GetScriptContent(integer  $scriptId) : string

Returns the contents of the script file associated with an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

string —

Contents of the script file.

SetScriptContent()

SetScriptContent(integer  $scriptId, string  $content) : boolean

Replaces the contents of the script file associated with an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

string $content

New contents of the script file.

Returns

boolean —

True if the script file contents were successfully replaced.

GetScriptFile()

GetScriptFile(integer  $scriptId) : string

Returns the file name of the script file associated with an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

string —

Script file name.

SetScriptFile()

SetScriptFile(integer  $scriptId, string  $fileName) : boolean

Sets the name of the script file associated with an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

string $fileName

New script file name.

Returns

boolean —

True if the script file was successfully set.

GetScriptIdByFile()

GetScriptIdByFile(string  $fileName) : integer

Returns the IPS object ID of the script object associated with the given script file.

Parameters

string $fileName

Script file name.

Returns

integer —

IPS object ID of the script object or null if the script object can not be found.

GetScriptTimer()

GetScriptTimer(integer  $scriptId) : integer

Returns the time in seconds of the timer set for an IPS script object.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

integer —

Number of seconds configured as script timer for the script (not the remaining time) or 0 if no script timer was set.

SetScriptTimer()

SetScriptTimer(integer  $scriptId, integer  $interval) : boolean

Sets the time in seconds when the script is called by the script timer.

Parameters

integer $scriptId

IPS object ID of the script.

integer $interval

Number of seconds between script invocations by the script timer or 0 to delete the timer.

Returns

boolean —

True if the script timer was successfully updated.

RunScript()

RunScript(integer  $scriptId) : boolean

Runs the IPS script in a separate thread.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

boolean —

True if the script was successfully started.

RunScriptEx()

RunScriptEx(integer  $scriptId, array  $parameters) : boolean

Runs the IPS script in a separate thread, passing an array of parameters.

Parameters

integer $scriptId

IPS object ID of the script.

array $parameters

Parameters to be passed to the script.

Returns

boolean —

True if the script was successfully started.

RunScriptWait()

RunScriptWait(integer  $scriptId) : string

Runs the IPS script in a separate thread, waits for it and returns its output.

Parameters

integer $scriptId

IPS object ID of the script.

Returns

string —

Output of the script.

RunScriptWaitEx()

RunScriptWaitEx(integer  $scriptId, array  $parameters) : string

Runs the IPS script in a separate thread, passing an array of parameters, waits for it and returns its output.

Parameters

integer $scriptId

IPS object ID of the script.

array $parameters

Parameters to be passed to the script.

Returns

string —

Output of the script.

RunScriptText()

RunScriptText(string  $content) : boolean

Runs the given PHP code in a separate thread.

Parameters

string $content

PHP code to be executed.

Returns

boolean —

True if the code was successfully started.

RunScriptTextEx()

RunScriptTextEx(string  $content, array  $parameters) : boolean

Runs the given PHP code in a separate thread, passing an array of parameters.

Parameters

string $content

PHP code to be executed.

array $parameters

Parameters to be passed to the script.

Returns

boolean —

True if the code was successfully started.

RunScriptTextWait()

RunScriptTextWait(string  $content) : string

Runs the given PHP code in a separate thread, waits for it and returns its output.

Parameters

string $content

PHP code to be executed.

Returns

string —

Output of the script.

RunScriptTextWaitEx()

RunScriptTextWaitEx(string  $content, array  $parameters) : string

Runs the given PHP code in a separate thread, passing an array of parameters, waits for it and returns its output.

Parameters

string $content

PHP code to be executed.

array $parameters

Parameters to be passed to the script.

Returns

string —

Output of the script.

CreateEvent()

CreateEvent(integer  $eventType) : integer

Creates a new IPS event object of the given type.

Parameters

integer $eventType

Type of the event.

Returns

integer —

IPS object ID of the new event object.

DeleteEvent()

DeleteEvent(integer  $eventId) : boolean

Deletes an IPS event object.

Parameters

integer $eventId

IPS object ID of the event.

Returns

boolean —

True if the event was successfully deleted.

EventExists()

EventExists(integer  $eventId) : boolean

Checks if an IPS event object exists.

Parameters

integer $eventId

IPS object ID of the event.

Returns

boolean —

True if the event object exists.

GetEvent()

GetEvent(integer  $eventId) : array

Returns information about an IPS event object.

Parameters

integer $eventId

IPS object ID of the event.

Returns

array —

Attributes of the event object.

GetEventIdByName()

GetEventIdByName(string  $eventName, integer  $objectId) : integer

Returns the IPS object ID of the first event with the given name under the given IPS object.

Parameters

string $eventName

Name of the event.

integer $objectId

IPS object ID of the parent object.

Returns

integer —

IPS object ID of the event or null if none was found.

GetEventList()

GetEventList() : array

Returns a list of the IPS object IDs of all event objects.

Returns

array —

IPS object IDs of all event objects.

GetEventCount()

GetEventCount() : integer

Returns the number of all IPS event objects.

Returns

integer —

Number of all IPS event objects.

GetEventListByType()

GetEventListByType(integer  $eventType) : array

Returns a list of the IPS object IDs of all event objects of the given type.

Parameters

integer $eventType

Type of the events.

Returns

array —

IPS object IDs of all event objects of the given type.

GetEventCountByType()

GetEventCountByType(integer  $eventType) : integer

Returns the number of all IPS event objects of the given type.

Parameters

integer $eventType

Type of the events.

Returns

integer —

Number of all IPS event objects of the given type.

SetEventActive()

SetEventActive(integer  $eventId, boolean  $active) : boolean

Enables or disabled the IPS event object.

Parameters

integer $eventId

IPS object ID of the event.

boolean $active

True if the event shoudl be enabled.

Returns

boolean —

True if the event was successfully updated.

SetEventCyclic()

SetEventCyclic(integer  $eventId, integer  $dateType, integer  $dateInterval, integer  $dateDays, integer  $dateDayInterval, integer  $timeType, integer  $timeInterval) : boolean

Sets the time when the cyclic IPS event should be triggered.

Parameters

integer $eventId

IPS object ID of the event.

integer $dateType

Type of the date interval (see link).

integer $dateInterval

Date interval type (see link).

integer $dateDays

Week days when the event should be triggered (see link).

integer $dateDayInterval

Trigger the event each number of days (see link).

integer $timeType

Type of the time interval (see link).

integer $timeInterval

Time interval type (see link).

Returns

boolean —

True if the event was successfully updated.

SetEventCyclicDateFrom()

SetEventCyclicDateFrom(integer  $eventId, integer  $day, integer  $month, integer  $year) : boolean

Sets the bounds for the first occurrence for a cyclic IPS event.

Parameters

integer $eventId

IPS object ID of the event.

integer $day

Start day.

integer $month

Start month.

integer $year

Start year.

Returns

boolean —

True if the event was successfully updated.

SetEventCyclicDateTo()

SetEventCyclicDateTo(integer  $eventId, integer  $day, integer  $month, integer  $year) : boolean

Sets the bounds for the last occurrence for a cyclic IPS event.

Parameters

integer $eventId

IPS object ID of the event.

integer $day

End day.

integer $month

End month.

integer $year

End year.

Returns

boolean —

True if the event was successfully updated.

SetEventCyclicTimeFrom()

SetEventCyclicTimeFrom(integer  $eventId, integer  $hour, integer  $minute, integer  $second) : boolean

Sets the bounds for the first occurrence for a cyclic IPS event.

Parameters

integer $eventId

IPS object ID of the event.

integer $hour

Start hour.

integer $minute

Start minute.

integer $second

Start second.

Returns

boolean —

True if the event was successfully updated.

SetEventCyclicTimeTo()

SetEventCyclicTimeTo(integer  $eventId, integer  $hour, integer  $minute, integer  $second) : boolean

Sets the bounds for the last occurrence for a cyclic IPS event.

Parameters

integer $eventId

IPS object ID of the event.

integer $hour

End hour.

integer $minute

End minute.

integer $second

End second.

Returns

boolean —

True if the event was successfully updated.

SetEventLimit()

SetEventLimit(integer  $eventId, integer  $count) : boolean

Sets the number of executions of a cyclic IPS event object.

Parameters

integer $eventId

IPS object ID of the event.

integer $count

Number of executions of the cyclic event or 0 to execute indefinitely.

Returns

boolean —

True if the event was successfully updated.

SetEventScheduleAction()

SetEventScheduleAction(integer  $eventId, integer  $actionId, string  $name, integer  $color, string  $scriptContent) : boolean

Sets the name, color and script contents for a week plan event or deletes it.

If the event's parent is an IPS script object, the given script is ignored and the parent script is executed instead.

Parameters

integer $eventId

IPS object ID of the event.

integer $actionId

Unique ID of the action (used as sorting criteria).

string $name

Name of the action. Leave empty to delete the action.

integer $color

RGB color value of the action.

string $scriptContent

PHP script to be executed when the action is triggered.

Returns

boolean —

True if the event was successfully updated.

SetEventScheduleGroup()

SetEventScheduleGroup(integer  $eventId, integer  $groupId, integer  $days) : boolean

Sets a group of days for a week plan event of deletes it.

Parameters

integer $eventId

IPS object ID of the event.

integer $groupId

Unique ID of the group (used as sorting criteria).

integer $days

Days for the group (see link).

Returns

boolean —

True if the event was successfully updated.

SetEventScheduleGroupPoint()

SetEventScheduleGroupPoint(integer  $eventId, integer  $groupId, integer  $pointId, integer  $hour, integer  $minute, integer  $second, integer  $actionId) : boolean

Sets a time point at a group of days for a week plan event or deletes it.

Parameters

integer $eventId

IPS object ID of the event.

integer $groupId

ID of the group of days as defined by IPS::SetEventScheduleGroup().

integer $pointId

Unique (within the same $groupId) ID of the time point (used as sorting criteria).

integer $hour

Hour (or -1 to delete the time point).

integer $minute

Minute (or -1 to delete the time point).

integer $second

Second (or -1 to delete the time point).

integer $actionId

ID of the action as defined by IPS::SetEventScheduleAction().

Returns

boolean —

True if the event was successfully updated.

SetEventScript()

SetEventScript(integer  $eventId, string  $scriptContent) : boolean

Sets the contents of the script that is executed when an event is triggered.

If the event's parent is an IPS script object, the given script is ignored and the parent script is executed instead.

Parameters

integer $eventId

IPS object ID of the event.

string $scriptContent

PHP script to be executed when the event is triggered.

Returns

boolean —

True if the script was successfully associated with the event.

SetEventTrigger()

SetEventTrigger(integer  $eventId, integer  $triggerType, integer  $variableId) : boolean

Sets the method to determine when an event should be triggered by an IPS variable.

Parameters

integer $eventId

IPS object ID of the event.

integer $triggerType

Type of the method to determine when the event should be triggered by the IPS variable.

integer $variableId

IPS object ID of the variable.

Returns

boolean —

True if the variable was successfully associated with the event.

SetEventTriggerSubsequentExecution()

SetEventTriggerSubsequentExecution(integer  $eventId, boolean  $again) : boolean

Enables or disables whether the event is triggered again before the condition that triggered the event clears.

Parameters

integer $eventId

IPS object ID of the event.

boolean $again

True to trigger the event again before the condition cleared.

Returns

boolean —

True if the event was successfully updated.

SetEventTriggerValue()

SetEventTriggerValue(integer  $eventId, mixed  $value) : boolean

Sets the reference values used to determine whether an event should be triggered by an IPS variable.

Parameters

integer $eventId

IPS object ID of the event.

mixed $value

Reference value used for the comparison.

Returns

boolean —

True if the event was successfully updated.

CreateLink()

CreateLink() : integer

Creates a new IPS link object.

Returns

integer —

IPS object ID of the new IPS link object.

DeleteLink()

DeleteLink(integer  $linkId) : boolean

Deletes an IPS link object.

Parameters

integer $linkId

IPS object ID of the link.

Returns

boolean —

True if the link was successfully deleted.

GetLink()

GetLink(integer  $linkId) : array

Returns information about an IPS link object.

Parameters

integer $linkId

IPS object ID of the link.

Returns

array —

Attributes of the IPS link object.

GetLinkIdByName()

GetLinkIdByName(string  $name, integer  $parentId) : integer

Returns the first IPS link object with the given name under the given parent object.

Parameters

string $name

Name of the link.

integer $parentId

IPS object ID of the parent object.

Returns

integer —

IPS object ID of the link or false if none was found.

GetLinkList()

GetLinkList() : array

Returns the IPS object IDs of all link objects.

Returns

array —

IPS object IDs of all link objects.

GetLinkCount()

GetLinkCount() : integer

Returns the number of all IPS link objects.

Returns

integer —

Number of all IPS link objects.

LinkExists()

LinkExists(integer  $linkId) : boolean

Checks if an IPS link object exists.

Parameters

integer $linkId

IPS object ID of the link.

Returns

boolean —

True if the IPS link object exists.

SetLinkTargetId()

SetLinkTargetId(integer  $linkId, integer  $targetId) : boolean

Returns the IPS object ID of the target object of a link.

Parameters

integer $linkId

IPS object ID of the link.

integer $targetId

IPS object ID of the object to which the link points.

Returns

boolean —

True if the link target was successfully updated.

CreateMedia()

CreateMedia(integer  $mediaType) : integer

Creates a new IPS media object of the given type.

Parameters

integer $mediaType

Type of the media object (see link).

Returns

integer —

IPS object ID of the new media object.

DeleteMedia()

DeleteMedia(integer  $mediaId, boolean  $deleteFile) : boolean

Deletes an IPS media object.

Parameters

integer $mediaId

IPS object ID of the media object.

boolean $deleteFile

True if the media file should also be deleted.

Returns

boolean —

True if the media object was successfully deleted.

GetMedia()

GetMedia(integer  $mediaId) : array

Returns information about an IPS media object.

Parameters

integer $mediaId

IPS object ID of the media object.

Returns

array —

Attributes of the media object.

GetMediaContent()

GetMediaContent(integer  $mediaId) : string

Returns the Base64 encoded contents of an IPS media object.

Parameters

integer $mediaId

IPS object ID of the media object.

Returns

string —

Base64 encoded contents of the media object.

SetMediaContent()

SetMediaContent(integer  $mediaId, string  $content) : boolean

Updates the contents of an IPS media object's file.

Parameters

integer $mediaId

IPS object ID of the media object.

string $content

New Base64 encoded media contents.

Returns

boolean —

True if the media file was successfully updated with the new contents.

SetMediaFile()

SetMediaFile(integer  $mediaId, string  $fileName, boolean  $mustExist) : boolean

Associates the given file name with an IPS media object.

Parameters

integer $mediaId

IPS object ID of the media object.

string $fileName

Name of the file to be associated with the media object.

boolean $mustExist

True if the media file must already exist.

Returns

boolean —

True if the media file was successfully associated with the media object.

GetMediaId()

GetMediaId(string  $mediaName) : integer

Returns the first IPS media object associated to the given media name.

Parameters

string $mediaName

Name of the media object.

Returns

integer —

IPS object ID of the media object or null if none was found.

GetMediaIdByFile()

GetMediaIdByFile(string  $fileName) : integer

Returns the IPS object ID of the media object associated to the given media file name.

Parameters

string $fileName

Name of the media file.

Returns

integer —

IPS object ID of the media object or null if none was found.

GetMediaIdByName()

GetMediaIdByName(string  $name, integer  $parentId) : integer

Returns the first IPS media object with the given name under the given IPS object.

Parameters

string $name

Name of the IPS media object.

integer $parentId

IPS object ID of the parent object.

Returns

integer —

IPS object ID of the media object or false if none was found.

GetMediaList()

GetMediaList() : array

Returns the list of the IPS object IDs of all media objects.

Returns

array —

IPS object IDs of all media objects.

GetMediaCount()

GetMediaCount() : integer

Returns the number of all IPS media objects.

Returns

integer —

Number of all IPS media objects.

GetMediaListByType()

GetMediaListByType(integer  $mediaType) : array

Returns the list of the IPS object IDs of all media objects of the given type.

Parameters

integer $mediaType

Type of the media objects.

Returns

array —

IPS object IDs of all media objects of the given type.

GetMediaCountByType()

GetMediaCountByType(integer  $mediaType) : integer

Returns the number of all IPS media objects of the given type.

Parameters

integer $mediaType

Type of the media objects.

Returns

integer —

Number of all IPS media objects of the given type.

MediaExists()

MediaExists(integer  $mediaId) : boolean

Checks if an IPS media object exists.

Parameters

integer $mediaId

IPS object ID of the media object.

Returns

boolean —

True if the media object exists.

SendMediaEvent()

SendMediaEvent(integer  $mediaId) : boolean

Notifies IP Symcon that the IPS media object was updated.

Parameters

integer $mediaId

IPS object ID of the media object.

Returns

boolean —

True if the update message was successfully processed by IP Symcon.

SetMediaCached()

SetMediaCached(integer  $mediaId, boolean  $cacheEnabled) : boolean

Enables or disables caching of the media file associated to an IPS media object.

Parameters

integer $mediaId

IPS object ID of the media object.

boolean $cacheEnabled

True if the media file should be cached.

Returns

boolean —

True if the caching was successfully enabled or disabled.

Execute()

Execute(string  $fileName, string  $parameters) 

Executes an external program.

Parameters

string $fileName

Command to be executed.

string $parameters

Parameters passed to the external command as command line arguments.

ExecuteEx()

ExecuteEx(string  $fileName, string  $parameters, boolean  $showWindow, integer  $sessionId) 

Executes an external program in the context of a user session.

Parameters

string $fileName

Command to be executed.

string $parameters

Parameters passed to the external command as command line arguments.

boolean $showWindow

True if the program's window should be shown.

integer $sessionId

Windows session ID in which the program should be executed and optionally displayed.

ExecuteWait()

ExecuteWait(string  $fileName, string  $parameters) 

Executes an external program, waits for it to end and returns the output.

Parameters

string $fileName

Command to be executed.

string $parameters

Parameters passed to the external command as command line arguments.

ExecuteWaitEx()

ExecuteWaitEx(string  $fileName, string  $parameters, boolean  $showWindow, integer  $sessionId) 

Executes an external program in the context of a user session, waits for it to end and returns the output.

Parameters

string $fileName

Command to be executed.

string $parameters

Parameters passed to the external command as command line arguments.

boolean $showWindow

True if the program's window should be shown.

integer $sessionId

Windows session ID in which the program should be executed and optionally displayed.

SemaphoreEnter()

SemaphoreEnter(string  $name, integer  $waitTime) : boolean

Sets a semaphore to enable exclusive use of a resource or waits for another script to release the semaphore.

Parameters

string $name

Name of the semaphore.

integer $waitTime

Number of milliseconds to wait for another script to release the semaphore if it is already set.

Returns

boolean —

True if the semaphore was successfully set or false if an timeout occurred while waiting for the release of the semaphore.

SemaphoreLeave()

SemaphoreLeave(string  $name) : boolean

Releases a semaphore after the exclusive use of a resource is no longer necessary.

Parameters

string $name

Name of the semaphore.

Returns

boolean —

True if the semaphore was successfully released.