Particle device maximum name length

Does anyone know what is the maximum # of chars permitted in a Device Name ?

I’ve been searching docs but could not find any references to this.

Thanks,

Marcus

You can test it yourself, Marcus1 by using Particle CLI command particle device rename OLD NEW:

100 chars is no problem - however, this is just a plaintext name for us humans: in fact, DeviceID will be crucial.
Whats your case?

1 Like

Thanks for looking into this by “trial & error”. I was hoping Particle staff could document this better, as we’re building an app that will handle multiple particle devices, and we need these fields documented accordingly.

I suppose Particle checks for duplicate device names and alerts users, even if the DeviceID is the crucial identifier. This is key in a system, such as a building project using 30-50 particle devices, where a technical help desk tries to rename devices – would naming be unique per device, per Particle account ?

I can impose these checks within our software, even create naming rules, but we should try to sync with what Particle does (or not) in its core systems.

I don’t recommend using the name as a unique identifier. Within a given Particle account you can’t name two devices with the same name. However, when you’re using customers or multiple user accounts, they can reuse the same names.

Internally, everything is based off the device ID (24-character hex). The names are just a convenience so you don’t have to type out and recognize the device IDs in Particle Build, console, CLI, etc… The underlying API calls take a device ID, not a name, as well.

2 Likes

Thank you for this explanation. We will design our systems accordingly :slight_smile: