A probe into the foreign internet of Things Platform (iii): IBM Watson IoT

Source: Internet
Author: User
Tags cloud hosting ibm analytics

A probe into the foreign internet of Things platform (III.)
--IBM Watson IoT

Ma Zhi

Platform positioning

Provides a fully managed cloud hosting service designed to simplify and derive value from IoT devices.

    • Watson IoT Platform provides powerful application access to IoT devices and data to quickly write analytics applications, visual dashboards, and mobile IoT applications.
    • Watson IoT platform can perform powerful device management operations and store and access device data, connecting various devices and gateway devices. Watson IoT Platform provides secure communication with devices by using MQTT and TLS.
    • Watson IoT Platform enables applications to communicate with connected devices, sensors, and gateways and use the data collected by them. Applications can use real-time APIs and REST APIs to communicate with devices.

Architecture

Platform API

Connection Class API

    • MQTT API for Applications
    • MQTT API for Devices
    • MQTT API for Gateways
    • HTTP API for Applications
    • HTTP API for Devices

Real-time Analytics class API

Information Management Class API

Risk Management Class API

    • IBM Blockchain API
    • Open Blockchain API

Cognitive Computing Class API

Natural language Processing

    • Natural Language Classifier
    • Concept Expansion (Beta)
    • Dialog
    • Language translation
    • Relationship Extraction (Beta)
    • Text to Speech
    • Speech to Text
    • Retrieve and Rank

Image analysis

    • Alchemy Vision
    • Visual Recognition (Beta)

Text analysis

    • Alchemy Language
    • Relationship Extraction (Beta)

Related concepts
  • Organization: provide organizational identity when registering with Watson IoT Platform to ensure that your organization's own data is accessible only from devices and applications.
  • device: A device can be any object that is connected to the Internet and has data placed in the cloud. The device must be registered before it can connect to the Watson IoT Platform. The device will use the authentication token to uniquely identify itself to Watson IoT Platform. The equipment is divided into managed devices and non-managed devices.
  • applications: Any object that connects to the Internet and wants to interact with the data from the device and/or control the behavior of those devices in some way. The application uses an API key and a unique application identity to identify itself to the Watson IoT Platform.
  • Gateway Devices: gateways are specialized classes of devices. They combine the capabilities of applications and devices to act as access points, providing connections to services for other devices that cannot be directly connected.
  • Event: An event is a mechanism used by a device to publish data to the Watson IoT Platform. The device controls the contents of the event and assigns a name to each event it sends. When Watson IoT Platform receives an event, it uses the credentials to determine from which device the event was sent. With this architecture, the device will not be able to emulate other devices.
  • command: a command is a mechanism that an application can use to communicate with a device. Only applications can send commands, and commands must be issued to specific devices.
  • Device registry: Manage inventory, configure security, and store metadata for millions of of devices. Define the device type to represent each device model and apply the default metadata to all devices of that type.
  • Connect: securely connect devices, gateways, and applications directly to the Watson IoT Platform via MQTT. Model the data in the device as an event and control the flow of events into the application.
  • Gateway support : In many cases, there is no direct connection between services and devices, and Watson IoT Platform allows connections to gateway devices that can provide indirect connections to multiple devices.
  • Device Management: allows Watson IoT Platform to manage the life cycle of a device by implementing the support for the Watson IoT Platform Device Management protocol in the device.
  • External service Integration: Watson IoT Platform enables integration with external services to bring data and operations supported by other online devices into the platform, making it easy for application and device developers to seamlessly interact with these services using the Watson IoT Platform API.
  • History: Configure Watson IoT Platform to store event records generated by the device.
  • Last event cache: The API can now return the Event-id value of the last record for a particular device, or the last record value for each Event-id reported by a particular device. The last event cache only applies to values sent in the last 30 days.

Function
  • Connect, configure, and manage devices
    • Connect Watson IoT on Bluemix, configure and manage IoT devices and data, create applications, visualize dashboards, and mobile IoT applications.
  • Visualize imputation Events
    • Bluemix collects IoT events visually into logical flowcharts, using node-red for drag-and-drop process orchestration.
    • Collect and manage the data in the time series view to view IoT device status in the data visualization panel in real time.
  • Real-time Analytics
    • Use analytics real-time insights to perform real-time analysis of IoT device data, observing device health and operational status.
  • Applied Cognitive Computing
    • Use text and speech for natural interactions
    • Image and scene recognition
    • Pattern matching for sensor inputs
    • Correlate with external data, such as weather and Twitter
  • Apply Blockchain
    • Use the risk management platform, including blockchain, to store data to a shared and non-erased ledger, providing secure transaction data link access for all participants.
  • Device Management
    • Perform various device operations by using the device Management service, such as rebooting or updating firmware, receiving device diagnostics and metadata, or performing bulk device additions and removal.
  • Responsive extensible connectivity
    • Connect devices and applications using the industry-standard MQTT Protocol (approved by OASIS). MQTT is designed to exchange data with the device in real time and efficiently.
  • Secure communications
    • Securely receives data from the device and sends commands to the device. This is done by using MQTT in conjunction with TLS to secure all communication between the device and the service.
  • Storing and accessing data
    • Have access to real-time data from the device and store the data for a period of time, allowing access to the device's historical and real-time data.

