All Things IoT | Losant Blog

Platform Update - Edge Development Improvements, User Tokens, Group: Update Node

Written by Dylan Schuster | Wed, May 26, 2021

Today’s release touches a number of Losant’s product components, with new features and improvements coming to a wide breadth of our IoT platform.

Edge Development Improvements

The biggest changes released today will affect those users who make use of our Edge Compute functionality, where we’ve made significant improvements to the experience of installing, developing, and deploying edge workflows.

First and foremost, we’ve streamlined the development and debugging lifecycle of Edge Workflows by introducing a new paradigm to our interface: the Device Live Look. After deploying a version to your Edge Compute devices, you can now immediately dive into one of the devices to see your work in action.

From an Edge Workflow’s editor, select the “Deployments” tab to view all devices that have any version of the workflow deployed to it. Then, to interact with a connected device, open the dropdown menu in its row and select the new “Live Look” option. (You can also connect to the device by selecting it in the “Debug” tab.)

This will open a takeover modal that essentially peeks into the workflow as it’s running on the device:

  • Whichever version is running is automatically selected.
  • The device’s Debug stream opens and messages begin appearing in the log.
  • Virtual Buttons are scoped to the device and are ready to press.
  • The Metrics tab displays usage data for the selected device.
  • If changes are necessary, you may click the “Make Changes” button in the top right corner to return to the editor, with the option to back up your current “develop” version if it differs from the deployed version.

This wipes out a number of steps in the development process and should make for a more productive and pleasant experience when building out workflows for use on the edge.

If instead, you would like to debug all workflows deployed to a given device, you can also fire the Live Look modal for each workflow on a device from the Edge Compute tab. If you determine that changes are necessary to a workflow, you may enter that workflow’s editor directly by clicking “Make Changes” within the Live Look, optionally saving the workflow’s current “develop” version as a new version before doing so.

As for installing the Edge Agent, we made two adjustments to make this process easier:

  1. We recently published an updated and much simpler Docker installation guide—along with a video demonstrating the process on a headless Raspberry Pi.
  2. From an Edge Compute device’s editor screen, you can now download a sample TOML file for the device, which includes all available configuration options and their environment variable counterparts. (You’ll still need to generate an access key and insert the key and secret into the file to authenticate the device.)

We’re confident that these updates will greatly speed up the development time for Edge Workflows and make it easier to debug Edge Compute gateways.

User-Scoped API Tokens and CLI Authentication

Today’s release also includes the ability to create and manage API tokens scoped to your user. This is similar to our existing application API tokens in that these allow for programmatic management of your Losant resources outside of our user interface; however, user tokens provide access to all your applications, organizations, and even your user account if desired.

For that reason, we added the ability to scope the tokens to specific operations, and we strongly recommend doing so when creating tokens for specific purposes. We even provide aliases to create read-only tokens or tokens for interacting only with the Losant CLI.

Speaking of the CLI, for those who use that tool but also authenticate their accounts using Single Sign-On (SSO), we added a new set-token command that allows for utilizing a user token within the tool. This solves a long-running pain point that SSO users have felt when trying to use the CLI to edit their experience resources in their local environment.

Group: Update Node

In this release, we’ve also added an Experience Group: Update Node at the request of multiple users. While it is possible to edit the properties of an Experience Group using the Losant API Node, exposing this functionality as a first-class node makes it significantly easier (not to mention more performant) to update a group’s properties in a workflow. This is especially true for the three most common edits to a group: modifying its user membership, updating its associated devices, and changing its parent group.

Other Updates

As always, this release comes with a number of smaller feature improvements, including:

  • The Generate Experience User Token Node now has an option to treat the user’s token generation as a login, which in turn will update the user’s “Last Login” timestamp. This benefits applications that use SAML or our Auth0 Social Login template to authenticate their Experience Users.
  • GCP: Function Nodes now allow for invoking via an HTTP trigger, which Google recommends in high-volume production applications.
  • The Device: Get Node has a new option to return the devices’ attributes as an object map instead of an array. This makes it much easier to read the attribute tags of a given device and attribute within a workflow.
  • In the list of an application’s notebooks, we are now displaying each notebook’s recent runs, errors, and minutes used in the current billing period. This helps identify which notebooks are running most frequently and using the majority of your organization’s allotted monthly notebook execution time.
  • We rewrote our Modbus: Read and Modbus: Write Nodes to hold open frequently used connections for a period of time. While this does not expose any new functionality, it has led to noticeable stability improvements, especially when utilizing serial connections.
  • Enterprise customers who make use of our Instance Manager APIs can now schedule automated usage reports to be delivered at regular intervals, either via email or by callback URL. They may also break down payload usage per organization or application at a daily level.
  • We also added support for instance-scoped tokens, which is a more preferable option than a user token for instance management as its scope is limited to a given instance and certain operations within it, and the token can be managed by other instance administrators.

Template Library Update

We’re continuing to grow our Template Library with new entries designed to demonstrate Losant best practices, shorten time to market, and improve end-user experience.

We’ve added one significant entry since our last platform update: an Experience Internationalization template. This includes:

  • A common structure for defining multilingual dictionaries as CSVs.
  • Multiple methods for serving an application experience in multiple languages.
  • A component to allow users to switch the language and instructions for adding additional languages.

What’s Next?

With every new release, we listen to your feedback. By combining your suggestions with our roadmap, we can continue to improve the platform while maintaining its ease of use. Let us know what you think in the Losant Forums.