Announcement

Collapse
No announcement yet.

Homeseer trigger autoremote message

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

    Homeseer trigger autoremote message

    Hi,

    Is there anyway to have the plugin send an autoremote message to the phone so that autoremote/tasker can react? (instead of vibrate, flash etc.)

    I want to send a autoremote "command" to phone. Create task to listen for autoremote event "command" and perform a task.

    Thank you

    #2
    I do this all of the time.

    I use a script, triggered with multiple events, to send commands to Tasker on my kitchen tablet via AutoRemote.

    I would be glad to share if you are interested.


    tenholde
    tenholde

    Comment


      #3
      Originally posted by tomtnt View Post
      Hi,

      Is there anyway to have the plugin send an autoremote message to the phone so that autoremote/tasker can react? (instead of vibrate, flash etc.)

      I want to send a autoremote "command" to phone. Create task to listen for autoremote event "command" and perform a task.

      Thank you
      You can use "Send HTML" or "Send Text Popup" from the tasker plugin.
      Or send custom code "autonotification=:=Your text to send"
      and this will be added to notification screen. You need to have autonotification installed for above command.

      Another way is to create your own TASK in ex. HS3 My Own tab.

      Create new task with name NOTIFICATION, add new Alert, select Notify.
      Enter %par2 under Title.
      Exit tasker to reload the changes.
      To call this new task, run custom code "notification=:=Your message to be sent"
      Please excuse any spelling and grammatical errors I may make.
      --
      Tasker Plugin / Speech Droid
      Tonlof | Sweden

      Comment


        #4
        Originally posted by tenholde View Post
        I do this all of the time.

        I use a script, triggered with multiple events, to send commands to Tasker on my kitchen tablet via AutoRemote.

        I would be glad to share if you are interested.


        tenholde
        Hi tenHolde,

        I would be interested in this script...
        Could you share it ?

        Thanks in advance !

        Comment


          #5
          Code:
           Public Sub Main(ByVal Parms As Object)
                  Dim p, rc As String
                  Dim BaseUrl As String = "https://autoremotejoaomgcd.appspot.com/sendmessage?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&message="
                  p = Parms.ToString
                  'hs.WriteLog("SendToTablet", p)
                  rc = SendPush(BaseUrl & p)
                  If rc <> "OK" Then
                      hs.WriteLog("SendToTablet", "Bad RC from SendPush: " & rc)
                      hs.WriteLog("SendToTablet", "URL: " & BaseUrl & p)
                  End If
              End Sub
              Function SendPush(ByVal sURL As String) As String
                  Dim strData As String = ""
                  Dim tlRequest As System.Net.HttpWebRequest
                  Dim tlResponse As System.Net.HttpWebResponse
                  Dim tlStatusCode As Integer
                  Try
                      tlRequest = CType(System.Net.WebRequest.Create(sURL), System.Net.HttpWebRequest)
                      tlRequest.ContentType = "text/html"
                      tlRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)"
                      tlRequest.Method = "GET"
                      tlRequest.Timeout = 10000
                      tlRequest.AllowAutoRedirect = True
                      tlResponse = CType(tlRequest.GetResponse(), System.Net.HttpWebResponse)
                      tlStatusCode = tlResponse.StatusCode
                      If tlStatusCode = System.Net.HttpStatusCode.OK Then
                          strData = New System.IO.StreamReader(tlResponse.GetResponseStream()).ReadToEnd()
                      Else
                          Return "Grab Error"
                      End If
                      tlResponse.Close()
                  Catch ex As Exception
                      hs.WriteLog("SendToTablet", "HTTP Request Failed: " & ex.ToString)
                  End Try
                  Return strData
              End Function
          tenholde

          Comment

          Working...
          X