Today's update greatly improves the platform's ease of use by introducing AI code generation to the Workflow Function Node. We've also made huge improvements to the Time-Series Graph through much more powerful Y-axis configuration.
AI Code Generation for the Workflow Function Node
Losant's drag-and-drop workflows provide hundreds of nodes that deliver a huge variety of turnkey functionality. Even with all these nodes, nearly every application still requires the Function Node, which allows you to write JavaScript to run custom logic on your payload data. The Function Node is used for things like custom protocol parsing or more complicated data processing and reshaping.
Today's update adds AI-powered code generation to the Function Node, making it far easier to use for those that aren't familiar with JavaScript. You can now describe your requirements in words and the platform will generate the code to perform that action.
In the Function Node editor, you'll see a new Generate Function button. This button displays a modal where you can enter a description of the code you'd like to create. The screenshot above is showing the result for the following prompt:
A function that converts fahrenheit and celsius.
The code generator is powered by Google Vertex AI and their Gemini models. This means the generator has a lot of knowledge it can draw from when creating code. For example, if you're using a RadioBridge LoRaWAN sensor, you can ask it for a function that parses that specific data:
Given a base64 encoded string from a Radiobridge voltage sensor, extract the Message Type, Event Definition, and Measurement.
The code generator is configured to only create code that's supported by the Losant platform. This means you don't have to specify the language or worry about the generated code using features that aren't supported (async operations, network access, etc.).
Ease of use is one of Losant's main product goals and code generation is a big step towards that goal. It makes the Function Node usable to non-developers and greatly increases the productivity for those already familiar with coding. There are many places in the platform that can benefit from AI code generation and the Function Node is just the start. As we learn and refine the tools, you'll see code generation rolling out to more places.
Improved Time Series Graphs
The Time Series Graph underwent a major overhaul as part of today's release, adding many features that you've been asking for.
Y Axes Configuration
You now have much more control over your graph's Y axes. This update adds a new section to the editor where Y axes are defined and configured. We've also added new features like scale (linear, logarithmic, square root) and position (left, right).
Stacked Area and Bar Segments
If you have multiple segments on a single axes that are configured as bars or area, you can now combine those points into a stacked chart.
Decorators
This update also adds Decorators, which allow you to add predefined lines or areas to the graph. These are most commonly used for threshold indicators to quickly see if a device's telemetry data is within a healthy range.
For all existing time series graphs, there's no action you need to take to begin using these new features. If you open the editor for an existing graph, you'll notice that the new Y axes configuration has already been created based on what you had previously defined.
Other Updates
As always, this release comes with several other features and improvements, including:
- When exporting device data, you now have the option to create one file per device instead of one large file. This is useful for large applications where it's more convenient to break up the exported data into separate files. We've also significantly improved the performance when exporting large volumes of device data.
- When bulk-updating devices, you can now rename attributes and change the content type for Blob-type attributes.
- A timeout field has been added to the Allen-Bradley: Read and Allen-Bradley: Write Nodes. When configured, if the read or write operation takes longer than this value, the node will return an error.
- A length field has been added to the Allen-Bradley: Read Node for reading array-type PLC tags. When defined, the node will read the configured number of elements from the array.
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.