29 April, 2024

Power unleashed: introducing PVM generator

AI-forged code companion for crafting your messages processing.

Even if you’re an experienced flespi user, the PVM abbreviation probably doesn't ring a bell. This custom-designed programming language for telematics data has remained largely unexplored, despite its standout qualities compared to other alternatives. The dedicated ‘msg-pvm-code’ plugin looked like another option in the plugins drop-down menu though it's an open road to custom message processing. 

Default data processing strictly follows protocol rules and regulations set by hardware manufacturers, and yes, core flespi functionality easily handles data flow setups on all levels. But some specific tasks might go beyond the boundaries; you might have even thought once they were nearly achievable. 

Here's the list of typical requests from our experience (I'm sure you can find something sounding similar to yours).

  • How to connect 3rd-party equipment through a GPS tracker's serial port and extract payload data?
  • How to get data from non-standard sensors and customize parsing?
  • How to modify message structure to adapt to your endpoint's restrictions?
  • How to transmit BLE data via a stream if parameters should be modified?
  • How to remove privacy-sensitive data from device messages to comply with GDPR regulations?

These tasks were easily solved, and the plugins are already running as with PVM, you can enhance message processing and implement custom logic. Perfect, but what's the catch?

The only roadblock was clear—the need to learn another language, which could be too time-consuming. We understand this struggle completely—why else would we have tried to walk in your shoes during the Gurtam AI hackathon? What if you could start using PVM today, without diving into documentation or requiring specific developer skills? That's why the PVM generator was developed. 

It's 100% AI-powered, meaning it uses the latest LLM thoroughly enriched with complete PVM knowledge. It can even convert your Java, Python or any other programming code to PVM language, so you don’t need to learn anything new :) You can communicate with it like a companion—state your task, click ‘generate code’, and witness the magic in the output. Ok, how can I try it?

The PVM generator is implemented in the Tools section of the flespi panel and is designed with familiar 'request-reply' interface. For instance, you can ask to "write PVM code that processes the parameter 'ibutton.code' according to this Python function":

In a couple of seconds you get the reply:

Or another request for writing "PVM code that processes 'payload.text' parameter according to this JavaScript function":

We've made it easy for you to use this code right away. Clicking on '+ Create plugin' will take you to the plugin setup window, or you can simply copy/paste the output to use it in the plugin already set up. Done!

And of course, let us know if you need a hand, but I bet you won't have to. :)