This documentation is for WSO2 IoT Server 3.0.0. View the documentation for the latest release.
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.
Quick Start Guide - IoT Server 3.0.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This section gives you a quick understanding of how to connect your device to WSO2 IoT Server and start using it. For this purpose, let's use the virtual fire alarm.

The virtual fire alarm is a virtual device that mimics the functionality of a real fire alarm. Therefore, for this use case you do not need a real device. Once you start the virtual fire alarm, it will connect to the WSO2 IoT Server and push the temperature readings it collects. The device supports MQTT and XMPP communications and is configured to use MQTT by default.

The following subsections explain how you can work with the virtual fire alarm:

Download WSO2 IoT Server

  1. Download WOS2 IoT Server from the here.

  2. Copy the downloaded file to a preferred location and unzip it.

    The unzipped file will be called <IoT_HOME> throughout this documentation.

Sign into the Device Management console

Follow the instructions given below to start WSO2 IoTS, and sign into the IoTS device management console:

  1. Navigate to the WSO2 IoT pack plugins and run the sample-deployer.xml.
    Example:

    cd <IoT_HOME>/plugins
    mvn clean install -f plugins-deployer.xml

    This step is only required if you are running WSO2 IoT using a pack after IoT-1.0.0-ALPHA2.

  2. Navigate to the bin directory and start WSO2 IoT.
    Example:

    cd <IoT_HOME>/bin
    ./start-all.sh
  3. Access the device management console by navigating to https://<HTTPS_HOST>:<HTTPS_PORT>/devicemgt.
    Example: https://localhost:9443/devicemgt 

  4. Enter your username and password.
    If you are new to using WSO2 IoTS, you need to first register with IoTS before you can to log into the WSO2 IoTS device management console.

     Click here for more information on registering with WSO2 IoTS.

    Follow the instructions given below to register with WSO2 IoT:

    1. Click Create an account.
    2. Fill out the registration form.

      • First Name: Provide your first name.
      • Last Name: Provide your last name.
      • Username: Provide a username. It should be at least 3 characters long with no white spaces.
      • Email: Provide a valid email address.
      • Password: Provide a password. It should be at least 8 characters long.
      • Confirm Password: Provide the password again to confirm it.
    3. Click Register.

  5. Click LOGIN

Start the virtual fire alarm

Follow the steps given below to start the virtual fire alarm device:

  1. Click Enroll New Device.
  2. Click Virtual Firealarm.
  3. Download the device:
    1. Click Download to download the device agent.
    2. Enter a preferred name for your device, select the simple or advanced agent option, and click DOWNLOAD NOW.

      The name must be at least 4 characters long.

  4. Navigate to the location of the unzipped device agent file.
    Example: Navigate to the device agent file that is in the <IOTS_HOME>/device_agents/virtual_firealarm directory.

    cd <IOTS_HOME>/device_agents/virtual_firealarm
  5. Start the virtual fire alarm.

    sh start-device.sh

    Once you start your virtual fire alarm, the fire alarm emulator will pop up.

    If you set the Protocol to XMPP, you need to enable XMPP communication on WSO2 IoTS, as it is disabled by default. To enable XMPP communication, open the xmpp.properties file that is in the <IoTS_HOME>/repository/conf/etc directory and configure XMPP by defining enabled=true as shown below:

    enabled=true
    host=localhost
    port=5222
    admin.username=admin
    admin.password=admin
    serverName=localhost

Try out the virtual fire alarm

Once you start your virtual fire alarm, you can try out the following actions:

ActionDescription
View device details

Click Control Device on the fire alarm emulator to view the device details, carry out operations, and monitor real-time data.

Ring the fire alarm
  1. Click Buzzer On/Off under Operations on the Device Details page.
  2. Enter On to ring the fire alarm, enter MQTT or XMPP as the protocol, and click Send to Device. Enter Off to stop the ringing.

View real-time and historical data

When you adjust the temperature and humidity values in the virtual fire alarm emulator you can see the data in real-time or view historical data by following the steps given below:

  • Click View Device Analytics to monitor real-time data via the Device Details pages.

    Or
  • Click View Device Data on the Fire alarm emulator to view the historical data.

What's next?

Follow the options given below to see what you can do next:

  • Do you have an Android device? Try out the Android Sense device type supported by default on WSO2 IoTS. For more information, see Android Sense.
  • Want to try out more devices? Connect the devices listed below to WSO2 IoTS and try them out.
  • Need to create a new device type and connect it to WSO2 IoTS? For more information, see the Device Manufacturer Guide.
  • No labels