Reference no: EM132374962
Designing User-centric IoT applications
ParkSmart (Smart Parking Recommender): An Overview
In this assignment, you will implement a web application that consumes real-time sensory data coming from parking sensors and provides a dashboard to monitor current status of on-street parking in the City of Melbourne. Furthermore, this application assists drivers in finding carparks by providing related information, that is, working on a smartphone in a web-browser.
Task 1: Invoking public web APIs:
A weather API will be used to provide the weather information (i.e. temperature and weather condition like rain, shower, cloudy, sunny) for a location. You need to call the right API methods and pass the right parameters, and then parse the JSON response to retrieve the current temperature.
The current temperature value will be displayed in the Dashboard when drivers search for a carpark.
These are some examples of weather APIs below, but you can find and use any other weather API. Make sure you use the free access.
Open Weather Map
World Weather Online's weather
Task 2 Parking Information and Status:
City of Melbourne has around 3000 in-ground on-street parking sensors which indicate if a parking bay is occupied or not. This information is available online through City of Melbourne's Open Data Platform1. Moreover, the Open Data portal also offers data about all parking signs and restrictions in Melbourne CBD. The Open Data portal provides programmatic access to these datasets including the ability to filter, query, and aggregate data.
Students should familiarise themselve with these APIs, and develop a search method that accepts geo- coordinates of a location (latitude and longitude) and returns live information about up to 10 parking locations within the radius of 500 meters from the provided location. This method should consume the APIs provided in Table 1, and produce the following information for each parking bay in JSON format:
• Bay ID: The unique ID of the parking bay where the parking sensor is located
• Parking Status: The status will either display: Occupied - A car is present in the parking bay at that time. Unoccupied - The parking bay is available at that time.
• Location: The latitude and longitude of the parking bay
• Restrictions
o Free: Indicates if the parking bay is free or metered.
o Duration: The time that a vehicle can park in the bay (assuming they can legally park there).
o Effective on public holidays: Does this restriction apply on public holidays ?
o Time: The time each day when the restriction applies (i.e. start time and end time)
o Days: An array of days where the restriction applies.
Table 1 - Open Portal APIs
The following text box represent an example of search method output. Please note in days, each day is mapped to an integer form 0(Sunday) to 6(Saturday).
Figure 1 Parking information example
Task 3 AWS IoT Core devices:
a) You should create 10 devices/Things in AWS IoT Core named as parking1, parking2... parking10. Whenever you start the ParkSmart application, you should connect to these 10 devices using AWS IoT Node JS SDK.
b) When a user searches for a location and you have retrieved parking bays (up to 10) using the search method, for each retrieved parking, you need to send a MQTT message to AWS IoT Core that contains the bay_id, status, and type of restriction for the current date and time (10 marks). For example, if the current time is Monday 10am, for the parking bay shown in Figure 1, the MQTT message should be as below:
c) Every two minutes, the application should check the status of parking bay (by invoking the correct Open portal API) and send a MQTT message to AWS IoT core if the status changes.
Task 5 ParkSmart Dashboard:
The dashboard should contain the following components:
a) Search bar: The dashboard should provide a location search bar with autocomplete feature that allows a user to search for parking near a location. Moreover, the search bar should convert the address to geo-coordinates. For this task, you can use any third party library.
After a user presses the search button, the application should call the search parking method. Moreover, it should fetch the weather in the given geo-coordinates.
b) Weather Widget: The dashboard should display the weather condition in the location searched by user.
c) Map: The dashboard should display the location that user has entered in the search bar, and also list all the parking bays near the provided location (outcome of search parking method).
o The marker colour will be based on the parking bay state as below:
• Available: Dark Green
• Likely to be available: Light Green
• Occupied: Blue
• Overstayed: Red
o When you tap on a marker, the parking information should be displayed in Parking Details widget in the dashboard.
o To complete this task, you can use any Map library such as:
d) Parking Details: If users tap on a parking bay marker, the dashboard should display all the information related to that parking. This widget should also have 4 buttons (available, occupied, likely to be available, and overstayed), that allow users to change the state of the parking bay.
e) Activity List: The Dashboard should display the last 50 messages it sent to AWS IoT Core (2 marks). It should also provide an option to save the logs as text file.
Note: Just have to do Task 5
Attachment:- Designing User-centric IoT applications.rar