Measurements to Cloud

Access to Reference Systems

The available reference systems are collected within the Reference Systems team. If you are not already a member, join this public team to get access to the included systems and libraries.

Learn more about importing blocks and joining teams.


These applications show how to upload measurements to popular cloud services. It consist of three applications:

  1. The Simulator application that generates syntetic data for the two other applications.
  2. The To Xively application is uploading these syntetic data to Xively
  3. The To Airvantage application is the upload these syntetic data to AirVantage

These applications uses MQTT for interprocess communication


Download this project and edit the config/demo-config.ini file

MQTT usage:

  1. Make sure to select your own publishing topic
  2. If wanted, change address of MQTT-broker

For Xively usage (skip this if you do not want to test Xively):

  1. Login in to your Xively account and create a device.
  2. On the device you must add these channels: Voltage, Current, Power and Windspeed
  3. Add Feed ID and Device key to ini-file

Read more about Xively API here

For AirVantage usage (skip this if you do not want to test AirVantage):

  1. Login to your Airvantage account and create a system to upload to following the instructions in this document. The project contains a model (in config folder) that you can use to generate your own “App”. Note that serial number should not contains any spaces and that if you change the model, the same changes must be done in Publish Airvantage block.
  2. Add serialnumber and password to ini-file

Read more about AirVantage publishing here and here

Instructions for use

  • Locate Simulator block.
  • Press Build and select J2SE environment
  • Execute the generated project
  • Watch window on screen, make sure there are no errormessages.
  • Keep this application running
  • Repeat for To Xively and/or To Airvantage, make sure there are no error messages.
  • You should now see data appearing on either (or both) cloud service.
  • Each application is stopped by pressing exit button.


Open the system block called Simulator:

Alt text

You will notice a periodic timer on the right side of the diagram. A tick is emitted from this timer once a second. Follow this tick through the block and you will understand how data are published to MQTT.

Open the system block called To Xively or To Airvantage:

Alt text

You will notice a Subscribe MQTT on the left the diagram. A sample is emitted from this block once when received from the MQTT broker. Follow this sample through the block and you will understand how data are published.

The Display blocks display values. It is not important, but added to show activity. Closing any of them will stop the system.