Meet the New TempoIQ - Device Data Model
In our last post announcing the new TempoIQ, we covered three major aspects of our new service that will help customers get more value out of their sensor data. We’ve modified the way companies think about modeling their data, given them powerful real-time monitoring tools, and done it all securely at scale.
The first part of these improvements - changing the way people think about their data - is a key piece in improving understanding and usability for our clients, and giving the implementers of TempoIQ much faster time to productivity. The device data model is an important mental model, whether people are implementing sensors, designing system architecture, or defining a business model around sensor analytics.
Instead of a flat collection data streams, our new data model has a two-level hierarchy, consisting of devices and sensors.
Typically, customers have many devices, which, in turn, have many sensors. A device itself usually corresponds to a physical unit. Devices could be small units with one or two sensors, like a smart thermostat or power inverter, or larger units with many more sensors, like a solar panel or a car, depending on the scope of the application and the breadth of what companies are measuring.
One key aspect of a device is that, each needs a unique identifier. This could be a serial number, a UUID given by a client system, or any other information that will let our system know exactly which device we are looking at.
Devices can also have additional attributes about them stored in TempoIQ. A great example of this is location data. For a building sensor, companies can store the building number and country/state/city on every device to know exactly where it is. In another case, companies may want to store the substation associated with a certain smart meter. Companies can add an unlimited number of attributes to make sense of data, and segment their devices in TempoIQ.
With attributes, you can look up all of the smart meters that draw power from a substation, or all of the solar panels in a certain field.
The last and the most important defining feature is that companies can attach one or more sensors to devices. For instance, a smart thermostat could have both a temperature sensor and a humidity sensor.
Sensors, on the other hand, correspond to a single measurement coming from a specific device. Examples include temperature, wind speed, and current.
Every sensor has a name - like “temp” - and these names must be unique per device. This means that can have two temperature sensors attached to one device, but they need unique names, “temp1” and “temp2,” for example. Two different devices can have sensors named “temp.”
Like devices, sensors have attributes too. It’s best, however, to only define attributes that specifically apply to those sensors, not to the whole device. Some good examples of sensor-level attributes include a measurement unit, a calibration offset, or a sensor location (if it doesn’t apply to the overall device).
A Real Life Example
To get a better sense of how devices and sensors could work in your application, here’s an example of what a smart thermostat would look like.
Let’s take a company called Acme Homes, which is manufacturing their first smart thermostat. There are a few measurements they want to take every minute:
- 1st floor temperature (temp1)
- 2nd floor temperature (temp2)
- Humiditity (hum)
In this case, we’ve given temperature sensors different key names (temp1 and temp2) and defined three overall sensors for the device. For a sample thermostat device, we would store the following information in TempoIQ:
Device: key: 1231246454123 attributes: device_type: thermostat customer: 321 site: 444 sensors: temp1: attributes: unit: degC (degrees Celsius) type: temperature temp2: attributes: unit: degC (degrees Celsius) type: temperature hum: attributes: type: humidity
With this setup, you can easily define multiple types of devices, or multiple types of sensor configurations, and deploy them easily at scale.
We’ve found that this model maps the way our customers think about their sensor problems, and allows people to wrap their heads around TempoIQ data quickly.
In this post, we’ve gone into more detail about how to define the data that companies send to TempoIQ. Next, we’ll talk more about how our real-time monitoring engine allows customers to leverage this data to get insights about their business.