Bluemix
    • Bluemix is a platform-as-a-service (PaaS) product based on the Cloud Foundry Open source project.
    • Bluemix provides a popular runtime and a large directory of services, and supports Docker-based container and VM deployments.
    • Bluemix is used to quickly create, host, and scale services and applications, and developers need to focus on application logic and application design.
    • Bluemix provides application access to IoT devices and data with simple and powerful features.

External service Integration
    • The Jasper is a management platform for SIM devices. The Jasper is integrated into the Watson IoT Platform Dashboard to manage Jasper devices through the Watson IoT Platform organization Dashboard.
      • View Total Jasper Data
        • Display: status, package, month-to-date data usage, SMS usage this month so far this month, voice usage, overage limit, add date, and date modified.
      • Change the SIM activation status
        • Select: Inventory, ready to activate, activated, deactivated, and obsolete
      • View SIM Usage
        • Display: Cycle start date, billing data and data totals, billable SMS and SMS totals, billable voice and voice totals.
        • You can use the YYYY-MM-DD format to set the period start date.
      • Send SMS to SIM
      • Change package

    • Integration with IBM Analytics for Hadoop
      • Using IBM Hadoop Distributed File System (HDFS) nodes, applications perform create, read, attach, and delete operations.
    • Integration with mobile application Security and Push
      • Use an application in Bluemix to send notifications to mobile devices in response to data received from the Internet of things Foundation sensor devices.

Analytics Real-time Insights
    • Provides real-time analytics engine and analytics authoring capabilities to enable monitoring and context of IoT device data to accelerate understanding of current situations, improve decision-making, and better respond to emerging issues.
    • Use a simple, rule-based combination model and an extensible framework to combine IoT device data with master asset data, analyze contexts in context, and automate responses to improve operations and improve availability and service levels.
    • Gets the live device data feed. The incoming data is explained by a virtual data model that can be augmented with master asset data from the asset management system.
    • User-defined rules are applied to real-time streaming ingest data to determine what needs to be followed. By manipulating the engine, you define automatic responses to detected situations, such as sending e-mail messages, triggering IFTTT recipes, performing node-red workflows, or using Webhook to connect to various Web Service.
    • Real-time data is displayed in the configurable dashboard of the IoT device location, data, metrics, and Alerts overview view.

    • Perform analytics on real-time data from your device with analytics real-time Insights, and gain insight into the health and overall operational status of these devices.
    • After you set up the Watson IoT Platform service to connect the analysis engine to your device, you can start using analytics real-time Insights.
    • You can also create new services using the existing Watson IoT Platform service.
    • To quickly launch and run this service, deploy the phone application and its associated Watson IoT Platform service to your organization.

Mqtt
    • The main mechanism used by devices and applications to communicate with Watson IoT Platform is MQTT; This is a protocol designed to efficiently exchange real-time data with sensors and mobile devices.
    • MQTT runs through TCP/IP, and mqtt.org provides a wide range of Mqtt client libraries to find the MQTT client library from Eclipse Paho project.
    • MQTT 3.1 is currently the most widely used protocol version. The V3.1.1 includes several secondary enhancements and is recognized as an OASIS standard.

MQTT Quality of Service
    • Up to one time (QoS0)
      • Messages are delivered at most once, or they may not be delivered at all. Delivery over the network is not acknowledged, and the message is not stored. If the client disconnects or the server fails, the message may be lost. QoS0 is the fastest way to transfer. Sometimes it is called "Forget it after you send it."
      • The MQTT protocol does not require the server to forward publishing content to clients at the QoS0 level. If the client is disconnected when the server receives the publication, the publication may be discarded according to the server implementation.
    • At least once (QoS1)
      • Messages are always delivered at least once. If a failure occurs before the sender receives the acknowledgement, the message may be delivered more than once. The message must be stored locally on the sender until the sender receives an acknowledgement that the message has been published by the receiving party. The message will be stored in the meantime, in case the message must be sent again.
    • Exactly once (QoS2)
      • Messages are always delivered exactly once. The message must be stored locally on the sender until the sender receives an acknowledgement that the message has been published by the receiving party. The message will be stored in the meantime, in case the message must be sent again. The QoS2 is the safest and slowest transmission mode. A more complex handshake and acknowledgment sequence than QoS1 will be used to ensure that duplicate messages are not present.

