About Thing Names

About Thing Names

Thing names can be any unique string. When you try Dashboard, your device will be given a name made up of an adjective and a noun, such as “juicy-mitten.” While names like that are probably unique and are fine for quick tests, you should have a strategy for naming your devices.

ThingSpace does not perform any validity checking on thing names when you send API requests. If you send data from “device1” and then later use the same device but use “device2” as the thing name, you will not get an error message, and the data will be treated as if it came from two separate devices. (You may find this useful in certain situations.) Likewise, if you send a request to get the dweets from “device1” but you don’t have any thing with that name, the request will return an empty response; there is no error that says, “You don’t have a thing with that name.” If another account has a device named “device1,” you will get the dweets from that device. If multiple accounts have devices wit the same name, you will get inconsistent results.

Hardware-based names

Consider using existing identifiers that your devices probably already have instead of creating another identifier for each device. Cellular devices have one or more of these unique identifiers, depending on whether they are 2G/3G or 4G devices:

  • ESN
  • MEID
  • IMEI

Most types of devices have serial numbers that are unique for a particular model. You may need to use both the model number and serial number together to be sure that the name is unique.

Location-based names

It may be more important for your application to track data coming from a specific location than to be concerned about the device itself. You might need a continual history of data, even if the device is swapped out. In that case, you can use location-based naming, but always include something to make sure the device name is unique across all of thingspace.io, not just within your own list of devices. For example, “downtown” is not a very unique name, but “SmithCountyAirQualityMonitor-downtown” is much more likely to be unique.

If you swap out an existing device for a new one and want to re-use the existing name, be sure to set up the new device to send exactly the same data in each dweet, or you will not have data continuity.