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.
- Once these requests are reached by the IOT Brokers, they have to propagate them to the IOT Devices which in turn have to execute the commands and provide back the ACK in somehow. The commands received have to be manifested in somehow to complete the test. (not yet available)At the moment we implemented the possibility for the IoT Broker to act on its IoT devices through NodeRED Dashboard Block Command →
- → IOT Broker 1 → IOT Device A.
- → IOT Broker 1 → IOT Device A, IOT Device B.....
- → IOT Broker 2 → IOT Device 4325, IOT Device 1234124.....
- → NodeRED Dashboard Block Command (COLLECTION OF THE RESULT)
You can start testing this requirement by following the sequence of actions:
- Open a Flow in your cloud (TC2.1a) IotApplication
- 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).
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.