mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-29 06:13:13 +01:00
fixed thermostats
This commit is contained in:
@@ -360,6 +360,12 @@ HomeMaticPlatform.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
setRegaValue: function(channel, datapoint, value) {
|
||||||
|
var rega = new RegaRequest(this.log, this.ccuIP);
|
||||||
|
rega.setValue(channel, datapoint, value);
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
|
||||||
getValue: function(channel, datapoint, callback) {
|
getValue: function(channel, datapoint, callback) {
|
||||||
|
|
||||||
if (channel.indexOf("BidCos-RF.") > -1) {
|
if (channel.indexOf("BidCos-RF.") > -1) {
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
if (this.state[dp] != undefined) {
|
if (this.state[dp] != undefined) {
|
||||||
callback(this.state[dp]);
|
if (callback!=undefined){callback(this.state[dp]);}
|
||||||
} else {
|
} else {
|
||||||
// that.log("No cached Value found start fetching and send temp 0 back");
|
// that.log("No cached Value found start fetching and send temp 0 back");
|
||||||
this.remoteGetValue(dp);
|
this.remoteGetValue(dp);
|
||||||
callback(0);
|
if (callback!=undefined){callback(0);}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -114,9 +114,15 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
if (mode == "set") {
|
if (mode == "set") {
|
||||||
//this.log("Send " + value + " to Datapoint " + dp + " at " + that.adress);
|
this.log("Send " + value + " to Datapoint " + dp + " at " + that.adress);
|
||||||
that.platform.setValue(that.adress,dp,value);
|
that.platform.setValue(that.adress,dp,value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mode == "setrega") {
|
||||||
|
this.log("Send " + value + " to Datapoint " + dp + " at " + that.adress);
|
||||||
|
that.platform.setRegaValue(that.adress,dp,value);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
informationCharacteristics: function() {
|
informationCharacteristics: function() {
|
||||||
@@ -580,11 +586,15 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
{
|
{
|
||||||
cType: types.TARGET_TEMPERATURE_CTYPE,
|
cType: types.TARGET_TEMPERATURE_CTYPE,
|
||||||
onUpdate: function(value) {
|
onUpdate: function(value) {
|
||||||
//that.delayed("set", "SET_TEMPERATURE", value,500);
|
if (that.state["CONTROL_MODE"]!=1) {
|
||||||
that.delayed("set", "MANU_MODE", value,500);
|
that.delayed("setrega", "MANU_MODE",value,500);
|
||||||
|
} else {
|
||||||
|
that.delayed("set", "SET_TEMPERATURE", value,500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onRead: function(callback) {
|
onRead: function(callback) {
|
||||||
that.query("SET_TEMPERATURE",callback);
|
that.query("SET_TEMPERATURE",callback);
|
||||||
|
that.query("CONTROL_MODE",undefined);
|
||||||
|
|
||||||
},
|
},
|
||||||
onRegister: function(characteristic) {
|
onRegister: function(characteristic) {
|
||||||
|
|||||||
Reference in New Issue
Block a user