mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
new Devices : Smokedetector
This commit is contained in:
@@ -330,7 +330,7 @@ HomeMaticPlatform.prototype = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
accessory = new HomeMaticGenericChannel(that.log, that, "1234" , "DummyKM" , "KEYMATIC" , "1234");
|
var accessory = new HomeMaticGenericChannel(that.log, that, "1234" , "DummyKM" , "SMOKE_DETECTOR" , "1234");
|
||||||
that.foundAccessories.push(accessory);
|
that.foundAccessories.push(accessory);
|
||||||
|
|
||||||
accessory = new HomeMaticGenericChannel(that.log, that, "5678" , "DummyBLIND" , "BLIND" , "5678");
|
accessory = new HomeMaticGenericChannel(that.log, that, "5678" , "DummyBLIND" , "BLIND" , "5678");
|
||||||
|
|||||||
@@ -544,6 +544,31 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Smoke Detector
|
||||||
|
if (this.type=="SMOKE_DETECTOR") {
|
||||||
|
cTypes.push(
|
||||||
|
{
|
||||||
|
cType: "00000076-0000-1000-8000-0026BB765291",
|
||||||
|
|
||||||
|
onRead: function(callback) {
|
||||||
|
that.query("STATE",callback);
|
||||||
|
},
|
||||||
|
|
||||||
|
onRegister: function(characteristic) {
|
||||||
|
that.currentStateCharacteristic["STATE"] = characteristic;
|
||||||
|
characteristic.eventEnabled = true;
|
||||||
|
that.remoteGetValue("STATE");
|
||||||
|
},
|
||||||
|
|
||||||
|
perms: ["pr","ev"],
|
||||||
|
format: "bool",
|
||||||
|
initialValue: that.dpvalue("STATE",0),
|
||||||
|
supportEvents: false,
|
||||||
|
supportBonjour: false,
|
||||||
|
manfDescription: "Smoke detected"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Heating Device
|
// Heating Device
|
||||||
|
|
||||||
if ((this.type=="CLIMATECONTROL_RT_TRANSCEIVER") || (this.type=="THERMALCONTROL_TRANSMIT")) {
|
if ((this.type=="CLIMATECONTROL_RT_TRANSCEIVER") || (this.type=="THERMALCONTROL_TRANSMIT")) {
|
||||||
@@ -588,8 +613,9 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
onUpdate: function(value) {
|
onUpdate: function(value) {
|
||||||
if (that.state["CONTROL_MODE"]!=1) {
|
if (that.state["CONTROL_MODE"]!=1) {
|
||||||
that.delayed("setrega", "MANU_MODE",value,500);
|
that.delayed("setrega", "MANU_MODE",value,500);
|
||||||
|
that.state["CONTROL_MODE"]=1; // set to Manual Mode
|
||||||
} else {
|
} else {
|
||||||
that.delayed("set", "SET_TEMPERATURE", value,500);
|
that.delayed("setrega", "SET_TEMPERATURE", value,500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRead: function(callback) {
|
onRead: function(callback) {
|
||||||
@@ -601,6 +627,7 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
that.currentStateCharacteristic["SET_TEMPERATURE"] = characteristic;
|
that.currentStateCharacteristic["SET_TEMPERATURE"] = characteristic;
|
||||||
characteristic.eventEnabled = true;
|
characteristic.eventEnabled = true;
|
||||||
that.remoteGetValue("SET_TEMPERATURE");
|
that.remoteGetValue("SET_TEMPERATURE");
|
||||||
|
that.remoteGetValue("CONTROL_MODE");
|
||||||
},
|
},
|
||||||
perms: ["pw","pr","ev"],format: "double",
|
perms: ["pw","pr","ev"],format: "double",
|
||||||
initialValue: that.dpvalue("SET_TEMPERATURE",16),
|
initialValue: that.dpvalue("SET_TEMPERATURE",16),
|
||||||
@@ -657,6 +684,9 @@ HomeMaticGenericChannel.prototype = {
|
|||||||
return types.LOCK_MECHANISM_STYPE
|
return types.LOCK_MECHANISM_STYPE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.type=="SMOKE_DETECTOR") {
|
||||||
|
return "00000087-0000-1000-8000-0026BB765291";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user