How to get device name from Device Network ID

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?

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

You seem to be looking for something else.

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

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.

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.

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?

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.

Might not be possible…

How did you get the networkId?

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

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

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

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.