Each Thing registered in the DPS comes with a set of predefined properties, and in addition you can define custom properties specific for your application domain.
Thing Definition's custom properties can be used, for example, to:
- group/sort/search things;
- manage additional thing information, like images or descriptions related to the installation;
- manage technical information/settings, like installation information (e.g. photos, descriptions) or used by the thing during running phases and dashboard presentation.
Configuring properties
- General: allows defining properties available to all Things, discarding the Thing Definition they are associated with.
- Thing Definitions: allow selecting a Thing Definition, and define properties available to all Things associated with the selected Thing Definition and descendant Thing Definition inheriting from.
General
Here, you can define properties available to all Things, discarding the Thing Definition they are associated with. The below list, displays the default properties and the additional properties for all things.
Thing predefined properties:
PROPERTY NAME |
DESCRIPTION |
REFERENCE NAME |
Name |
The friendly name of the thing. |
name |
Serial Number |
The thing serial number. |
serialNumber |
Thing Definition |
The thing definition object associated with the thing. |
thingDefinition |
GPS Position |
The GPS coordinates in the format <latitude>,<longitude>. If missing, the parent location coordinates are inherited. |
gpsPosition |
These properties cannot be deleted, because mandatory for the correct functioning of the DPS application, but you can modify the Label and according to the property also some constraints.
Thing Definitions
Here, you can select a Thing Definition, and define properties available to all Things associated with the selected Thing Definition and descendant Thing Definition inheriting from.
The below list, displays the default properties, the additional properties for all things, and the additional properties that are specific for the Sorter Thing Definition.
Creating a new Property
To add a new thing property, you should:
- Select where the new property must be added, General or Thing Definitions.
- Select the Thing Definition if needed.
- Press the Add Property button.
- Provide the required information.
- Press the Save button.
Editing Properties
From the property list, if you click on a property, you will enter the property editing page.
The Thing property editing page is subdivided into the following sections. Note, that depending on the selected property, the editing page may be different.
General
- Label: the label displayed within the pages (e.g. Foo Bar).
- Name: the property simple name used to reference it within templates and APIs (e.g. properties.fooBar)
- Description: the description that is displayed under the properties within the editing pages.
-
Type: the property value type, one of Boolean, Date, Double, Email, File, Float, Integer, Long, Phone Number, String.
For more details about types, refer to the Property Types article. - Unit: the unit displayed along with the property value (e.g. Kg). It is available only for numeric properties.
- Default value: the property default value assigned to a newly created object.
- Data Type: in case of numeric values, you can define whether the property values are DISCRETE or CONTINUOUS, and then you can also define Dictionary or Thresholds.
-
Group: the key used to group properties within editing dialogs.
Rendering
- Order: the order used to sort properties within editing dialogs.
- Searchable: the property can be used within the advanced search panel.
- Selection: the selection mode (radio, select, switch) for multiple values.
- Values: the set of value and label pairs in case of selection.
Constraints
- Unique: it is not possible to have two objects with the same property value. If you try to create a new object or update an existing one, using the value already saved in another object, the backend will report an error.
- Mandatory: the property cannot be left blank. When creating a new object or updating an existing object, if the value of the property is missing, the backend reports an error.
- Limit write permissions depending on the user-type: you can limit the user-types can write the property value. If a user which is not authorized to the property, try to write it, the backend reports an error. Properties that are not writable by a user type are also not visible on the edit page of that object in the DPS application.
-
RegEx Validation: you can specify a regular expression (e.g. ([a-z])*)to validate STRING properties.
Optionally, you can also define the error message to inform the user in case of wrong values. - Min: the minimum value used to validate numeric properties.
- Max: the maximum value used to validate numeric properties.
Data Binding
- None: the value must be manually provided.
- Statistic: the value is periodically updated according to a statistic.
- Metric: the value is periodically updated according to a metric (available only for thing-definition specific properties).
Options
- Notify users on property value update: users who have visibility to the thing will be notified if the property is updated.
- Restore value on thing deactivation: the property value is restored when the parent thing is deactivated.
Data binding
Within the Data Binding section, you can configure whether the property value must be bound to a metric or statistic. For more details you can refer to the Data Binding article.
Comments
0 comments
Please sign in to leave a comment.