Blog

Making the Most of Telematics Data Management with Navixy's IoT Logic Expression Language

  • Businesses seek custom telematics data to optimise operations but struggle to access and process it due to basic tracker output.
  • A low-code solution can help efficiently process and tailor telematics data to meet specific business needs.
  • Navixy's low-code tool, built on JEXL expression language, empowers users to process real-time and historical data, enabling custom calculations, data enrichment, and automation to extend telematics hardware capabilities.

Straightforward data that GPS trackers and sensors share may not be enough for businesses in telematics that require deeper insights and custom data manipulation to address their goals and needs.

To help businesses fully exploit the potential of telematics data, Navixy recently introduced the IoT Logic Expression Language. This tool enables custom calculations and logic to extend hardware capabilities, enrich data, and automate processes using both real-time and historical data.

Here's how Andrey Melnik, the Head of Technical Support at Navixy, explains this tool's value:

Navixy IoT Logic Expression Language is a significant advancement in telematics data management. As businesses increasingly seek ways to handle telematics data to back up decision-making and improve operations, the need for efficient data management tools becomes clear. Our low-code solution allows precise data manipulation for each tracker, IoT device, and sensor, recalculating direct data values in real time. It gives you a competitive edge by delivering necessary insights for optimised operations.

– Andrey Melnik, the Head of Technical Support in Navixy

Where logic can be used in telematics: understanding IoT Logic

Before getting to the IoT Logic Expression Language, let’s take a general view of what Navixy IoT Logic is.

Navixy IoT Logic is a telematics data management tool that simplifies the handling of connected device data by eliminating the need for developing complex decoding and processing systems. It efficiently manages multiple device protocols, retrieves historical data, performs calculations, and creates logic expressions for various purposes. This includes custom attribute creation to extend hardware capabilities, enrich data, and automate business processes, offering a comprehensive solution for managing telematics data.

Let's look at where it can be used.

Real-world use cases for Navixy IoT Logic

Fuel level monitoring

Imagine a customer who wants to be alerted about every abnormal fuel level change. With Navixy IoT Logic, the program can automatically send specific commands to adjust the system and bring it back to normal. It will also notify the responsible person about the event.

Speeding event notifications

Consider another scenario where a company wants to monitor particular speeding events. While some may need alerts for every instance, others might only want notifications if the speeding exceeds a preset limit for over a minute. Navixy IoT Logic can tailor notifications to ignore shorter events due to a poor GPS signal or overtaking, ensuring each customer receives only relevant alerts.

To enable these custom scenarios, you might want to retrieve specific telematics data, which can be challenging.

The need for a universal solution

In fact, retrieving such data wouldn't be possible without expressions. Trackers typically do not provide complex or customised data directly – they usually only share straightforward, basic values from connected devices and sensors.

To address this, we sought a solution to handle detailed data requirements, processing and calculating data to meet individual business needs. This solution should have been flexible enough to process real-time data from trackers and adaptable to varied business scenarios. Navixy IoT Logic Expression Language became the answer, enabling us to retrieve, manipulate, and utilise data efficiently across diverse use cases.

What is Navixy IoT Logic Expression Language: meet our universal expression language

It was a challenge for the team. How can we explain to our platform how to recalculate every direct value – coming in and already collected – and do it individually for every tracker, device, machine, or even for a flow of trackers at once, if necessary? We needed a universal tool applicable to create our solutions and be suitable for everyone. We decided to take the LowCode programming direction and developed the Navixy IoT Logic Expression Language.

Navixy IoT Logic Expression Language is based on Java Expression Language (JEXL), so it will be familiar to developers. Its syntax uses the "camelCase" method of separating words in function names.

For example: thisIsTheFunctionName

IoT Logic data flows consist of a sequence of nodes representing the steps of data enrichment. IoT Logic Expression Language can be used in two nodes:

  • Initiate attributes
  • Logics

These nodes allow you to manipulate incoming raw data received from devices, third-party services, and other data sources by bringing the data to the necessary format for the recipient – Navixy or another third-party platform.

IoT Logic EL functions

Like other expression languages, the IoT Logic Expression Language works via functions that are key points for calculations and other data manipulations. Each function has its parameters that help you obtain the necessary data from the data stream.

Breaking down main functions and parameters

There are three main functions that will be available at the start of the IoT Logic product:

  • value(): This function is the main method to obtain parameters received from the tracker and attributes calculated inside the IoT Logic product.
  • genTime(): This function helps to get the date and time when the value was generated on the device side.
  • srvTime(): This function returns the date and time when the value was received on the IoT Logic server.

