Announcement

Collapse
No announcement yet.

Status text shows as function popupr1(url)

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

    Status text shows as function popupr1(url)

    Hi Michael, If I remember it right, I was able to see the status text or the value of a device in HSTouch, I do not remember exactly which one of the two, but I think I lost that ability. For several devices now, instead of the value of that device, I see function popupR1(url) I gave you few examples of what I'm seeing and trying to accomplish. Could you perhaps store the string value in the value field?
    Attached Files

    #2
    I am not a HS Touch user so don’t fully appreciate what you are showing. In general mcsSprinklers uses JavaScript in device strings and it services the clicks from mcsSprinklers pages to interpret the intent of the click. If you show the device string in HS Touch and the click it then HSTouch will not know what to do since it did not load the pop up JavaScript.

    The only thing that can be stored in device values are numbers so unless VSP is setup then HS can only show the number.

    I think the bottom line is that you should not ask HSTouch to show DeviceString if you expect to be able to click on it.

    Comment


      #3
      Originally posted by Michael McSharry View Post
      I am not a HS Touch user so don’t fully appreciate what you are showing. In general mcsSprinklers uses JavaScript in device strings and it services the clicks from mcsSprinklers pages to interpret the intent of the click. If you show the device string in HS Touch and the click it then HSTouch will not know what to do since it did not load the pop up JavaScript.

      The only thing that can be stored in device values are numbers so unless VSP is setup then HS can only show the number.

      I think the bottom line is that you should not ask HSTouch to show DeviceString if you expect to be able to click on it.
      Understood, in the example above, would it be possible to put 88% in the value field?

      Sent from my SM-G973U1 using Tapatalk

      Comment


        #4
        Originally posted by alphatech View Post
        Understood, in the example above, would it be possible to put 88% in the value field?
        I doubt it. It looks like the value is the status of the valve. You might be able to extract it from the string with a script though.

        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          In HS and HS2 there existed a DeviceStatus that was typically On, Off, Dim etc. This property was removed in HS3 and only DeviceValue being used as the method to control a device. Since DeviceValue in HS3 is now being used to handle the On/Off for the Area device it is no longer available to put status information such as 88.

          Comment


            #6
            It makes sense Michael, thank you. Would you know how to take that string and get that value using a script like suggested? There are several devices that I would like to see in hs touch but have that issue.

            Thanks

            Sent from my SM-G973U1 using Tapatalk

            Comment


              #7
              Give this a try.
              Save it in the HS Scripts folder with a .vb extension.
              You'll need to define a new virtual device. Replace 'nnnn' in the script with the device Ref ID.
              The last line is commented out, but can output the results to the HS log if desired.

              Code:
              Public Sub Main(ByVal Parms As Object)
              
                  'Creates device with "clean" device string for HSTouch
              
                  Imports System.Text.RegularExpressions
                  Dim imgRegex As New Regex("<[^>]*>", RegexOptions.IgnoreCase)
              
                  Dim strLine As String
                  Dim dblNumber As Double
              
                  'Soil moisture
              
                      strLine = imgRegex.Replace(hs.DeviceString(302), "")
                      hs.SetDeviceString(nnnn, strLine.Trim(), True)
                      dblNumber = Val(strLine)
                      hs.SetDeviceValueByRef(nnnn, dblNumber, True)    
                      'hs.WriteLog("Soil moisture", strLine.Trim())        'debug
              
                  End Sub
              Mike____________________________________________________________ __________________
              HS3 Pro Edition 3.0.0.548, NUC i3

              HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

              Comment


                #8
                In the past I created a set of status devices to assist with HS Touch. These are the R1xx and R2xx device codes enabled from the Homeseer section of the Other page. R1xx gives the predict times. R2xx gives the moisture levels. Seems to me that this is what you should be using rather than the Rxx series of devices.

                Comment


                  #9
                  It worked great, I do not want to pollute this post with another compliment to you guys but it shows that you both care about other users and always try to accomodate their needs. Thanks.

                  Comment

                  Working...
                  X