Connector Factory

The Connector Factory can be found at connector-factory.octoblu.com. The purpose of the Connector Factory is to manage, find, and create connectors.

The Process of Creating a Connector

In order to create a Connector there are several steps needed.

  1. Register a Meshblu Device with the following properties:
{
  "type": "device:[connector-name]",
	"connector": "meshblu-connector-[connector-name]",
  "connectorMetadata": {
  	"stopped": false,
    "version": "[connector-version]",
    "githubSlug": "[github-user]/meshblu-connector-[connector-name]
  },
  "octoblu": {
  	"registryItem": {...},
  },
  "owner": "owner-uuid",
  "discoverWhitelist": [
  	"[owner-uuid]"
  ],
  "configureWhitelist": [
  	"[owner-uuid]"
  ],
  "sendWhitelist": [
  	"[owner-uuid]"
  ],
  "receiveWhitelist": [
  	"[owner-uuid]"
  ],
  "schemas": {
    "version": "2.0.0",
    ...
	}
}
  1. Register another device associated with the original device. This device is the called the "Status Device", who's purpose is to prevent polluting the connector device with status messages and config changes. Create a device in Meshblu with the following properties:
{
	"type": "connector-status-device",
  "owner": "[owner-uuid]",
  "discoverWhitelist": ["[connector-uuid]", "[owner-uuid]"],
  "configureWhitelist": ["[connector-uuid]", "[owner-uuid]"],
  "sendWhitelist": ["[connector-uuid]", "[owner-uuid]"],
  "receiveWhitelist": ["[connector-uuid]", "[owner-uuid]"]
}
  1. Using the newly registered connector uuid and status device uuid, update the connector device with the following properties:
{
	"statusDevice": "[status-device-uuid]",
   "octoblu": {
    "links": [
      {
        "url": "https://connector-factory.octoblu.com/things/configure/[connector-uuid]",
        "title": "View in Connector Factory",
      }
    ]
  }
}
  1. Generate a One Time Password (OTP) with the installation metadata.
{
  "connector": "meshblu-connector-[connector-name]",
  "tag": "v[connector-version]",
  "githubSlug": "[github-user]/meshblu-connector-[connector-name]",
  "connectorAssemblerVersion": "v[connector-assembler-version]",
  "dependencyManagerVersion": "v[dependency-manager-version]",
  "ignitionVersion": "v[ignition-version]",
  "octoblu": {
  	"uuid": "[octoblu-user-uuid]",
    "token": "[octoblu-user-token]"
  }
}
  1. Using the key from the OTP generate result, download the following URL:
    • Base URI: https://file-downloader.octoblu.com/download
    • Query Params:
      • fileName: 'MeshbluConnectorInstaller-[otp-key].dmg'
      • uri: 'https://github.com/octoblu/electron-meshblu-connector-installer/releases/download/v8.3.0/MeshbluConnectorInstaller-[go-os]-[go-arch].dmg'
    • Example: https://file-downloader.octoblu.com/download?fileName=MeshbluConnectorInstaller-123456.dmg&uri=https%3A%2F%2Fgithub.com%2Foctoblu%2Felectron-meshblu-connector-installer%2Freleases%2Fdownload%2Fv8.3.0%2FMeshbluConnectorInstaller-darwin-amd64.dmg

Services

Meshblu

The Connector Factory uses Meshbu is used to find, configure, and create devices.

OTP Service

One Time Password, or OTP, is a method for storing and retrieving credentials. Once the credentials are retrieved, they are removed from the datastore. We've create a Meshblu OTP service, which can be found here.

Connector Detail Service

The Connector Detail Service handling retrieving Github details about a connector. It can be found here.

Github

Github is used by the Connector Factory for hosting connectors, components, and release assets.