Parameters are the same for all functions:

  • device parameter/attribute: string with device parameter that is supported by the device communication protocol or calculated within the created flow.
  • index: optional int from 0 to 12. Means how many steps into the past we need to go through to take a value. Where 0 means the newest (or current) value, 12 means 12 values ago from the newest one. If it is not specified, the platform will use a default index = 0.
  • validation flag: optional string. It can have one of two values: ‘all’ or ‘valid’. When you use ‘all’, it means the historical data including null values. When you use ‘valid’, it means the storage excluding null values. If not specified, the platform will use a default flag = ‘valid’.

Let’s look at how the main functions return data and the use examples:

FunctionReturn valueExample
value()Its format depends on the type of data provided by a tracker in the parameter. Can be text, boolean, numeric, binary, etc.value(‘can_fuel’, 1, ‘valid’)
srvTime()Returns the date and time in Unix-time format of when the value was received on the IoT Logic server.srvTime(‘avl_255’, 0, ‘all’)
genTime()Returns the date and time in Unix-time format of when the value was generated on the device side.genTime(‘lat’, 5, ‘valid’) or genTime(‘lat’, 5)

Work with time formats in Navixy IoT logic

Navixy IoT Logic uses Unix time in milliseconds (ms), a standard format in IT systems. Using this format ensures quick and easy data processing by other systems, as most systems are familiar with it. Unix time represents the number of milliseconds elapsed since midnight (00:00:00 UTC) on January 1, 1970.

For example, 1490347940000.

Right, – you say – Unix time is a great option for manipulations and storing. But what if we want to make it more human-friendly? You can use a particular time function to change the format.

dtFormat('time parameter'): This function changes the format from Unix time to ISO 8601. For instance, it will automatically recalculate Unix time 1720618553 to ISO 8601 2024-07-10T13:35:53.000 UTC+0.

Below is the example of the function:

dtFormat(genTime('temp_1', 0, 'all'))

Using expressions for attributes calculation

As data flows into IoT Logic, you can leverage expressions to perform various calculations on your attributes. It allows you to derive new metrics or modify existing ones based on the incoming data.

Calculate values for attributes

Once IoT Logic receives parameters in the incoming data stream from devices, you can perform calculations to generate new values based on this data. For example, you may want to create a parameter that calculates the difference between the latest and previous temperature values. The expression would look like this:

value('temp_1', 0, 'valid') - value('temp_1', 1, 'valid')

This expression should be inserted into a specific field of the node. Once the expression is set, IoT Logic will calculate it in real time as soon as it receives a data packet from any device in the data stream.

Moreover, this new calculated attribute will be available for the following nodes, including the next nodes with calculations or logic.

IoT Logic Expression Lamguage: initial attributes

Calculate date and time for attributes in IoT Logic

For attributes created in the IoT Logic flow processing, the genTime and srvTime parameters are the same and equivalent to the value calculation server date and time (Unix time in ms). This value is set by default and corresponds to the now() short function. Additionally, you can rewrite date and time values in two ways:

  • You can offset the time by days, hours, minutes, or seconds by adding additional milliseconds via the expression below:
    genTime('avl_25', 0, 'valid') + 120000
  • You can calculate the time by subtracting one time value from another:
    genTime('avl_25', 0, 'valid') - genTime('avl_25', 1, 'valid')

After that, the time values will be updated. Also, you can remove any of these time values for the calculated attributes altogether if you want them to be null and (or) date/time values aren't necessary for the recipient party.

Future of IoT Logic

We have plans to develop the IoT Logic syntax further tol extend your capabilities even more. All these extensions relate to logic, additional calculations, and automation. Below is a list of upcoming functions for the IoT Logic product:

  • Logical expressions and if/else structures;
  • Bitwise operations;
  • Regular expressions;
  • Parameter extraction.

The IoT Logic with Navixy IoT Logic Expression Language makes it possible to create individual solutions for your customers, which will address different needs and business cases quickly.

Conclusion: using the potential of telematics data to the full

Navixy IoT Logic Expression Language is a powerful tool aiming to transform how businesses interact with telematics data. It helps address unique business needs and efficiently automate business processes with custom calculations and real-time data manipulation. Users get the flexibility to enhance data accuracy or tailor alerts, allowing businesses to leverage their telematics data to its fullest potential. As we continue to enhance IoT Logic, our commitment remains to deliver innovative solutions to address evolving challenges in telematics.

← Previous articleNext article →
Ready for the most innovative GPS tracking software?
SIGN UP
Recent posts