Profiles
The Profile
field of an asset defines the data type. Both simple types like integer as well as more complex and custom data types with numerous fields are possible. You can open the Asset details from DEVICE tab, then clicking on three dots on the right side and then View asset details. Under Profile section click on Advanced tab.
The full structure looks like:
"asset": {
"profile": {
"type": "integer"
}
}
When setting an asset profile using our Cloud, omit the asset
and profile
tags.
{
"type": "integer"
}
Simple profile types
Use "type"
field to define the asset’s state data type. It describes how to interpret the asset state value(s).
String
Simple string value type:
{
"type": "string"
}
If you want to define a set of valid string values:
{
"type": "string",
"enum": ["yes", "no", "maybe"]
}
Boolean
Simple boolean value type:
{
"type": "boolean"
}
Integer
Simple integer number value:
{
"type": "integer"
}
Number
Simple decimal number value:
{
"type": "number"
}
Simple profile extra fields
Minimum & Maximum
By defining minimum and maximum bounds, the platform ensures that the state value is validated to be in the defined range.
{
"type": "integer",
"minimum": 0,
"maximum": 255
}
Unit
Use this field to label the unit of measurement of the physical quantity that this asset reports or actuates upon.
{
"type": "integer",
"unit" : "mV"
}
Complex profile type
Object
Custom object value. The type object
and properties fields are fixed. What these properties are, is completely up to you. Just make sure it is valid JSON structure. For example:
{
"type": "object",
"properties": {
"city": { "type": "string" },
"latitude": { "type": "number" },
"longitude": { "type": "number" }
}
}
Examples
For more profile examples (and which Controls they support) please visit the Controls section.
Be proactive and investigate our Cloud elements even better:
And other articles in the Help Center! 😉