SOFTWARE PLATFORMS AND SERVICES
(ENABLING IOT)
Module 6
Course Outline
Module 1: Course Introduction (3 hours)
Module 2: Wireless Technologies for IoT and their Challenges (6 hours)
Basic wireless options supporting IoT and their challenges.
A Practical lab on getting started with the things network
Module 3: Smart objects (6 hours)
The numerous items that can be connected to the networks will be discussed
A Practical lab on getting started with IoT devices e.g. pycom
Module 4: Connecting smart object (6 hours)
The various ways to connect the multiple objects on the networks will be highlighted
A Practical lab on RPiDC (a data center in a RPi)
Module 5: Application protocols for IoT (9 hours)
Many of the protocols that enable IoT will be taught in this module.
A Practical lab on LoRaWAN
2
Course Outline
Module 6: Software Platforms and Services (6 hours)
All the software that enables IoT will be put in perspective
Module 7: Cloud and fog computing for IoT (6 hours)
Other concepts in IoT including cloud
Module 8: IoT in Industry (6 hours)
How IoT is applicable to the current state of the industry
Module 9: IoT Data (6 hours)
What nature of data can be utilised in IoT
Module 10: Securing IoT (6 hours)
Some security details for IoT will be studied
3
Software Platforms for IoT
Software Platforms:
Integrated environments that provide tools and services to facilitate the
development, deployment, and management of IoT applications and
devices.
Offer a set of features to streamline the process of connecting devices, processing data,
and creating user interfaces.
Types of Platforms
Device Management Platforms
Data Management Platforms
Application Enablement Platforms
Software Platforms for IoT
Device Management Platforms
Enable the onboarding, monitoring, and management of IoT devices
throughout their lifecycle.
Key Features:
Device Registration: Securely register new devices to the platform.
Firmware Management: Over-the-air (OTA) updates to ensure devices run the
latest software.
Monitoring: Real-time status monitoring and alerting for device performance and
health.
Security Management: Implement security protocols for data transmission and
device access.
Software Platforms for IoT
Examples:
AWS IoT Device Management
Google Cloud IoT Core
Microsoft Azure IoT Hub
Software Platforms for IoT
Data Management Platforms
Handle the ingestion, storage, processing, and analysis of data generated by
IoT devices.
Key Features:
Data Ingestion: Efficiently collect data from multiple sources and formats.
Data Storage: Scalable storage solutions for large volumes of data (e.g., databases,
data lakes).
Data Analytics: Tools for real-time and batch processing, visualization, and insights
generation.
Integration with BI Tools: Connect with Business Intelligence (BI) platforms for
advanced analytics.
Software Platforms for IoT
Examples:
IBM Watson IoT Platform
Amazon Kinesis
Google BigQuer
Software Platforms for IoT
Application Enablement Platforms
Provide developers with pre-built frameworks and tools to accelerate the
creation of IoT applications.
Key Features:
APIs and SDKs: Comprehensive APIs and Software Development Kits (SDKs) for
easy integration.
User Interface Development: Tools for building web and mobile applications for user
interaction.
Analytics and Reporting: Built-in analytics tools to analyze data and generate reports.
Integration Capabilities: Seamless integration with other enterprise applications and
services.
Software Platforms for IoT
Examples:
Particle
ThingSpeak
Losant
IoT Platforms
IoT Platforms
Platforms specifically designed for building, managing, and scaling IoT
systems.
Typically handle device connectivity, communication, data collection, and
monitoring.
Key Characteristics:
IoT-specific: Built to handle the unique challenges of IoT systems, including device
connectivity, security, and large-scale data collection.
Integrated services: IoT platforms often provide out-of-the-box services like device
management, data analytics, and security tailored for IoT devices.
IoT Platforms
Examples:
AWS IoT Core: Allows IoT devices to connect securely to the cloud, communicate,
and transmit data.
Microsoft Azure IoT Hub: Manages IoT devices, collects data, and handles messaging
between devices and the cloud.
Google Cloud IoT: Provides device management, real-time data processing, and
machine learning for IoT systems.
Purpose:
Serve as a middleware between IoT devices and other software platforms (like cloud services).
Provide a complete, integrated environment for managing IoT devices, networks, and data pipelines.
Use Case:
AWS IoT Core can be used to connect IoT devices, securely collect sensor data, and route the data to
AWS services like S3 for storage or Lambda for processing.
AWS IoT Core Overview
About AWS IoT Core
AWS IoT Core allows connected devices to interact with cloud applications and
other devices in a secure, scalable, and reliable manner.
Designed to help IoT devices send data to the cloud, process that data, and
enable communication between devices and cloud services.
AWS IoT Core key functionalities
Device Connectivity and Communication
AWS IoT Core allows millions of devices to securely connect to the cloud and
exchange data in real time.
Devices can communicate using standard IoT protocols such as MQTT, HTTP,
and WebSockets.
AWS IoT Core Overview
MQTT (Message Queuing Telemetry Transport): A lightweight messaging
protocol optimized for low-bandwidth and unreliable networks. It’s ideal
for IoT use cases.
HTTP: Enables devices to interact with AWS IoT Core via HTTP requests,
useful for non-persistent connections or for devices that cannot use MQTT.
WebSockets: Provides full-duplex communication between the device and
AWS IoT Core, useful for persistent connections between the client and
server.
AWS IoT Core Overview
Message Broker
The AWS IoT Core Message Broker manages communication
between connected devices and cloud applications by providing a
secure and scalable MQTT-based pub/sub messaging system.
Publish/Subscribe Model: Devices publish messages to specific topics, and
other devices or applications can subscribe to these topics to receive
messages. The broker routes messages between devices, applications, and
cloud services.
Topic-Based Routing: Each message is tagged with a topic, and subscribers
that match the topic receive the message. The topics can be fine-tuned
using wildcard patterns to allow for flexible routing.
AWS IoT Core Overview
Device Security
AWS IoT Core provides robust security mechanisms for IoT devices,
ensuring that only authorized devices can connect and
communicate with the service.
X.509 Certificates: Devices use these certificates for mutual authentication
when connecting to AWS IoT Core.
IoT Policies: These policies define what actions a device or user can
perform (e.g., publish, subscribe, connect) and what topics they can
interact with.
TLS Encryption: AWS IoT Core enforces TLS (Transport Layer Security) to
secure data exchanged between devices and AWS IoT.
AWS IoT Core Overview
Device Shadows
A Device Shadow in AWS IoT Core is a JSON document that represents the last
known state of a device. It allows you to track and control the state of a device
even when it is offline.
Persistent State: The shadow stores the device’s state (e.g., on/off, temperature, etc.)
persistently in the cloud.
Desired and Reported State: The shadow maintains a desired state (what you want the
device to do) and a reported state (what the device is currently doing).
Synchronization: When the device reconnects to AWS IoT, it receives any changes to the
desired state that occurred while it was offline and updates the cloud with its reported
state.
AWS IoT Core Overview
Rules Engine
The Rules Engine allows you to define actions that are triggered
when a message is published to a topic. This enables you to process,
transform, and act upon IoT data in real time.
SQL-Like Syntax: The rules engine uses a SQL-based syntax to filter and
transform incoming messages before sending them to AWS services or
third-party applications.
Integration with AWS Services: The rules engine can route data to many
other AWS services, such as Amazon S3, Amazon DynamoDB, AWS Lambda,
Amazon Kinesis, and Amazon SNS.
Data Transformation: You can use the rules engine to transform data, filter
out unnecessary data, or enrich data before routing it to the destination.
AWS IoT Core Overview
Device Registry
The Registry lets you keep track of devices connected to AWS IoT Core. It stores
metadata about each device and can be used to identify and manage large fleets of
devices.
Device Metadata: You can store attributes such as device name, type, and configuration.
Thing Groups: Devices can be organized into groups (e.g., based on location, type) to manage them
collectively and apply policies to groups.
Jobs
AWS IoT Core supports the ability to remotely manage and update fleets of devices
using IoT Jobs. This feature allows you to define and deploy actions to a large number
of devices simultaneously.
Remote Actions: You can update firmware, restart devices, change configuration settings, or
deploy software updates remotely.
Scheduling and Monitoring: Jobs can be scheduled and monitored to ensure they are
successfully completed.
AWS IoT Core Overview
Amazon Sidewalk Integration
AWS IoT Core integrates with Amazon Sidewalk, allowing devices with low
power and low bandwidth to connect over long ranges via Sidewalk, and
communicate securely with AWS IoT Core.
Fleet Indexing and Search
Fleet Indexing enables you to search and filter your devices across multiple
attributes (such as device state, type, or custom metadata) to get insights into
your IoT ecosystem.
Efficient Search: You can query across your fleet to quickly find devices that meet certain criteria,
such as devices with a specific firmware version or devices in a particular state.
AWS IoT Core Overview
IoT Analytics and Machine Learning
AWS IoT Core integrates with services like AWS IoT Analytics and Amazon SageMaker to help
process and analyze IoT data, and even deploy machine learning models to make predictions
based on IoT data streams.
IoT Analytics: Provides powerful tools to perform advanced analytics on IoT data and derive actionable insights.
Machine Learning Models: You can integrate with Amazon SageMaker to deploy models that can, for example,
predict failures in devices or optimize device performance based on usage patterns.
Monitoring and Logging
AWS IoT Core provides comprehensive monitoring and logging to track device activity,
message flow, and security events.
Amazon CloudWatch: You can monitor IoT metrics and logs through Amazon CloudWatch, which allows you to
set up alarms for specific thresholds.
AWS CloudTrail: Tracks API calls and actions performed on AWS IoT Core, providing an audit trail of activities
within your IoT ecosystem.
Lab Activity: Exploring IoT Software Platforms
Objective
Familiarize you with a selected IoT platform (e.g., AWS IoT, Google Cloud IoT, or Microsoft
Azure IoT) by:
creating an account,
managing devices,
and processing data.
Prerequisites
Basic understanding of IoT concepts.
Familiarity with web applications and APIs.
A computer with internet access.
Duration
2-3 hours
Lab Activity: Exploring IoT Software Platforms
Lab Steps
Create an AWS Account
Go to the AWS Free Tier page.
Navigate to the AWS Management Console (and sign in).
Navigate to AWS IoT Core (you may need to search for it)
Create a Virtual Device (Thing)
In the AWS IoT Core dashboard, click on Manage > All Devices > Things >
Create Things.
Choose Create single thing and click Next.
Enter a name for your Thing (e.g., SmartMeter).
Lab Activity: Exploring IoT Software Platforms
Click Next to move to the next step.
Under Device Certificate, leave the default, Auto-generate a new
certificate (recommended), and click next
Click on Create policy (you can select an existing policy, if any)
In the new window that opens, enter policy name (e.g
water_meter_policy) and under policy document, select JSON.
Replace the code in the text area for policy document with the
following code and then click Create. This creates a new policy. Go go
back to the previous page and check the newly created policy.
Lab Activity: Exploring IoT Software Platforms
Lab Activity: Exploring IoT Software Platforms
Click on Create Thing. This creates certificates and keys that will be
used for secure communication. Download all the files including:
Certificate (your-certificate.pem.crt)
Private Key (your-private.pem.key)
Root CA (Amazon Root CA 1)
Important: Download these files immediately, as you cannot retrieve them
later.
Lab Activity: Exploring IoT Software Platforms
Connect a Device (virtual) to the Thing
Activate your preferred python environment (or work from the
main python installation – not recommended)
Installed the required library by running the following command:
pip install AWSIoTPythonSDK
Create a python script to simulate a physical device (e.g name the
script device.py) and then add the following code to the script
Note: To find your YOUR_ENDPOINT , from you AWS IoT Core Console, navigate to
Domain Configurations, under Connect and then scroll to the bottom of the
page. You will find your endpoint under Domain name
Lab Activity: Exploring IoT Software Platforms
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
import json
import time
client = AWSIoTMQTTClient(“SmartMeter") #Replace with your Thing name
client.configureEndpoint("YOUR_ENDPOINT", 8883) # Replace YOUR_ENDPOINT with the
endpoint from AWS IoT
client.configureCredentials("path/to/AmazonRootCA1.pem",
"path/to/your-private.pem.key",
"path/to/your-certificate.pem.crt")
client.connect()
print("Connected to AWS IoT")
# Publish data
while True:
temperature = 20 + (5 * (time.time() % 10) / 10) # Simulated temperature
humidity = 40 + (20 * (time.time() % 10) / 10) # Simulated humidity
data = {"temperature": temperature, "humidity": humidity}
client.publish("sensor/data", json.dumps(data), 1)
print(f"Published: {data}")
time.sleep(5) # Publish every 5 seconds
Lab Activity: Exploring IoT Software Platforms
Publish and view the data
Run the script from your enviroment
Go to your AWS IoT console and under Test, click on MQTT Test
Client. On the next screen, subscribe to the topic sensor/data by
entering sensor/data in text field and then clicking subscribe. At
this point, you should be able to view data published by your
device.