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
- Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the
JAVA_HOMEenvironment variable. For more information on setting up
JAVA_HOMEon your OS, see Installing the Product.
- Check out system requirements section and ensure that you have all the appropriate prerequisite software installed on your system.
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.
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 longerror. 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
.zipfile is located in the
Copy the IoT Server Server zip folder to the new path you created and unzip the file there.
Example: Unzip the file in the
Sign into the Device Management console
Follow the instructions given below to start WSO2 IoT Server, and sign into the device management console:
Navigate to the WSO2 IoT Server pack's samples directory and run the
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.
Start WSO2 IoT Server by starting the three profiles in the following order:
Start the broker profile, which corresponds to the WSO2 Message Broker profile.
The default port assigned for the broker is 9446.
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.
Start the analytics profile, which corresponds to the WSO2 Data Analytics Server profile.
The default port assigned for analytics is 9445.
Access the device management console by navigating to
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.
Start the virtual fire alarm
Follow the steps given below to start the virtual fire alarm device:
If you are a new user, click Enroll New Device.
If you have enrolled devices before, click Add under Devices.
- Click Try to try out the Virtual Firealarm, which is listed under Virtual Device Types.
- Download the device:
- Click Download Agent to download the device agent.
Enter a preferred name for your device and click DOWNLOAD NOW.
Unzip the downloaded agent file and navigate to its location via the terminal.
Start the virtual fire alarm.
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 theicon , 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|
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:
Clickto monitor real-time data via the Device Details pages.
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.