Announcement

Collapse
No announcement yet.

Send commands via script?

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

    Send commands via script?

    New to the plugin. I've been able to learn some commands and successfully send them using the web interface (yea!). What I'd like to do is incorporate actions into scripts. I can't see to locate or load the help files. Is it as simple as issuing a hs.setvalue command for the selected device?.

    Where can I get a copy of the manual anyway?
    Regards, Bob

    #2
    Sorry, I have been lazy with documentation lately. I'll get it finished up as soon as possible.

    In the mean time, you can simply create an event to send IR commands or use HSTouch and use "HomeSeer: Control a HomeSeer Device" action.

    Regards,
    Ultrajones
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    Comment


      #3
      Thanks for the reply.

      For the time being, I've created events that are working but I'd like to convert to scripts in the future.
      Regards, Bob

      Comment


        #4
        Hi Guys,

        Any progress with information on how to send an IR command directly from a script? I would like to streamline this as much as possible.

        is it possible and just not documented yet, or is it just not written into the plugin?

        Comment


          #5
          Any plans to get this integrated anytime soon?

          Comment


            #6
            The functionality is in there, but is not user friendly as you would need to know the associated device value. I need to add support to allow you to send an IR command based on the friendly string name. However, I am in the middle of adding support for the Global Cache GC-IRE and won't be able to post anything until that is done. The Global Cache GC-IRE is taking a lot longer than I thought in part due to the limitations of the Global Cache devices and the lack of documentation available.

            Regards,
            Ultrajones
            Regards,
            Ultrajones
            Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

            Comment


              #7
              Hey UJ,

              thanks for the reply. I guess I have no choice but to wait..

              can you at least give me the format even thought it will be difficult, maybe I can still take a stab at it?

              Can I assume that the device values somehow corresponds to the order of the value list itself?

              Comment


                #8
                UJ,

                any progress with the direct calls from a script?

                Also I noticed that when sending an IR via your plugin that a "Value " appears in the log. Is this the value that you are referring to below? if so cant I just set the device value via a script?

                EDIT.... Well I answered my own question.. the answer is YES you can run a ( hs.SetDeviceValue "]14","41" ) command obviously the "]14" refers to YOUR BL_BLASTER and the "41" is the value of the command you want to send, which you can find in your Log after sending the ir command manually.
                Attached Files

                Comment


                  #9
                  Friendly Script Command?

                  Any ETA on when we may expect this feature? I am at a stand still on my remote control coding until it arrives. I never imagined there was no (practical) scripting capability or I would have waited before purchasing the plugin. My bad.

                  Gary

                  Comment


                    #10
                    Originally posted by mbrett View Post
                    the answer is YES you can run a ( hs.SetDeviceValue "]14","41" ) command obviously the "]14" refers to YOUR BL_BLASTER and the "41" is the value of the command you want to send, which you can find in your Log after sending the ir command manually.
                    In my case, it looks like this value is the command's "relative" position in the file that was use to import the commands via the UltraGCIR import function. Which makes me wonder if these values change when the commands are maintained. I did notice that all these values can be determined by looking at the web page source html, where they are stored with the command name as an "option value".

                    Gary

                    Comment


                      #11
                      I am adding the following function:

                      Public Function SendIRToDevice(ByVal strDeviceCode As String, ByVal strButtonName As String) As Boolean

                      I'll post an update here once I can complete the testing.

                      Regards,
                      Ultrajones
                      Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                      Comment


                        #12
                        Testing shows it works. I'll post an update later today.

                        Here is a sample script showing usage:
                        Code:
                          Sub Main(ByVal parm As Object)
                        
                            '
                            ' Define our plug-in object
                            '
                            Dim hspi As Object = hs.plugin("UltraGCIR")
                        
                            '
                            ' SendIrCommand will accept either HomeSeer "Location DeviceName" or the DeviceCode
                            '
                            Dim arrDevices As String() = {"[11", "Family Room Apple TV"}
                            For Each strDevice As String In arrDevices
                        
                              Dim bSuccess As Boolean = hspi.SendIrCommand(strDevice, "MENU")
                              hs.WriteLog("Debug", String.Format("SendIrToDevice() command {0} returned {1}", strDevice, bSuccess.ToString()))
                            Next
                        
                          End Sub
                        Last edited by Ultrajones; May 15, 2011, 06:16 PM.
                        Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                        Comment


                          #13
                          Ultrajones, thanks much for the quick response, greatly appreciated. If you need any help with the testing, let me know.

                          Thanks
                          Gary

                          Comment


                            #14
                            UltraGCIR HSPI version 1.1.4152.35475 was just posted. It adds SendIrCommand(). Please let me know if you experience any issues attempting to use it.

                            Regards,
                            Ultrajones
                            Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                            Comment


                              #15
                              Seems to work fine for me, thanks much!

                              Gary

                              Comment

                              Working...
                              X