This documentation is for WSO2 IoT Server 3.1.0. View the documentation for the latest release.
Enterprise IoT solution - IoT Server 3.1.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

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:

Before you begin

Download WSO2 IoT Server

  1. Download WSO2 IoT Server.

    Tip: If you want to try out the advanced device search capabilities, download the WSO2 IoT Server 3.10-Update1 pack and try it out.

  2. Copy the downloaded file to a preferred location and unzip it. The unzipped file is called <IOTS_HOME> throughout this documentation.

    • The downloaded WSO2 IoT Server file is large. Therefore, when unzipping, it might extract halfway through and stop. To avoid this, we recommend that you unzip the file via the terminal.

    • The maximum character count supported for a file path in the Windows OS is 260. If this count is exceeded when extracting the pack into a directory, you will get the Error 0x80010135: Path too long error. To overcome this issue use the commands given below:
      • Create a substring and map the current file path to it.
        In the example given below, the WSO2 IoT Server .zip file is located in the C:\Users\Administrator\Downloads\pre-beta directory.

        C:\Users\Administrator\Downloads\pre-beta>subst Y: C:\Users\Administrator\Downloads\pre-beta
      • Copy the IoT Server Server zip folder to the new path you created and unzip the file there.
        Example: Unzip the file in the Y: directory.

Sign into the Device Management console

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.

    Why 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.


    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.

      cd <IOTS_HOME>/bin
      cd <IOTS_HOME>\bin

      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.


      The default port assigned for the core is 9443.

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


      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.

     Click here for more information on registering with WSO2 IoT Server.

    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

    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.

    ./ --> 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:

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.
  • No labels