Description

ThingSpeak is an IoT platform with built-in MATLAB® analytics, which allows preprocessing, analyzing and visualizing data sent by IoT devices, as well as creating actions such as alerts based on you channel data. Milesight LoRaWAN® devices can connect to ThingSpeak via The Thing Stack.


Requirement

  1. The Thing Stack Sandbox Account
  2. ThingSpeak Account
  3. Milesight LoRaWAN® Devices (Sensors, Controllers, in this example AM107 is used)


Configuration

Step1.Connect Device to The Thing Stack

Connect device to The Thing Stack followed article How to Connect Milesight End Devices to The Things Stack v3 and ensure the The Thing Stack receives data normally.

Step2. Setup ThingSpeak

Log in ThingSpeak account, click New Channel to add new data channels. In this channel, we define 7 fields. Click Save Channel to save all settings.


After save, you can find channel ID and API keys which will be used for The Thing Stack integration.

Step3.The Thing Stack-ThingSpeak Integration

Click Applications-> Integration -> Webhooks to add a ThingSpeak webhook.

Webhook ID: user-defined

Channel ID: ThingSpeak Channel ID

API Key: ThingSpeak Write API Key

Click create thingspeak webhook save the configuration.


Step4.Add Device Decoder and Check Data

Paste the device decoder in Payload formatters tab. Milesight device decoders can be found here.


Change the decoder variable names to corresponding fields in ThingSpeak channel field order.

In this example, we need to change the temperature to field1, humidity to field2, activity to field3...

After change, click Save changes.

Then The Thing Stack will process the data as fields.


You will see data sent as field order in ThingSpeak and process it.

--END--