Home Page Icon
Home Page
Table of Contents for
Table of Contents
Close
Table of Contents
by Peter Waher
Learning Internet of Things
Learning Internet of Things
Table of Contents
Learning Internet of Things
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
A definition for Internet of Things
Competing definitions
Direct consequences
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Viewing or downloading the online appendices
Errata
Piracy
Questions
1. Preparing our IoT Projects
Creating the sensor project
Preparing Raspberry Pi
Clayster libraries
Hardware
Interacting with our hardware
Interfacing the hardware
Internal representation of sensor values
Persisting data
External representation of sensor values
Exporting sensor data
Creating the actuator project
Hardware
Interfacing the hardware
Creating a controller
Representing sensor values
Parsing sensor data
Calculating control states
Creating a camera
Hardware
Accessing the serial port on Raspberry Pi
Interfacing the hardware
Creating persistent default settings
Adding configurable properties
Persisting the settings
Working with the current settings
Initializing the camera
Summary
2. The HTTP Protocol
HTTP basics
Adding HTTP support to the sensor
Setting up an HTTP server on the sensor
Setting up an HTTPS server on the sensor
Adding a root menu
Displaying measured information in an HTML page
Generating graphics dynamically
Creating sensor data resources
Interpreting the readout request
Testing our data export
User authentication
Adding events for enhanced network performance
Adding HTTP support to the actuator
Creating the web services resource
Accessing individual outputs
Collective access to outputs
Accessing the alarm output
Using the test form
Accessing WSDL
Using the REST web service interface
Adding HTTP support to the controller
Subscribing to events
Creating the control thread
Controlling the actuator
Summary
3. The UPnP Protocol
Introducing UPnP
Providing a service architecture
Documenting device and service capabilities
Creating a device description document
Choosing a device type
Being friendly
Providing the device with an identity
Adding icons
Adding references to services
Topping off with a URL to a web presentation page
Creating the service description document
Adding actions
Adding state variables
Adding a unique device name
Providing a web interface
Creating a UPnP interface
Registering UPnP resources
Replacing placeholders
Adding support for SSDP
Notifying the network
Responding to searches
Implementing the Still Image service
Initializing evented state variables
Providing web service properties
Adding service properties
Adding actions
Using our camera
Setting up UPnP
Discovering devices and services
Subscribing to events
Receiving events
Executing actions
Summary
4. The CoAP Protocol
Making HTTP binary
Finding development tools
Adding CoAP to our sensor
Defining our first CoAP resources
Manually triggering an event notification
Registering data readout resources
Returning XML
Returning JSON
Returning plain text
Discovering CoAP resources
Testing our CoAP resources
Adding CoAP to our actuator
Defining simple control resources
Parsing the URL in CoAP
Controlling the output using CoAP
Using CoAP in our controller
Monitoring observable resources
Receiving notifications
Performing control actions
Summary
5. The MQTT Protocol
Publishing and subscribing
Adding MQTT support to the sensor
Controlling the thread life cycle
Flagging significant events
Connecting to the MQTT server
Publishing the content
Adding MQTT support to the actuator
Initializing the topic content
Subscribing to topics
Receiving the published content
Decoding and parsing content
Adding MQTT support to the controller
Handling events from the sensor
Decoding and parsing sensor values
Subscribing to sensor events
Controlling the actuator
Controlling the LED output
Controlling the alarm output
Summary
6. The XMPP Protocol
XMPP basics
Federating for global scalability
Providing a global identity
Authorizing communication
Sensing online presence
Using XML
Communication patterns
Extending XMPP
Connecting to a server
Provisioning for added security
Adding XMPP support to a thing
Connecting to the XMPP network
Monitoring connection state events
Notifying your friends
Handling HTTP requests over XMPP
Providing an additional layer of security
The basics of provisioning
Initializing the Thing Registry interface
Registering a thing
Updating a public thing
Claiming a thing
Removing a thing from the registry
Disowning a thing
Initializing the provisioning server interface
Handling friendship recommendations
Handling requests to unfriend somebody
Searching for a provisioning server
Providing registry information
Maintaining a connection
Negotiating friendships
Handling presence subscription requests
Continuing interrupted negotiations
Adding XMPP support to the sensor
Adding a sensor server interface
Updating event subscriptions
Publishing contracts
Adding XMPP support to the actuator
Adding a controller server interface
Adding XMPP support to the camera
Adding XMPP support to the controller
Setting up a sensor client interface
Subscribing to sensor data
Handling incoming sensor data
Setting up a controller client interface
Setting up a camera client interface
Fetching the camera image over XMPP
Identifying peer capabilities
Reacting to peer presence
Detecting rule changes
Connecting it all together
Summary
7. Using an IoT Service Platform
Selecting an IoT platform
The Clayster platform
Downloading the Clayster platform
Creating a service project
Adding references
Making a Clayster module
Executing the service
Using a package manifest
Executing from Visual Studio
Configuring the Clayster system
Using the management tool
Browsing data sources
Interfacing our devices using XMPP
Creating a class for our sensor
Finding the best class
Subscribing to sensor data
Interpreting incoming sensor data
Creating a class for our actuator
Customizing control operations
Creating a class for our camera
Creating our control application
Understanding rendering
Defining the application class
Initializing the controller
Adding control rules
Understanding application references
Defining brieflets
Displaying a gauge
Displaying a binary signal
Pushing updates to the client
Completing the application
Configuring the application
Viewing the 10-foot interface application
Summary
8. Creating Protocol Gateways
Understanding protocol bridging
Using an abstraction model
The basics of the Clayster abstraction model
Understanding editable data sources
Understanding editable objects
Using common data sources
Overriding key properties and methods
Controlling structure
Publishing properties
Publishing commands
Handling communication with devices
Reading devices
Configuring devices
Understanding the CoAP gateway architecture
Summary
9. Security and Interoperability
Understanding the risks
Reinventing the wheel, but an inverted one
Knowing your neighbor
Modes of attack
Denial of Service
Guessing the credentials
Getting access to stored credentials
Man in the middle
Sniffing network communication
Port scanning and web crawling
Search features and wildcards
Breaking ciphers
Tools for achieving security
Virtual Private Networks
X.509 certificates and encryption
Authentication of identities
Usernames and passwords
Using message brokers and provisioning servers
Centralization versus decentralization
The need for interoperability
Solves complexity
Reduces cost
Allows new kinds of services and reuse of devices
Combining security and interoperability
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Learning Internet of Things
Table of Contents
Learning Internet of Things
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
A definition for Internet of Things
Competing definitions
Direct consequences
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Viewing or downloading the online appendices
Errata
Piracy
Questions
1. Preparing our IoT Projects
Creating the sensor project
Preparing Raspberry Pi
Clayster libraries
Hardware
Interacting with our hardware
Interfacing the hardware
Internal representation of sensor values
Persisting data
External representation of sensor values
Exporting sensor data
Creating the actuator project
Hardware
Interfacing the hardware
Creating a controller
Representing sensor values
Parsing sensor data
Calculating control states
Creating a camera
Hardware
Accessing the serial port on Raspberry Pi
Interfacing the hardware
Creating persistent default settings
Adding configurable properties
Persisting the settings
Working with the current settings
Initializing the camera
Summary
2. The HTTP Protocol
HTTP basics
Adding HTTP support to the sensor
Setting up an HTTP server on the sensor
Setting up an HTTPS server on the sensor
Adding a root menu
Displaying measured information in an HTML page
Generating graphics dynamically
Creating sensor data resources
Interpreting the readout request
Testing our data export
User authentication
Adding events for enhanced network performance
Adding HTTP support to the actuator
Creating the web services resource
Accessing individual outputs
Collective access to outputs
Accessing the alarm output
Using the test form
Accessing WSDL
Using the REST web service interface
Adding HTTP support to the controller
Subscribing to events
Creating the control thread
Controlling the actuator
Summary
3. The UPnP Protocol
Introducing UPnP
Providing a service architecture
Documenting device and service capabilities
Creating a device description document
Choosing a device type
Being friendly
Providing the device with an identity
Adding icons
Adding references to services
Topping off with a URL to a web presentation page
Creating the service description document
Adding actions
Adding state variables
Adding a unique device name
Providing a web interface
Creating a UPnP interface
Registering UPnP resources
Replacing placeholders
Adding support for SSDP
Notifying the network
Responding to searches
Implementing the Still Image service
Initializing evented state variables
Providing web service properties
Adding service properties
Adding actions
Using our camera
Setting up UPnP
Discovering devices and services
Subscribing to events
Receiving events
Executing actions
Summary
4. The CoAP Protocol
Making HTTP binary
Finding development tools
Adding CoAP to our sensor
Defining our first CoAP resources
Manually triggering an event notification
Registering data readout resources
Returning XML
Returning JSON
Returning plain text
Discovering CoAP resources
Testing our CoAP resources
Adding CoAP to our actuator
Defining simple control resources
Parsing the URL in CoAP
Controlling the output using CoAP
Using CoAP in our controller
Monitoring observable resources
Receiving notifications
Performing control actions
Summary
5. The MQTT Protocol
Publishing and subscribing
Adding MQTT support to the sensor
Controlling the thread life cycle
Flagging significant events
Connecting to the MQTT server
Publishing the content
Adding MQTT support to the actuator
Initializing the topic content
Subscribing to topics
Receiving the published content
Decoding and parsing content
Adding MQTT support to the controller
Handling events from the sensor
Decoding and parsing sensor values
Subscribing to sensor events
Controlling the actuator
Controlling the LED output
Controlling the alarm output
Summary
6. The XMPP Protocol
XMPP basics
Federating for global scalability
Providing a global identity
Authorizing communication
Sensing online presence
Using XML
Communication patterns
Extending XMPP
Connecting to a server
Provisioning for added security
Adding XMPP support to a thing
Connecting to the XMPP network
Monitoring connection state events
Notifying your friends
Handling HTTP requests over XMPP
Providing an additional layer of security
The basics of provisioning
Initializing the Thing Registry interface
Registering a thing
Updating a public thing
Claiming a thing
Removing a thing from the registry
Disowning a thing
Initializing the provisioning server interface
Handling friendship recommendations
Handling requests to unfriend somebody
Searching for a provisioning server
Providing registry information
Maintaining a connection
Negotiating friendships
Handling presence subscription requests
Continuing interrupted negotiations
Adding XMPP support to the sensor
Adding a sensor server interface
Updating event subscriptions
Publishing contracts
Adding XMPP support to the actuator
Adding a controller server interface
Adding XMPP support to the camera
Adding XMPP support to the controller
Setting up a sensor client interface
Subscribing to sensor data
Handling incoming sensor data
Setting up a controller client interface
Setting up a camera client interface
Fetching the camera image over XMPP
Identifying peer capabilities
Reacting to peer presence
Detecting rule changes
Connecting it all together
Summary
7. Using an IoT Service Platform
Selecting an IoT platform
The Clayster platform
Downloading the Clayster platform
Creating a service project
Adding references
Making a Clayster module
Executing the service
Using a package manifest
Executing from Visual Studio
Configuring the Clayster system
Using the management tool
Browsing data sources
Interfacing our devices using XMPP
Creating a class for our sensor
Finding the best class
Subscribing to sensor data
Interpreting incoming sensor data
Creating a class for our actuator
Customizing control operations
Creating a class for our camera
Creating our control application
Understanding rendering
Defining the application class
Initializing the controller
Adding control rules
Understanding application references
Defining brieflets
Displaying a gauge
Displaying a binary signal
Pushing updates to the client
Completing the application
Configuring the application
Viewing the 10-foot interface application
Summary
8. Creating Protocol Gateways
Understanding protocol bridging
Using an abstraction model
The basics of the Clayster abstraction model
Understanding editable data sources
Understanding editable objects
Using common data sources
Overriding key properties and methods
Controlling structure
Publishing properties
Publishing commands
Handling communication with devices
Reading devices
Configuring devices
Understanding the CoAP gateway architecture
Summary
9. Security and Interoperability
Understanding the risks
Reinventing the wheel, but an inverted one
Knowing your neighbor
Modes of attack
Denial of Service
Guessing the credentials
Getting access to stored credentials
Man in the middle
Sniffing network communication
Port scanning and web crawling
Search features and wildcards
Breaking ciphers
Tools for achieving security
Virtual Private Networks
X.509 certificates and encryption
Authentication of identities
Usernames and passwords
Using message brokers and provisioning servers
Centralization versus decentralization
The need for interoperability
Solves complexity
Reduces cost
Allows new kinds of services and reuse of devices
Combining security and interoperability
Summary
Index
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset