di=createobject("roDeviceInfo")
identifier=di.GetChannelClientId()
GetDeviceUniqueId() as String
Returns the serial number of the unit running the script. This is a 12 character alphanumeric string. While this value was traditionally used to uniquely identify a device, we now recommend using the publisher ID for this purpose.
GetDeviceUniqueID() is deprecated and will be removed from the firmware in the Spring 2019 OS update. Developers must update their channels to use the 12-character alphanumeric unique identifier returned by GetChannelClientId()
https://sdkdocs.roku.com/display/sdkdoc/ifDeviceInfo