Template:Networking rutos manual data to server rut3xx trb2
The information in this page is updated in accordance with firmware version .
Summary
The Data to Server feature provides you with the possibility to set up data senders that collect data from various sources and periodically send it to remote servers. Note: On {{{name}}}, Data to Server is additional software that can be installed from the System → [[{{{name}}} Package Manager|Package Manager]] page.
Data Senders
A Data Sender is an instance that gathers and periodically sends collected data to a specified server. The Data Senders list is empty by default so, in order to begin configuration you must add a new collection first. To add a new collection, click the 'Add' button.
After this you should be redirected to the newly added data configuration page.
Data configuration
Refer to the table below for descriptions on data configuration fields.
Note: these tables have coloring schemes to indicate which fields can be seen with different configuration.
| Field | Value | Description |
|---|---|---|
| Name | string; default: input1 | Name of data input. |
| Type | Base | Lua script | ; default: Base | Data input type. |
| Format type | Json | Custom | Lua script; default: Json | Arranges the format of the sent JSON segment. |
| Values | list; default: All values included | Select values based on the data input type. If no values are selected, all values will be included. |
| Format string | string; default: none | Specifies custom format string. |
| Empty value | string; default: N/A | A string which will be placed if any value cannot be received. |
| Delimeter | string (Maximum length of value is 1 bytes); default: N/A | Specifies delimiters for multiple data segments. |
| Lua format example script | -(interactive button) | Download the Lua script. |
| Lua format script | -(interactive button) | Upload the Lua script. |
| Segment count | integer [1..64]; default: 1 | Max segment count in one JSON string sent to server. |
| Send as object | off | on; default: off | When turned on, sends JSON segment as object and not as an array element.
|
| Lua data example script | -(interactive button) | Download Lua data example script. |
| Lua script | -(interactive button) | Upload Lua data script. |
* This is additional software that can be installed from the System → [[{{{name}}} Package Manager|Package Manager]] page.
Collection configuration
> > > > > >
| Field | Value | Description |
|---|---|---|
| Enabled | off | on; default: on | Enables data to server collection instance. |
| Timer | Period | Scheduler | None; default: Period | Strategy for collecting/sending data to destination. |
| Period | integer; default: 60 | Interval in seconds for collecting/sending data to destination. |
| Day time | string; default: none | Day time when action should be executed. Use '*' to indicate every hour or minute, (e.g., 12:15, *:15, 12:*, or *:*). |
| Interval type | Weekdays | Month days; default: Weekdays | Allows selecting between week and month days for instance intervals. |
| Weekdays | list; default: Every day is selected | Weekdays, when data should be sent/collected. If nothing is selected, every day of the week will be included. |
| Month day | list; default: Every day is selected | Month days, when data should be sent/collected. If nothing is selected, every day of the month will be included. |
| Month day: Force last day | off | on; default: off | Forces intervals to accept last day of month as valid option if selected day doesn't exist in ongoing month. |
| Retry | off | on; default: off | In case of a failed attempt, retry to send the same data to destination later. |
| Retry count | Default: 10 | Retry to send the same data N times |
| Timeout | Default: 1 | Timeout in second between retry attempts |
| Format type | JSON | custom | Lua script; default: JSON | Data collection objects formatting. |
| Format string | Default: Instance name | Specifies custom format string |
| Empty value | Default: N/A | A string which will be placed if any value cannot be received |
| Lua format example script | -(interactive button) | Download the Lua script. |
| Lua format script | -(interactive button) | Upload the Lua script. |
Server configuration
| Field | Value | Description |
|---|---|---|
| Type | HTTP | Azure IoT Hub (requres to install package from [[{{{name}}} Package Manager|Package Manager]]); default: HTTP | Interval in seconds for collecting/sending data to destination. |
| Server address | Default: empty | Hostname or IP address of the broker to connect to. |
| HTTP headers | Default: empty | Allows to add custom headers to the HTTP requests. |
| Enable secure connection | off | on; default: off | Enables the use of TLS certificates. |
| Certificate files from device | off | on; default: off | Specify where the certificates will be used from. |
| Certificate authority file | .ca file; default: none | Certificate authority is an entity that issues digital certificates. A digital certificate certifies the ownership of a public key by the named subject of the certificate. |
| Client Certificate | .crt file; default: none | Certificate file is a type of digital certificate that is used by client systems to make authenticated requests to a remote server. If client certificate is not needed, leave both client certificate and client key fields empty. |
| Client Private Keyfile | .key file; default: none | File containing private key for this client. This file needs to be not encrypted. |
| Configuration type | Unique Azure Iot Hub configuration | Existing Azure Iot Hub configuration; default: Unique Azure Iot Hub configuration | |
| Unique Azure Iot Hub configuration: Connection type | Shared Access Signature (SAS) key | Device Provisioning Service (DPS); default: Shared Access Signature (SAS) key | Connection type to an existing IoT Hub. |
| Unique Azure Iot Hub configuration: Connection String | string; default: none | Connection string based on primary key used in API calls which allows device to communicate with IoT Hub. |
| Unique Azure Iot Hub configuration: ID Scope | string; default: none | Unique identifier that is assigned to an Azure IoT Hub during its creation and is used to uniquely identify the specific provisioning service the device will register through. |
| Unique Azure Iot Hub configuration: Registration ID | string; default: none | The registration ID is used to uniquely identify a device registration with the Device Provisioning Service. Registration ID is the X.509 certificate common name (CN) field of the individual device's certificate. |
| Unique Azure Iot Hub configuration: Global Device Endpoint | string; default: global.azure-devices-provisioning.net | Destination for messages sent by IoT devices to the Azure IoT Hub (will default to global.azure-devices-provisioning.net if not set). |
| Unique Azure Iot Hub configuration: Attestation mechanism | X.509 Certificates | Symmetric Key; default: X.509 Certificates | Method used to confirm a device's identity in Device Provisioning Service. |
| Unique Azure Iot Hub configuration: X.509 Certificates: X.509 Certificate | -(interactive) button; default: none | Upload the "leaf" certificate file. |
| Unique Azure Iot Hub configuration: X.509 Certificates: X.509 Private Key | -(interactive) button; default: none | Upload the "leaf" key file. |
| Unique Azure Iot Hub configuration: Symmetric Key: Symmetric Key | string; default: none | The the derived device key from the DPS Primary Key. |
| Existing Azure Iot Hub configuration: Azure IoT Hub instance | select; default: none | Previously created instance in [[{{{name}}}_Cloud_Solutions#Azure_IoT_Hub|Azure IoT Hub]] |
[[Category:{{{name}}} Services section]]



