Author Topic: Send email to IFTTT to *quite quickly* trigger VC commands (Dropbox required)  (Read 3565 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
This has been discussed before, but:

While IFTTT sucks for some things, if you use a recipe that involves sending an email to IFTTT to trigger a THEN behaviour, it does work quite quickly.

This can be useful if you want to communicate with VC remotely.

1. You need to enable the email channel and the Dropbox channel in your IFTTT account.
2. You need to enable the Watcher plugin in VC.
3. Create a Watcher that looks something like the attached image.

In other words, set Watcher up to watch a particular Dropbox folder.

I use it with this recipe: https://ifttt.com/recipes/361463-send-email-to-voxcommando-watcher-plugin

Although this requires that you avoid typos in your email, it is a versatile way to communicate with VC.

In the body of your email, you specify the actions that you want VC to execute. If you have selected "Execute on Create" and "Then Delete!" in your file watcher, then as soon as the file appears in your Dropbox, as long as VC is running the Watcher plugin will immediately try to execute the message, and it will then delete the file. Which means that you can continue to send messages without need to create new files all the time in Dropbox.

So, you can trigger events in VC by send an email:

Code: [Select]
Subject line: #vc
Message: VC.TriggerEvent&&LightsOn

You can trigger specific commands if you know the voice command:
Code: [Select]
Subject line: #vc
Message: VC.TellVox&&Listen to music

You can execute specific actions, rather than commands:
Code: [Select]
Subject line: #vc
Message: TTS.Speak&&Hi honey. I'll be home in half an hour.


In other words, simply use the standard VC API syntax:
http://voxcommando.com/mediawiki/index.php?title=API_Application_Programming_Interface
« Last Edit: December 29, 2015, 03:25:13 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
I say "quite quickly" in order to be cautious and not overstate things -- but frankly, for me, it's worked almost instantly with every test.

Basically, it's the amount of time it takes to send the email, plus a few more seconds.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
just wondering, with a TCP server ... and making an http call to vc would be "neater" and eliminate dropbox and save few CPU cycles from watching folders. However it requires setting up ddns (or fixed IP) so it is a bit harder to setup
« Last Edit: December 28, 2015, 03:16:04 PM by Haddood »
When Voice command gets tough, use hand gestures

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Yes setting up a webserver would be the neatest solution and certainly would have the quickest response time with the least overhead.  However, some users may not find it to be the most secure solution, so it depends if you are sensitive to that.

As you say, one would need to set up a DDNS server which may mean paying a small annual fee.  For me, I think it's the best solution, but maybe not for everyone.

Going on the assumption that the preferred input method is to be able to send an email, then doing something with IFTTT and/or dropbox seems like a good compromise.  Maybe the best solution (theoretically) would be a real gmail plugin but that probably isn't going to happen any time soon.
« Last Edit: December 28, 2015, 03:54:12 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
and save few CPU cycles from watching folders.

For the record though, I don't think watching a DropBox folder is using any noticeable resources, CPU or otherwise.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
In my tests, I've seen no noticeable CPU usage with this solution. I have monitored it.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)