Announcement

Collapse
No announcement yet.

Send custom commands?

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

    Send custom commands?

    Does the current plug-in have the capability to send custom commands to the TR40?

    I've just moved my thermostats from my Stargate to HS. I'd like to post text messages to them (TM =), and I've seen old posts describing 'CmdSendCustom', but I cannot find any documentation for the function. Is this function supported, or is there another way to access this feature?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    #2
    I pulled the following from one of my scripts (.txt) that writes messages to the TR-40
    PHP Code:
    sub main()

            
    dim message 
            dim RCS
            set RCS
    =hs.plugin("RCS Serial Thermostats")
     
            
    message "text stuff here"
            
    if len(message) > 79 then
               message 
    Mid message179
            
    end if
            
    call RCS.cmdsendcustom(1,"TM=" """" message """")
     
            
    set RCS=Nothing
    end sub 

    Comment


      #3
      Jim,
      Thanks. That's great news.

      A search turned up your post from several years ago, but it wasn't clear if the command still worked. I assume it is working in the latest plug-in version?

      Is there any documentation from HS?
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        So I decided to just try it . . .and it works! This is my vb.net test (sent to thermostat at address 2):

        Code:
        Sub Main(parm as object)
        
            Dim strMessage As String
            Dim objRCS As Object = hs.Plugin("RCS Serial Thermostats")
            Dim intReturn As Integer
        
            strMessage = "Test"
            
            intReturn = objRCS.CmdSendCustom(2, "TM=" & """" & strMessage & """")
        
            hs.WriteLog("RCS Message", CStr(intReturn))
        
            objRCS = Nothing
        
        End Sub
        To clear all messages, I used this command: intReturn = objRCS.CmdSendCustom(2, "TM=" & """"#"""")

        Thanks again.
        Last edited by Uncle Michael; December 13, 2012, 10:54 AM. Reason: correct error
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Glad to help. I use it with a really old script from Jim Doolittle to read tasks from outlook and send the current ones to the TR-40 display

          Comment


            #6
            Outlook Script

            Originally posted by JimCirillo View Post
            Glad to help. I use it with a really old script from Jim Doolittle to read tasks from outlook and send the current ones to the TR-40 display

            Anyway you can post a link to that script?

            Comment


              #7
              Here's Jim D's script - I just added the code to process the task info and send to the TR40...
              Attached Files

              Comment


                #8
                Thanks for the help...I think everyone appreciates the time savings offered by a quick cut and paste of a previously tested script.

                Fine Print Note: I have ten RCS TR40 stats in my home. That in itself might explain why others complain of my "control" issues.

                Comment

                Working...
                X