Added Temperature sensor and Fan

This commit is contained in:
Foxi352 committed 2016-09-09 11:02:40 +02:00
1 parent a8e1cb6a4c
commit 1859b247ae
2 files changed
+128 -6

No files matched your search

+2 -3
View File
@@ -3,7 +3,6 @@ var WebSocketClient = require('websocket').client
var colorOn = "\x1b[30;47m";
var colorOff = "\x1b[0m";
var version = "1.0";
function SmartHomeNGConnection(platform, log, host, port) {
this.log = log;
@@ -19,7 +18,7 @@ function SmartHomeNGConnection(platform, log, host, port) {
}
SmartHomeNGConnection.prototype.init = function () {
var that = this
var that = this;
this.shng_ws = new WebSocketClient();
this.shng_ws.on('connect', function(connection) {
that.log('[SmartHomeNGConnection] connected to server!');
@@ -84,7 +83,7 @@ SmartHomeNGConnection.prototype.idenfityMyself = function() {
var buffer = {};
buffer.cmd = 'identity';
buffer.sw = 'homebridge-SmarHomeNG';
buffer.ver = version;
buffer.ver = this.platform.version;
var command = JSON.stringify(buffer);
this.connection.send(command);
} else {