TC2.9 - IOT Protocol Commands

Test Case Title

TC2.9 - IOT Protocol Commands

Goal

The Commands modality consists in the fact that the IOT Broker (or the whole set of IOT Brokers of the solution/ infrastructure) has to be capable to send at one or at a set of IOT Devices the same command to perform some activity

Prerequisites

Using a PC or Mobile with a web browser. You need a Snap4City account. Sensors and actuators for writing.

The following functionalities are available only for a specific Snap4City account with specific privileges.

Expected successful result

Generation of a flow that checks the value of devices. According to specified conditions on these values, the values of other devices can be modified

Steps

 

 

The Commands modality consists in the fact that the IOT Broker (or the whole set of IOT Brokers of the solution/ infrastructure) has to be capable to send at one or at a set of IOT Devices the same command to perform some activity.

  • For example, “please refresh your value”, “please force the sending of a new value”, “please restart”, “Get me a value now!”, “Get me the actuator value set now ?”, etc.
    From the point of view of the platform, the different IOT Devices can be managed by multiple IOT Brokers so that the abstraction 1:N has to be performed at higher level.  This means that once identified the set of IOT Devices with IOT Discovery (e.g., query on KB to get all temperature sensor in the city), the list of them is sent to the IOT Application using the NodeRED Block executing/implementing the “Command Request” which decomposes the request in multiple “Command Requests” to multiple IOT Brokers.
  • Open a Flow in your cloud (TC2.1aIotApplication
  • To be able to test the flow you have to register two new devices (also virtual) as described  on the site following the TC 2.11: you must register a device with model Thermometer and a device with model AirConditioner. Once registered you can download the certificates of the devices (private key and certificate) and the authority certificate (download here) and insert them in the configuration of the node. In the first yellow node you must insert the thermometer data, in the following yellow nodes you must insert the AirConditioner data. You can import the flow "TC2.9 - IOT Protocol Commands" with the steps described in TC2.13 (on cloud) or import it from a file (if you have not an IOT Application on cloud).
    https://lh5.googleusercontent.com/S2rO5_25M8IadIYOWm2NPBC2yADCfb2uU9VApIB5TkP_7DkTpvnvyW9MvxSkRN57YrcgOXtz4cwIU7cEyCk2HT4gPQWhA4UxEFbgnhH0rbA_I5igGIUoKkj8_L3gRkrxoscbn-aqBphGWg1SDQ
    that allows you to check the value of the thermometer). If the temperature is greater than 22 degree, the air conditioner (the device registered in the Context Broker) is turned on otherwise is turned off.