MMI126818 - Security Issues in Internet of Things (IoT) Assignment

Download Solution Order New Solution

Assignment Task

Overview

This coursework makes use of environmental data sourced from a set of two sensors located at a specific geographical location. The data is to be sent to Google Cloud, via a single IoT device representation.

This section of the specification provides an overview of what is to be delivered. Later sections detail the requirements.

The IoT configuration is to be as follows:

  • Your own PC running Node-RED.
  • A newly created Google Core IoT device representation for the two sensor devices.

The Google Cloud architecture includes the following:

  • A Node-RED application on a VM that provides the following features:
    • Data analysis that utilises data stored in a Firebase database.
    • Visualisation of data.
    • A Google Map with a marker representing the sensor location.
      • Some data is to be made available in the marker InfoWindow.
    • A Slack messaging interface for the transmission of regular messages relating to environmental conditions.
  • A Google Cloud function that writes data to a Firebase database.

2 The sensor data

  • The data is provided in a spreadsheet.
  • In the spreadsheet each row of data represents sets of data for two sensors, with each set of sensor data given a timestamp in two formats:
    • A human readable format:
      • Date of the sensor readings.
      • Time of the sensor readings.
    • A Unix timestamp that matches the Date and Time data.
      • You will already be familiar with this as used within Node-RED.
    • Node-RED code is provided to read from a spreadsheet and emit one set of sensor readings for each unit of time. In this way we can use the code to simulate individual sets of sensor readings, delivered over time.

Task

1. Creating and deploying a Google Core IoT device for use with the sensor data

Part (a) of this task represents a common challenge, interpreting the functionality of some new code that you are given.

  • You are provided with the Node-RED code and a spreadsheet.
    • The spreadsheet represents a range of sensor data (two sensors) for specific dates/times.
  • The code should be deployed to your PC Node-RED.
  • The code requires the following Node-RED library to be installed first:
  • node-red-contrib-spreadsheet-in

Explain the purpose of each part of the supplied code. Your description should start with the first node and follow through in-sequence to the final node. You can refer to the ‘Help’ information provided for each node-type.

  • Within the Google Cloud Console create:

    1. A new Google Core IoT registry.

    2. Within that registry create a new Google Core IoT device representation. You should create a relevant name for the device representation. You should include Pub/Sub topics for Telemetry and State.

    3. Pub/Sub subscriptions for the Telemetry topic and the State topic.

To evidence this, provide screenshots.

  • Each screenshot must contain the browser URL bar and contain the full width of the browser window.
  • The following screenshots must be shown:
    • ‘Registry Details’, including the configured topics.
    • The registry entry for the new device that you have created.

Describe how you set up this new Google Core IoT device on your PC Node-RED implementation for sending both Telemetry and State messages. Discuss all configurations, including authentication.

Examine the spreadsheet from start to finish. You will see that for some rows in the spreadsheet, the sensor entries have values that are unusable.
Extend the original code so that it ignores the rows with unusable values, rather than emitting these values at the end of the flow.

2. Using the sensor data on Google Cloud

  • There is a requirement to view the sensor data on Google Cloud Node-RED. You should already have deployed code to view data on Dashboard charts, within the Week 7 laboratory Dashboard example.

Create a Cloud Node-RED flow that includes the following:

  • Subscribes to the IoT device Telemetry messages only . Do not subscribe to State messages in your Node-RED application. The Telemetry data must come from the IoT device (on your PC), via the Google Core IoT service.
  • Provides a Node-RED dashboard with two charts (one for each sensor) that contain the data arriving from the IoT device.
    • The charts should be correctly labelled and should each show the last 100 data points received.
    • You can ignore the timestamp received from the Telemetry messages
  • Provide a Google Maps web page within the Cloud Node-RED application. On that page you should provide a marker at the following location:
    Within that marker you should provide an InfoWindow that contains the latest sensor data from the two sensors, clearly labelled.
  • One of the laboratory sessions deals with creating a Cloud Function to store IoT data into a Firestore database, on a particular database ‘Collection’. Based on that exercise you should do the following:
  • Create a new Cloud Function that is triggered by messages from the Pub/Sub ‘State’ topic that you have created (Note: we are not triggering from the Telemetry messages).
  • This Cloud Function should save IoT State messages that arrive. This Cloud Function code is very similar to the functionality of the previous Cloud Function within the lab session, and you will need a new database collection . Please ensure that you store the entire contents of the payload of the received message.
  • Send a set of ‘State’ messages from the IoT device to be processed by the Cloud Function and stored in the database collection. These will be used for subsequent database queries.
  • A set of analytic operations is required within the Cloud Node-RED application, to deliver insights into the received sensor data. The interface to these operations must be on the same Node-RED dashboard as delivered for Section 4 Part (a).

The specific requirements are:

  • Delivery of a set of Node-RED dashboard buttons that trigger relevant operations to deliver the following analysis, as dashboard text outputs. The analytical operations are listed below.
    Note: The analysis must be based upon database queries, followed by any other analytical operations (if required).
  • There should be a separate dashboard button and dashboard output for each of the following:
  • The highest value of nitric_oxide within the entire set of stored data.
  • The highest value of nitrogen_dioxide between two dates.
    • The dates should be selected on the dashboard using date-selector code.
      • This code is available in the import file : ‘Node-RED_dates.txt’ supplied in the folder linked on Page 2 of this document.
    • The most recent value of nitric_oxide.
      • This value should also be sent in a message to a Slack channel. The message should describe what data is being sent.
    • The median value of nitrogen_dioxide between two dates.
      • Use the date-selector code to set the date.
      • Use an appropriate node that will yield the ‘median’ statistic

This MMI126818Engineering has been solved by our PHD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.