> For the complete documentation index, see [llms.txt](https://docs.dataclearinghouse.org/dch-2.0-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dataclearinghouse.org/dch-2.0-documentation/data-management/adding-a-new-data-source.md).

# 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](https://bitbucket.csiro.au/projects/SBDCH/repos/bms-json/browse).
   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 ](https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html)(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:<br>

         <table data-header-hidden><thead><tr><th width="404"></th><th></th></tr></thead><tbody><tr><td>{<br>  "expect_timestamp": true,<br>  "timestamp_message_delimiter": "\n",<br>  "timestamp_format": "y-M-d'T'H:m:s.SSS'Z'"<br>}</td><td>2024-03-05T13:56:01.987\n21</td></tr><tr><td>{<br>  "expect_timestamp": true,<br>  "timestamp_message_delimiter": ",",<br>  "timestamp_format": "y-M-d'T'H:m:s'Z'"<br>}</td><td>2024-03-05T13:56:01,21</td></tr></tbody></table>
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](/dch-2.0-documentation/changelog.md#points-in-context-data-pools-and-classification). Publishing to DCH using these credentials places your data in a newly formed Data Pool within the Data Source.
