1. Home
  2. Docs
  3. User Guides
  4. Avimesa Gadget (Virtual Device Client)

Avimesa Gadget (Virtual Device Client)

Avimesa Gadget is a virtual device that can be run from the command line on a Linux-based device, like a Raspberry Pi for instance, or using Localhost. This allows developers to get started building Avimesa-based Industrial IoT projects without the need for an Avimesa 1000. You can also attach it to other Linux programs and processes using STDIN/STDOUT and named pipes. Primary uses include connecting to sensor processes and directly communicating with Avimesa Messages via a prompt.

Instructions to install and run Avimesa Gadget:

  1. Create Avimesa Account if you haven’t already.
  2. Download Avimesa Gadget and unzip the files.
  3. Run sudo ./install.sh
  4. Run man avmsagadget to check if installed correctly and to view some instructions on how to use Gadget
  5. Run avmsagadget to begin using the Command Line Interface
  6. Use one of the DeviceID's and Authcodes from your Avimesa Account to send sample messages to our cloud

How to use Example:

  1. Open ExampleInput in a text editor and replace <Enter Device ID Here> and <Enter Authcode Here> with the device ID and Authcode that you want to use.
  2. Replace val in the JSON data above with values you’d want sensors to read between .004 and .02.
  3. On the command line run avmsagadget < exampleInput
  4. This will run avmsagadget and pipe in, line by line, the inputs that you would normally type in. Using this format allows you to not have to manually type in a whole JSON.

Notes:

  • You can run man avmsagadget to view the man page for Avimesa Gadget

  • To send a message you must have a valid DeviceID, Authentication Code, and our Valid JSON format (View the Example.json). You will want to change the “dev_id” key into your personal Dev_ID and change the channel data val to 4-20mA ranges for whatever sensor data you would like to use. They should be within range .004 and .02

  • You can run Avimesa Gadget through CLI or through Pipe files

  • To view more information on how to run gadget, you can also run avmsagadget through CLI with avmsagadget then type help to see the commands available and how to use them.

  • When using the -p option, all stdin, stdout, and stderr are redirected to the name you give with -p. You must then open another terminal window and write to these named pipe files. To properly exit, you can write to the namegiven.in pipe file the word exit.

Example:

cat > namegiven.in
exit

Avimesa Gadget is available as a free download.