mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-04 06:13:13 +01:00
send command every 20s to prevent timing out
This commit is contained in:
@@ -53,6 +53,14 @@ LogitechHarmonyPlatform.prototype = {
|
|||||||
.then(function (client) {
|
.then(function (client) {
|
||||||
self.log("Connected to Logitech Harmony remote hub");
|
self.log("Connected to Logitech Harmony remote hub");
|
||||||
|
|
||||||
|
// prevent connection from closing
|
||||||
|
setTimeout(function() {
|
||||||
|
setInterval(function() {
|
||||||
|
self.log("Sending command to prevent timeout");
|
||||||
|
client.getCurrentActivity();
|
||||||
|
}, 20000);
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
callback(null, client);
|
callback(null, client);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user