Introduction
This sample demonstrates an analysis if data that are collected on the usage of smart home appliances.
Prerequisites
Set up the general prerequisites required for WSO2 DAS, before you start.
Building the sample
Follow the steps below to build the sample.
Uploading the Carbon Application
Follow the steps below to upload the Carbon Application (c-App) file of this sample. For more information, see Carbon Application Deployment for DAS.
- Log in to the DAS management console using the following URL: https://<DAS_HOST>:<DAS_PORT>/carbon/
- Click Main, and then click Add in the Carbon Applications menu.
- Click Choose File, and upload the
<DAS_HOME>/samples/capps/Smart_Home.car
file as shown below. - Click Main, then click Carbon Applications, and then click List view, to see the uploaded Carbon application as shown below.
Executing the sample
Follow the steps below to execute the sample.
Running the data publisher
Navigate to <DAS_HOME>/samples/smart-home/
directory in a new CLI tab, and execute the following command to run the data publisher: ant
This reads the <DAS_HOME>/samples/smart-home/resources/access.log
file, and sends each log line as an event to the event stream which is deployed through the above C-App.
Viewing the output
You may use the Data Explorer or the Analytics Dashboard of the WSO2 DAS Management Console to browse published sample events.
Using the Data Explorer
Follow the steps below to use the Data Explorer to view the output.
- Log in to the DAS management console if you are not already logged in.
- Click Main, and then click Data Explorer in the Interactive Analytics menu.
- Select
ORG_WSO2_SAMPLE_SMART_HOME_DATA
for the Table Name as shown below. - Click Search. You view the published data as shown below.
Using the Analytics Dashboard
Follow the steps below to use the Analytics Dashboard to view the output.
- Log in to the DAS management console if you are not already logged in.
- Click Main, and then click Analytics Dashboard in the Dashboard menu.
- Log in to the Analytics Dashboard using
admin/admin
credentials. - You view the
Smart Home
Dashboard which is already deployed through the C-App as shown below. - Click View option of the Dashboard. It opens the
Smart Home
Dashboard with three gadgets in a new tab of your Web browser as shown below.