{"_id":"59d14cf52a06140010dbf880","project":"568bdc1483d2061900d86cdc","version":{"_id":"59a72290d61777001b6c42c3","project":"568bdc1483d2061900d86cdc","__v":19,"createdAt":"2017-08-30T20:39:44.453Z","releaseDate":"2017-08-30T20:39:44.453Z","categories":["59a7236e3fe4d90025117c10","59a72eb6cb0db3001b84cfe2","59a734eb757d030019b85af8","59c0243b1b2d07001a9d2b76","59c035e42126e10028effb12","59c06c40df5b3c0010584a13","59c1a5852cabe5002641a3e7","59c2fb00b2b45c0010b7a3d7","59c32ceb9aea850010ac4130","59c32e6e190c90003cb0d12f","59c33affb2b45c0010b7aa23","59c7dfa457bd8200105444dc","59c7e975c50cf30010d712a0","59cffdef0cd4dd0010294d54","59d0622ca91a810032c8f60c","59d06733c1aec60026253065","59d174d44ac471001a07b123","59d5a5e323e6e800103defb2","59ecf1d8ed507c001c52b255"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.0","version":"0"},"category":{"_id":"59d0622ca91a810032c8f60c","project":"568bdc1483d2061900d86cdc","version":"59a72290d61777001b6c42c3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-10-01T03:34:04.474Z","from_sync":false,"order":4,"slug":"edge-server-plugins","title":"Edge Server"},"user":"58cc41f21751ce2f003be3b7","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-10-01T20:15:49.513Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"# Introduction\n\nThe Edge server may be configured by editing the `localsettings.json` file in `/projects/droplit-edge`. Settings include things such as the ecosystem the server is targeting, and which plugins to enable. The settings are organized in a JSON object with a standard structure.\n\n# JSON Settings Object Example\n```\n{\n    \"ecosystemId\": \"C5859a328e206a321b51f02f7\",\n    \"transport\": {\n        \"host\": \"wss://edge-ws.droplit.io\"\n        \"enableHeartbeat\": true\n    },\n    \"plugins\": {\n        \"droplit-plugin-philips-hue\": {\n            \"enabled\": true,\n            \"localServices\": [ \"Connectivity\" ]\n        },\n        \"droplit-plugin-lifx\": {\n            \"enabled\": true\n    },\n    \"promotedMembers\": {\n        \"connect\": \"Connectivity.connect\"\n    },\n    \"debug\": {\n        \"generateHeapDump\": false\n    }\n}\n```\n\n# Setting Definitions\n\n## ecosystemId\nThe ecosystem that the Edge server is connected to. This should be the raw ID, not an alias.\n\n## transport\nAn object used to configure options related to web socket transport.\n\n## host\nSpecifies the host address of the web socket server the Edge targets. The host address for the release server is `wss://edge-ws.droplit.io`.\n\n## enableHeartbeat\nWhether to use a heartbeat with the configured web socket server. The value is a boolean, `true` by default. This is intended for use in debugging only and not expected for normal usage.\n\n## plugins\nConfiguration for the individual plugins used by the Edge server. There are two different possible syntaxes to specify the structure of this value.\n\nThe first way to specify the plugin configuration is to treat every plugin as a separate pair in an object. The configuration is specified using a key-value pair, where the key is the plugin name, and the value is an object containing the configuration for the individual settings. This object should always contain an 'enabled' key, which has a boolean value denoting whether the plugin is enabled. It may also, depending on the plugin, contain other unique key-value pairs.\n\n```\n{\n    \"plugins\": {\n        \"droplit-plugin-philips-hue\": {\n            \"enabled\": true\n        },\n        \"droplit-plugin-lifx\": {\n            \"enabled\": true\n        },\n        \"droplit-plugin-wemo\": {\n            \"enabled\": false\n        }\n    }\n}\n```\n\nThe second way to specify the plugin configuration is to use an array. This may be simpler when a number of plugins are enabled simply using the default settings and must all be enabled. Distinct plugins can still be enabled as objects with unique settings, if desired. The previous example would translate to the following in this syntax.\n\n```\n{\n    \"plugins\": [\n        \"droplit-plugin-philips-hue\",\n        \"droplit-plugin-lifx\",\n        {\n            \"name\": \"droplit-plugin-wemo\",\n            \"enabled\": false\n        }\n    ]\n}\n```\n\n## name\nThe name of a plugin, only used with the array syntax of the plugins configuration.\n\n## enabled\nWhether plugins are enabled, using a boolean value. Included pugins are enabled by default.\n\n## localServices\nConfigures the local services that a specific plugin is to subscribe to. The value is an array of strings representing the service names.\n\n## promotedMembers\nA mapping between a custom promotion name and local service member.\n\n## debug\nAn object used to configure options related to debugging the Edge server. None of the contained keys are expected to be enabled for normal usage.\n\n## generateHeapDump\nConfigures whether a heap dump is generated on a timed interval (every half hour) using a boolean value. The value is `false` by default.","excerpt":"","slug":"edge-local-settings","type":"basic","title":"Local Settings"}
# Introduction The Edge server may be configured by editing the `localsettings.json` file in `/projects/droplit-edge`. Settings include things such as the ecosystem the server is targeting, and which plugins to enable. The settings are organized in a JSON object with a standard structure. # JSON Settings Object Example ``` { "ecosystemId": "C5859a328e206a321b51f02f7", "transport": { "host": "wss://edge-ws.droplit.io" "enableHeartbeat": true }, "plugins": { "droplit-plugin-philips-hue": { "enabled": true, "localServices": [ "Connectivity" ] }, "droplit-plugin-lifx": { "enabled": true }, "promotedMembers": { "connect": "Connectivity.connect" }, "debug": { "generateHeapDump": false } } ``` # Setting Definitions ## ecosystemId The ecosystem that the Edge server is connected to. This should be the raw ID, not an alias. ## transport An object used to configure options related to web socket transport. ## host Specifies the host address of the web socket server the Edge targets. The host address for the release server is `wss://edge-ws.droplit.io`. ## enableHeartbeat Whether to use a heartbeat with the configured web socket server. The value is a boolean, `true` by default. This is intended for use in debugging only and not expected for normal usage. ## plugins Configuration for the individual plugins used by the Edge server. There are two different possible syntaxes to specify the structure of this value. The first way to specify the plugin configuration is to treat every plugin as a separate pair in an object. The configuration is specified using a key-value pair, where the key is the plugin name, and the value is an object containing the configuration for the individual settings. This object should always contain an 'enabled' key, which has a boolean value denoting whether the plugin is enabled. It may also, depending on the plugin, contain other unique key-value pairs. ``` { "plugins": { "droplit-plugin-philips-hue": { "enabled": true }, "droplit-plugin-lifx": { "enabled": true }, "droplit-plugin-wemo": { "enabled": false } } } ``` The second way to specify the plugin configuration is to use an array. This may be simpler when a number of plugins are enabled simply using the default settings and must all be enabled. Distinct plugins can still be enabled as objects with unique settings, if desired. The previous example would translate to the following in this syntax. ``` { "plugins": [ "droplit-plugin-philips-hue", "droplit-plugin-lifx", { "name": "droplit-plugin-wemo", "enabled": false } ] } ``` ## name The name of a plugin, only used with the array syntax of the plugins configuration. ## enabled Whether plugins are enabled, using a boolean value. Included pugins are enabled by default. ## localServices Configures the local services that a specific plugin is to subscribe to. The value is an array of strings representing the service names. ## promotedMembers A mapping between a custom promotion name and local service member. ## debug An object used to configure options related to debugging the Edge server. None of the contained keys are expected to be enabled for normal usage. ## generateHeapDump Configures whether a heap dump is generated on a timed interval (every half hour) using a boolean value. The value is `false` by default.