{"action":"created","issue":{"url":"https://api.github.com/repos/nfarina/homebridge/issues/293","labels_url":"https://api.github.com/repos/nfarina/homebridge/issues/293/labels{/name}","comments_url":"https://api.github.com/repos/nfarina/homebridge/issues/293/comments","events_url":"https://api.github.com/repos/nfarina/homebridge/issues/293/events","html_url":"https://github.com/nfarina/homebridge/pull/293","id":112074798,"number":293,"title":"Plugin system","user":{"login":"nfarina","id":117280,"avatar_url":"https://avatars.githubusercontent.com/u/117280?v=3","gravatar_id":"","url":"https://api.github.com/users/nfarina","html_url":"https://github.com/nfarina","followers_url":"https://api.github.com/users/nfarina/followers","following_url":"https://api.github.com/users/nfarina/following{/other_user}","gists_url":"https://api.github.com/users/nfarina/gists{/gist_id}","starred_url":"https://api.github.com/users/nfarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfarina/subscriptions","organizations_url":"https://api.github.com/users/nfarina/orgs","repos_url":"https://api.github.com/users/nfarina/repos","events_url":"https://api.github.com/users/nfarina/events{/privacy}","received_events_url":"https://api.github.com/users/nfarina/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":50,"created_at":"2015-10-19T05:32:24Z","updated_at":"2015-11-04T11:48:30Z","closed_at":"2015-11-03T23:22:53Z","pull_request":{"url":"https://api.github.com/repos/nfarina/homebridge/pulls/293","html_url":"https://github.com/nfarina/homebridge/pull/293","diff_url":"https://github.com/nfarina/homebridge/pull/293.diff","patch_url":"https://github.com/nfarina/homebridge/pull/293.patch"},"body":"Proposal for new \"Plugin\" system.\r\n\r\nThis splits Homebridge into a \"core\" npm package with minimal dependencies that is intended to be installed globally via a single command `npm install -g homebridge`.\r\n\r\nBy itself, Homebridge does nothing - you must install one or more Plugins to have any functionality.\r\n\r\nPlugins are published separately to npm and installed globally like `npm install -g homebridge-lockitron`.\r\n\r\nSince homebridge will now be system-global, all user files have been moved to `$HOME/.homebridge`. For now, that means `config.json` and `persist` are epected to be there instead of inside the Homebridge package.\r\n\r\nPlugins can \"register\" one or more accessories or platforms by calling methods on the `homebridge` API object passed to the new \"plugin initializer\" method which is expected to be the root export of the plugin (this is similar to Grunt plugins).\r\n\r\nSee `example-plugins/homebridge-lockitron` for an example of a Plugin package.\r\n\r\nAll of today's accessories and platforms would be very slightly modified to access HAP classes via the `homebridge` API, and temporarily published to a new npm package `homebridge-legacy`. So today's users could type `npm install -g homebridge-legacy` and get all the accessories and platforms as they are today.\r\n\r\nHowever, accessory and platform authors will be strongly encouraged to create their own Github repos and npm packages for their own Plugins, so that users can install only what they need, and are in control of when to upgrade plugins. This will also naturally move the very high amount of issue/PR traffic to the Plugin repositories where they belong.\r\n\r\nI'm still working on porting the existing accessories+platforms to the new `homebridge-legacy` repo, but figured I would make this PR for discussion in the meantime.\r\n\r\n/cc @cflurin, @snowdd1, @SphtKr, @maddox, @madmod, @KhaosT\r\nContinuing discussion from #278"},"comment":{"url":"https://api.github.com/repos/nfarina/homebridge/issues/comments/153696655","html_url":"https://github.com/nfarina/homebridge/pull/293#issuecomment-153696655","issue_url":"https://api.github.com/repos/nfarina/homebridge/issues/293","id":153696655,"user":{"login":"cflurin","id":5056710,"avatar_url":"https://avatars.githubusercontent.com/u/5056710?v=3","gravatar_id":"","url":"https://api.github.com/users/cflurin","html_url":"https://github.com/cflurin","followers_url":"https://api.github.com/users/cflurin/followers","following_url":"https://api.github.com/users/cflurin/following{/other_user}","gists_url":"https://api.github.com/users/cflurin/gists{/gist_id}","starred_url":"https://api.github.com/users/cflurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cflurin/subscriptions","organizations_url":"https://api.github.com/users/cflurin/orgs","repos_url":"https://api.github.com/users/cflurin/repos","events_url":"https://api.github.com/users/cflurin/events{/privacy}","received_events_url":"https://api.github.com/users/cflurin/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T11:48:30Z","updated_at":"2015-11-04T11:48:30Z","body":"yes, I did uninstall and clean without success\r\n```sh\r\nsudo npm uninstall -g homebridge\r\nsudo npm cache clean\r\n```"}}