Creating command templates
Who can do it: Service provider
Where: Wialon Platform Studio
Command templates are reusable configurations that allow you to define a command once and apply it to many different devices. They are especially useful for managing fleets supporting different device models, as a single template can contain the same command for different device models.
First, you need to create the template itself, which will act as a container for your commands.
-
In Wialon Platform Studio, expand the Resources section in the navigation menu.
-
Open the Command templates page.
If you haven’t created any command templates yet, click Add first command template on the empty page.
-
Click the New template button to create a new command template.
-
On the General tab, enter a descriptive name for the template (for example, Engine lock or Request video clips).
-
(Optional): In the Description field, add more details about the template’s purpose.
-
Click Save.
After saving, you will be redirected to the template properties, where you can start adding specific commands.
Adding commands to the template
Once the template is created, you can add commands to it. A template can hold commands for many device models, but only one command for each model.
-
After creating the template, go to the Commands tab.
-
In the Add command for: field, select a device model from the dropdown list. For example, Teltonika FMC130.
-
Click the icon
to add a command configuration block for the selected model. The icon is unavailable until you select a model, and also if the template already has a command for this model.
-
From the Command dropdown list, select the command you want to add (for example, Get configuration param or Custom command). The list of available commands depends on the device model.
-
Set the parameter values. They are sent to the device exactly as saved here, so fill in every required parameter. Otherwise, the command fails when it runs, and the user gets an error message.
-
(Optional): In the Ttl field, specify the command’s “time to live” in seconds. This is how long the command waits in the queue for the device to execute it before it expires. For a new command block, the default value is 60.
-
Click Save within the command block to save its configuration.
-
To add commands for other device models to the same template, repeat steps 2-7.
Each command block is saved separately with its own Save button. The Save button on the General tab saves only the template name and description.
Once created, you can use these command templates in automations or make them available to users by adding the Execute command widget in Wialon Platform FleetSpace. To run commands from the widget, users also need the Send commands permission for the device.