I've started to play with Ruby on Rails to make some plugins for Siri Proxy Server. I am inexperienced with Ruby but have manage the basics.
what I have done:
################ Commands listen_for (/show a demo to (.*)/i) do |name| show_demo request_completed end ################ Actions def show_demo(name) say "Hi #{name}, let me do a quick demo for You." say "For example if You tell me 'Turn on sidelight' I will turn the sidelights in Living room like now..." system "/usr/local/bin/tdtool --on 2" say "That was the sidelights, and now if like I can turn on the gallery for You, just tell me 'turn on gallery' like so... " system "/usr/local/bin/tdtool --on 3" say "This only part of things I can do after mod." say "Now I will turn all devices off..." system "/usr/local/bin/tdtool --off 3" system "/usr/local/bin/tdtool --off 2" say " Thank You #{name}, and goodbye." end
The problem is when I'll start the demo all the actionssystem "..."
are executed before Siri start to say anything .
How can I delay above action to put them in right place in time to execute them right after words I want?
Thank You in advance.