Announcement

Collapse
No announcement yet.

Devicestring set by plugin unreadable

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

    Devicestring set by plugin unreadable

    I've noticed that the device string set by the plugin is seen in the web interface of HS3 but when using something like hs.WriteLog("test", hs.DeviceString(329) ) is doesn't show up in the log.

    Anyone else noticed this?
    - Bram

    Send from my Commodore VIC-20

    Ashai_Rey____________________________________________________________ ________________
    HS3 Pro 3.0.0.534
    PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

    #2
    Are you certain you are seeing DeviceString and not DeviceStatus. The string is formed based upon the DeviceValue and the ValueStatusPairs.

    Look at the Advanced Tab of DeviceManagement for DeviceString.

    Comment


      #3
      On the device page i see Bram


      But this isn't the device string because it's set as value



      I can understand that the device is showing a value and not a device string
      However it becomes rather difficult for me this way when i want to speak out the value of the device instead of a devicestring.
      As in hs.speak("hello " & hs.DeviceString(329) )

      Is there a way to set the devicestring too?
      Attached Files
      - Bram

      Send from my Commodore VIC-20

      Ashai_Rey____________________________________________________________ ________________
      HS3 Pro 3.0.0.534
      PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

      Comment


        #4
        HS will prioritize the DeviceString over the Status so this would defeat the VSP of the Status Graphics tab. For scripting HS3 provides DeviceVSP_GetStatus to get the status text. Somthing like hs.DeviceVSP_GetStatus(ref,value,"Both") or in the more general case hs.DeviceVSP_GetStatus(ref,hs.DeviceValue(ref),"Both"). I did not try it to confirm syntax, but should be a good start where you can reference HS3Help.pdf for details.

        Comment


          #5
          Thanks for pointing me into the right direction
          I solved it and I update my script so that is will either find the device string or use the VSP pair

          In case anyone is interested in this.
          Code:
          Dim MyStatus
            Dim DevRef  = 312 ' Ref ID of the device
            Dim Value   = hs.DeviceValue(DevRef)
            Dim VSPType =   1  ' 0 = Status - Control
                                             ' 1 = Status
                                             ' 2 = Control
                                             ' 3 = Status - Control
            MyStatus = hs.DeviceVSP_GetStatus(DevRef, Value, VSPType)
            hs.WriteLog("test", MyStatus)
          - Bram

          Send from my Commodore VIC-20

          Ashai_Rey____________________________________________________________ ________________
          HS3 Pro 3.0.0.534
          PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

          Comment

          Working...
          X