Closed gizus closed 6 years ago
If you set the auto disconnect time parameter to for example 10, the Flic will disconnect after 10 seconds of timeout.
Right, that was the other way, but I tried via simpleclient with no result (probably wrong syntax). Would please state the right syntax for this command? es. changeModeParameters 80:e4:da:73:6b:83 NormalLatency 2
That's correct but replace the full address with your connection id.
the connection UUID of the single button? Like getButtonUUID 80:e4:da:73:6b:83 Button UUID response: 80:e4:da:73:6b:83 687f0b3933f54385bf7ee9228db1f51c
Or my session?
Note that the auto disconnect time is applied the next time it connects (you need to go out and in range first).
If you specify the auto disconnect time at the creation of the connection channel then you don't have that problem. However simple client doesn't support that, while the js lib supports that.
connect 80:e4:da:73:6b:83 0
changeModeParameters 0 NormalLatency 2
ah ok button per button What is the js equivalent? I could insert in the initial loop (taken form example.js)
client.once("ready", function() { var ora=new Date(); console.log("Connesso a "+ora.getHours()+":"+ora.getMinutes()+":"+ora.getSeconds()); client.getInfo(function(info) { info.bdAddrOfVerifiedButtons.forEach(function(bdAddr) {
// HERE //
listenToButton(bdAddr);
});
});
});
Or, may I directly change it in the sqlite param file?
In the example, replace
var cc = new FlicConnectionChannel(bdAddr);
with
var cc = new FlicConnectionChannel(bdAddr, {autoDisconnectTime:2});
IT WORKS! 👍 Thank you for your marvellous support!
No prob ;)
Hi there, I need to command 18 flic buttons with a raspberry (only 10 concurrent session).
Due to the fact that i DON'T need a high sensitivity or more than 10 concurrent actions, I could disconnect a button after a press event, so that it frees up a channel and next time will follow the "connected"-"ready" sequence.
Can't find the right syntax for doing that, I need some help, please.