Table of Contents:

1.  Indoor Tracking Examples base on iBeacon

1.1  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

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

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

image-20220905084736-4.png

1.2  Configure TTS to Use the Losant Webhook

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

image-20220905084816-5.png

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

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

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.

image-20220905085017-8.png

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

image-20220905091131-22.png

Drag 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.

image-20220905085051-10.png

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.

image-20220905085115-11.png

1.4  Create a device

image-20220905085132-12.png

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

image-20220905085201-13.png

Name is required, others can be added later

image-20220905085219-14.png

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

image-20220905085236-15.png

Refer to the data in debug and add parameters to the device.

image-20220905085253-16.png

Create a new dashboard.

image-20220905085323-17.png

image-20220905110438-1.png

Select the appropriate template.

image-20220905085355-19.png

Set beacon and position.

image-20220905085417-20.png

image-20220905085437-21.png

 

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