Announcement

Collapse
No announcement yet.

need some advice (hs.geturl) volume set

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

    need some advice (hs.geturl) volume set

    Hi all

    how can i make this easy for hstouch?

    the set23 is 23% volume
    how can i make a script that if i want 10 it automatically sets the volume to 10% in that url , so i can use it in hstouch with a slider.
    or in a simple event with a virtual device.

    is that possible?

    this is the url :
    &hs.GetURL("http://192.168.0.35","/web/vol?set=set23",TRUE,80)



    regards
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

    #2
    Personally I would have a virtual device, status track that in HSTouch and have a HS event that triggered the script whenever it changed value. In the script then check the device value and send it to the URL.

    Comment


      #3
      hi adam

      you maybe have a example how i can send it to the url , i know i need to replace the =set23
      so i can build the script myself , im basic with scripting but im still learning

      regards


      Originally posted by mrhappy View Post
      Personally I would have a virtual device, status track that in HSTouch and have a HS event that triggered the script whenever it changed value. In the script then check the device value and send it to the URL.
      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

      Comment


        #4
        i have something like this , but nothing happens

        im still learning scripting

        Code:
        Sub Main(ByVal Parm As Object)
        	Try
        	Dim result As String
        	Dim Volumestring As String = hs.deviceString(2603)
        	hs.urlaction("http://192.168.0.35/web/vol?set="& Volumestring, "POST", "", "")
        	hs.writelog("Device", "Raw String Value: " & Volumestring)
        	hs.WriteLog("Info", result + "end")
        	Catch ex As Exception : hs.writelog("TestCheck", "Error: " & ex.Message.ToString)
        	End Try
        End Sub
        Last edited by Malosa; July 12, 2016, 05:22 AM.
        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




        HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

        Comment


          #5
          Do the hs.writelog lines print out and if so are the values correct?
          -Rupp
          sigpic

          Comment


            #6
            Originally posted by Rupp View Post
            Do the hs.writelog lines print out and if so are the values correct?
            hehe, i had a wrong value in the virtual device
            it works now , i spend testing for a couple of hours , it just was an frogotten word.
            Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
            Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




            HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

            Comment

            Working...
            X