GarageDoorOpener fixed

This commit is contained in:
Snowdd1
2015-09-19 21:24:55 +02:00
parent eec663a5c8
commit 84c51aa27a
2 changed files with 38 additions and 20 deletions

View File

@@ -210,7 +210,7 @@ KNXDevice.prototype = {
this.log("knx registering FLOAT " + addresses); this.log("knx registering FLOAT " + addresses);
knxd_registerGA(addresses, function(val, src, dest, type){ knxd_registerGA(addresses, function(val, src, dest, type){
this.log("Received value from bus:"+val+ " for " +dest+ " from "+src+" of type "+type+ " for " + characteristic.displayName); this.log("Received value from bus:"+val+ " for " +dest+ " from "+src+" of type "+type+ " for " + characteristic.displayName);
if (val>=(characteristic.minimumValue || 0) && val<=(characteristic.maximumValue || 255) { if (val>=(characteristic.minimumValue || 0) && val<=(characteristic.maximumValue || 255)) {
characteristic.setValue(val, undefined, 'fromKNXBus'); characteristic.setValue(val, undefined, 'fromKNXBus');
} else { } else {
this.log("Value %s out of bounds %s...%s ",hk_value, (characteristic.minimumValue || 0), (characteristic.maximumValue || 255)); this.log("Value %s out of bounds %s...%s ",hk_value, (characteristic.minimumValue || 0), (characteristic.maximumValue || 255));

View File

@@ -7,8 +7,8 @@
}, },
"description": "This is an example configuration file for KNX platform shim", "description": "This is an example configuration file for KNX platform shim",
"hint": "Always paste into jsonlint.com validation page before starting your homebridge, saves a lot of frustration", "hint": "Always paste into jsonlint.com validation page before starting your homebridge, saves a lot of frustration",
"hint2":"Replace all group addresses by current addresses of your installation, these are arbitrary examples!", "hint2": "Replace all group addresses by current addresses of your installation, these are arbitrary examples!",
"hint3":"For valid services and their characteristics have a look at the knxdevice.md file in folder accessories!" "hint3": "For valid services and their characteristics have a look at the knxdevice.md file in folder accessories!",
"platforms": [ "platforms": [
{ {
"platform": "KNX", "platform": "KNX",
@@ -74,7 +74,7 @@
}, },
{ {
"accessory_type": "knxdevice", "accessory_type": "knxdevice",
"description":"sample device with multiple services. Multiple services of different types are widely supported", "description": "sample device with multiple services. Multiple services of different types are widely supported",
"name": "Office", "name": "Office",
"services": [ "services": [
{ {
@@ -102,11 +102,11 @@
"type": "WindowCovering", "type": "WindowCovering",
"description": "iOS9 Window covering (blinds etc) type, still WIP", "description": "iOS9 Window covering (blinds etc) type, still WIP",
"name": "Blinds", "name": "Blinds",
"Target": { "TargetPosition": {
"Set": "1/2/3", "Set": "1/2/3",
"Listen": "1/2/4" "Listen": "1/2/4"
}, },
"Current": { "CurrentPosition": {
"Set": "1/3/1", "Set": "1/3/1",
"Listen": "1/3/2" "Listen": "1/3/2"
}, },
@@ -115,20 +115,38 @@
} }
} }
] ]
},{ },
"accessory_type": "knxdevice", {
"accessory_type": "knxdevice",
"description":"sample contact sensor device", "description": "sample contact sensor device",
"name": "Office", "name": "Office Contact",
"services": [ "services": [
{ {
"type": "ContactSensor", "type": "ContactSensor",
"name": "Office Door", "name": "Office Door",
"ContactSensorState": { "ContactSensorState": {
"Listen": "5/3/5" "Listen": "5/3/5"
}
} }
}, ]
},
{
"accessory_type": "knxdevice",
"description": "sample garage door opener",
"name": "Office Garage",
"services": [
{
"type": "GarageDoorOpener",
"name": "Office Garage Opener",
"CurrentDoorState": {
"Listen": "5/4/5"
},
"TargetDoorState": {
"Listen": "5/4/6"
}
}
]
}
] ]
} }
], ],