How to get device name from Device Network ID


(Jack) #1

Hi,
I am trying to retrieve a device’s name/label from its Device Network ID (e.g. 3263, BE89). How can I do this in the SmartThings DTH?


(www.rboyapps.com - Make your home your butler!) #2

A device network id is a SmartThings assigned id one assigned at device instance creation.

You seem to be looking for something else.


(Jack) #3

How could I retrieve the device’s name from its network id? Is there some command like “name = getDeviceName(3263)” which returns “Smart Outlet”?


(Dan) #4

Have you checked out the developer documentation? I think this is what you’re looking for. If you’re in a DTH, you can just use the ‘device’ object.


(Jack) #5

How would I call “device.” if I only have the network id? I am trying to get the names of multiple devices - not just 1.


(Dan) #6

If you’re inside a Device Handler, you really cannot interact with any other devices, unless they are child devices. Is that what you’re after? A Composite Device Handler’s Child device’s?


(Jack) #7

I have a ZigBee repeater that tells the Smartthings which devices it is extending the range for. However, it only tells Smartthings the device’s network id. And from these network ids, I need to retrieve the corresponding device names (which will be displayed on the app). This is my ultimate goal.


(Dan) #8

Might not be possible…


(www.rboyapps.com - Make your home your butler!) #9

How did you get the networkId?


(Jack) #10

I send readAttribute (Note: this is my own ZigBee repeater).


(Jack) #11

If using this approach, would I be able to get device names by id?


(Dan) #12

They’re not child devices, though. So I don’t think so.


(www.rboyapps.com - Make your home your butler!) #14

You can only get the current device object by using device
A DTH cannot access other device objects and even SA’s can only access device objects that have been explicitly selected by the user.