{"_id":"576832b907b1f30e0039c643","__v":27,"project":"5764745b4f867c0e002bc8ed","version":{"_id":"5764745b4f867c0e002bc8f0","project":"5764745b4f867c0e002bc8ed","__v":4,"createdAt":"2016-06-17T22:06:19.667Z","releaseDate":"2016-06-17T22:06:19.667Z","categories":["5764745b4f867c0e002bc8f1","57683255bb15f40e00a288ce","57683306d8067e1900fc823d","57694b8f47693a0e00002b19"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"githubsync":"","parentDoc":null,"user":"5564f227f0f70f0d00a9ab20","category":{"_id":"57683255bb15f40e00a288ce","__v":0,"project":"5764745b4f867c0e002bc8ed","version":"5764745b4f867c0e002bc8f0","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-20T18:13:41.597Z","from_sync":false,"order":1,"slug":"architecture","title":"Architecture"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-20T18:15:21.174Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"The Connector Factory can be found at  [connector-factory.octoblu.com](https://connector-factory.octoblu.com). The purpose of the Connector Factory is to manage, find, and create connectors.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"The Process of Creating a Connector\"\n}\n[/block]\nIn order to create a Connector there are several steps needed.\n\n1. Register a Meshblu Device with the following properties:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"type\\\": \\\"device:[connector-name]\\\",\\n\\t\\\"connector\\\": \\\"meshblu-connector-[connector-name]\\\",\\n  \\\"connectorMetadata\\\": {\\n  \\t\\\"stopped\\\": false,\\n    \\\"version\\\": \\\"[connector-version]\\\",\\n    \\\"githubSlug\\\": \\\"[github-user]/meshblu-connector-[connector-name]\\n  },\\n  \\\"octoblu\\\": {\\n  \\t\\\"registryItem\\\": {...},\\n  },\\n  \\\"owner\\\": \\\"owner-uuid\\\",\\n  \\\"discoverWhitelist\\\": [\\n  \\t\\\"[owner-uuid]\\\"\\n  ],\\n  \\\"configureWhitelist\\\": [\\n  \\t\\\"[owner-uuid]\\\"\\n  ],\\n  \\\"sendWhitelist\\\": [\\n  \\t\\\"[owner-uuid]\\\"\\n  ],\\n  \\\"receiveWhitelist\\\": [\\n  \\t\\\"[owner-uuid]\\\"\\n  ],\\n  \\\"schemas\\\": {\\n    \\\"version\\\": \\\"2.0.0\\\",\\n    ...\\n\\t}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n2. 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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"type\\\": \\\"connector-status-device\\\",\\n  \\\"owner\\\": \\\"[owner-uuid]\\\",\\n  \\\"discoverWhitelist\\\": [\\\"[connector-uuid]\\\", \\\"[owner-uuid]\\\"],\\n  \\\"configureWhitelist\\\": [\\\"[connector-uuid]\\\", \\\"[owner-uuid]\\\"],\\n  \\\"sendWhitelist\\\": [\\\"[connector-uuid]\\\", \\\"[owner-uuid]\\\"],\\n  \\\"receiveWhitelist\\\": [\\\"[connector-uuid]\\\", \\\"[owner-uuid]\\\"]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n3. Using the newly registered connector uuid and status device uuid, update the connector device with the following properties:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"statusDevice\\\": \\\"[status-device-uuid]\\\",\\n   \\\"octoblu\\\": {\\n    \\\"links\\\": [\\n      {\\n        \\\"url\\\": \\\"https://connector-factory.octoblu.com/things/configure/[connector-uuid]\\\",\\n        \\\"title\\\": \\\"View in Connector Factory\\\",\\n      }\\n    ]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n4. Generate a One Time Password (OTP) with the installation metadata.\n    - POST https://meshblu-otp.octoblu.com/generate\n    - Basic Auth: [connector-uuid]:[connector-token]\n    - Use the following JSON as the POST body.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"connector\\\": \\\"meshblu-connector-[connector-name]\\\",\\n  \\\"tag\\\": \\\"v[connector-version]\\\",\\n  \\\"githubSlug\\\": \\\"[github-user]/meshblu-connector-[connector-name]\\\",\\n  \\\"connectorAssemblerVersion\\\": \\\"v[connector-assembler-version]\\\",\\n  \\\"dependencyManagerVersion\\\": \\\"v[dependency-manager-version]\\\",\\n  \\\"ignitionVersion\\\": \\\"v[ignition-version]\\\",\\n  \\\"octoblu\\\": {\\n  \\t\\\"uuid\\\": \\\"[octoblu-user-uuid]\\\",\\n    \\\"token\\\": \\\"[octoblu-user-token]\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n5. Using the `key` from the OTP generate result, download the following URL:\n    - Base URI: `https://file-downloader.octoblu.com/download`\n    - Query Params:\n        - **fileName**: 'MeshbluConnectorInstaller-**[otp-key]**.dmg'\n        - **uri**: 'https://github.com/octoblu/electron-meshblu-connector-installer/releases/download/v8.3.0/MeshbluConnectorInstaller-**[go-os]**-**[go-arch]**.dmg'\n    - 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`\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Services\"\n}\n[/block]\n## Meshblu \n\nThe Connector Factory uses [Meshbu](https://meshblu.readme.io) is used to find, configure, and create devices.\n\n## OTP Service\n\nOne 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](https://github.com/octoblu/meshblu-otp-service).\n\n## Connector Detail Service\n\nThe Connector Detail Service handling retrieving Github details about a connector. It can be found [here](https://github.com/octoblu/connector-detail-service).\n\n## Github\n\n[Github](https://github.com) is used by the Connector Factory for hosting connectors, components, and release assets.","excerpt":"","slug":"connector-factory","type":"basic","title":"Connector Factory"}
The Connector Factory can be found at [connector-factory.octoblu.com](https://connector-factory.octoblu.com). The purpose of the Connector Factory is to manage, find, and create connectors. [block:api-header] { "type": "basic", "title": "The Process of Creating a Connector" } [/block] In order to create a Connector there are several steps needed. 1. Register a Meshblu Device with the following properties: [block:code] { "codes": [ { "code": "{\n \"type\": \"device:[connector-name]\",\n\t\"connector\": \"meshblu-connector-[connector-name]\",\n \"connectorMetadata\": {\n \t\"stopped\": false,\n \"version\": \"[connector-version]\",\n \"githubSlug\": \"[github-user]/meshblu-connector-[connector-name]\n },\n \"octoblu\": {\n \t\"registryItem\": {...},\n },\n \"owner\": \"owner-uuid\",\n \"discoverWhitelist\": [\n \t\"[owner-uuid]\"\n ],\n \"configureWhitelist\": [\n \t\"[owner-uuid]\"\n ],\n \"sendWhitelist\": [\n \t\"[owner-uuid]\"\n ],\n \"receiveWhitelist\": [\n \t\"[owner-uuid]\"\n ],\n \"schemas\": {\n \"version\": \"2.0.0\",\n ...\n\t}\n}", "language": "json" } ] } [/block] 2. 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: [block:code] { "codes": [ { "code": "{\n\t\"type\": \"connector-status-device\",\n \"owner\": \"[owner-uuid]\",\n \"discoverWhitelist\": [\"[connector-uuid]\", \"[owner-uuid]\"],\n \"configureWhitelist\": [\"[connector-uuid]\", \"[owner-uuid]\"],\n \"sendWhitelist\": [\"[connector-uuid]\", \"[owner-uuid]\"],\n \"receiveWhitelist\": [\"[connector-uuid]\", \"[owner-uuid]\"]\n}", "language": "json" } ] } [/block] 3. Using the newly registered connector uuid and status device uuid, update the connector device with the following properties: [block:code] { "codes": [ { "code": "{\n\t\"statusDevice\": \"[status-device-uuid]\",\n \"octoblu\": {\n \"links\": [\n {\n \"url\": \"https://connector-factory.octoblu.com/things/configure/[connector-uuid]\",\n \"title\": \"View in Connector Factory\",\n }\n ]\n }\n}", "language": "json" } ] } [/block] 4. Generate a One Time Password (OTP) with the installation metadata. - POST https://meshblu-otp.octoblu.com/generate - Basic Auth: [connector-uuid]:[connector-token] - Use the following JSON as the POST body. [block:code] { "codes": [ { "code": "{\n \"connector\": \"meshblu-connector-[connector-name]\",\n \"tag\": \"v[connector-version]\",\n \"githubSlug\": \"[github-user]/meshblu-connector-[connector-name]\",\n \"connectorAssemblerVersion\": \"v[connector-assembler-version]\",\n \"dependencyManagerVersion\": \"v[dependency-manager-version]\",\n \"ignitionVersion\": \"v[ignition-version]\",\n \"octoblu\": {\n \t\"uuid\": \"[octoblu-user-uuid]\",\n \"token\": \"[octoblu-user-token]\"\n }\n}", "language": "json" } ] } [/block] 5. 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` [block:api-header] { "type": "basic", "title": "Services" } [/block] ## Meshblu The Connector Factory uses [Meshbu](https://meshblu.readme.io) 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](https://github.com/octoblu/meshblu-otp-service). ## Connector Detail Service The Connector Detail Service handling retrieving Github details about a connector. It can be found [here](https://github.com/octoblu/connector-detail-service). ## Github [Github](https://github.com) is used by the Connector Factory for hosting connectors, components, and release assets.