What is a command? Learn about how to issue commands, define states of a command, schedule commands, and define command models in the Connect Platform.
What is a device command?
Commands are exactly what they sound like: telling your device to perform an action or to give you a crucial piece of information. Device commands are a hands-free way of extending control into the field where the possibilities for carrying out tasks are endless. You may use device commands to do a multitude of things, and (almost) anything is possible. We've built Connect's device management so that the only limitation here is what your hardware can and cannot do.
An example of a command you can issue is...
- Changing the state of your asset (whether that's turning something on and off, or adjusting certain variables)
- Publishing report data from the device and/or the asset attached
- Publishing location-based data
Issue a command to a single device
- Access the “Jobs” section on the left panel on a device.
- Select the arrow in the top right-hand corner - this arrow is the “Issue a Command” Button.
- Enter the relevant information as the command for the device.
- Select “ISSUE COMMAND”.
- Command. The remote procedure to call. The action or operation you want the device to perform.
- Arguments. A comma-separated list of arguments to pass to the remote procedure call. Specifications that are used to customize and target the commands.
- Peripherals. The name of the targeted peripheral that should receive this command. By default, this value will be "0" meaning no peripheral is targeted, and the device itself is the intended receiver of this command.
- Time to Live. The time for this command to remain alive. After this time has expired, the system will mark such unacknowledged commands as "TIMED OUT", and this command should be ignored.
States of a Command
- "Completed". The device received and acknowledged the command.
- "Timed Out". The system marks a command as timed out when it does not receive an acknowledgment from the device within the specified Time to Live period.
How to schedule commands for the future:
- You can schedule a command for future delivery using the “BULK ACTION” Button.
- However, you can select one device using the left-hand box system and select “BULK ACTION”.
- For more information refer to Campaigns.
Command Models
A Command Model is a collection of formal commands that are known to be supported by a device. The device is programmed to interpret these commands and perform basic actions depending on the command. Commands are codes the device understands.
With a command model, each of the commands is pre-defined and presents the required arguments for a particular remote procedure call. Some validation and checking can be done on the input to confirm the parameters are as the device expects.
- Navigate to the device.
- Select the “Jobs” menu item in the left panel.
- Select a command from the drop-down menu under the Commands icon. You can filter this menu by typing the name (or part of a name) of a command.
- Select the command you wish to send.
Different command models have different purposes. New ones can be created for different devices, or for different companies with different needs. A good example is how the MobiGo 4+ and MobiGo 2 command models are very similar, just that the MobiGo 2 has no print capabilities and so the commands that make the device print something have been removed.
Find out where commands models are (and how to change them) here.