Announcement

Collapse
No announcement yet.

Push/Pop: Number of itens on stack

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

  • Push/Pop: Number of itens on stack

    About push/pop device´s value, is there a way to know how many itens are on the stack ?

  • #2
    Originally posted by Hans View Post
    About push/pop device´s value, is there a way to know how many itens are on the stack ?
    This is an inherent challenge/problem with a stack. YOU (the 'automaton owner') must know whats on the stack and in what order when you create an event/automation. But, that will change so you MUST understand the possibilities. The way around this is to give a Stack Item a Label. Then, you must know what that Label is and be consistent with labeling when you add to the Stack.

    example Stack using labels

    Daytime normal
    Daytime modified
    Daytime kid favorites

    Comment


    • #3
      Originally posted by Ltek View Post

      This is an inherent challenge/problem with a stack. YOU (the 'automaton owner') must know whats on the stack and in what order when you create an event/automation. But, that will change so you MUST understand the possibilities. The way around this is to give a Stack Item a Label. Then, you must know what that Label is and be consistent with labeling when you add to the Stack.

      example Stack using labels

      Daytime normal
      Daytime modified
      Daytime kid favorites
      Using stacks is new to me but the way I understood them was that you are not setting up specific device settings in a group stack per se but obtaining all current settings of a group at that specific time your event triggers and then push those back out when the push event triggers, is that correct?


      Sent from my iPhone using Tapatalk
      HS3 3.0.0.500 &HSTouch Designer 3.0.71 with 782 Devices, 479 Events
      Plugin's:
      BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee,
      EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
      weatherXML, Jon00 Alexa Helper, Network Monitor, Z-Wave 3.0.1.252

      Comment


      • #4
        Originally posted by Hans View Post
        About push/pop device´s value, is there a way to know how many itens are on the stack ?
        If I’m understand this correctly, as you are setting up your events you will need to keep track of how many stacks you have set up as your events progress. Then if needed, clear them once you’ve determined you are done with them.


        Sent from my iPhone using Tapatalk
        HS3 3.0.0.500 &HSTouch Designer 3.0.71 with 782 Devices, 479 Events
        Plugin's:
        BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee,
        EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
        weatherXML, Jon00 Alexa Helper, Network Monitor, Z-Wave 3.0.1.252

        Comment


        • #5
          The Profit you can read https://en.wikipedia.org/wiki/Stack_(abstract_data_type) to understand the basics.

          Stacks can be setup in anyway the developer wants, and as many as they want. My comments have nothing to do with setting up events for tracking stacks. That would be impossible, unless the plugin is designed that way... and it would also be inefficient.

          Ideally the plugin would do things such as...

          Create and Label stack(s)
          Push, and label, stack items
          Pop (based on: item number, first, last, or label)
          Query Stack for stack item info (count, items/labels, values)
          ... etc

          Comment

          Working...
          X