How to add device attributes like TTN?

Hi

It’s possible to add attributes for a device like TTN ? With TTN I use this command to add a custom attribute for my devices, I hope we can make that using LoraServer ? How To ?

ttnctl devices set %%MYDEVICEID%% --attr-set %%ATTRIBUTE_NAME%%:%%ATTRIBUTE_VALUE%%

Anyone can answer my questions ?

This is not the ttn forum. Try this question there

Is not about TTN question,

I need to know if anyone can put a custom attributes or properties like on TTN.

If no answer, do I need to understand is not possible ?

It’s a perfectly valid question.

As far as I know, it’s not supported. You could do something of the like by adding a key and value to the JS object in a custom codec, but that’d be application wise, not per device.

Hi Folk
I come here again to know if is possible to define a parameters or attributes per device ? We thinking to move from TTN to ChirpStack.

My use case is :
Using TTN, we have applications with devices. TTN offer ttnctl command and we can specify attributes like
ttnctl devices set MYDEVICEID --attr-set key:1234567

Key is the name of our attribute and 1234567 is the value. We can retrieve this information from our Node-Red without integrate it in the device payload.

Can anyone help or answer please ?

Do you mean:

You will find that under the device configuration :slight_smile:

exactly !
Q. We can retrieve it from Node-Red Payload ?

Yes, see the Protobuf / JSON definition here: https://github.com/brocaar/chirpstack-api/blob/master/protobuf/as/integration/integration.proto#L84.

Please note, you must use the protobuf or json marshaler in your chirpstack-application-server.toml configuration (the default is json_v3 for backwards compatibility):

  # Integration configures the data integration.
  #
  # This is the data integration which is available for all applications,
  # besides the extra integrations that can be added on a per-application
  # basis.
  [application_server.integration]
  # Payload marshaler.
  #
  # This defines how the MQTT payloads are encoded. Valid options are:
  # * protobuf:  Protobuf encoding
  # * json:      JSON encoding (easier for debugging, but less compact than 'protobuf')
  # * json_v3:   v3 JSON (will be removed in the next major release)
  marshaler="json_v3"

https://www.chirpstack.io/application-server/install/config/

Thanks for the information.

We are in reflexion to move from TTN to ChirpStack and since attributes are available, is a good reason that we can now use it. FYI, we use attributes to store an API key per device. This API key is used to call our REST API (third application) without needed to send the API KEY as payload from the device.

If someone is available to set/config a server, please contact me