Announcement

Collapse
No announcement yet.

Appending text / formatting when tracking device

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

    Appending text / formatting when tracking device

    Is there any way to modify the text that is shown when one tracks a device, for example, having the device value and then some text like "%" for example?

    Is there any way to format the text from the device status, for example, making it all CAPS?

    I am trying to see to what extent I can use device tracking instead of $SCRIPT in order to be more efficient, but I am lacking some formatting options...

    Cheers
    HS3 Pro Edition 3.0.0.548| Plug-Ins Enabled: Sonos 3.1.0.57, RFXCOM 30.0.0.45, X10 3.0.0.62, IPThermostat 3.4.5.0, Pushover 3P 0.0.0.54, Blue-Iris 3.1.3.33206, Z-Wave 3.0.10.0, BLML2HS 2.0.28.0, mcsMQTT 6.12.4.0, Insteon 3.0.7.19​​ | Win 7 32-bit | Intel Atom D2550 @ 1.86GHz 4GB RAM

    #2
    I've had to create separate devices just for HSTouch to store the formatted information I want. I then set status tracking on those devices. It will also require a event/script to take the 'raw' data and format it into the new destination device.

    Anything to save a $SCRIPT call will enhance performance...
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    Comment


      #3
      I put this exact feature request in about two years ago into the bugzilla DB (forgot my login and there appears to be nowhere to register new logins) but no answer.

      Scripts/virtual devices have been the way around it, or carefully crafted second labels that give the appearance that they are one label.

      Comment


        #4
        Appending text / formatting when tracking device

        Yes, have been doing the joining labels bit as well, but it's such a pain with the way the editor shows the text one way in the designer and another on the device... It means back and forth each time, with micro adjustments in between... Oh well...

        I will end up doing custom devices and events / scripts in HS as well, but first I want to try out the mainlobby web designer V5 and see if it is any easier to do things like this... I believe there is some issue with data refreshing that requires sending a page refresh when something changes, but have not yet installed it so cannot say for sure...

        If I had the time, I would probably end up writing my own mobile app connected to the HS API layer
        HS3 Pro Edition 3.0.0.548| Plug-Ins Enabled: Sonos 3.1.0.57, RFXCOM 30.0.0.45, X10 3.0.0.62, IPThermostat 3.4.5.0, Pushover 3P 0.0.0.54, Blue-Iris 3.1.3.33206, Z-Wave 3.0.10.0, BLML2HS 2.0.28.0, mcsMQTT 6.12.4.0, Insteon 3.0.7.19​​ | Win 7 32-bit | Intel Atom D2550 @ 1.86GHz 4GB RAM

        Comment


          #5
          Have you tried something like this. I placed it in the Text property under Appearance and I get the string value of the device in all caps even though only the first character in the device's string is a cap:
          Code:
          [$SCRIPT=&UCase(hs.DeviceString("t99"))]
          Note that you can get Lower Case with :
          Code:
          [$SCRIPT=&LCase(hs.DeviceString("t99"))]
          And Title Case (Intitial upper case character for each word) should be possible (untested) with;
          Code:
          [$SCRIPT=&StrConv(hs.DeviceString("t99"), VbStrConv.ProperCase)]
          Karl
          Karl S
          HS4Pro on Windows 10
          1070 Devices
          56 Z-Wave Nodes
          104 Events
          HSTouch Clients: 3 Android, 1 iOS
          Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

          Comment

          Working...
          X