Author Topic: VC watcher folder and receiving Noaa severe weather alerts with IFTTT  (Read 10345 times)

0 Members and 1 Guest are viewing this topic.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #15 on: October 01, 2014, 12:52:54 PM »
I just tested using SendToDropBox from my gmail webmail account and it works perfectly with &&

So, this means you can put any actions you want in the body of the email.

I'm not sure what else you need, but if this does not cover you then consider looking at the watcher plugin settings again.  You can do more advanced things by using the event based trigger at the bottom.

i'll play around with it. thanks. 

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #16 on: October 02, 2014, 09:04:59 AM »
Someone is home ignoring the phone and email.  Bam vc to the rescue.  "honey don't forget to walk the dog."  A remote voice.  actually that is easy with James' ifttt recipe and your personal email account.  
How about friends sending things over vc during a party? (yes i can use a raspberry pi, set up a mail server, register a domain....)

Have you considered the gmail notifier python code I posted a while back? Particularly for the first need, but it could be used for both scenarios.

http://voxcommando.com/forum/index.php?topic=1679.msg14606#msg14606

The code I posted triggers a VC event when a gmail message with a specific subject line is received. That event can pass whatever you want from the email as payloads. So, you can set it up that only messages with the subject heading "vox commando" (or whatever is easy to get right but still unique) trigger the event. And then you pass the body of the message as a payload.

In VC, create a command triggered by this event that simply makes a TTS announcement.

The important part of the python script that you would edit is the following section:

Code: [Select]
           else:    
                self.fullCount = matchObj.group(1)
                subject = matchObj.group(2)
                summary = matchObj.group(3)
                self.msgID = matchObj.group(4)
                sender = matchObj.group(5)
                
                #triggers VC event if email subject line says "motion detected". Change to your needs.
                if subject == "motion detected":
                    #triggers event "newMail" in VC & sends subject and sender as payloads {1} & {2}.
                    vc.triggerEvent("newMail",List[str](["subject: "+subject,"sender: "+sender]))        
                    

1. Change the "if subject ==" line from "motion detected" to your preferred subject line.
2. Instead of sending "subject" and "sender" as payloads, you can change it to one "summary" payload. (Summary is the gmail term for the body of the email message.)

So that line becomes:
Code: [Select]
vc.triggerEvent("newMail",List[str]([summary]))
Then, you have a command in VoxCommando such as:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.3-->
<command id="323" name="new mail announcement" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <params>
      <param>Excuse me. You have an important message. It says:</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>newMail</event>
</command>


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)

Bighigh69

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #17 on: March 31, 2015, 10:55:11 PM »
Ok  I read this post and I am new to voxcommando and his forum. I am wondering if this has been figired out with spring here and severe weather on the  way i would like to have a working weather alert system from vox if there is any..help please, thank you.. :D

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #18 on: April 01, 2015, 06:38:12 PM »
I unfortunately have had things in life get in the way of me doing much with my home automation.  I do need something to distract me, I'll see if i can try to figure anything out.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #19 on: April 02, 2015, 08:22:47 AM »
As far as I know, the various suggestions James and I made in this thread work.

An IFTTT solution for NOAA weather alerts is also posted here: http://voxcommando.com/forum/index.php?topic=2097.0.
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)