Added call to onRegister function

The onRegister function makes it easier to provide event-based characteristic updates.

Supported by the underlying HAP-NodeJS framework.
This commit is contained in:
Alistair Galbraith
2015-07-01 18:10:34 -07:00
parent dcdeb4c928
commit 85a2071e05

1
app.js
View File

@@ -124,6 +124,7 @@ function createHAPServer(name, services) {
for (var k = 0; k < services[j].characteristics.length; k++) {
var options = {
onRead: services[j].characteristics[k].onRead,
onRegister: services[j].characteristics[k].onRegister,
type: services[j].characteristics[k].cType,
perms: services[j].characteristics[k].perms,
format: services[j].characteristics[k].format,