Announcement

Collapse
No announcement yet.

How to reference HSTouch slider value in script parameter

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

    How to reference HSTouch slider value in script parameter

    I am trying to call a script from an HSTouch Slider selection. I'm basically trying to use a slider to control volume on my Russound.

    I need to pass the script 3 parms (controller number, zone number, volume). I have the controller and zone hardcoded and am trying to pass the value of my slider for the volume.

    &hs.RunScript("BLRussound_Functions.vb","Set_Zone_Volume","1 ;4;Slider_002")

    This results in a parm string of "1;4;Slider_002". I know the above is wrong as it is taking the slider name as text but I can't figure out what the right way is. How do I include a slider's value in a parm string so it ends up with a number between 1-100? Do I use a & or something in front of the slider name?

    I've tried everything I can think of. Any help is appreciated!

    Chad

    #2
    In the designer you should have below the script boxes some drop downs for scriptparameter1/2/3/4/5 and basically in here you need to pass the slider out. I'm not sure how to pass out the fixed values though you may end up having hidden labels for that.

    Comment


      #3
      Just thinking about it does BLRussound not let you status track a slider to the volume function? I would've thought it would but if not you might be better having a virtual device for this and then having an event in HS that sent the value of this virtual device to a script. That way there is no real messing in HSTouch all you do is track to the virtual device.

      Comment


        #4
        Originally posted by mrhappy View Post
        Just thinking about it does BLRussound not let you status track a slider to the volume function?

        It works fine for me.
        Originally posted by rprade
        There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

        Comment


          #5
          Mine works in designer as well. I don't use scripts though, I am using it to control the actual device. The only script I have for blrussound is to display data on the keypad screens.

          Comment


            #6
            Thanks everyone. I tried using the drop-down method in HSTouch and never could get it to work. I was using two text fields to try to pass the static parms. Maybe that is the wrong thing to do. I finally gave up and tried using the Runex statement instead. If I put a number in where the slider value is supposed to go the script runs just fine and the volume adjusts. I just can't figure out how to properly code the slider value property into the statement so it's adjustable from the screen.

            As far as using status tracking on the slider, yes, you sure would think that would work but no-go for me. I track it to the C1Z4 Volume device for example and I can move the slider and nothing ever changes on the russound.

            I have two CAA-66 units. The status correctly shows both units and all of their zones and volumes and such. Perhaps having two units is the problem....I don't know.

            Any advice is greatly appreciated. I'd really like to get this plugin to work (still on 30 day trial) but so far am not getting very far. I was using the other Russound plugin prior but it only supports 1 controller that I'm aware of. I was really hoping to be able to control both.

            Thanks so much. Chad

            Comment


              #7
              Originally posted by radarthis View Post
              Thanks everyone. I tried using the drop-down method in HSTouch and never could get it to work. I was using two text fields to try to pass the static parms. Maybe that is the wrong thing to do. I finally gave up and tried using the Runex statement instead. If I put a number in where the slider value is supposed to go the script runs just fine and the volume adjusts. I just can't figure out how to properly code the slider value property into the statement so it's adjustable from the screen.

              As far as using status tracking on the slider, yes, you sure would think that would work but no-go for me. I track it to the C1Z4 Volume device for example and I can move the slider and nothing ever changes on the russound.

              I have two CAA-66 units. The status correctly shows both units and all of their zones and volumes and such. Perhaps having two units is the problem....I don't know.

              Any advice is greatly appreciated. I'd really like to get this plugin to work (still on 30 day trial) but so far am not getting very far. I was using the other Russound plugin prior but it only supports 1 controller that I'm aware of. I was really hoping to be able to control both.

              Thanks so much. Chad
              I don't use the plugin so I'm limited in what I test but if you status track the device to the slider does it work OK in the windows application? There were historically issues with sliders in IOS that had non conventional (ie not 0-100) start and stop values.

              As I say you have to use the ScriptParameters boxes to pass in slider/drop values and then this passes to the script. It passes it IIRC as a object array so when your script runs you have to check what the various elements of that array are. If you post your script then should be able to give an idea but in reality I would go with the status tracking if you could.

              Comment


                #8
                Thanks. No, status tracking doesn't work on any client be it Windows, WinCE, etc. I've tried the drop-down method multiple times and always get string conversion errors. I'll try it again.

                Does anyone know what delineator HSTouch uses for the parm string? Is it a semicolon or pipe or something else? I tried both in my script to no avail.

                Chad

                Comment


                  #9
                  Originally posted by radarthis View Post

                  As far as using status tracking on the slider, yes, you sure would think that would work but no-go for me. I track it to the C1Z4 Volume device for example and I can move the slider and nothing ever changes on the russound.

                  You've got to report this to Blade because it should work. I have one CAA66 and just having the slider track the volume device works perfectly. Controlling the volume from an event however doesn't work.
                  Originally posted by rprade
                  There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                  Comment


                    #10
                    Do you have this checked?

                    Tim
                    Attached Files
                    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                    Comment


                      #11
                      No, I do not have that box checked.

                      Comment

                      Working...
                      X