Announcement

Collapse
No announcement yet.

Sending multiple capi commands

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

  • jon00
    replied
    Robert,

    Did you get this working?

    Leave a comment:


  • langenet
    replied
    Thank you very much Jon. I'll give your suggestions a try.

    Robert

    Leave a comment:


  • jon00
    replied
    You should be able to do something like this:

    PHP Code:
      Sub Main(ByVal Parm As String)

            
    Dim Digit As String ""

            
    For Each c As Char In Parm
                Digit 
    "DIGIT " c
                hs
    .CAPIControlHandler(hs.CAPIGetSingleControl(704,True,Digit,False,False))
                
    hs.waitsecs(0.2)
            
    Next

        End Sub 
    I don't use the Global Cache Pro plugin, however the original Global cache plugin used the following syntax which could be an alternative:

    PHP Code:
      Sub Main(ByVal Parm As String)

            
    Dim Digit As String ""
            
    For Each c As Char In Parm
                Digit 
    "DIGIT " c
                hs
    .PluginFunction("Global Cache","","SendIR", new Object() {"192.168.1.XX"1Digit})
                
    hs.waitsecs(0.2)
            
    Next

        End Sub 

    Leave a comment:


  • langenet
    started a topic Sending multiple capi commands

    Sending multiple capi commands

    So I have my wifi2ir and the global cache pro plugin. If I want to switch the set top box to channel 2, the capi commnd string would be hs.CAPIControlHandler(hs.CAPIGetSingleControl(704,True,"DIGI T 2",False,False)). If I understand the way the wifi2ir would send commands to issue a channel of say 29, I'm guessing that there would be two command strings sent. One for the 2, then one for the 9.
    How would the method be created to send capi1 command + capi2 command +... ???
    Is this the preferred method or are there other suggestions that would work?

    The ultimate goal here is to use Jon's alexa script and pass in the integer for the channel I want, from my echo, do some parsing which I then think would need to be broken down to multiple send commands. So for example, it I say change the channel to 29, two command strings would be sent to the wifi2ir from within the script.

    Robert
Working...
X