Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 8

...

  1. Click Enroll New Device.
  2. Click Try to try out the Virtual Firealarm.
  3. Download the device:
    1. Click Download Agent to download the device agent.
    2. Enter a preferred name for your device (e.g., "FireAlarm"), select the simple or advanced agent option, and click DOWNLOAD NOW.

      Tip

      Tip: Avoid using spaces or other characters for the device name.

      Info
      • Using the Simple Agent you can try out basic functions mentioned under the Try out the virtual fire alarm section of the Simple Agent tab
      • Using the Advanced Agent, you can define policies on the device based on the policy enforcement criteria, and also try out the functions mentioned under the Try out the virtual fire alarm section of the Advanced Agent tab.

...

Localtabgroup
Localtab
activetrue
idsimpleagent
titleSimple Agent

Follow the steps below to start the simple agent fire alarm.

  1. Navigate to the location of the unzipped device agent file on your terminal.
    Example: Navigate to the device agent file, which is in the <IOTS_HOME>/device_agents/virtual_firealarm directory.

    Code Block
    cd <IOTS_HOME>/device_agents/virtual_firealarm
  2. Start the virtual fire alarm.

    Code Block
    sh start-device.sh

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

Anchor
simple_agent_tryout
simple_agent_tryout
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 Image Modified 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.

Image Modified

Ring the fire alarm
  1. Click Control buzzer under Operations on the Device Details page
    Image Modified
  2. Enter On to ring the fire alarm, and click Send to Device. Enter Off to stop the ringing.
    Image Modified
Localtab
idadvancedagent
titleAdvanced Agent

Follow the steps below to define a policy for the fire alarm device and start the advanced agent fire alarm.

  1. Click the icon, and click Policy Management.

  2. Click Add New Policy and select the Virtual Fire Alarm platform.

  3. Configure a policy using the Siddhi Query Language and click Continue.
    The following is an example of a policy you can use for the Fire Alarm device. See  Adding a Policy for more information on how to add your own policy.

    Code Block
    define stream fireAlarmEventStream (deviceID string, temp int);
    from fireAlarmEventStream#window.time(3010 sec)
    select deviceID, max(temp) as maxValue
    group by deviceID
    insert into analyzeStream for expired-events;
    from analyzeStream[maxValue < 50]
    select maxValue
    insert into bulbOnStream;
    from fireAlarmEventStream[temp > 50]
    select deviceID, temp
    insert into bulbOffStream;
  4. Assign the policy to user roles or users and select an action to be triggered upon non-compliance.
    For example, you can assign the policy to the admin user role and select Enforce as the action upon non-compliance. For more information, see Adding a Policy.
  5. Enter a name and description for the policy and click Publish.

    When you start the fire alarm device, this policy will be assigned to the device.
  6. Navigate to the location of the unzipped device agent file on your terminal.
    Example: Navigate to the device agent file, which is in the <IOTS_HOME>/device_agents/virtual_firealarm directory.

    Code Block
    cd <IOTS_HOME>/device_agents/virtual_firealarm
  7. Start the virtual fire alarm.

    Code Block
    sh start-device.sh

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

Anchor
advanced_agent_tryout
advanced_agent_tryout
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 Image Modified 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.

Image Modified

Ring the fire alarm
  1. On the emulator, enter a temperature lower than 50°. The buzzer will start ringing.
  2. Enter a temperature higher than 50° to stop the ringing.

Note that the buzzer now works according to the policy you defined above.

View real-time and historical data

...