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

0 Members and 1 Guest are viewing this topic.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
A recipe I cobbled together so I can receive emergency weather alerts.   
https://ifttt.com/recipes/207167-voxcommando-receive-noaa-severe-weather-email

Maybe this should go in XML subforum.  Or Maybe we need an IFTTT sub now.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #1 on: September 29, 2014, 10:46:16 AM »
the format of the email that comes across

"tts.speak&&...FLOOD WATCH IN EFFECT THIS AFTERNOON THROUGH TUESDAY EVENING FOR EAST CENTRAL FLORIDA... ...FLOOD WATCH IN EFFECT FROM NOON EDT TODAY THROUGH TUESDAY EVENING... THE NATIONAL WEATHER SERVICE IN MELBOURNE HAS ISSUED A * FLOOD WATCH FOR EAST CENTRAL FLORIDA...INCLUDING THE FOLLOWING"

the "..." is part of the body of the email.  It's not the greatest thing, but if you do not have something electronic on that reports emergency alerts, it is better than not being prepared.
« Last Edit: September 29, 2014, 10:58:50 AM by keithj69 »

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #2 on: September 29, 2014, 08:08:55 PM »
be very aware that if you are using email to send alerts for tts, it has to be plain text.  I can pass vera commands, so gmail isn't a complete waste. using labels in gmail to trigger commands based on subject is very doable.  
I wish the watch folder could do something with the email.  I want to have it where anyone can email in to trigger tts.  My thinking on it is this.  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....)

 :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk

edit--it can be done with sms.  but the trigger word is still there. It's a start.
« Last Edit: September 29, 2014, 08:28:48 PM by keithj69 »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #3 on: September 30, 2014, 10:38:56 AM »
A recipe I cobbled together so I can receive emergency weather alerts.  
https://ifttt.com/recipes/207167-voxcommando-receive-noaa-severe-weather-email

Maybe this should go in XML subforum.  Or Maybe we need an IFTTT sub now.

Thanks.  This is a neat idea.  I am trying it out now, but I guess I will have to wait a while before anything happens?  We don't have much severe weather at this time of year.   ;D

EDIT:  Sadly, I don't think this can be used outside of the US.  There may well be another feed available for other countries though.
« Last Edit: September 30, 2014, 10:49:17 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #4 on: September 30, 2014, 10:42:41 AM »
be very aware that if you are using email to send alerts for tts, it has to be plain text.  I can pass vera commands, so gmail isn't a complete waste. using labels in gmail to trigger commands based on subject is very doable.  
I wish the watch folder could do something with the email.  I want to have it where anyone can email in to trigger tts.  My thinking on it is this.  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....)

 :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk :bonk

edit--it can be done with sms.  but the trigger word is still there. It's a start.

I have read this post over about 12 times and I just can't seem to distill it down into something I can really understand.

If possible do you think you could rephrase it in a less "stream of consciousness" style?

Is there something in particular that you are trying to accomplish, but are unable to get working the way you want?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #5 on: September 30, 2014, 11:06:28 AM »
EDIT:  Sadly, I don't think this can be used outside of the US.  There may well be another feed available for other countries though.

