This documentation is for WSO2 IoT Server 3.1.0. View the documentation for the latest release.
Page Comparison - Enterprise IoT solution (v.37 vs v.38) - IoT Server 3.1.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section gives you a quick understanding of how to connect your device to WSO2 IoT Server as an enterprise IoT solution 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:

Table of Contents

Tip
titleBefore you begin

Download WSO2 IoT Server

Excerpt Include
Downloading the Product
Downloading the Product
nopaneltrue

Sign into the Device Management console

Excerpt

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

  1. Navigate to the WSO2 IoT Server pack's samples directory and run the device-plugins-deployer.xml file.

    Info
    titleWhy is this needed?

    Before enrolling devices with WSO2 IoT Server you need to have the device type plugins created. The Android, Android Sense, Windows, and Android Virtual Device sample device type plugins are available by default on WSO2 IoT Server. You need to run the command given below to create the Raspberry Pi, Arduino, and Virtual Fire Alarm sample plugins.

    For more information on writing your own device plugin, see Writing Device Types.

    Example:

    Code Block
    cd <IOTS_HOME>/samples
    mvn clean install -f device-plugins-deployer.xml
  2. Start WSO2 IoT Server by starting the three profiles in the following order:

    1. Start the broker profile, which corresponds to the WSO2 Message Broker profile.

      Localtab Group
      Localtab
      activetrue
      titleLinux/Mac/Solaris
      Code Block
      cd <IOTS_HOME>/bin
      ./broker.sh
      Localtab
      titleWindows
      Code Block
      cd <IOTS_HOME>\bin
      broker.bat

      The default port assigned for the broker is 9446.

    2. Start the core profile, which corresponds to the WSO2 Connected Device Management Framework (WSO2 CDMF) profile.

      Localtab Group
      Localtab
      activetrue
      titleLinux/Mac/Solaris
      Code Block
      ./iot-server.sh
      Localtab
      titleWindows
      Code Block
      iot-server.bat

      The default port assigned for the core is 9443.

    3. Start the analytics profile, which corresponds to the WSO2 Data Analytics Server profile.

      Localtab Group
      Localtab
      activetrue
      titleLinux/Mac/Solaris
      Code Block
      ./analytics.sh
      Localtab
      titleWindows
      Code Block
      analytics.bat

      The default port assigned for analytics is 9445.

  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 IoT Server, you need to first register before you can to log into the WSO2 device management console.

    Expand
    titleClick here for more information on registering with WSO2 IoT Server.
    Panel
    borderColor#6A98FA
    bgColor#ffffff
    borderWidth1

    Follow the instructions given below to register with WSO2 IoT Server:

    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. If you are a new user, click Enroll New Device

    Info

    If you have enrolled devices before, click Add under Devices.

  2. Click Try to try out the Virtual Firealarm, which is listed under Virtual Device Types
  3. Download the device:
    1. Click Download Agent to download the device agent.
    2. Enter a preferred name for your device and click DOWNLOAD NOW.

  4. Unzip the downloaded agent file and navigate to its location via the terminal.

  5. Start the virtual fire alarm.

    Code Block
    ./start-device.sh --> For Linux/Mac/Solaris
    start-device.bat --> For Windows

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

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 the icon , and click Device Management. Select the virtual fire alarm device you created from your devices and view the device details, carry out operations, and monitor real-time data.

Ring the fire alarm
  1. Click Control buzzer under Operations on the Device Details page.
  2. Select the Buzzer On option and click Send to Device, to ring the fire alarm. The Alarm Status on the Fire Alarm Emulator indicates that the fire alarm is ringing.

    Similarly, select the Buzzer Off option and click Send to Device, to stop the ringing. The Alarm Status on the Fire Alarm Emulator indicates that the fire alarm is no longer 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  to monitor real-time data via the Device Details pages.

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 IoT Server. For more information, see Android Sense.
  • Want to try out more devices? Connect the devices listed below to WSO2 IoT Server and try them out.
  • Need to create a new device type and connect it to WSO2 IoT Server? For more information, see the Device Manufacturer Guide.