Open maciekish opened 11 years ago
its a problem with the plugins execution on the SiriProxy server. I think that if you send a request_completed after you lock it or after a timeout it should work. Im not sure about it. Im having the same problem but i'm trying to figure it out. I have discovered that Apple uses callbacks to resolve some of this issues. I'll post if a have progress.
I agree with @bgottsch... I think that your best bet might be to set up a worker thread when you ask the question and if they don't respond in like 10 seconds you can issue a request_completed
.
Might not hurt to add a timeout to ask
, but I think it lives in @chendo's cora code.
Is it possible for you to provide a simple example of how to set up the worker thread after asking a question please? I'm very new to this language.
Hi, I have set siriproxy to control my tellstick net. If i ask it to "Set the kitchen light to 50%", it will do so and ask if i want it any darker or brighter. If i respond to that, everything is nice and dandy. If i just lock my phone without anwering her question, and unlock it a moment later and say something else like "Turn the kitchen light off", she will respond as if i had answered the previous question (She will say "Happy to be of service", instead of turning the light off).
So my question is, how do i "cancel" the question after inactivity/phone lock?
Here is the code:
listenfor /set(?: the)? ([a-z])(?: to)? ([0-9]_)(?: %)*/i do |light_name, value| light_name = light_name.strip print value + "\n"
end