Editing an Asset Template
The asset template editor: About, uplink and downlink codecs, data fields, tags, list widgets, additional parameters, MQTT and widgets.
To open the template editor, click the template name on the Asset Templates page, or select Edit template in the row menu.
All settings of the template are shown on one page. Use the navigation on the left (About, Uplink data, Downlink data, Tags, List widgets, Parameters, MQTT, Widgets) to jump to a section.

Header actions
Back (<)
Returns to the Asset Templates list.
Show JSON
Shows the whole template as JSON at the bottom of the page. Click again to hide it.
Copy to account
Copies the template to another organization (account) you have access to.
Save changes
Saves all changes. The button becomes active as soon as you change something.
About
General information about the device model:
Name: the template name shown in lists and when adding assets.
Manufacturer: the device manufacturer. Used by the Manufacturer filter.
Description: what the device is and what it is used for.
Manufacturer website: a link to the product page.
Connectivity: the supported protocols, e.g.
LoRaWAN,Sigfox. Shown as badges in the list and used by the Protocol filter.Map Marker: the icon used for assets of this template on maps and in lists. Click the button to choose another icon.
Image: a picture of the device. Click the image area to upload or replace it, × removes it.
Uplink data
The uplink decoder converts the raw payload sent by the device into named values.

Code: the decoder in JavaScript. It must contain a
decode(payload, data)function that returns an object with the decoded values.payloadis the payload as a HEX string;data.metacontains network metadata such astype,rssi,snr,gatewayEui,fPortandfCnt. Click Fullscreen to edit long decoders.Test payload: paste a HEX payload and click Run. The decoded result appears in Output.
Data fields
Data fields define which decoded values Widgelix stores and shows. The counter next to the title shows the number of fields.

Name
The key exactly as returned by the decoder, e.g. channelA.
Units
Unit of measurement, e.g. Volts, °C, %.
Min/Max
Optional expected range, used e.g. by gauges and charts.
×
Removes the field.
Add field: adds an empty row.
Load from payload: paste a decoded JSON object, and all its keys are added as fields at once. Then set units and ranges manually.
Take device id from payload: read the device ID from a decoded field instead of the network metadata.
Take position from payload: read latitude and longitude from decoded fields, for devices with GPS.
Downlink data
The downlink encoder converts a JSON command into the binary payload sent to the device. This section is optional.

Code: the encoder in JavaScript. It receives the JSON command and returns the payload as a HEX string.
Test payload: paste a JSON command and click Run to see the encoded HEX in Output.
Data fields: the parameters of the command. Enter a Name and an optional Comment, then click + Add. These fields are used by the Downlink Button widget and on the asset Downlinks tab.
Tags
Tags let you group and tell apart assets of this template by their attributes. In the template you define the tag names; the values are then set on each asset.
Typical examples:
Location:
floor,room,address.Installation place: where the sensor is mounted, e.g.
installed inwith values like supply duct, server rack, north wall.Measured object: what exactly the sensor measures, e.g.
measureswith values like boiler 2, main line, freezer A.
To add a tag, click Add tag, enter its name and press Enter. The counter shows how many tags the template has.
Tag values are set on the asset Meta tab. You can then filter the Assets list by a tag value and show one tag under the asset name (see Meta tag in List widgets below).
Personalized alerts in Actions
Every tag of the template is available as a placeholder in Actions messages. When an action fires, the placeholder is replaced with the tag value of the asset that triggered it.
This lets you set up one action for hundreds of devices at once: instead of creating a separate rule for every sensor, you create one action for the whole template, and each alert still tells the recipient exactly which device it is, where it is installed and what it measures.
See Action Types & Placeholders for the full list of placeholders.
List widgets
Defines what the Assets list shows for every asset of this template.

Fields to show: up to 3 data fields shown in the Last values column.
Sparkline: a trend of the last 24 uplinks under a field. Bars suit discrete values (states, detections, counts).
Battery indicator: shows the battery level in the Battery column.
Meta tag: a tag shown under the asset name when its value is set on the asset, e.g.
room: 1020.Preview: shows how a sample asset will look in the list.
See List Widgets for details.
Additional parameters

Take radio parameters from payload: RSSI and SNR are read from the decoded payload instead of the network metadata. Enter the field names for RSSI and SNR.
Take battery parameters from payload: the battery level is read from the decoded payload and converted to percent. Enter the battery field name and, where requested, the battery type, capacity and power consumption per cycle.
MQTT
Enable MQTT connectivity: publish uplinks of assets of this template and accept downlinks over the platform MQTT broker.
Widgets
The widgets shown on the Dashboard tab of every asset of this template. In the editor, widgets show NaN because there is no live data.

Turn on the Edit switch to change the layout:
+ Add Widget: adds a widget. See Widgets for all widget types and their settings.
⚙ on a widget: opens its settings.
Drag a widget to move it, drag its bottom right corner to resize it.
Turn the Edit switch off when you are done and click Save changes.
Deleting a template
In the left navigation, under Danger zone, click Delete template and confirm. The template is removed from the organization. This cannot be undone.