Platform · Asset Templates

Custom LoRaWAN payload decoders for any device, written in JavaScript

Every IoT device speaks its own binary format. In Widgelix you write a short JavaScript decoder once, test it on a real payload, and reuse it for every device of that model. Using a popular sensor? It probably already has a ready decoder in the supported devices catalogue.

JavaScript
uplink decoders and downlink encoders
Test console
run a payload before going live
Write once
reuse for every device of the model
Widgelix asset template editor with a JavaScript uplink decoder, test payload console and data fields
The problem

Every new sensor model starts with bytes nobody can read

A LoRaWAN or Sigfox sensor sends a few bytes of HEX. Before anyone can see a temperature, someone has to find the vendor's codec, adapt it to the platform, map the fields and units, and repeat the work for every project. Proprietary devices often have no ready decoder at all.

  • Vendor codecs need adapting for every platform
  • Field names and units differ between projects
  • No safe place to test a decoder before devices go live
  • Stateful logic (counters, deltas) needs a custom backend
How it works

One template per device model

  1. 01

    Check the catalogue, or start from scratch

    If your device is in the supported devices catalogue, load its ready template and you are done. For anything else, create an asset template from scratch.

  2. 02

    Decode and test

    Write a decode(payload, data) function in JavaScript. Paste a real HEX payload into the test console, click Run and check the output before saving.

  3. 03

    Add devices and use the data

    Every device you attach to the template uses the same decoder. Decoded fields feed dashboards, actions, reports and AI agents immediately.

Capabilities

Everything a device model needs, in one template

Asset templates (formerly device types) hold the decoding, data model and default views for a device model.

Uplink decoder

A JavaScript function receives the payload as HEX plus network metadata (type, RSSI, SNR, gateway EUI, fPort, fCnt) and returns named values.

Downlink encoder

Turn a JSON command into the HEX payload the device expects. Its fields drive the Downlink Button widget, the asset Downlinks tab and downlink actions.

Data fields with units and ranges

Declare which decoded values to store, with units and expected min/max. Load all fields at once from a sample decoded payload.

Per-device state

Decoders can keep persistent storage per device between messages, for counters, deltas and baselines, without an extra backend.

Device ID and GPS from payload

Read the device ID or latitude/longitude from decoded fields, so trackers and gateways that forward many devices appear correctly on maps.

Tags and default views

Define tags such as floor, room or measured object, the list widgets shown in the assets list, and the default dashboard for every device of the model.

Reuse across organisations

Copy a template to another organisation you manage, or share it through the project repository so partners can install it.

AI-assisted decoders

AI agents connected through the Widgelix MCP server can write a decoder and test it against a sample payload before saving the template.

Looking for a ready decoder?

Popular sensors from vendors such as Milesight, Dragino, Elsys, Tektelic, Adeunis and MClimate already have verified decoders in the supported devices catalogue. Load the template and skip the coding.

Browse supported devices
Widgelix asset templates list with device images, manufacturers and connectivity badges
At a glance

Template and codec features

Decoder languageJavaScript, executed in an isolated sandbox
Decoder inputHEX payload + metadata: type, RSSI, SNR, gateway EUI, fPort, fCnt
DownlinksJSON → HEX encoder with named command fields
TestingBuilt-in console for uplink and downlink codecs
StatePersistent per-device storage between messages
RepositorySupported devices catalogue with verified decoders
ConnectivityLoRaWAN, Sigfox, MQTT, HTTP webhook and more
PortabilityShow as JSON, copy to another organisation, publish to the repository

Related pages

Questions about payload decoders

+What is a payload decoder?

Most low-power IoT devices send compact binary payloads to save battery and airtime. A payload decoder is a small function that converts those bytes into named values such as temperature or battery voltage.

+Can I use the decoder published by my sensor vendor?

Usually yes. Vendor JavaScript codecs can be pasted into the decoder with minor changes to the function signature. Test them in the built-in console with a real payload before saving.

+Is my device supported out of the box?

Check the supported devices catalogue. If a template exists, load it from the repository. If not, create one from scratch, or ask us and we can add it.

+Can I send commands to devices?

Yes. Add a downlink encoder to the template. Downlinks are sent through integrations that support them, such as The Things Stack, Actility, Helium, LORIOT, Loxone and the GreenMesh LoRaWAN Network Server.

+Does it work for non-LoRaWAN devices?

Yes. The same template model is used for Sigfox, MQTT and HTTP webhook devices. Only the payload format and metadata differ.

Read the asset template documentation →The template editor in detail: uplink and downlink codecs, data fields, tags, parameters and widgets.

More platform features

Bring your devices, we'll help decode them

Tell us which sensors and meters you use. We'll check repository support and help with templates for anything new.

  • Repository check for your device list
  • Template and decoder setup for new models
  • Migration from your current platform's codecs
Book a Demo

We'll reply within one business day.