The Losant Template Library is a collection of common UI components, sample workflows, data simulators, and examples for all Losant users. Resources found in the Template Library can be integrated into existing applications to improve the usability, security, and speed to market for your applications.
The template library is divided into the following categories:
The Device template category contains components related to device creation and management.
The Device Provisioning templates provide dynamic device registration, onboarding, and provisioning functionality. These templates allow your solution to create devices on-demand, instead of requiring devices to be pre-created in the platform prior to being deployed.
For example, see the Dynamic Registration template:
This template provides JWT-based dynamic device registration. This allows devices to register themselves by sending a digitally-signed JWT token to a device registration API endpoint.
Device Recipes Templates allow you to create devices with pre-defined attributes and tags. Many of these recipes come from Losant technology partners, enabling you to use their sensors and hardware with the Losant platform.
For example, see the KST3320 Distance Sensor device recipe:
The KST3320 is a device capable of contactless measurement of solid and liquid levels within 10mm accuracy. It is capable of transmitting that information over short ranges using Bluetooth Low Energy or long ranges using a variety of Low-Power Wide Area Network (LPWAN).
Experience templates provide out-of-the-box features or reference implementations to add new functionality to your experiences.
Experience APIs provide examples of building RESTful data APIs for your application experiences. These are useful when building advanced single-page applications and native mobile apps.
For example, the Experience Authentication Endpoint demonstrates receiving user login credentials as part of a JSON request and replying with a token on successful authentication.
Boilerplates provide foundations on which you can build your experience. These handle the required markup to include dependencies, like Twitter Bootstrap, as well as providing common layouts that can be directly used by your experience.
For example, see the Bootstrap 4 Layouts template:
This template includes a variety of page layout configurations built within the Bootstrap 4 framework. This template serves as a starting point for any new application experience.
Component templates provide pre-built functionality that can be directly included in your own Experience Pages or Experience Layouts. Many of these templates provide UI components that are common across many IoT solutions.
For example, see the Device List template:
This template displays a list of devices. Each entry has a configurable link, label, and optional device image. The list is based on the Bootstrap 4 List group component.
Form templates provide various solutions for accepting and utilizing user input. The forms in this category provide out-of-the-box functionality as well as reference implementations for common features that you can add to your experience.
For example, see the Forgot Password template:
This template provides all the necessary endpoints, workflows, and pages to deliver “forgot password” and “password reset” functionality.
Experience Page templates provide pre-built Experience Pages. Most pages are not intended to be used as an out-of-the-box solution, but rather to provide guidance on how to use the service or feature within your experience.
For example, see the Braze Web Push Notifications template:
This template provides an example page that demonstrates how to register for and receive Web Push Notifications from the Braze customer engagement platform.
Workflows provide the intelligence or business logic for your application. Workflow templates provide pre-built workflows that deliver common functionality across a wide variety of application types.
Alerting templates demonstrate how to implement alerting within your application. They provide best practices around using the Latch Node as well as creating and automatically resolving Losant Events.
For example, see the Latching and Events template:
This template demonstrates:
- How to use the Latch Node and create events with the Event: Create Node.
- How to auto-resolve events after the Latch Node resets using the Event: Update Node.
- How to store attribute value thresholds on attribute tags.
Data workflow templates demonstrate how to utilize the workflow engine to integrate with third-party services, which allows you to extend the functionality of your Losant application in a number of ways.
For example, the Stream Exports to AWS S3 template demonstrates how to push the results of device data exports and notebook executions straight to your Amazon S3 bucket.
Workflow Edge Compute
Edge Compute workflow templates cover a variety of use cases within the Gateway Edge Agent, both for complete local control as well as integrating the GEA with the cloud platform.
For example, the Publish Edge Files to Application Files template utilizes an Edge Workflow and an Application Workflow to retrieve upload credentials for an Application File from the cloud and then upload that file directly from the Edge Compute device.
These nodes extend the workflow palette with new functionality like data filtering or integrations with external services. When imported, these nodes appear in your application’s collection of Custom Nodes.
For example, see the Moving Average template:
This node calculates a moving average over a configurable number of data points. Once imported, this node is available in your application’s collection of Custom Nodes.
Workflow simulators provide a means to generate sample data during your early development or proof-of-concept phases. This can be used when you do not have access to actual device data or when you test how your solution behaves under specific scenarios.
For example, see the Blob Data Simulator template:
This template demonstrates:
- How to simulate blob attribute data via a workflow.
- How to save that data to device state.
- How to use that device state in a dashboard.
For more information, see:
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.