Announcement

Collapse
No announcement yet.

Best Way To Have Homeseer Announce That I Have A New Text Message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Best Way To Have Homeseer Announce That I Have A New Text Message

    I would like to have Homeseer announce when I get a new text message for times when my phone is sitting in another room where I can't hear the notification chime. I assume I can do this using the Tasker plugin; is that true? (It is an android phone) Is there a better way to accomplish this?

    #2
    Since you're apparently using Android you don't even need to use the Tasker plugin for Homeseer. Just use the JSON api and use Tasker on your phone to directly call the TTS function. I do this (for phone calls, not texts) on our phones. The tasker task looks like:
    • HTTP Get Action
      • Server:Port - the IP address of your HS instance
      • Path - JSON
      • Attributes:
        • request=speak
        • phrase="whatever-you-want-it-to-say-with-dashes-not-spaces"

    One note - HS has a flaw in the TTS routine - you can't use spaces or the speech screws up. So use dashes instead.

    Comment


      #3
      Originally posted by HSAccord View Post
      Since you're apparently using Android you don't even need to use the Tasker plugin for Homeseer. Just use the JSON api and use Tasker on your phone to directly call the TTS function. I do this (for phone calls, not texts) on our phones. The tasker task looks like:
      • HTTP Get Action
        • Server:Port - the IP address of your HS instance
        • Path - JSON
        • Attributes:
          • request=speak
          • phrase="whatever-you-want-it-to-say-with-dashes-not-spaces"

      One note - HS has a flaw in the TTS routine - you can't use spaces or the speech screws up. So use dashes instead.
      Thanks, I'll take a look at that.

      Comment


        #4
        I take it one step further by having Tasker announce who the caller/texter is from (assuming the caller is in my phone address book).

        Comment


          #5
          BTW and not that hyphens do not work in this situation, but the normal way to pass special characters like spaces in a HTTP string is to give the hexadecimal equivalent preceded by a percent sign (i.e for a space, substitute %20).

          whatever%20you%20want%20it%20to%20say

          Comment


            #6
            Originally posted by aa6vh View Post
            I take it one step further by having Tasker announce who the caller/texter is from (assuming the caller is in my phone address book).
            Tested doing a JSON announcement from my browser and that worked fine. Now I just need to download and learn Tasker so I can trigger a JSON call from an incoming Text. Hopefully adding the name of the texter will be obvious to achieve once I learn how Tasker works.

            Comment


              #7
              Originally posted by upstatemike View Post

              Tested doing a JSON announcement from my browser and that worked fine. Now I just need to download and learn Tasker so I can trigger a JSON call from an incoming Text. Hopefully adding the name of the texter will be obvious to achieve once I learn how Tasker works.
              This might help you get started. My routine has a bunch of stuff in it for my smartwatch and stuff, which you can ignore.

              The variables in Upper case are globals. The Global variables that start with SMS are tasker provided. See the tasker help file for details on the SMS variables.

              Code:
                  Profile: EvtSMS
                  Settings: Restore: yes
                      Event: Received Text [ Type:Any Sender:* Content:* SIM Card:* MMS Body:* ]
              
                  Enter Task: Anon
              
                  A1: Variable Set [
                       Name: %buff
                       To: %SMSRB
                       Max Rounding Digits: 3 ]
              
                  A2: Variable Set [
                       Name: %sname
                       To: %SMSRN
                       Max Rounding Digits: 3 ]
              
                  A3: Variable Set [
                       Name: %sname
                       To: u s g s
                       Max Rounding Digits: 3 ]
                      If  [ %buff ~ *ens@ens.usgs.gov* ]
              
                  A4: If [ %buff ~ %* ]
              
                      A5: [X] Perform Task [
                           Name: KwikLog
                           Priority: %priority
                           Parameter 1 (%par1): %MMSRS
                           Parameter 2 (%par2): y ]
              
                      A6: Stop [ ]
                          If  [ %sname ~ %SMSRF ]
              
                  A7: Else
              
                      A8: Stop [ ]
                          If  [ %buff ~ *gerald* ]
              
                  A9: End If
              
                  A10: Variable Add [
                        Name: %NUMSMS
                        Value: 1
                        Wrap Around: 0 ]
              
                  A11: Perform Task [
                        Name: SetIcon
                        Priority: %priority-1 ]
              
                  A12: Set Widget Label [
                        Name: SetProfile
                        Label: P: %NUMCALLS S: %NUMSMS ]
              
                  A13: Perform Task [
                        Name: WearRefresh
                        Priority: %priority
                        Parameter 1 (%par1): counts ]
              
                  A14: Perform Task [
                        Name: SetNotify
                        Priority: %priority
                        Parameter 1 (%par1): missed
                        Parameter 2 (%par2): x ]
              
                  A15: If [ %QUIET = 0 & %SCREEN !~ on ]
              
                      A16: Say [
                            Text: New Text Message Received
                            Engine:Voice: default:default
                            Stream: 3
                            Pitch: %SPKPCH
                            Speed: %SPKSPD ]
              
                      A17: If [ %sname !~ %SMSRF ]
              
                          A18: Say [
                                Text: from %sname
                                Engine:Voice: default:default
                                Stream: 3
                                Pitch: %SPKPCH
                                Speed: %SPKSPD ]
                              If  [ %sname !~ %SMSRF ]
              
                          A19: Perform Task [
                                Name: HSSpeak
                                Priority: %priority
                                Parameter 1 (%par1): new text message received from %sname
                                Structure Output (JSON, etc): On ]
              
                      A20: End If
              
                  A21: End If
              Hope that helps you get started. BTW the test for "gerald" is because some spammer keeps sending me messages addressed to him, and I want to just ignore them.

              Comment


                #8
                Thanks for the example! I'll install Tasker later this week and see if I can get it going.

                Comment

                Working...
                X