Module-3
IoT Platforms Design Methodology:
•Introduction
•IoT Design Methodology
•Case Study on IoT System forWeather Monitoring loT Systems
Logical Design using Python:
•Introduction,
•Installing Python
•Python DataTypes and Data structures
•Control flow
•Functions
•Modules
•Packages
•File Handling
•Operations
•Classes
•Python Packages of Interest for IoT.
IoT Platforms Design Methodology:
 Designing IoT systems is complex due to multiple components
(devices, web services, analytics, databases).
 Designs are often tied to specific vendors or products, leading to
lock-in and difficulty upgrading.
 A generic design methodology is proposed, product- and
language-independent, based on the IoT-A reference model.
 Goals: Reduce design, testing, and maintenance time; increase
interoperability and flexibility.
Main Steps in IoT System Design:
 Purpose & Requirements Specification
 Process Specification
 Domain Model Specification
 Information Model Specification
 Service Specifications
 IoT Level Specification
 FunctionalView Specification
 OperationalView Specification
 Device & Component Integration
 Application Development
Steps involved in IOT Methodology
Purpose & Requirements Specification
Define Purpose & Requirements of IoT system
Domain Model Specification
Define Physical Entities,Virtual Entities, Devices, Resources and Services in the IoT system
Information Model Specification
Define the structure (e.g. relations, attributes) of all the information in the IoT system
Service Specifications
Map Process and Information Model to services and define service specifications
IoT Level Specification
Define the IoT level for the system
FunctionalView Specification
Map IoT Level to functional groups
OperationalView Specification
Define communication options, service hosting options, storage options, device options
Device & Component Integration
Integrate devices, develop and integrate the components
Application Development
Develop Applications
 Step 1: Purpose & Requirements Specification
 Clearly define the purpose, behavior, and
requirements (data, analysis, management, privacy, security,
UI).
 Example: Home automation system to control lights remotely,
with both auto and manual modes and local/remote access.
 Step 2: Process Specification
 Define use cases and create process diagrams describing
system modes, decision points, and state transitions.
 Example:When in auto mode, monitor light level and control
light state; in manual mode, allow user control over
light.Module3.pdf
 Step 3: Domain Model Specification
 Identify and define main concepts, entities, and their
relationships:
◦ Physical Entities (e.g., room, light)
◦ Virtual Entities (digital representations)
◦ Devices (e.g., mini-computer with sensors/actuators)
◦ Resources (software, on-device or network)
◦ Services (interfaces for control/monitoring).
 Step 4: Information Model Specification
 Specify the structure of information, such as attributes and
relationships for each virtual entity.
 Example:Virtual Entity for environment (attributes: temperature,
humidity, light, pressure).
 Step 5: Service Specifications
 Design service types, endpoints,
inputs/outputs, and schedules.
 Services can be RESTful (for user/UI) or native
(for device control).
 Step 6: IoT Level Specification
 Determine the deployment level (e.g.,
sensor-level, gateway-level, cloud-level systems)
relevant for the use case.
 Step 7: FunctionalView Specification
 Map system aspects to functional groups:
◦ Device FG (monitoring/control devices)
◦ Communication FG (protocols/APIs)
◦ Services FG (REST/native services)
◦ Management FG
◦ Security FG
◦ Application FG
 Step 8: OperationalView Specification
 Decide on deployment and operation options:
◦ Devices, communication stack, services' hosting, application/database
servers, security mechanisms, management tools.
 Step 9: Device & Component Integration
 Schematic integration of hardware and
software:
◦ Example: Raspberry Pi mini-computer, sensors,
actuators all interconnected.
 Step 10:Application Development
 Develop the final applications (web app,APIs,
analytics, user dashboards), using selected
frameworks and deployment strategies.
IoT Design Methodology:Weather Monitoring Case Study
 System Goal:
 Collect temperature, humidity, pressure, and light data over several locations (“end nodes”).
 Key Steps
 Process Specification: Each end node reads sensors periodically and sends readings to the cloud.
 Domain Model:
