For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payload

A payload is the structured data generated by the YuDash device before it is transmitted to a server or written to a file.

The core payload contains the acquired sensor data. Depending on the application, optional metadata such as a timestamp, device header, and device status can also be included before the final JSON or TXT payload is generated.

Payload Configuration

Payload settings are configured from:

Cloud Settings → Payload → Open Payload Wizard

The Payload Formatter Wizard controls how acquired sensor data is encoded before it is transmitted or stored.

Payload Format

The Payload Format selects the encoder used to generate the final payload. YuDash provides simple predefined JSON formats as well as configurable JSON and text generators.

Use Format & Keys to select the required format.

Payload Format
Use

JSON_FORMAT_10

Standard key-value JSON payload. Recommended starting format for most MQTT and HTTP integrations.

JSON_FORMAT_11 .. 18

Other predefined JSON structures for specific integration requirements and existing deployments.

JSON_FORMAT_19

Configurable JSON generator for creating custom JSON payload structures.

TXT20

Configurable text generator for text, CSV-style, FTP and data-logging formats.

For most new JSON integrations, start with JSON10. Use JSON19 when the receiving system requires a custom JSON structure.

JSON Payload

JSON payloads provide a structured format for sending acquired variables to MQTT brokers, HTTP/HTTPS APIs and other applications that accept JSON data.

For most integrations, JSON_FORMAT_10 is the recommended starting point. Alternative predefined structures are available where required, while JSON_FORMAT_19 provides a configurable JSON generator for custom payloads.

JSON_FORMAT_10 — Standard Key-Value Payload

JSON10 sends each YuDash variable directly as a JSON key-value pair.

This simple structure works well for most MQTT and HTTP integrations where the receiving server can directly use the YuDash variable names.


JSON11 — Two-Level Payload

JSON11 creates a two-level JSON structure, with each variable name used as the main key.

The secondary key, such as value, is configurable.

Other Predefined JSON Formats

Additional predefined JSON formats are available for specific platforms, legacy integrations and application-specific data structures.

JSON_FORMAT_19 — JSON Template Engine

JSON_FORMAT_19 enables the YuDash JSON Template Engine, a generic payload engine for creating custom JSON structures to match application-specific APIs and server schemas.

Use the JSON Generator page for template syntax, live variables, device metadata, timestamps, nested objects and arrays./

Time Stamp

A timestamp can be added to the generated payload when the receiving application requires the time associated with the data.

Enable Send TimeStamp, then configure:

  • Time Stamp Key — the JSON key used for the timestamp, for example ts, timestamp or time

  • Time Stamp Format — the required timestamp representation

The timestamp is inserted into the generated JSON along with the sensor data.

UTC Timestamp Formats

Format

Sample Time Stamp

TS_50 — UTC Seconds

1675630526

TS_51 — UTC MilliSeconds

1675630526000

TS_52 — UTC YYYY-MM-DDTHH:MM:SS

2023-02-05T20:55:26Z

TS_53 — UTC YYYY-MM-DD HH:MM:SS

2023-02-05 20:55:26

TS_54 — UTC YYYY_MM_DD_HH_MM_SS

2023_02_05_20_55_26

TS_55 — UTC YYYY-MM-DDTHH:MM:00

2023-02-05 20:55:00

TS_56 — UTC DD-MM-YYYY HH:MM:SS

05-02-2023 20:55:26

For TS_55, seconds are set to 00.

Local Time Timestamp Formats

Format

Representation

TS_60

LocalTime Seconds

TS_61

LocalTime MilliSeconds

TS_62

LocalTime YYYY-MM-DDTHH:MM:SS

TS_63

LocalTime YYYY-MM-DD HH:MM:SS

TS_64

LocalTime YYYY_MM_DD_HH_MM_SS

TS_65

LocalTime YYYY-MM-DDTHH:MM:00

TS_66

LocalTime DD-MM-YYYY HH:MM:SS

Example

With JSON_FORMAT_10 and a timestamp key configured as timestamp:

The timestamp key is configurable; common choices include timestamp, ts and time.

Device Headers

Device Headers add identification or other metadata to the JSON payload in addition to the acquired sensor data.

A header consists of a Key and a Value. The value can either be a fixed value entered by the user or a dynamic YuDash metadata reference.

Fixed Key-Value Headers

Use a fixed value when the information remains constant for the installation.

For example:

Header Key

Header Value

device_id

YU10005054

station_id

STATION001

With JSON_FORMAT_10, these headers are added alongside the measured variables:

Fixed headers are useful for application-specific identifiers such as a site name, station code or customer-defined device ID.


Dynamic Device Metadata

Instead of entering a fixed value, the Header Value can use a supported @ metadata reference. YuDash resolves the reference when the payload is generated, allowing information such as the device serial number, station ID or firmware version to be included automatically.

For example:

Header Key

Header Value

station_id

@YSID

serial_no

@YDNO

firmware

@YFWV

The transmitted JSON then contains the actual runtime values rather than the @ references.

Available Metadata References

Reference

Value

@YSID

Station ID

@YDNO

Device serial number

@YFWV

Firmware version

@YMC1

MAC address without separators

@YMC2

Device MAC-address representation

@EIPA

Ethernet IP address

@MBSL

Modbus Slave ID as text

@MBSI

Modbus Slave ID as a number

@FGDB

Cellular signal-strength value

@YUTS

Generated payload timestamp

These metadata references are resolved by the YuDash payload engine at runtime.

Fixed values are transmitted exactly as configured. @ metadata values are resolved dynamically each time the payload is generated.

Last updated