TRB256 - API Flow for Creating Data to Server Configuration

Hello,

To configure the “Data to Server” feature on the TRB256 device, the following sequence of 8 API calls is currently required, which seems a bit unusual for a relatively straightforward setup:

  1. Create Collection Config (Disabled Initially)
    Create the collection with "enabled": "0" to avoid errors when creating it with "enabled": "1".
  2. Call Status API
    Retrieve the collection, input, and output IDs needed for subsequent steps.
  3. Update Input Configuration
    Use the retrieved input ID to configure the input parameters (e.g., Modbus settings, members list, format).
  4. Call Status API
    Verify that the input config is applied correctly.
  5. Update Output Configuration
    Use the output ID to configure the output (e.g., Azure plugin and connection section name).
  6. Call Status API
    Confirm the output configuration is applied.
  7. Enable the Collection
    Update the collection with "enabled": "1" to activate it now that input and output are properly configured.
  8. Final Status API Call
    Verify that the collection is active and everything is working as expected.

Could you please confirm if this is the correct and recommended approach? Also, is there any way to reduce the number of API calls needed to complete this setup?

Thanks for your help.

Hello,

Your steps seem to be just as required. Input and output configuration must be applied and validated independently before activating the data collection. Skipping these validations may result in undefined system behavior.

You may skip the “validating” of whether a call went through successfully, or in other words, whether the setting was really applied, but you can never be too sure.

Regards,
M.

Hello,

Is there a NuGet package available for developing with TRB256 in .NET 6?

Thanks

Hello,

Available package downloads can be found here: TRB256 Package Downloads - Teltonika Networks Wiki

The Nuget package doesn’t seem to be present here, so you will either have to:

  1. Compile a custom SDK: Software Development Kit - Teltonika Networks Wiki
  2. Utilize custom feeds: Adding your own package to existing Feed - For Developers - OpenWrt Forum

Regards,
M.

Hello,

Can you please provide steps for 1. Compile a custom SDK: Software Development Kit - Teltonika Networks Wiki for Dot net 6

Thanks

Hello there,

The instructions can be found on the same page at the bottom, here’s a link: RUTOS Software Development Kit (SDK) Instruction - Teltonika Networks Wiki

Kind regards,
M.

This topic was automatically closed after 60 days. New replies are no longer allowed.