Test Case Title |
TC2.10 - IOT Protocol Notifications |
Goal |
The Notification modality is an action towards devices performed by IOT Brokers. The IOT Device is acted to change status receiving a new value, for instance. It is quite similar to the Command, a part for the fact that the IOT Broker does not expect to have a feedback from the IOT Device, and the Notification is performed 1:1. |
Prerequisites |
Using a PC or Mobile with a web browser. 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 gathers notifications triggered by a device when a value of it changes |
Steps |
|
The Notification modality is the typical action towards devices performed by IOT Brokers. The IOT Device is acted to change status receiving a new value, for instance. It is quite similar to the Command, a part for the fact that the IOT Broker does not expect to have a feedback from the IOT Device, and the Notification is performed 1:1.
- For example: a user acting on some device state “light on”, “light at 30%”, “beep” and this notification is propagated toward the real device/actuator.
- Dashboard Widget (or NodeRED Dashboard Block) → IOT Broker →
- IOT Device (a Command can be sent to read again)
- The IOT device for receiving Notification has to subscripted to IOT Broker notificator associate to the Dashboard Widget Entity
You can start testing this requirement by following the sequence of actions:
- Click on url https://iot-app.snap4city.org/nodered/nr5
- [sign in with Snap4City account]
- You see a dashboard with different tabs labelled according to the four steps at the base of our communication pattern.
- By using this link https://iot-app.snap4city.org/nodered/nr5/?#flow/8f6adc46.97ea5 or clicking on the tab: Notification, the canvas presents a flow that subscribes a sensor (test_sensor 02) of type Thermometer. Any time a value of the attribute "temperature" changes, a notification is sent to the Context Broker and visualized on the debug console. As said for the operation “Command” it is now possible to act for sending commands to other devices.
- Input Block in NodeRED application → data transformation → NodeRED application Dashboard
- To test click on the link to see a live example with an analog cursor acting on IOT Orion Broker as actuator, and actuator on dashboard:
- https://www.snap4city.org/view/index.php?iddasboard=MjIx