This commit is contained in:
2017-04-10 21:51:07 +02:00
parent 771e325ae3
commit 8dd7992043
12 changed files with 41 additions and 29 deletions
+5 -3
View File
@@ -93,17 +93,19 @@ function connect(item) {
function handleDependingOnValue(item, value2check) {
switch(value2check) {
case item.on.action.open.value:
doDoorStateChangedCall(item.on.action.open);
doDoorStateChangedCall(HOST, item.on.action.open);
break;
case item.on.action.closed.value:
doDoorStateChangedCall(item.on.action.closed);
doDoorStateChangedCall(HOST, item.on.action.closed);
break;
}
}
/* private */
function doDoorStateChangedCall(options) {
function doDoorStateChangedCall(host, options) {
const HOST = host;
Log.inspect('Call options', options);
callback = function(response) {
+2 -2
View File
@@ -9,13 +9,13 @@
"timeout": 2000,
"open": {
"value": "1110",
"host": "hobu",
"host": "hobu.local",
"port": "2999",
"path": "/set/state/of/door/100/to/open/"
},
"closed": {
"value": "1111",
"host": "hobu",
"host": "hobu.local",
"port": "2999",
"path": "/set/state/of/door/100/to/closed/"
}