In case the connected machinery needs to send a file (e.g., an internal log) to the cloud, a BLOB type metric can be used. The file received will be stored in binary format, it will be up to you how to manage the metric value in the dashboards, for instance, download the file, or parse and display.
Creating a BLOB metric
To add a new BLOB Metric to a Thing Definition, you should:
- Enter the RAW Data page.
- Select the Thing Definitions tab.
- Select the Thing Definition to edit.
- Press the Add Metric button.
- Select the BLOB Metric type and provide the required information.
- Press the Save button and edit the additional information, if needed.
Editing a BLOB metric
A BLOB Metric is described by:
- Name: the name of the metric, also used to reference it within the dashboards' templates.
- Description: the text describing the metric. The description is displayed as a tooltip within the dashboard widgets.
- Group: the group the metric belongs to (e.g. Temperatures, System).
The mapping section of a metric you can configure:
Path: the path used to dispatch the incoming messages according to the underlying connection protocol, for instance in the case of MQTT this is the last part of the message topic.
Content Name: the name of the property to be extracted from the incoming message payload, and which contains the Base64-encoded file.
File Name: the name of the property to be extracted from the incoming message payload, and which contains the original name of the file. If missing, the file name will be the metric name.
Displaying a BLOB
A BLOB metric can be displayed only within a thing-details-widget or a multi-metric-list-widget, and the rendered value is the file name that can be clicked in order to open the file in a new browser tab.