homebridge-cul
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"plugins": [ | ||
"homebridge-config-ui-x", | ||
"homebridge-cul" | ||
], | ||
"platforms": [ | ||
@@ -3,0 +7,0 @@ { |
28
index.js
@@ -186,2 +186,9 @@ var http = require('http'); | ||
var newAccessory = new Accessory(accessoryName, uuid); | ||
newAccessory.getService(Service.AccessoryInformation) | ||
.setCharacteristic(Characteristic.Manufacturer, 'CUL') | ||
.setCharacteristic(Characteristic.Model, 'CUL EM') | ||
// .setCharacteristic(Characteristic.SerialNumber, ...) | ||
.setCharacteristic(Characteristic.FirmwareRevision, require('./package.json').version) | ||
newAccessory.on('identify', function(paired, callback) { | ||
@@ -202,2 +209,23 @@ platform.log(newAccessory.displayName, "Identify!!!"); | ||
newAccessory | ||
.getService(Service.Lightbulb).addCharacteristic(Characteristic.Brightness) | ||
.on('set', function(value, callback) { | ||
platform.log(newAccessory.displayName, "Bright -> " + value); | ||
callback(); | ||
}); | ||
newAccessory | ||
.getService(Service.Lightbulb).addCharacteristic(Characteristic.Saturation) | ||
.on('set', function(value, callback) { | ||
platform.log(newAccessory.displayName, "Sat -> " + value); | ||
callback(); | ||
}); | ||
newAccessory | ||
.getService(Service.Lightbulb).addCharacteristic(Characteristic.Hue) | ||
.on('set', function(value, callback) { | ||
platform.log(newAccessory.displayName, "Hue -> " + value); | ||
callback(); | ||
}); | ||
this.accessories.push(newAccessory); | ||
@@ -204,0 +232,0 @@ this.api.registerPlatformAccessories("homebridge-samplePlatform", "CulPlatform", [newAccessory]); |
{ | ||
"_from": "github:foxthefox/homebridge-cul", | ||
"_id": "homebridge-cul@0.0.1", | ||
"_id": "homebridge-cul@0.0.2", | ||
"_inBundle": false, | ||
@@ -17,8 +17,7 @@ "_integrity": "", | ||
"_requiredBy": [ | ||
"#USER", | ||
"/" | ||
"#USER" | ||
], | ||
"_resolved": "github:foxthefox/homebridge-cul#e58c7a224399c714fb79cc58258e0f4e79cd2330", | ||
"_resolved": "github:foxthefox/homebridge-cul#faa05950553c5562ae4060d6e4f15bfe5669e2a6", | ||
"_spec": "foxthefox/homebridge-cul", | ||
"_where": "/opt/test", | ||
"_where": "/usr/lib", | ||
"author": { | ||
@@ -47,2 +46,3 @@ "name": "foxthefox" | ||
"keywords": [ | ||
"homebridge-plugin", | ||
"homebridge", | ||
@@ -63,3 +63,3 @@ "plugin", | ||
}, | ||
"version": "0.0.1" | ||
"version": "0.0.2" | ||
} |
# homebridge-cul | ||
hombridge plugin CUL -USB | ||
After adding this to config.json | ||
"plugins": [ | ||
"homebridge-cul" | ||
], | ||
the plugin appears in the "homebridge-config-ui-x". | ||
before was "Error: The requested platform 'CUL' was not registered by any plugin.", when only having the platform section added in config.json. |
11624
224
12