1. Home
  2. Docs
  3. User Guides
  4. Avimesa.js

Avimesa.js

This guide will walk you through the process of installing Avimesa.js using a shell script, which automatically installs Avimesa.js and its dependencies. If you would rather install the files separately, for example if you plan to run Avimesa Gadget on one machine and Avimesa Sails on a separate machine, please see this document. A common development scenario would be to run Avimesa Gadget on a Raspberry Pi and Avimesa Sails on localhost with Mac or Windows until it’s ready to deploy.

Avimesa.js consists of several products:

  • Avimesa Gadget
  • Avimesa Sails
  • Avimesa 1000 Simulator

Pre-requisites for this installation:

  • Machine running Debian Linux or ARM Linux** (Avimesa Gadget currently requires one of these) ** A Raspberry Pi is a great choice
  • Zip file containing Avimesa.js Download here
  • Avimesa Messages account with your API credentials handy

Instructions:

If you haven’t already created your free Avimesa Account click here

Open a terminal window and change into the directory where Avimesa.js-1.0.zip is and run the command unzip Avimesa.js-1.0.zip

Type cd Avimesa.js-1.0 and enter

Run sudo ./install.sh

  • It may take anywhere from 5-15 minutes to install depending on your internet connection
  • This will install NodeJS, SailsJS, Avimesa Gadget and run npm install in order to install all required node_modules to run Avimesa Sails

Run ./changeCredentials.sh

  • Enter your Avimesa Api Key and Avimesa Api Password

Type cd avimesa-sailsjs then enter

Run the following command to launch the Avimesa Sails application:

sails lift

Now, open a second Terminal window

Change directory back to Avimesa.js-1.0 by typing cd ../

Run this command cd Avimesa\ 1000\ Simulator

Then run the following command to launch the Avimesa 1000 Simulator”

node index.js

Open two browser windows and navigate to one of the following:

  • on SSH to Pi – your_ip_address:8080 in one window and your_ip_address:1337 in another, or:
  • on Debian/Desktop – localhost:8080 in one window and localhost:1337 in the other

You should now have two browser windows open. The window running port 1337 should look like this, running Avimesa Sails:

And the window running port 8080 should look like this, running the Avimesa 1000 Simulator:

In the Avimesa Sails window (port 1337), login with:

  • Username: admin@example.com

  • Password: abc123

Go to Devices and click on the Device ID with which you want to send data from

Click on Add Sensor on top right of sensors info

Add a new Amp (AC) sensor on channel 1 with min reading 0 and max 5

Add a new Temp (Fahrenheit) sensor on channel 2 with min reading 0 and max 300

On the Avimesa 1000 Simulator web page (port 8080), Enter Device ID and Authcode for that device and how many messages per DELAY seconds you want to send and click Run

Click on a sensor that you added to view a chart of the sensor data you sent. You should now see a chart with data that looks something like this:

IoT temperature data chart

Note: You may install the apps individually without the Avimesa.js installer script. For instructions see the following:

Installing Avimesa Sails

Installing Avimesa Gadget