How can I get the MAC address of a device

Hello,

I’m trying to get the MAC Address of my devices that are specified in my SmartThings Dashboard.

I know how I can get the model of my devices doing:

switches.getModelName()

So I was wondering if there is any method so I can get the mac number.

Thank you!

What kind of devices?

I’ve read that zigbee devices have mac addresses, z-wave devices don’t.

They are zigbee devices. Actually I can see their mac address in the smartthings dashboard

If you go to your router and go to the administration section, you should be able to see a listing of all wired and wireless devices. The MAC addresses will be there. There are also any number of free wifi sniffers that will give you details about your network.

That wouldn’t work for zigbee devices, they’re not connected to the router.

@luisfpinto what are you trying to do with the zigbee device MAC addresss?

Should be able to click on the device name and the mac is part of the device ID, but it can be hit or miss.

Best option for LAN devices is to pull from your router. If you don’t have router access, you can try to query the device with a dos command if you know its IP ( nbtstat -A 192.168.x.xxx ) but again, hit or miss depending on the device.

Why would you ask someone why they want their MAC address?

Because there might be a better way to accomplish whatever it is he’s trying to accomplish. Not everyone on these boards is an expert.

It may be that someone wants to assign a fixed IP address to a device, and for that, you need the MAC address. Or, you are trying to identify devices on a wireless network for security reasons, but all you have is a list of Mac addresses