Announcement

Collapse
No announcement yet.

Slider maximum on HSTOUCH HS3

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

    Slider maximum on HSTOUCH HS3

    I have a slider which status tracks a value 'position'

    This slider has a maxValue of 100.

    For this song it has a value of 0 to 206; the next song will be different.
    So after 100 seconds, the slider button kind of leaves my slider.
    (203 doesn't fit in 100).

    Can someone help me with the code for HSTOUCH MAX VALUE to put in the maxlength field to get this 206 value.
    It has a device ref of 82.

    Alternatively there is another element (ref 83) called length which has a 206 value.
    Attached Files

    #2
    You can edit the slider with HSTouch. Look at the the bottom on the right hand side in the element properties. You can 100 to a reasonable figure of say 250.


    Eman.
    TinkerLand : Life's Choices,"No One Size Fits All"

    Comment


      #3
      Hi

      Thanks for the reply
      Edit it with what?

      I know where the properties are but how do I fetch the length 206?

      Comment


        #4
        Originally posted by smokeycoles View Post
        Hi

        Thanks for the reply
        Edit it with what?

        I know where the properties are but how do I fetch the length 206?
        Open up your HSTouch designer. It's all there.

        Eman.
        TinkerLand : Life's Choices,"No One Size Fits All"

        Comment


          #5
          Thanks for the help.

          If anyone else can help explain how to get the maximum value from a HS3 ID;

          I would appreciate it.

          Comment


            #6
            For best practice I use the main slider for my AMP. So I set the value to 200 although my AMP gives out values of low numbers but loud. What I did here is any other device with different values will fall with in that range. And also because they go through the AMP they are restricted not to have loud sounds during quiet hours. So if you cleate different sliders for your devices in HSTouch you can edit all sorts of values for your devices.


            Eman.
            TinkerLand : Life's Choices,"No One Size Fits All"

            Comment


              #7
              That doesn't really work for seeing the track progress..



              At the bottom of the screen it says:
              "The maximum value returned. This is automatically set if the control associated with specific items such as a listbox, or music track length."

              This is a music track length but I cannot get it to set itself to auto (in this case 206 or 275 on the next song).


              I have tried changing the device in the HS3 web interface from a slider to a list box, I wonder if my settings are preventing it from seeing the valuemax.

              Comment


                #8
                Originally posted by smokeycoles View Post
                That doesn't really work for seeing the track progress..



                At the bottom of the screen it says:
                "The maximum value returned. This is automatically set if the control associated with specific items such as a listbox, or music track length."

                This is a music track length but I cannot get it to set itself to auto (in this case 206 or 275 on the next song).


                I have tried changing the device in the HS3 web interface from a slider to a list box, I wonder if my settings are preventing it from seeing the valuemax.
                I'm sorry, I thought you were about volumes.


                Eman.
                TinkerLand : Life's Choices,"No One Size Fits All"

                Comment


                  #9
                  No problems; I appreciate that you helped.
                  Thank you

                  I wonder if this could be a bug. I am sure one of the pioneers will know.

                  Comment


                    #10
                    Contact Jon00 here :http://board.homeseer.com/forumdisplay.php?f=883


                    He is very good at that.

                    Eman.
                    TinkerLand : Life's Choices,"No One Size Fits All"

                    Comment


                      #11
                      Hi, any takers for some help with this one?

                      Thanks

                      Comment


                        #12
                        I think you are going to have a struggle with this, the Sonos plugin I imagine is creating or altering the value/status pair depending on the length of the track (208 seconds?), next track changes it etc.

                        I imagine that HSTouch does not cater for this as it is fairly unusual to change these on a regular basis (a dimmer would never need to change it from 1-99), I imagine then that HSTouch queries the devices for the maximum value only when the screen loads (or even HSTouch loads). I know that historically there were issues with non 0-100 values on some clients but I believe these were sorted.

                        One method to test would be to change the track then reload the HSTouch client whilst it is doing this to see whether reloading the client causes it to get a new value from HS and alter the slider behavior.

                        Comment


                          #13
                          I could not think of an easy answer either. You really need another virtual device where its device value is calculated using the remaining time as a percentage. You can then use that with fixed values in HSTouch.

                          I find it strange that other values of 1000 and 1001 have been used for up/down for this device. Any track longer than 16.666 minutes would overlap these!
                          Jon

                          Comment


                            #14
                            Hi Guys

                            Thanks for your responses.

                            Its not so much it incorrectly gets the maximum value when it changes - its more the fact it never gets the maximum value even with a song already on and me opening the screen from switching the app on.

                            It just relies on the default 100...

                            I think the virtual device is the way to go; so that each time the track position changes - it can calculate a percentage using

                            refID 82 (Track Position) value of 0-208
                            refID 83 (Track Length) value of 208


                            If I use an event which calculates this each time; the value of track position changes.

                            O

                            Comment


                              #15
                              Ok

                              So I think I have one to really stomp people.

                              I have a virtual device and my slider is status tracking it.
                              It works by the way!!!
                              If my script is rubbish, please just let me know why as I am new to scripting (this is my 2nd)

                              This is my script:

                              Dim percentage As Double
                              Dim getLengthValue As Integer
                              Dim getPositionValue As Integer

                              ' Main Method
                              '----------------------------------
                              Sub Main(parm As Object)
                              End Sub


                              ' Track Percentage
                              '----------------------------------
                              Sub trackPercentage_LivingRoom(parm As Object)

                              getLengthValue = hs.DeviceValueEx(45)
                              getPositionValue = hs.DeviceValueEx(46)

                              'hs.writelog("SONOS","Track Length is: " & getLengthValue)
                              'hs.writelog("SONOS","Track Position is: " & getPositionValue)
                              'hs.writelog("SONOS","Track Percentage is: " & ((getPositionValue / getLengthValue) * 100))

                              percentage = Format(((getPositionValue / getLengthValue) * 100), "00")
                              hs.SetDeviceValueByRef(641, percentage, True)
                              'hs.writelog("SONOS","Virtual Track Position is: " & hs.DeviceValueEx(641))


                              End Sub


                              My Event is:


                              IF Sonos Living Room Track Position
                              just had its value set or changed.

                              Then Run the script: C:/Program Files (x86)/HomeSeer HS3/scripts/sonos.vb
                              calling method trackPercentage_LivingRoom
                              and wait for the command to finish before continuing, and also only allow one instance of the script to run at a time.



                              So my question is - if I want to use it as a Control now.
                              So essentially I control a virtual device > which controls SONOS track position by a NEW sub function in the Script, lets say setPercentage_LivingRoom

                              The problem is that I don't know which event to pick - which only allows changes when i physically set with HSTouch ???
                              And I don't want it to loop with the one above.

                              Any ideas?

                              If I cant get this bit working - it is OK, I am happy with the main bit that the scroll moves with the song.

                              Comment

                              Working...
                              X