◦ Physical: Environment
◦ Virtual Entities: Environmental readings
◦ Devices: Sensors (temp, humidity, light, pressure), mini-computer
◦ Services: Controller (reads/sends data)
 Information Model: One virtual entity (“environment”) with attributes for each sensor type.
 Service Specification: Native controller service on each node, sends data every 15 seconds to
cloud REST API.
 Deployment: Multiple sensor nodes, cloud storage & analysis, user-facing dashboard for visualizing
data, centralized controller for management.Module3.pdf
 Functional & OperationalViews: Functional groups for device, communication, services, database,
application, management, security.
◦ Devices: Raspberry Pi, sensors
◦ Communication: REST over HTTP,WiFi,TCP/IP
◦ Application: Cloud analysis, dashboard
Introduction
 Python is a general-purpose, high-level
language widely used in IoT development.
 Supports both object-oriented and
procedural programming.Module3.pdf
 Interactive, easy-to-learn, and cross-platform
(Windows, Linux, Mac).
Installing Python
 Windows: Download installer from
python.org.
 Linux (Ubuntu example):
◦ Install dependencies with apt-get.
◦ Download and extract Python source.
◦ Build and install with ./configure, make, sudo
make install.
Python DataTypes and Data Structures
 Numbers: int, float, long, complex
◦ Example: a=5, b=2.5, x=9898878787676L, y=2+5j
 Strings: ordered collections of characters
◦ Example: s="Hello World!"
 Lists: mutable ordered collections
◦ Example: fruits=['apple','orange','banana','mango']
 Tuples: immutable ordered collections
◦ Example: fruits=("apple","mango")
 Dictionaries: key-value mappings
◦ Example: student={'name':'Mary', 'id':'8776', 'major':'CS'}
Control Flow
 if/elif/else: Standard conditionals
 for: Iterates over sequences (list, string,
dict)
 while: Loops while a condition is true
 break/continue/pass: Modify loop
behavior
 range(): Generates lists of numbers

