West Connectivity - Connectors
Connectors functionality provides a centralized control for devices configuration and provisioning. A single connectivity sub-domain is provided per instance of Connector which usually pairs with a firmware version and a hardware model.
Overview
As is discussed in the Data Flow article, West Connectivity internally represents real-world IoT components as the Connectors, Applications, and Integrations.
In general, most West Connectivity users want to simply connect a Device to the cloud and start interacting with that Device remotely to create something valuable for end users or for a business process. However, there are many different types of Devices. Each type has a different level of processing/communication/storage capabilities and represents/controls different real-world parameters.
To make “connecting/interacting to a remote Device” a scalable effort for businesses, West Connectivity uses the idea of a Device type (or Device model)—known as a Product—to define how Devices belonging to the Connector interact. Connectors, therefore, have multiple Devices associated with them (one Connector, many Devices). Once the behavior of the general Connector is defined, it is easy to start “stamping out” thousands of Devices that will interact as required by the Connector to which they belong. The representation and capabilities in West Connectivity of a given Device are often referred to by the industry as a “Digital Twin,” a “Device Shadow,” or a “Virtual Device.”
Because there are so many different possible Connectors variants (i.e. ranging from a simple sensor to a very capable gateway - each having varieties of processing, communications, storage, data representation, and control capabilities), each West Connectivity Connector allows the configuration of its capabilities. Every Device interacts with West Connectivity as defined its Connector’s configuration of these areas:
- Communications authentication method
- Communications protocol
- Device identities/whitelist pool
- Expected communications behavior
- Expected data schema
- Data & State persistence
- Firmware/content
- Cloud-assisted processing
- User/Value-Added-Reseller access/control permissions
- Automated external Integrations
It is also often the case that an Connector will be used to power a variety of End User applications (Applications). For example, a Connected Pump Product may have some specific Pumps that are used in a container truck filling/dispensing application, while other Pumps (belonging to the same Connector) are used in a maintenance facility fluid transfer application. In West Connectivity, an Connector is able to be used in a variety of Applications without changes to the underlying Devices – even when the Applications are created and maintained by business partners or customers.
Device Lifecycle
This guide documents the different stages of a device during its time on the West Connectivity platform.
This includes device provisioning, device distribution, customer experience, claiming a device, transferring device ownership, replacing a device, and device end-of-life.
Device Provisioning Process
The West Connectivity uses three security methods to authenticate connections. One method uses an automatically generated pre-shared key, the second is using customized password, and last method uses client certificates to establish a secure TLS connection.
Pre-Shared Key
The pre-shared key process has two methods to add identities and authenticate. Users can make a call that will add an identity, ID=12345, and a user generated key, CIK=40 character hex. This adds a device to the platform and adds the authentication in one effort. The other method is to provide the server an identity, and it will generate a key for authentication. In either case, the pre-shared key will exist on the device in non-volatile memory. The devices uses the key, either user-generated or provided, to write data to the cloud and to read data from it.
Data Format
In order for West Connectivity to properly process data, it must first understand some information about the type of data it expects from the device. West Connectivity supports three main data types: number, string, and boolean. Each resource within a product has what is called an "alias." An alias is the name describing the resource. For instance, a resource with an alias of "temp", and a format of number will be expecting data to describe it in the following format: temp=70
.
Distribution
Once a device is provisioned and the data format is defined, the device is prepared for sale to distributors or end users. West Connectivity lets you create a custom API to give access to data and control over a device based on identity. Users can claim their device in a custom application and access the device's data from the custom API. The API uses a Lua scripting environment and gives access to dozens of integrations and core services. These services can be leveraged to allow for maximum flexibility when designing your custom application. After distribution, a device enters standard operating mode. A device will remain this way until deactivation, ideally, but oftentimes devices require maintenance, or debugging, if issues arise.
Customer Experience
Customers should be able to simply plug in their device and then access the needed functionality from the custom application. Because the key has been pre-shared, and because the device has authenticated, the customer can simply register with your application. They will then have access to the data and can control the device from the cloud. West Connectivity has been designed to be simple and easy for the end users of your device.