mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Instructions in README, sample provider
This commit is contained in:
40
README.md
40
README.md
@@ -1,4 +1,42 @@
|
||||
|
||||
# Branch in Progress
|
||||
|
||||
This branch contains an in-progress ground-up rewrite of HomeBridge that looks more like what we want in the [roadmap](/nfarina/homebridge/wiki/Roadmap).
|
||||
This branch contains an in-progress ground-up rewrite of HomeBridge that looks more like what we want in the [roadmap](/nfarina/homebridge/wiki/Roadmap).
|
||||
|
||||
To play with HomeBridge today, follow the instructions in the [master branch](/nfarina/homebridge).
|
||||
|
||||
## Installing
|
||||
|
||||
Install HomeBridge using [npm](https://npmjs.com):
|
||||
|
||||
```sh
|
||||
npm install -g homebridge
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
You can run HomeBridge easily from the command line:
|
||||
|
||||
```sh
|
||||
> homebridge server
|
||||
```
|
||||
|
||||
It will look for any locally-installed providers and load them up automatically.
|
||||
|
||||
## Providers
|
||||
|
||||
HomeBridge does nothing by itself; in order to expose your home to HomeKit, you'll need to install one or more HomeBridge "Providers." A Provider is an npm module that connects with HomeBridge and registers accessories for devices in your home.
|
||||
|
||||
Providers must be published to npm and tagged with `homebridge-provider`. The package name must contain the prefix `homebridge-`. For example, a valid package might be `homebridge-philips-hue`.
|
||||
|
||||
Providers are automatically discovered and loaded from your home directory inside the `.homebridge` folder. For instance, the Philips Hue Provider would be placed here:
|
||||
|
||||
```sh
|
||||
~/.homebridge/providers/node_modules/homebridge-philips-hue
|
||||
```
|
||||
|
||||
Right now you must copy providers manually (or symlink them from another location). The HomeBridge server will load and validate your Provider on startup. You can find an example Provider stub in [example-providers/homebridge-liftmaster]().
|
||||
|
||||
## Running from Source
|
||||
|
||||
You can run HomeBridge directly from source by cloning this repo and running the executable [bin/homebridge](). Remember to `npm install` dependencies first!
|
||||
3
example-providers/homebridge-liftmaster/index.js
Normal file
3
example-providers/homebridge-liftmaster/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
// Demonstrate that we were loaded
|
||||
console.log("LiftMaster provider loaded!");
|
||||
12
example-providers/homebridge-liftmaster/package.json
Normal file
12
example-providers/homebridge-liftmaster/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "homebridge-liftmaster",
|
||||
"version": "0.0.0",
|
||||
"description": "LiftMaster Support for HomeBridge",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"homebridge": ">=0.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"homebridge-provider"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user