Guides
Guides

Custom Registry

Would you like to have your own list of devices appear in app.octoblu.com and connector-factory.octoblu.com? You can easily add one that acts just like Official Octoblu Connectors Registry by hosting your own JSON file with the following structure:

{
  "name": "My Custom Registry",
  "documentation": "...",
  "version": "1.0.0",
  "items": [
    {
      "_id": "someuser-meshblu-connector-custom-device",
      "name": "My Custom Device",
      "description": "blah blah blah",
      "type": "device:my-custom-device",
      "tags": ["Awesome Thing"],
      "githubSlug": "someuser/meshblu-connector-custom-device",
      "createUri": "https://connector-factory.octoblu.com/connectors/create/someuser/meshblu-connector-custom-device",
      "configureUri": "https://connector-factory.octoblu.com/things/configure/:uuid",
      "iconUri": "https://icons.octoblu.com/devices/generic.svg"
    }
  ]
}

Once you have a hosted registry, now update your Octoblu User with the registry uri. You can use meshblu-util to do this.

# Install meshblu-util
npm install -g meshblu-util

# Go to tmp directory
cd /path/to/some/tmp/dir

# Create a meshblu.json of your Octoblu User
meshblu-util register > meshblu.json

# Copy the UUID and generate a token for your Octoblu user (https://app.octoblu.com/profile)
# Add them to your meshblu.json
vim meshblu.json

# Create an update json file
# Write the following to the following custom-registry-update.json
# {
#  "$set": {
#    "octoblu.registries.connectors.my-custom-registry.uri": "[url-to-my-custom-registry]"
#  }
# }

meshblu-util update -p -f ./custom-registry-update.json