HTTP API for Applications
    • View organization details.
    • Batch device operations (list all, add, remove).
    • Device type operations (list all, create, delete, view details, update).
    • Device actions (List devices, add, remove, view details, update, view location, view management information).
    • Device diagnostic actions (clear logs, retrieve logs, add log information, delete logs, get specific logs, clear error codes, get device error codes, add error codes).
    • Connection problem Determination (List device connection log events).
    • Historical event Retrieval (view events for all devices, view events for a device type, view events for a specific device).
    • Device Management request actions (list Device management requests, start requests, clear request status, GET request details, get a list of request statuses for each affected device, GET request status for a specific device).
    • Usage management (retrieves the number of active devices over a period of time, the amount of storage used to retrieve historical event data, and retrieves the total used data).
    • Publish events on behalf of a device (test)
    • Service Status query (retrieves service status for the organization).

MQTT Connections for Applications
  • Client Connection
    • Each registered organization has a unique endpoint that must be used when connecting to an MQTT client for an application in that organization.
    • org_id. messaging.internetofthings.ibmcloud.com
  • MQTT Client Identity
    • Applications must be authenticated using a specific format of the client identity
    • A:org_id:app_id
  • MQTT Certification
    • An application requires an API key to connect to an organization. When you register an API key, a token that must be used in conjunction with the API key is generated.
  • Publish Device Events
    • An application can treat events as if they were from any registered device when it publishes events.
    • Posted to Topics iot-2/type/device_type/id/device_id/evt/event_id/fmt/format_string
  • Publish Device Commands
    • The application can publish commands to any registered device.
    • Posted to Topics iot-2/type/device_type/id/device_id/cmd/command_id/fmt/format_ String
  • Booking Device Events
    • An application can subscribe to events from one or more devices.
    • Book a theme iot-2/type/device_type/id/device_id/evt/event_id/fmt/format_string
  • Booking device Commands
    • The application can subscribe to commands that will be sent to one or more devices.
    • Book a theme iot-2/type/device_type/id/device_id/cmd/command_id/fmt/format_string
  • Booking Device status messages
    • An application can subscribe to the monitoring status of one or more devices.
    • Book a theme iot-2/type/device_type/id/device_id/mon
  • Booking Application Status Messages
    • An application can subscribe to the monitoring status of one or more applications.
    • Book a theme iot-2/app/app_id/mon

HTTP API for Devices
    • Publish Events
      • As an alternative to MQTT, devices can submit events to IoT Platform through the HTTP API. The device can be https://${orgid}.internetofthings.ibmcloud.com/api/v0002/device/types/${typeid}/devices/${deviceid}/to the Events/${eventid} "Submit" POST "request.
    • Certification
      • The request must contain an authorization header. Only Basic authentication methods are supported. With an API key authentication application, when an application makes any request to the IoT Platform API, it must provide the API as its credentials:
      • User name = "Use-token-auth"
      • Password = Authentication Token
    • Quality of Service
      • The HTTP (S) protocol provides "up to one" best effort delivery, similar to the QoS0 quality of service provided by the MQTT protocol. When an event message is routed using the QoS0 or HTTP (S) equivalent, the device or application must implement retry logic to ensure delivery.

MQTT Connections for Devices
  • Client Connection
    • Each registered organization has a unique endpoint that must be used when connecting to an MQTT client for a device in that organization.
    • org_id. messaging.internetofthings.ibmcloud.com
  • MQTT Client Identity
    • The device must be authenticated using the client identity in the following format:
    • D:org_id:device_type:device_id
  • MQTT Certification
    • User name
    • The service currently only supports token-based authentication for devices, so there is currently only one valid user name for the device. The value "Use-token-auth" indicates to the service that the authentication token for the device will be passed as the password for the MQTT connection.
    • Password
    • If you are using token-based authentication, submit the device authentication token as a password when you establish an MQTT connection.
  • Publish Events
    • The device can only publish event topics in the following format: iot-2/evt/event_id/fmt/format_string
  • Booking command
    • The device can only subscribe to command topics in the following format:command_id/fmt/format_string. Events for other devices cannot be booked, and only commands that are specifically published to the device itself will be received.
  • Managed devices
    • Device lifecycle management support is optional, and the Device Management protocol used by IoTF leverages the same MQTT connection that the device has used for event and command control.
    • Managed devices can publish messages with a quality of service (QoS) level of 0 or 1. If you use QoS level 1, messages from the device are queued if necessary. A message from a device cannot be a hold message.
    • IoT Platform can publish requests with a QoS level of 1 to support Message Queuing. To queue a message if it is not connected to a managed device, the device should use "Cleansession=false".