Module3.1-1iotnodule32022schemevtuI.pptx

  • 1.
    Module-3 IoT Platforms DesignMethodology: •Introduction •IoT Design Methodology •Case Study on IoT System forWeather Monitoring loT Systems Logical Design using Python: •Introduction, •Installing Python •Python DataTypes and Data structures •Control flow •Functions •Modules •Packages •File Handling •Operations •Classes •Python Packages of Interest for IoT.
  • 2.
    IoT Platforms DesignMethodology:  Designing IoT systems is complex due to multiple components (devices, web services, analytics, databases).  Designs are often tied to specific vendors or products, leading to lock-in and difficulty upgrading.  A generic design methodology is proposed, product- and language-independent, based on the IoT-A reference model.  Goals: Reduce design, testing, and maintenance time; increase interoperability and flexibility.
  • 3.
    Main Steps inIoT System Design:  Purpose & Requirements Specification  Process Specification  Domain Model Specification  Information Model Specification  Service Specifications  IoT Level Specification  FunctionalView Specification  OperationalView Specification  Device & Component Integration  Application Development
  • 4.
    Steps involved inIOT Methodology Purpose & Requirements Specification Define Purpose & Requirements of IoT system Domain Model Specification Define Physical Entities,Virtual Entities, Devices, Resources and Services in the IoT system Information Model Specification Define the structure (e.g. relations, attributes) of all the information in the IoT system Service Specifications Map Process and Information Model to services and define service specifications IoT Level Specification Define the IoT level for the system FunctionalView Specification Map IoT Level to functional groups OperationalView Specification Define communication options, service hosting options, storage options, device options Device & Component Integration Integrate devices, develop and integrate the components Application Development Develop Applications
  • 5.
     Step 1:Purpose & Requirements Specification  Clearly define the purpose, behavior, and requirements (data, analysis, management, privacy, security, UI).  Example: Home automation system to control lights remotely, with both auto and manual modes and local/remote access.  Step 2: Process Specification  Define use cases and create process diagrams describing system modes, decision points, and state transitions.  Example:When in auto mode, monitor light level and control light state; in manual mode, allow user control over light.Module3.pdf
  • 6.
     Step 3:Domain Model Specification  Identify and define main concepts, entities, and their relationships: ◦ Physical Entities (e.g., room, light) ◦ Virtual Entities (digital representations) ◦ Devices (e.g., mini-computer with sensors/actuators) ◦ Resources (software, on-device or network) ◦ Services (interfaces for control/monitoring).  Step 4: Information Model Specification  Specify the structure of information, such as attributes and relationships for each virtual entity.  Example:Virtual Entity for environment (attributes: temperature, humidity, light, pressure).
  • 7.
     Step 5:Service Specifications  Design service types, endpoints, inputs/outputs, and schedules.  Services can be RESTful (for user/UI) or native (for device control).  Step 6: IoT Level Specification  Determine the deployment level (e.g., sensor-level, gateway-level, cloud-level systems) relevant for the use case.
  • 8.
     Step 7:FunctionalView Specification  Map system aspects to functional groups: ◦ Device FG (monitoring/control devices) ◦ Communication FG (protocols/APIs) ◦ Services FG (REST/native services) ◦ Management FG ◦ Security FG ◦ Application FG  Step 8: OperationalView Specification  Decide on deployment and operation options: ◦ Devices, communication stack, services' hosting, application/database servers, security mechanisms, management tools.
  • 9.
     Step 9:Device & Component Integration  Schematic integration of hardware and software: ◦ Example: Raspberry Pi mini-computer, sensors, actuators all interconnected.  Step 10:Application Development  Develop the final applications (web app,APIs, analytics, user dashboards), using selected frameworks and deployment strategies.
  • 10.
    IoT Design Methodology:WeatherMonitoring Case Study  System Goal:  Collect temperature, humidity, pressure, and light data over several locations (“end nodes”).  Key Steps  Process Specification: Each end node reads sensors periodically and sends readings to the cloud.  Domain Model: ◦ Physical: Environment ◦ Virtual Entities: Environmental readings ◦ Devices: Sensors (temp, humidity, light, pressure), mini-computer ◦ Services: Controller (reads/sends data)  Information Model: One virtual entity (“environment”) with attributes for each sensor type.  Service Specification: Native controller service on each node, sends data every 15 seconds to cloud REST API.  Deployment: Multiple sensor nodes, cloud storage & analysis, user-facing dashboard for visualizing data, centralized controller for management.Module3.pdf  Functional & OperationalViews: Functional groups for device, communication, services, database, application, management, security. ◦ Devices: Raspberry Pi, sensors ◦ Communication: REST over HTTP,WiFi,TCP/IP ◦ Application: Cloud analysis, dashboard
  • 11.
    Introduction  Python isa general-purpose, high-level language widely used in IoT development.  Supports both object-oriented and procedural programming.Module3.pdf  Interactive, easy-to-learn, and cross-platform (Windows, Linux, Mac).
  • 12.
    Installing Python  Windows:Download installer from python.org.  Linux (Ubuntu example): ◦ Install dependencies with apt-get. ◦ Download and extract Python source. ◦ Build and install with ./configure, make, sudo make install.
  • 13.
    Python DataTypes andData Structures  Numbers: int, float, long, complex ◦ Example: a=5, b=2.5, x=9898878787676L, y=2+5j  Strings: ordered collections of characters ◦ Example: s="Hello World!"  Lists: mutable ordered collections ◦ Example: fruits=['apple','orange','banana','mango']  Tuples: immutable ordered collections ◦ Example: fruits=("apple","mango")  Dictionaries: key-value mappings ◦ Example: student={'name':'Mary', 'id':'8776', 'major':'CS'}
  • 14.
    Control Flow  if/elif/else:Standard conditionals  for: Iterates over sequences (list, string, dict)  while: Loops while a condition is true  break/continue/pass: Modify loop behavior  range(): Generates lists of numbers