GetDeviceByName
Called to get a device by its name.
Function
Device GetDeviceByName(name: String)
Parameters
Name | Type | Description |
---|---|---|
name | String | Device name to search for |
Return Value
A device object if device is found or null if device not found.
Example
// Get device by name
var device = GetDeviceByName("Device1")
// Log its properties
LogDebug("Device Name = " + device.Name);
LogDebug("Device Id = " + device.Id);
LogDebug("Device Config = " + device.Config);
LogDebug("Device Type = " + device.Type);