Reference no: EM132962323
Internet of Things
IoT Device
2.1 Description of supplied Node-RED flow
(a) The supplied Node-RED flow in Appendix A of the Technology Specification document contains a Node-RED function node with the code shown below. Please explain all aspects of the function code, from receiving a message until returning.
// Array of simulated temperatures
var temp1 = [15, 17, 18.5, 20, 21.5, 23, 24, 22.2, 19, 1];
// Array of simulated relative humidities
var humidity1 = [50, 55, 61, 68, 65, 60, 80, 70, 62, 53];
var counter1 = context.get('counter1') || 0;
counter1 = counter1 + 1;
if (counter1 > 9)
counter1 = 0;
context.set('counter1', counter1);
msg = {
payload:
{
d: {
"temperature": temp1[counter1],
"humidity": humidity1[counter1]
}
}
};
return msg;
(a) Provide a screenshot of the entire deployed IoT Device flow on PC (or Mac). This screenshot should show all elements of the flow and should also show that that the Watson IoT node and MQTT node are connected.
(b) Provide the complete exported flow code for the IoT Device.
2.2 Watson IoT Service.
(a) Describe the creation of the Watson IoT Service device entry, including the creation of the device-type.
(b) Show the credentials that are returned for the creation of device: ‘CW2Dev1'. Explain why (on first creating these) you should store these credentials securely. Please provide a text version of these credentials - not a screenshot.
(c) After sending several data entries to the Watson IoT Service, provide a screenshot of the CW2 Board, showing all three Cards.
2.3 Execution of the IoT Device Application
(a) Take a screenshot of the IoT Device Node-RED Debug panel output for the case where the temperature value is > 23 and the panel shows a copy of the object sent. Please expand the object on the panel so that all fields can be seen. The date-time of the Debug output should also be visible.
(b) Take a screenshot of the IoT Device Node-RED Debug panel for the data received by the MQTT input (from IBM Cloud) in response to this ‘high-temperature' situation in part (a) directly above. Please expand the object on the panel so that all fields can be seen. The date-time of the Debug output should also be visible.
IBM Cloud Node-RED Application
(a) Provide a screenshot of the Dashboard chart showing a history of at least 10 pairs of values for temperature and humidity.
(b) Provide a screenshot of a Debug output that shows a copy of the incoming message received from the IoT Device, that triggers your flow to send to your Slack channel. Please expand the object on the panel so that all fields can be seen. The date-time of the Debug output should also be visible.
(c) Provide a screenshot of a Debug output that shows a copy of a message sent to your Slack channel. Please expand the object on the panel so that all fields can be seen. The date-time of the Debug output should also be visible.
(d) Provide a screenshot from your Slack channel, showing the message received via the message sent in part (c) above.
(e) Provide a screenshot of a Debug output that shows a copy of the incoming message received from the IoT Device, that triggers your flow to write to the Cloudant database. Please expand the object on the panel so that all fields can be seen. The date-time of the Debug output should also be visible.
(f) Provide a screenshot (from the Cloudant database service) of the contents of the specific document inserted into the database in response to the example data in part (e) above.
(c) Provide a screenshot of the entire deployed Node-RED IBM Cloud flow. This screenshot should show all elements of the flow and should show that the IBM IoT node and MQTT node are connected.
(g) Provide the complete exported flow code for the IBM Cloud Node-RED application.
Attachment:- Internet of Things.rar