Adding a new data source

Connecting a remote MQTT client to DCH

To create a new Data Source, follow these steps:

  1. On the sidebar, select Data.

  2. Select Add Data Source.

  3. Enter a memorable name for the ID and Name fields (optional: add Description of data source).

  4. Username is auto-generated and is Case Sensitive.

  5. Enter a password or generate a random one save it somewhere.

  6. Select your Data Decoder.

    1. BMS-JSON Decoder is on default and does not require any configuration. bms-json payload schema can be found here.

    2. Simple Payload Decoder is for gateway devices that cannot handle JSON payloads. If you would like to use a customised configuration instead of the default behaviour, you can set:

      1. expect_timestamp: field that tells the decoder whether the payloads will contain timestamps or not. Default is "true".

      2. timestamp_message_delimiter: field that tells the decoder what delimeter character you will be using between your timestamps and values (e.g. ","). Default is the newline character "\n".

      3. timestamp_format: field that tells the decoder the format structure of your timestamps as specified here (e.g. "y-M-d'T'H:m:s'Z'"). Default is "y-M-d'T'H:m:s.SSS'Z'".

      4. Some pairs of payload/decoder config:

        { "expect_timestamp": true, "timestamp_message_delimiter": "\n", "timestamp_format": "y-M-d'T'H:m:s.SSS'Z'" }

        2024-03-05T13:56:01.987\n21

        { "expect_timestamp": true, "timestamp_message_delimiter": ",", "timestamp_format": "y-M-d'T'H:m:s'Z'" }

        2024-03-05T13:56:01,21

  7. Press Add data source.

  8. Copy your username and save it.

  9. Press Close.

Any MQTT payload published to the DCH broker using these credentials will automatically be assigned to your organisation. A Data Source can have multiple Data Pools. Publishing to DCH using these credentials places your data in a newly formed Data Pool within the Data Source.

Last updated