Announcement

Collapse
No announcement yet.

Trying to correct invalid Names in Virtual devices

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

  • Trying to correct invalid Names in Virtual devices

    I can change to DVD and the virtual device with the status is showing DVD. I then change to BluRay and it still show DVD. I have tried a script using SendRawCommand to try and rename this when it updates, but the if/then statement doesnt want to work. Anyone have an idea how to fix this one? The following results in SIBD SVSOURCE
    I will admit, I am just learning this .vb stuff for homeseer.

    ******************************************
    Sub Main(ByVal parms As Object)
    Dim mode As String = ""
    mode = hs.Plugin("BLDenon").SendRawCommand("SI?")
    if mode = "SIBD SVSOURCE " Then mode = "BluRay"

    hs.setDeviceString ("^12",mode)
    End Sub
    ******************************************

  • #2
    HS2 or HS3?
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


    • #3
      Re: Trying to correct invalid Names in Virtual devices

      HS2. if I can see how, im sure I can do it in 3 with your help in the other thread.

      Comment


      • #4
        Try this

        Code:
        Sub Main(ByVal parms As Object)
            Dim mode As String = ""
            mode = hs.Plugin("BLDenon").SendRawCommand("SI?")
            If String.CompareOrdinal(mode.Trim, "SIBD SVSOURCE") = 0 Then
                mode = "BluRay"
            End If
            hs.setDeviceString ("^12",mode)
        End Sub
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment


        • #5
          Still no change.

          Sent from my SAMSUNG-SGH-I337 using Tapatalk

          Comment


          • #6
            What error do you get?
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


            • #7
              This did the trick for me. Now, not only can I define the values missing with my AVR-1913, but I can customize as well..



              Sub Main(ByVal parms As Object)
              Dim mode As String = ""
              mode = hs.Plugin("BLDenon").SendRawCommand("SI?")
              If mode.Contains("SIBD") Then mode = "BluRay"
              If mode.Contains("SIUSB/IPOD") Then mode = "IPOD / USB"
              If mode.Contains("SIIRADIO") Then mode = "Internet Radio"
              If mode.Contains("SISERVER") Then mode = "Media Server"
              If mode.Contains("SISAT/CBL") Then mode = "CBL/SAT"
              If mode.Contains("SIPANDORA") Then mode = "Pandora"
              If mode.Contains("SIMPLAY") Then mode = "Media Player"
              If mode.Contains("SIGAME") Then mode = "XBOX 360"
              If mode.Contains("SITUNER") Then mode = "FM Radio"
              If mode.Contains("SISPOTIFY") Then mode = "Spotify"
              If mode.Contains("SISIRIUSXM") Then mode = "SiriusXM"
              If mode.Contains("SITUNER") Then mode = "FM Radio"
              If mode.Contains("SIFLICKR") Then mode = "Flickr"
              hs.setDeviceString ("^12",mode)

              End Sub

              Comment


              • #8
                Glad you got it working
                In HS3 the plugin is different. It allows you to use multiple receivers and the Denon control web page is gone. You still have access to the scripting calls but you should use HSTouch or MainLobby to design your own control page for the receivers

                I plan to add some more customization to the plugin in order to make things easier.
                Cheers,
                Bob
                Web site | Help Desk | Feature Requests | Message Board

                Comment


                • #9
                  Thanks for the assistance. I have tried a few different ways to work with this receiver and yours is the only one that was not flaky and versatile enough to work for me. I have already created a custom interface in HSTouch for HSPRO. I'm sure it will be just as easy with your example to create the needed vb scripts for an interface for 3. Purchased.

                  Comment

                  Working...
                  X