Professional Documents
Culture Documents
Internet of Things CW2 RESIT Session 2020-21 Submission Document
Internet of Things CW2 RESIT Session 2020-21 Submission Document
Internet of Things CW2 RESIT Session 2020-21 Submission Document
First Name
Surname
Student ID
Date
I declare that this coursework is an original piece of work that has been created only by me. The
work is not based on previous coursework that has been submitted as part of another module or
submitted to another academic programme of study.
I also declare that I have read and understand the guidance on plagiarism that is provided on the
web pages (and the linked pages) at:
1. https://www.gcu.ac.uk/library/smile/plagiarismandreferencing/
2. https://www.gcu.ac.uk/student/support/induction/essentials/itguide/plagiarism/
3. Section 9.6 and related sections of:
https://www.gcu.ac.uk/media/gcalwebv2/theuniversity/gaq/dogfiles/senate/Code%20of
%20Student%20Conduct%202017-18%20GBV%20Policy%20update
%20120218%20FINAL%20UPDATED%20SPSO%20ADDRESS%2018.12.18.pdf
Note that the submitted file must be named in the following format:
<SURNAME>_<FIRSTNAME>_CW2_REPORT.docx
If any of the name fields are not applicable for your GCU-registered name then please insert a ‘-‘
(dash) character for that field.
!!!! Please use this document as the template for submission. It is expected that all MS Word styles
and headings will remain exactly as they appear in this template. Please insert the answer directly
below each question. Keep all headings and the text of each question within the document. !!!!
Page 1 of 5
V 0.1 16th June 2021
1 Instructions
The submission is based upon the specification provided in the document: ‘Internet of Things CW2
RESIT Session 2020-21 Technology Specification.docx’.
2 IoT Device
(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.
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.
Page 2 of 5
V 0.1 16th June 2021
(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.
(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.
(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.
Page 3 of 5
V 0.1 16th June 2021
(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.
Page 4 of 5
V 0.1 16th June 2021
Page 5 of 5