Review payload in Amazon Timestream

In this section you will trigger or simulate the ingestion of the payload from your LoRaWAN device, verify the successful execution of binary decoding using MQTT client and finally review the stored payloads in Amazon Timestream.

Please use this link or navigate to AWS IoT, Test and MQTT Client.

1. Subscribe to topic lorawanworkshop/debug

Please input the topic name lorawanworkshop/debug in “Topic filter” field and click on “Subscribe”.

AWS Management Console

2. Trigger ingestion from your LoRaWAN device or ingest a test message

Please select between two options:

  • You don’t have a LoRsWAN device or your LoRaWAN device is not supported by this workshop
    If you want to simulate a LoRaWAN device and you have selected “sample_device” as a decoder name in previous steps, please proceed to Step 3.
  • Your LoRaWAN device is supported by this workshop
    If you have a supported LoRaWAN device, please trigger transmission on your LoRaWAN device and go directly to Step 4.

3. Prepare invocation of AWS IoT Rule

Please click on the “Publish to topic” tab and paste the following payload into the “Message payload” field:

        "PayloadData": "<Sample PayloadData>",
        "WirelessDeviceId": "57728ff8-5d1d-4130-9de2-f004d8722bc2",
        "WirelessMetadata": {
          "LoRaWAN": {
            "DataRate": 0,
            "DevEui": "a84041d55182720b",
            "FPort": 2,
            "Frequency": 867900000,
            "Gateways": [
                "GatewayEui": "dca632fffe45b3c0",
                "Rssi": -76,
                "Snr": 9.75
            "Timestamp": "2020-12-07T14:41:48Z"

The result should look like: AWS Management Console

4. Replace a test payload

Please replace the string <Sample PayloadData> with a sample payload according to this table.

Manufacturer Device name Sample “PayloadData”
Dragino LHT65 y6QHxgG4AQhmf/8=
Dragino LSE01 AuHtlACmawQPVGM=
Browan Tabs Object Locator Ae48SPbhAgRupmA=
Other device or no device available yet Ae48SPbhAgRupmA=

The result should look like: AWS Management Console

5. Update the topic name
On the “Publish to topic” tab, please update the topic name with the following value:$aws/rules/lorawanworkshop_WriteLoRaWANDataToTimestream_<Decoder name>

Please replace <Decoder name> with an appropriate name based on the table below, e.g. $aws/rules/lorawanworkshop_WriteLoRaWANDataToTimestream_sample_device

Manufacturer Device name Decoder name
Axioma W1 axioma_w1
Dragino LHT65 dragino_lht65
Dragino LSE01 dragino_lse01
Dragino LGT92 dragino_lgt92
Dragino LBT1 dragino_lbt1
Browan Tabs Object Locator tabs_objectlocator
Other device or no device available yet sample_device

The result should look like: AWS Management Console

6. Invoke AWS IoT Rule
Please double-check that you have completed the following tasks:

  • a. Pasted the sample message payload into “Message payload” field
  • b. Updated the value of the attribute “PayloadData”
  • c. Updated the value of the field “Topic name”

Your console should look like this: AWS Management Console

7. Verify successful ingestion

You should have arrived at this step either by proceeding from step 2 (i.e. after triggering an ingestion on your LoRaWAN device) or from step 6 (i.e. after simulating an ingestion from a LoRaWAN device).

Both if you have triggered an ingestion from your LoRaWAN device, or performed Steps 2 and 3 to simulate the ingestion, you should see the decoded message arriving in the MQTT Test client:

AWS Management Console

6. Review payloads in Amazon Timestream

Please open the Amazon Timestream query editor console by using this link. Preview the content of the tables:

  • Table iotcorelorawandemoLoRaWANTelemetryTableDemo will store the decoded telemetry payload from LoRaWAN devices
  • Table iotcorelorawandemoLoRaWANMetadataTable will store LoRaWAN metadata (e.g. RSSI and SNR per LoRaWAN gateway) for each ingestion

AWS Management Console AWS Management Console AWS Management Console