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).
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:
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.
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.