homebridge
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -68,2 +68,6 @@ var chalk = require('chalk'); | ||
// prepend timestamp | ||
var date = new Date(); | ||
msg = chalk.black("[" + date.toLocaleString() + "]") + " " + msg; | ||
func(msg); | ||
@@ -70,0 +74,0 @@ } |
{ | ||
"name": "homebridge", | ||
"description": "HomeKit support for the impatient", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"scripts": { | ||
@@ -29,3 +29,3 @@ "dev": "DEBUG=* ./bin/homebridge -D -P example-plugins/ || true" | ||
"commander": "2.8.1", | ||
"hap-nodejs": "0.2.6", | ||
"hap-nodejs": "0.2.7", | ||
"semver": "5.0.3", | ||
@@ -32,0 +32,0 @@ "node-persist": "^0.0.8" |
@@ -104,3 +104,3 @@ | ||
The best place to start is the included [Example Plugins](https://github.com/nfarina/homebridge/tree/master/example-plugins). Right now this contains a single plugin that registers a fake door lock Accessory. This will show you how to use the Homebridge Plugin API. | ||
The best place to start is the included [Example Plugins](https://github.com/nfarina/homebridge/tree/master/example-plugins). Right now this contains a single plugin that registers a platform that offers fake light accessories. This will show you how to use the Homebridge Plugin API. | ||
@@ -111,8 +111,22 @@ For more example on how to construct HomeKit Services and Characteristics, see the many Accessories in the [Legacy Plugins](https://github.com/nfarina/homebridge-legacy-plugins/tree/master/accessories) repository. | ||
There isn't currently an example for how to publish a Platform (which allows the user to bridge many discovered devices at once, like a house full of smart lightbulbs), but the process is almost identical to registering an Accessory. Simply modify the example `index.js` in [homebridge-lockitron](https://github.com/nfarina/homebridge/tree/master/example-plugins/homebridge-lockitron) to say something like: | ||
And you can find an example plugin that publishes an individual accessory at [here](https://github.com/nfarina/homebridge/tree/6500912f54a70ff479e63e2b72760ab589fa558a/example-plugins/homebridge-lockitron). | ||
homebridge.registerPlatform("homebridge-myplugin", "MyPlatform", MyPlatform); | ||
See more examples on how to create Platform classes in the [Legacy Plugins](https://github.com/nfarina/homebridge-legacy-plugins/tree/master/platforms) repository. | ||
# Plugin Development | ||
When writing your plugin, you'll want Homebridge to load it from your development directory instead of publishing it to `npm` each time. You can tell Homebridge to look for your plugin at a specific location using the command-line parameter `-P`. For example, if you are in the Homebridge directory (as checked out from Github), you might type: | ||
```sh | ||
DEBUG=* ./bin/homebridge -D -P ../my-great-plugin/ | ||
``` | ||
This will start up Homebridge and load your in-development plugin from a nearby directory. Note that you can also direct Homebridge to load your configuration from somewhere besides the default `~/.homebridge`, for example: | ||
```sh | ||
DEBUG=* ./bin/homebridge -D -U ~/.homebridge-dev -P ../my-great-plugin/ | ||
``` | ||
This is very useful when you are already using your development machine to host a "real" Homebridge instance (with all your accessories) that you don't want to disturb. | ||
# Common Issues | ||
@@ -148,1 +162,3 @@ | ||
The original HomeKit API work was done by [KhaosT](http://twitter.com/khaost) in his [HAP-NodeJS](https://github.com/KhaosT/HAP-NodeJS) project. | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90022
1337
162
+ Addedhap-nodejs@0.2.7(transitive)
- Removedhap-nodejs@0.2.6(transitive)
Updatedhap-nodejs@0.2.7