Announcement

Collapse
No announcement yet.

PlayIREX won't use SECU16-IR zones

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

  • PlayIREX won't use SECU16-IR zones

    When I use the following script to control my 2 300 Disk DVD changers, which use the same IR codes, the DVD named "DVD" is on zone 17 (0) and the changer named "DVD_1" is on zone 3, PlayIREX only sends to zone 17 (0). If I go to VIEW > IRCONFIG, the TEST buttons send the code to the correct changer. any ideas?

    --- SCRIPT START ----
    sub DVD(DiskNum)

    Set CPUXA = hs.GetPlugins("ADIOcelot")
    DIM lastplayeddvd
    DIM ChangerName

    DiskNum=Cstr(DiskNum)

    Lastplayeddvd = DiskNum

    ChangerName = "DVD "
    if DiskNum > "300" then
    DiskNum = DiskNum - 300
    ChangerName = "DVD_1 "
    End if


    If Len(DiskNum) >0 then
    CPUXA.PlayIREX ChangerName & "STOP"
    CPUXA.PlayIREX ChangerName & "Display"
    CPUXA.PlayIREX ChangerName & "Enter"
    For x=1 to Len(DiskNum)
    Digit = Mid(DiskNum,x,1)
    If Digit >="0" and Digit <="9" then
    DVDnum = ChangerName & digit
    CPUXA.PlayIRex DVDnum
    End if
    next
    CPUXA.PlayIREX ChangerName & "Enter"
    HS.WaitSecs 3
    CPUXA.PlayIREX ChangerName & "Display"
    HS.WaitSecs 3
    CPUXA.PlayIREX ChangerName & "Display"
    HS.WriteLog "DVD changer", ChangerName & "changed disk to # " & DiskNum
    End if

    END sub

  • #2
    PlayIREX uses a lookup to determine the zone to use. irlbl.cfg and irzones.cfg are the two files that are processed to establish the relationship between zones and locations and names. I've never had a SECU16IR, but there are others that use ADIOcelot that do. I do not know if they use the PlayIREX scripting function. I can add some intermediate outputs to help debug if you wish.
    Last edited by Michael McSharry; June 11th, 2006, 11:50 AM.

    Comment


    • #3
      Ok, what did you just say?

      irlbl.cfg and irzones.cfg look Ok,
      I don't know programming well enough to use the (?) script you supplied, and I really have done all I can.
      Can someone else chime in here?

      TNX

      PaulH

      Comment


      • #4
        Followup, if I manually select the DVD then the following variant works for either changer. Notice that I don't specify the changer to the script:

        ---- START SCRIPT ---
        sub DVD(DiskNum)

        Set CPUXA = hs.GetPlugins("ADIOcelot")
        DIM lastplayeddvd
        DIM ChangerName
        DiskNum=Cstr(DiskNum)
        lastplayeddvd = DiskNum
        ChangerName = "DVD"
        if DiskNum > "300" then
        DiskNum = DiskNum - 300
        ChangerName = "DVD_1"
        End if



        If Len(DiskNum) >0 then
        CPUXA.PlayIREX "DVD STOP"
        CPUXA.PlayIREX"DVD Display"
        CPUXA.PlayIREX"DVD Enter"
        For x=1 to Len(DiskNum)
        Digit = Mid(DiskNum,x,1)
        If Digit >="0" and Digit <="9" then
        DVDnum = "DVD " & digit
        CPUXA.PlayIRex DVDnum
        End if
        next
        CPUXA.PlayIREX "DVD Enter"
        HS.WaitSecs 3
        CPUXA.PlayIREX "DVD Display"
        HS.WaitSecs 3
        CPUXA.PlayIREX "DVD Display"
        ' HS.WaitSecs 3
        ' CPUXA.PlayIREX "DVD Display"

        HS.WriteLog "DVD changer", ChangerName & " changed disk to # " & DiskNum
        End if

        END sub

        Comment


        • #5
          You seemed to have isolated the problem to scripting-related rather than plugin-related. Since the plugin acts as if it does not recognize the zone it means that ChangerName is suspect.

          When you do the compare I suggest you do a numeric rather than a string compare. The second and more likely culprit is the lack of a space ater the changer name.

          Code:
          if not isNumeric(DiskNum) then
              exit sub
          end if
          
          lastplayeddvd = DiskNum
          ChangerName = "DVD "
          if DiskNum > 300 then
              DiskNum = DiskNum - 300
              ChangerName = "DVD_1 "
          End if

          Comment

          Working...
          X