Here is an alternative method that does not require IFTTT.  The nice thing is that you can set it to check for alerts as often as you like, whereas with IFTTT you are at their mercy.  I heard that the default interval was around 30 minutes.  The other nice thing about this one is that you can adapt it to work with any RSS feed for any location where some kind of feed is available.  My example uses my location, which is the Laurentian region of Quebec.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.3-->
<commandGroup open="True" name="Weather alerts" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1120" name="check alerts in Laurentians" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.SetEventTimer</cmdType>
      <params>
        <param>5m</param>
        <param>CheckWeatherAlerts</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>https://weather.gc.ca/rss/battleboard/qc62_e.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then />
      <else>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Warning.  I was unable to connect to the weather service.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.StopMacro</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>Results.RegExSingle</cmdType>
      <params>
        <param>&lt;entry&gt;\s*&lt;title&gt;(.*?)&lt;/title&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{Match.1}&amp;&amp;No alerts in effect</ifParams>
      <then>
        <action>
          <cmdType>VcAdvanced.Log</cmdType>
          <params>
            <param>Everything is OK</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Warning! {Match.1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Warning! {Match.1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>check alerts in Laurentians</phrase>
    <event>CheckWeatherAlerts</event>
    <event>VC.Loaded</event>
  </command>
</commandGroup>

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #6 on: September 30, 2014, 03:22:07 PM »
I have read this post over about 12 times and I just can't seem to distill it down into something I can really understand.

If possible do you think you could rephrase it in a less "stream of consciousness" style?

Is there something in particular that you are trying to accomplish, but are unable to get working the way you want?

I was pretty flustered last night, sorry.  I had ifttt fighting with me and Lemon (vc) chirping out and turning things on and off while the tv was on.  Still trying to figure the mic location and sensitivity settings.

What i was trying to accomplish is simple.  I receive an email (gmail) and it puts it in dropbox/watch folder, then read out. 
I figure it could be a cool party trick.  or even used if someone was home, but they were purposely ignoring the phone/email/text.  I was trying to use email instead of sms, because i do not want to give out my phone number to everyone, and it is easier to create a new email account for these purposes.   
What i figured out is it has to be as plain text. Not a big deal for me to set things to plain text, but playing tech support isn't ideal for something so trickish. 

After all the back and forth with testing last night, i have come to the conclusion that ifttt is a cool novelty, but really shouldn't be used for something serious and timely. 
I think for my party trick it will be easier to set up a rasp pi webserver and setup an interface to allow people locally connected to play around. at least i know it will be near instant and not 30 seconds - 1 hour.

I have a meeting to run to right now. I will look at the code after.  Thank you and I promise to try not to do to many more stream of consciousness ramblings on here.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #7 on: September 30, 2014, 05:41:44 PM »
What i was trying to accomplish is simple.  I receive an email (gmail) and it puts it in dropbox/watch folder, then read out. 
I figure it could be a cool party trick.  or even used if someone was home, but they were purposely ignoring the phone/email/text.  I was trying to use email instead of sms, because i do not want to give out my phone number to everyone, and it is easier to create a new email account for these purposes.   
What i figured out is it has to be as plain text. Not a big deal for me to set things to plain text, but playing tech support isn't ideal for something so trickish. 
It seems to work when you send plain text, or when you send both.  I believe gmail sends both, and I thought that most mail clients would also do that by default.
There are lots of ways to send messages to VC.  You might want to check out the simple web server which is built into the TCP plugin, especially in the latest version of VC.  (2.1 or later)


After all the back and forth with testing last night, i have come to the conclusion that ifttt is a cool novelty, but really shouldn't be used for something serious and timely. 
I think for my party trick it will be easier to set up a rasp pi webserver and setup an interface to allow people locally connected to play around. at least i know it will be near instant and not 30 seconds - 1 hour.
I think it has its uses.  Even in the non-novelty department.  Although I personally haven't been driven to use it yet, I can see where it might come in handy.  Being able to send email to it is OK and when you do that it should react within a minute or so.  Having it poll for information is kind of nice if you don't have your computer always having to check things.  So doing things like monitoring an RSS feed makes sense with IFTTT as long as you don't require an immediate notification.  I believe there are some alternatives to IFTTT that are probably more powerful, and possibly a bit harder to learn.  I don't know if they would also allow for snappier notifications.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #8 on: September 30, 2014, 07:29:15 PM »
I actually just found a solution, completely by accident. To a point.
If you sign up here https://sendtodropbox.com, you have the option to send text files to dropbox in the form of an email.  As long as you have proper formatting like tts.speak&&testing this out, it will work.  And it is much quicker than ifttt.  Is there a way to add an option to watcher to append a text file with a command? Should i go to the feature request section?

I am thinking a check box for append and a blank area to add your command that is added to the beginning of the text in the file. heck the subject could be a trigger as to what is appended.
edit...maybe a group/commands that watches and can trigger based on file name/ turned off by voice, so people do not abuse if you forget about it.  
edit2. just checked.  Subject is file name and body is text that is read.
edit3. bummer, i tried to using ifttt to forward gmail based on label to my sendtodropbox, but it formatted like this "tts.speak&amp;&amp;there is a party in my pants, and you are not invited."  the good news is it was quick. i didn't see a way to change/strip formatting in labels. I am done for the night.  I have been consumed with this project for the last day. I am at a happy stopping point.

edit4: cleaned up
« Last Edit: October 01, 2014, 11:05:19 AM by keithj69 »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #9 on: September 30, 2014, 10:28:22 PM »
 Is there a way ($$) to add an option to watcher($$) to append a text file with a command?

I don't understand what this means, except for the $ signs.

"Is there a way to append a text file with a command"?  Sorry, I don't know what this means.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #10 on: October 01, 2014, 10:17:55 AM »
edit3. bummer, i tried to using ifttt to forward gmail based on label to my sendtodropbox, but it formatted like this "tts.speak&amp;&amp;there is a party in my pants, and you are not invited."  the good news is it was quick. i didn't see a way to change/strip formatting in labels.

I have tested sending email from my gmail account to IFTTT and when the files arrive in my dropbox all '&'s are in tact and work correctly.  I'm not sure what you are doing differently.  How are you sending your emails?

I don't really know what you mean when you say "forward gmail" or what you mean by "label".

I would like to be able to help you.  I see no limitations on being able to send any commands to VC using the
Code: [Select]
email >> IFTTT >> Dropbox >> watcher method.  I'm not sure what is gong wrong for you.  Maybe you are using an unusual method of sending mail.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #11 on: October 01, 2014, 11:07:15 AM »
I have tested sending email from my gmail account to IFTTT and when the files arrive in my dropbox all '&'s are in tact and work correctly.  I'm not sure what you are doing differently.  How are you sending your emails?

I don't really know what you mean when you say "forward gmail" or what you mean by "label".

I would like to be able to help you.  I see no limitations on being able to send any commands to VC using the
Code: [Select]
email >> IFTTT >> Dropbox >> watcher method.  I'm not sure what is gong wrong for you.  Maybe you are using an unusual method of sending mail.

Sent you a pm. 
In all honesty, I do not want to use ifttt for this.  To many hops that can cause failure.  See my pm.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #12 on: October 01, 2014, 11:19:19 AM »
I still don't see the problem.  Is it "SendToDropBox" that is converting & to &amp;    ?

You can put any action including tellvox into the body of the email.  This means you are completely unlimited in what you can do.  You can use any action, tellvox, or events.

If the encoding of & to &amp; was a problem only when sending from IFTTT to SendToDropBox then the fact that you don't want to use IFTTT any more makes this a non issue.
« Last Edit: October 01, 2014, 11:59:40 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #13 on: October 01, 2014, 12:15:24 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.

keithj69

  • $upporter
  • Sr. Member
  • *****
  • Posts: 113
  • Karma: 7
    • View Profile
Re: VC watcher folder and receiving Noaa severe weather alerts with IFTTT
« Reply #14 on: October 01, 2014, 12:50:17 PM »
Not sure where the &amp was coming from.  I did try it from my pc (gmail) that was set to send in plaintext and then from my cell. Both times the formatting was wrong. I am assuming it is coming from the first gmail hop in the recipe.  The testing i did with email to sendtodropbox just worked.
  
I understand about putting the command in the body, but i am looking at it more broad than just me.  I couldn't imagine trying to get a non-geek person to remember to add these things.  

This is starting to get off track from the original context of the post.  In the beginning playing with ifttt was fun and cool.  But i see ifttt as a vulnerability in the wait.  Right now, against better judgement, I have to many things in ifttt attached to my various site accounts.  Ifttt is a perfect starting place for hackers.  Yes it is easy to set up other accounts and use them.  But I really do not want to have to go through the process of setting up multiple accounts again.  

Honestly at this point I am not going to do much more with ifttt for the reasons I gave above. And yes, I understand all approaches to this has its insecurities.  It is time to get down and dirty with learning the full power of vc to accomplish the things i want with watcher.

Attaching a picture of the sendtodropbox options in case you or others haven't seen it.