Manage attributes via Bosch IoT Suite UI
Goal
Let us assume, you will later have multiple digital twins on various locations and a user app will need to display such details.
The easiest way to store such rather static type of information is by adding attributes.
In this tutorial you will enrich your hello-world-device-01 with attributes like manufacturer details.
{
"name"
:
"ACME demo corp."
,
"location"
:
"Berlin"
,
"serialno"
:
"42"
,
"model"
:
"fancy"
}
Procedure
Navigate to the Bosch IoT Suite UI:
Click the Things view.
Select your thing.
Click Attributes.
Click the + icon, to add some attributes.
Set the Name to manufacturer.
In the JSON value field add the content from the snippet above.
Confirm with OK.
The thing is updated respectively. In case you have an application listening on this thing it will be notified with a "change" event.
Result
Now the attributes are stored and can be used later for searching and filtering.
Once you have more things, you can use the respective attributes' entries as search arguments.
Note: The search is case sensitive.
Example 1: Find all things with manufacturer ACME demo corp.
eq(attributes/manufacturer/name,
"ACME demo corp."
)
Example 2: Find all things with serial number 42.
Things >Filter > Advanced > Query
eq(attributes/manufacturer/serialno,
"42"
)