Device Name vs Device Label in Drivers

Trying to get my head around the purpose of the two.

I know device label overrides device name but where are the two used differently?

For example, in the devices list I'm expecting it to show the device name for organizational purposes and I'm hoping that the label is used in things such as dashboards so we can have a more friendly name.

The dashboard does use the the label but the devices list also does use the label. Makes me wonder what the purpose of the name is then?

2 Likes

I asked this too and never got an answer...hope you do as I would like to know!

Eventually @patrick or @bravenel will see this and give us their input.

(see what I did there? :slight_smile: )

Didn't think this was that mysterious... The Label is what you give it, the Device Name is what the device driver gave it, typically on pairing.

Both are editable but for the most part, the Label is used for display purposes.

If a label is not set, the device name is used.

In an upcoming update, the device Label and device name will be in the device list and will help searching...

When in doubt, use the label to set it to something you want it to be displayed in the UI.

2 Likes

I've been setting device name and label the same. Any reason not to do this?

Nope, free to name them how you see fit. Good note though, try to avoid special characters and you will avoid special results...

Special characters typically are:

% $ : , . # < > / \ { } [ ] @ ` ' "

We do what we can to trap for these but highly recommend you don't use them in labels and names of devices.

4 Likes

How about names of apps? Does that same recommendation about special characters apply?

Sure. This is standard practice for any web input. Like I said, we do our best to sanitize the inputs, but I recommend avoiding special characters in any text input unless it specifically needs it.

It could result in unexpected results.

2 Likes

If you have them set differently, which one is used for Google Assistant integration when asking her to turn on a switch, etc.?

When a label is present, that is used

1 Like

For me, I use the Device Name as a way to identify the actual hardware I am using. It is really helpful since I use multiple manufacturers of dimmers, dual relays, in-wall switches, etc. That way I don't have to extract stuff out of the ceiling or wall boxes to remind me what I installed as I experiment with different drivers and such.
The Device Label is the friendly name of what Wife wants in Dashboard, Alexa, etc to used and see. I add a little description at the end of virtual labels to help remind me that this particular device is not physical item and it's purpose such as hueGroup or LifxGroup

6 Likes

Patrick,
I am trying to create a more universal zigbee device Handeler the way that smartthings does. I see the way that smartthings does this is to include a DeviceJoinName: in the fingerprint profileid. In smartthings, this is the Device Name used when adding the device (i.e. Ikea vs Amazon Smart zigbee switch use the same device handler, but the default name is either Ikea or Amazon based on the fingerprint). Using this, multiple devices made by different device manufacturers can use the same device handler. But, each differ fingerprint device, can have a basic default join name. How is this done in hubitat, it seems to simple use the driver name instead. Am i missing something or is this simply not supported in HE?

@mike.maxwell is the better one to ask.

Most of our drivers contain at lease two separate fingerprint entries, some more than 10, each fingerprint defines a specific device that works with that driver, this works the same way in st. We just don't currently assign deviceJoinName to the driver name. Anoying, but not a high priority for us right now.

Since I have so many devices and device types I've started using emojis to identify certain things, like groups vs individual device. This doesn't appear to have broken anything... but will it?

Supposedly they sanitize the inputs, so it shouldn't break something. As a real test, try Emoji'); DROP TABLE Devices;--. :innocent:

1 Like