Skip to content

Commit

Permalink
Some Logging, Program launcher fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thkl committed Jan 23, 2017
1 parent 7ecab12 commit 60fef93
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ChannelServices/HomeMaticHomeKitProgramService.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ HomeMaticHomeKitProgramService.prototype.createDeviceService = function(Service,
.on('set', function(value, callback) {
if (value==1) {

that.log("Launch Program " + that.name);
that.log("Launch Program " + that.adress);
that.command("sendregacommand","","var x=dom.GetObject(\""+that.adress+"\");if (x) {x.ProgramExecute();}",function() {

});
Expand Down
4 changes: 2 additions & 2 deletions ChannelServices/HomeMaticHomeKitSwitchService.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ HomeMaticHomeKitSwitchService.prototype.createDeviceService = function(Service,
.on('set', function(value, callback) {
if (value==1) {

that.log("Launch Program " + that.name);
that.command("sendregacommand","","var x=dom.GetObject(\""+that.name+"\");if (x) {x.ProgramExecute();}",function() {
that.log("Launch Program " + that.adress);
that.command("sendregacommand","","var x=dom.GetObject(\""+that.adress+"\");if (x) {x.ProgramExecute();}",function() {

});

Expand Down
4 changes: 2 additions & 2 deletions HomeMaticChannelLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ var HomeMaticChannelLoader = function (log) {
cfg["interface"] = channel.intf;

// Replace Chars in name https://github.com/thkl/homebridge-homematic/issues/56

name = name.replace(/[.:#_()-]/g,' ');

var accessory = new service(log,platform, id ,name, channelType ,adress,special, cfg, Service, Characteristic);
list.push(accessory);
} else {
Expand Down
3 changes: 2 additions & 1 deletion HomeMaticRPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var HomeMaticRPC = function (log, ccuip,port,system,platform) {

this.log = log;

this.log.info("init RPC for %",system);
this.log.info("init RPC for %s",system);
this.system = system;
this.ccuip = ccuip;
this.platform = platform;
Expand Down Expand Up @@ -129,6 +129,7 @@ HomeMaticRPC.prototype.init = function() {
if ((accessory.adress == channel) || 
((accessory.cadress != undefined) && (accessory.cadress == channel)) || 
((accessory.deviceAdress != undefined) && (accessory.deviceAdress == deviceAdress))) {
that.log.debug("Accessory %s found -> Send Event",accessory.name);
accessory.event(channel,datapoint, value);
}

Expand Down
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

**** BEGINNING OF VERSION 0.0.41 the selection of channels to use with HomeKit via a CCU Subsection is mandatory

Version 0.0.66
some error logging
Fix for Programs with _ etc

Version 0.0.65
fix for Programs

Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ HomeMaticPlatform.prototype.accessories = function(callback) {

}
} catch (e) {
that.log.warn("Unable to parse live ccu data. Will try cache if there is one");
that.log.warn("Unable to parse live ccu data. Will try cache if there is one. If you want to know what, start homebridge in debug mode -> DEBUG=* homebridge -D");
that.log.debug("JSON Error %s for Data %s",e,data);
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-homematic",
"version": "0.0.65",
"version": "0.0.66",
"description": "Homematic plugin for homebridge: https://github.com/nfarina/homebridge",
"license": "ISC",
"keywords": [
Expand Down

0 comments on commit 60fef93

Please sign in to comment.