Returns the device code for the given named device. This function can be used with the IsOff and IsOn functions as well as other functions that require an actual device code.
Parameter: name
Type: string
Description: This is the name of the device including its location, such
as "den table lamp".
Return value: X10
house code and unit code
Type: string
Description: This is the house code and unit code or device code of the
device, such as "A1" or "q17".
If the
device does not exist, an empty string is returned.
dim code
code = hs.GetDeviceCode("den table lamp")
msgbox "The housecode unitcode is: " & code