Can the Device Description Field be embedded in the decoder() JSON return object

Hi Everyone,

Can the Device Description Field be embedded in the decoder() JSON return object? (Given The Decoder only receives two arguments port, data)

Background I’m using a number of Netvox magnetic contact sensors for different contact purposes. and the Device description field would assist identifying (The only alternative is to make one app for each device use case)

Thanks in Adv.

Do the devices uplink different packet formats depending on your use case? If not, the decoder can be the same and the application can differentiate on device name. (Which is included in the MQTT / http data)

1 Like

Hi @DCH_Project, I use a number of Netvox sensors and use the Javascript decoder to create payload fields.
I then use an MQTT subscriber to access the sensor uplinks. The JSON/MQTT provides the dev_id and hardware_serial fields as well as the decoded payload_fields (plus a lot of other stuff).
This would allow you to use the dev_id free-format text field in a structured way.
The code at your MQTT subscriber could then process the uplinks according to the “different contact purposes” that you require.

1 Like

Hi Kersing,

As I thought - it’s not possible to access the “device description” field
would be great new addition to the TTN

I have already architectured most applications to use a lookup table on the dev_id but wanted to access description information, for another use…