IoT Assignment 2 - 1906139
IoT Assignment 2 - 1906139
Physical Entity: Room in the home and the light appliance to be controlled
Virtual Entity: There is virtual entity for the room to be monitored and for the appliance
to be controlled
Device: Single-board minicomputer which has light sensor and actuator
Resource: The on-device resource is the operating system that runs on the single-board
mini computer
Service: There are three services:
A service that sets the mode to auto or manual, or retrieves the current mode
A service that sets the light appliance state to on/off or retrieves the current light
stare
A controller service that runs the native service on the device.
Step 4: Information Model Specification
There are two virtual Entities – a virtual entity for the light appliance and one for room.
The figure below shows the information model for home automation system.
Controller service: -
Mode service: -
State service: -
Device: the device FG includes a single board mini-computer, a light sensor and a relay
switch.
Communication: Communication protocols used in home automation are: - 802.11(link
layer), IPV4/IPV6(network layer), TCP (Transport layer), and HTTP(application layer).
The communication API used in the home automation system is REST-based API.
Services: There are two REST services (mode and state service) and one native service
(controller service).
Management, Security and Application: IoT devices maps to the Device FG and the
Management FG. Resources map to the Device FG and communication FG. Controller
service maps to the services FG. Web services map to services FG. Database maps to the
management FG and security FG. Application maps to the application FG, Management
FG and security FG.
These views can be visualised in the diagram below: -
Step 8: Operational View Specification
Devices: Computing device (raspberry Pi), light dependent resistor (sensor), relay
switch (actuator)
Communication API’s: REST APIs
Communication Protocols: 802.11(link layer), IPV4/IPV6(network layer), TCP
(Transport layer), and HTTP (application layer).
Services:
1. Controller Service – Hosted on device, implemented in python and run as native
service
2. Mode service – REST-full web service, hosted on device, implemented with Django-
REST framework
3. State service – REST-full web services, hosted on device, implemented with Django-
REST framework
Application:
Web Application – Django Web Application
Application Server – Django App Server
Database Server – MySQL
Security:
Authentication: Web App, Database
Authorization: Web App, Database
Management:
Application Management - Django App management
Database Management – MySQL DB Management
Device Management – Raspberry Pi device Management
The purpose of home intrusion detection system is to detect intrusions using sensors
(such as PRI sensors and door sensors) and raise alerts, if necessary.
Each room in the home has a PRI motion sensor and each door has door sensor. These
sensors can detect motion or opening of doors. Each sensor is read at regular intervals
and the motion detection or door opening events are stored and alerts are sent.
The domain model includes physical entities for room and door and the corresponding
virtual entities. The device here is a single-board mini computer which has PRI and door
sensors attached to it. The domain model is also included in the services involved in the
system
Step 4: Information Model Specification
The information model defines the attributes of room and door virtual entities and their
possible values. The room virtual entity has an attribute ‘motion’ and the door virtual
entity has an attribute ‘state’.
The services are derived from the process specification and the information model. The
system has three services: -
1. A RESTful web service that retrieves the current state of a door from the database
or sets the current state of a door to open/closed
2. A RESTful web service that retrieves the current motion in a room or sets the
motion of a room to yes/no
3. A native controller services that runs on the device and reads the PIR and door
sensors and calls the REST services for updating the state of rooms and doors in the
database.
Door service: -
Room service: -
Controller service: -
Step 6: IoT level specification
We shall use level-2 for deployment of home intrusion system shown as below:-
The system uses Django framework for web application and REST service. The Django
web application is backed by a MySQL database. The IoT device used here is Raspberry
Pi along with PIR and door sensors
Step 9&10: Device and component integration & application development
Schematic diagram of the home intrusion detection system can be seen below
The purpose of a smart parking system is to detect the number of empty parking slots
and send the information over the internet to smart parking application backends.
Sensors are used for each parking slot, to detect whether the slot is empty or occupied.
This information is aggregated by a local controller and then sent over the Internet to a
server.
Each parking slot has an ultrasonic sensor fixed above, which can detect the presence of
a vehicle in the slot. Each sensor is read at regular intervals and the state of the parking
slot (empty or occupied) is updated in the database.
Step 3: Domain Model Specification
The domain model includes a physical entity for the parking slot and the corresponding
virtual entity. The device here is a single -board mini computer which has ultrasonic
sensor attached to it. The domain model also includes the services attached to it.
Step 4: Information model specification
The information model defines the attribute (state) of the parking slot virtual entity
with two possible values (empty and occupied)
State Service: -
We shall use level-2 for deployment of smart parking system shown as below: -
Step 7 & 8: Functional View Specification & Operational view Specification
The functional view and the operation view specifications for smart parking system are
similar to home intrusion detection system. The system uses Django framework for web
application and REST service. The Django web application is supported by a MySQL
database. The IoT device used is Raspberry Pi along with the ultrasonic sensors. The
figure below shows the sensors deployed in parking.
Step 9 & 10: Device and component integration & Application Development
The process specification shows that the sensors are read after fixed intervals and the
sensor measurements are stored.
The physical entity is the environment which is being monitored. There is a virtual
entity for the environment. Devices include temperature sensors, pressure sensor,
humidity sensor, light sensor and single board minicomputer. Resources are the
software components which can be either on-device or network-resources. Services
include the controller service which monitors the temperature, humidity and light and
sends the readings to the cloud.
Step 4: Information model specification
There is one virtual entity for the environment being sensed. The virtual entity has
attributes – temperature, pressure, humidity and light.
The service specification is derived from process and information model for the
weather monitoring system.
The controller service runs as a native service on the device and monitors temperature,
pressure, humidity and light once every 15 seconds. The controller service calls the rest
service to store these measurements in the cloud.
Step 6: IoT level specification
We shall use level-6 for deployment of weather monitoring system. The system consists
of multiple nodes placed in different locations for monitoring temperature, humidity
and pressure in an area. The end nodes are equipped with various sensors (such as
temperature, humidity and light). The end nodes send the data to the cloud and the data
is stored in a cloud database.
The figure below shows the mapping deployment label to functional groups for thr
weather monitoring system
The figure below is an example of mapping functional groups to operational view
specifications for weather monitoring system.
Coordinator node: -
4. Agriculture
a. Smart Irrigation
IoT devices and soil moisture sensors are used to determine the amount of moisture in
the soil and release the flow of water through the irrigation pipes when the moisture
levels go below a certain threshold. Data on the moisture levels is also collected in the
cloud where it is analysed to plan watering schedules.
It uses level-6 deployment design methodology for its implementation. The system
consists of multiple nodes placed in different locations for monitoring soil moisture in a
field. The end nodes send the data to the cloud and the data is stored in a cloud database.
A cloud-based application is used for visualizing the data. The schematic diagram of
smart irrigation system is shown below.
The end node includes raspberry Pi mini-computer and soil moisture sensor. A solenoid
valve is used to control the flow of water through the irrigation pipe. When the moisture
level goes below a threshold, the valve is opened to release water.
5. Productive Applications
a. IoT Printer
IoT printer prints a daily briefing every morning. The daily briefing comprises of the
current weather information, weather predictions for the day and the user’s schedule
for the day.
The schematic diagram of IoT printer is shown below: -