1.  Indoor Tracking Examples base on iBeacon

Create a Losant Webhook

If you do not have a Losant Account, you can sign up for a free Losant Developer Sandbox account. Once you have an account, create a new application. You can start from a blank application or from a Losant Application Template, like The Things Network Application Template.

Once you’ve created a new application, click Webhooks and then Add Webhook.

image-20220905084626-2.png

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg

Enter a Webhook Name and then click Create Webhook. You may also enter a username and password to use Basic Auth. If you use Basic Auth, you will need to edit your Losant Webhook in TTS.

image-20220905084724-3.png

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg

Once the Webhook is created, copy the unique identifier from the URL that comes after https://triggers.losant.com/webhooks/.

image-20220905084736-4.png

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image006.jpg

Configure TTS to Use the Losant Webhook

In the TTS application , click on Integrations, then Webhooks, and then Add webhook.

image-20220905084816-5.png

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image008.jpg

Click on the Losant Webhook tile. If you are using Basic Auth for this Webhook or need to subscribe to more than just uplink messages, then please review the end of this How-To Guide in the section named Editing Your Losant Webhook in TTS.

image-20220905084846-6.png

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image010.jpg

Enter the following information into the Losant Webhook configuration:

  • Webhook ID: Make up any name that you would like. This does not have to be the ID of the webhook as it is stored in Losant.
  • Unique ID of Losant Webhook URL: This is the Losant Webhook unique ID that was copied to the clipboard in LOSANT Webhooks.

Finally, click Create Losant webhook. If you need to configure additional options (e.g. Basic Auth or additional messages to subscribe to), use the TTS Custom Webhook Template or add these options once the Webhook in TTS is created by following the last section of this guide, Editing Your Losant Webhook in TTS.

image-20220905084936-7.png

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image012.jpg

Since TTS is now configured to forward data to the Losant Webhook, let’s create a Losant Application Workflow to receive the data from TTS.

Click on Workflows and then in the Application Workflow section, click Add to create a new Application Workflow.

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image014.jpg

Enter a name for your Application Workflow (as well as a description if you’d like) and click Create Workflow.

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image016.jpgDrag and drop the Webhook Trigger Node and the Debug Node onto the visual workflow engine’s canvas and connect them together. If you have only one webhook in this Losant application, it will be automatically selected for the Webhook Trigger. If you have multiple webhooks, select the one that was created in Webhook. Next, click Save and Deploy. Now that this workflow is deployed, click on the Debug Panel.

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image018.jpg

When TTS receives new data from the sensor, it will send that data to Losant over the Losant Webhook and trigger this workflow. Each time this workflow runs, new data will be displayed in the Debug Panel as shown below.

Note: If TTS is not automatically decoding your data as shown below in data.body.uplink_message.decoded_payload, then you can decode your LoRaWAN device data in this Losant Application Workflow. Check out the blog post How To Decode and Visualize Your LoRaWAN Sensor Data Using TTS and Losant to learn more about decoding LoRaWAN data in Losant.

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image020.jpg

Create a device

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image022.jpg

Select the appropriate equipment. In this example, select a Standalone equipment

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image024.jpg

Name is required, others can be added later

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image026.jpg

Add equipment in the workflow so that data can flow to the equipment

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image028.jpg

Refer to the data in debug and add parameters to the devicefile:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image030.jpg

Create a new dashboard

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image032.jpg

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image034.jpg

Select the appropriate template

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image036.jpg

Set beacon and position

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image038.jpg

file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image040.jpg

Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0