Device Management Protocol
    • The device management feature creates a new class of connected devices, which are managed devices. Managed devices must contain a management agent that understands the IoT Platform Device Management protocol and can send a manage devices request to the IoT Platform Device Management Server. Managed devices can access device management operations.
    • The Device Management protocol defines a set of supported operations. The device management agent can support some of these operations, but you must support the Manage devices and cancel manage devices actions. Devices that support firmware operations must also support observation.
    • Device Management life cycle
      • Create devices and related device types using dashboards or APIs in IoT Platform.
      • The device must be connected to an IoT Platform and use the Manage devices action to become a managed device.
      • View and manipulate the device's metadata (as described in the device model) through device operations (for example, firmware updates and device reboots).
      • Devices can communicate updates (for example, location or diagnostic information, and error codes) through device management protocols.
      • An optional lifecycle parameter is provided in the Manage devices action request in order to handle the failed device in a large number of cases. This life cycle parameter contains a number of seconds that the device must issue another "manage device" request during that time to avoid being flagged as a stop and become an unmanaged device.
      • After the device is decommissioned, you can use the dashboard or REST API to remove the device from the IoT Platform.

Context Mapping
    • Watson IoT Context Mapping allows applications to use geospatial features, such as map matching and shortest path search based on a global road network.
    • The following features are used through the Context Mapping REST API:
      • High-accuracy map matching using road network geometry.
      • Handle real-time events on the map, such as traffic.
      • Take into account the dynamic shortest path search (route search) for real-time events, such as traffic.
      • Retrieves corridor geometry data that can be used to draw corridor shapes on a map.
    • The Context Mapping Service uses the road network data extracted from OPENSTREETMAP (in the form of WGS84 coordinates). Only road traffic is used for analysis.
      • Using Context Mapping for map matching
      • Route search using the Context Mapping
      • Using Context Mapping to handle traffic incidents

Driver Behavior

    • Use the Watson IoT Driver Behavior to analyze driver behavior by using the Driver Behavior API to collect and analyze automotive probing data and associated data.
    • After you create and deploy an unbound service instance, integrate the application with the Driver Behavior API.

Safety
    • IBM Watson IoT is a fully managed cloud hosting service that addresses security issues in the following areas:
      • Authentication: Identify the user, device, or application you are trying to access.
      • Authorization: Ensures that users, devices, and applications have access to the organization's information.
      • Encryption: Ensures that the data is read only by the authorized party and is not intercepted.

Security – Organization Management
    • The browser-based GUI and REST API are marked with HTTPS, with DigiCert signed certificates.
      • GUI: Certified by IBM identity.
      • Rest API: After you create an API key from the GUI, you can use it to perform certified REST API calls against your organization.

Security – Devices and applications
    • After registering the device or generating an API key, the authentication token will be hashed using the encrypted salt (salt).
    • Device credentials and API keys can be revoked individually if they are compromised.

Secure – Connect
    • The device is connected by a unique combination of clientId and authentication tokens that only the user knows.
    • Provides full support for connections over TLS (V1.2).
    • An open standard (MQTT V3.1.1) is used to allow easy interoperability between many platforms and languages.

Security – data leakage between devices
    • The device only has permission to publish and book restricted theme spaces:
      • /iot-2/evt/+/fmt/+
      • /iot-2/cmd/+
    • All devices use the same theme space to prevent devices from mimicking other devices.
    • The only way to impersonate another device is to obtain the compromised security credentials for that device.

Security – Prevent data leakage between organizations
    • The subject space for devices and applications is within a single organization.
    • Based on client authentication, the theme structure is transformed using organizational identity, so that one organization cannot access data in another organization.

Platform Interface

Create a Bluemix account

Select Area

Watson IoT Platform Service Instance

Configure User access rights

Generate the API secret key

Create a Device type

Add a Device

Device Authentication Token

Device Events

A probe into the foreign internet of Things Platform (iii): IBM Watson IoT

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.