No announcement yet.

get value, change value, then go back to original value

  • Filter
  • Time
  • Show
Clear All
new posts

    Sorry for the delay. Busy day, and this was a lot to digest.
    I don't use Sonos, so in a lot of ways I'm guessing, but I would hope it gives you a means to access and control its data. If not, that's something to take up with the PI author.

    First, I'm pretty sure in order to get the Zone Name to populate, you'll need to store the name in a Virtual Device DeviceString, then display the DeviceString in a text box. Same with the volume level. Store that in the same VD DeviceValue. It's relatively easy to get HST to work with the device properties from there.

    The control 'screen' is probably going to need to be a set of identical screens (one for each Zone appropriately named, etc.). Work with one at a time, say Master Bedroom, then once that's working, you can copy the whole screen, name the copies as needed and change the properties of the elements to fit the individual zones. Each one would be opened by pressing the associated button on the main screen.

    A Virtual Device can be used to hold the value of your slider. Then just reference that device in the slider properties (devicevalue) in HST. Within your script, probably a separate subroutine, use the Device Value to modify the volume. That will require a new event as well, triggered on" VD value changes to Any". Same applies if the volume is changed from another source... copy the actual volume level to the VD so the slider tracks.

    As for the screen on top business. Good luck with that. It's been a problem with HST from the beginning. The more pressure HS gets to have this fixed, perhaps the sooner we'll see it fixed. I'd start with a call to support to ask the proper procedure to lodge bug reports. I don't think Bugzilla is active any longer.

    Hope that helps some.
    Real courage is not securing your Wi-Fi network.


      We're still not on the same page.
      I know what I 'need' to do, but I don't know HOW to do it.
      The screens are done. That's not an issue.
      I need to know how to use the Virtual devices.
      Meaning, how do I set them up.
      1st Step, How do I store the name in a Virtual Device DeviceString? I've only used VD's to track the status of lights so far.


        Create a Virtual Device (The new Virtual Device has no associated Plugin)

        1. Click on the green + on the top right side of any Device Screen.
        Under the Configuration Tab
        2. Give it a name, and location(s)
        3. (Probably a good idea to) give it a Device Code.
        4. Set the rest of the options for the device as needed.
        Under the Status Graphics Tab
        Set up the necessary Status & Graphics pairs as needed. You shouldn't need to do much there actually to start with.

        Save the Device. Done.

        To Store a Device String via scripting:
        hs.SetDeviceString(dvRef,"Any String you need",False) [or True to update the DeviceLastChange]

        To Retrieve them:
        A = hs.DeviceString(dvRef)
        A = hs.DeviceValue(dvRef)
        Real courage is not securing your Wi-Fi network.