GetDeviceById

Called to get a device by its id.

Function

Device GetDeviceById(id: integer)

Parameters

Name Type Description
id Integer Device Id to search for

Return Value

A device object if device is found or null if device not found.

Example

// Get device by id
var device = GetDeviceById(100)

// Log its properties
LogDebug("Device Name = " + device.Name);
LogDebug("Device Id = " + device.Id);
LogDebug("Device Config = " + device.Config);
LogDebug("Device Type = " + device.Type);