Announcement

Collapse
No announcement yet.

Can this be done?

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

    Can this be done?

    I've been browsing the threads related to virtual devices for some time now but can't quite find what I'm after. I'm wondering if it's even possible without scripting.

    I'm trying to create a simple virtual device that I can use as a countdown timer in HSTouch. To that end I'm trying to create a dimmable virtual device with range of 0-30 so that I could use the dim value as the timer display

    Basically something like this

    Turn virtual device on - setting it to 30
    start a recurring event every minute that sends a dim command to the device
    When the device hits off - hitting 0 it will turn back on to 30 and start again.

    I can create the device but I can't seem to set up a control for it that will just allow me to send it a dim command that decreases its value by one. I end up with scales or dropdowns to set the value and that's not much use to me.

    Is there such a thing as a control to just 'bump' the virtual device up or down by 'one'?

    I see many of my devices that have a -6 and -7 for dim and bright commands but I don't see how they're implemented - I'm assuming that they're used as event triggers?

    Thanks!

    #2
    You can do this with @spud's easytrigger plugin. You can set the device to it's own value - 1.

    You just have to create a couple of events.

    1) setup an event with a recurring trigger for every minute with a condition that the VDs value is less than 30 (or 31?) and greater than zero

    2) Set up another event that states when the value is zero, it goes back to 30.


    The above will of course will cause an infinite loop that loops every 30 minutes or so, so you may need more logic to prevent that if that is not what you want.
    Attached Files

    Comment


      #3
      Originally posted by MarkJames View Post
      I'm trying to create a simple virtual device that I can use as a countdown timer in HSTouch. To that end I'm trying to create a dimmable virtual device with range of 0-30 so that I could use the dim value as the timer display

      Turn virtual device on - setting it to 30
      start a recurring event every minute that sends a dim command to the device
      When the device hits off - hitting 0 it will turn back on to 30 and start again.

      I can create the device but I can't seem to set up a control for it that will just allow me to send it a dim command that decreases its value by one.
      You can do this with a counter (Tools/Global Variables, Timers, Counters).
      One event can reset the counter to 30 if it reaches 0.
      Another event can be recurring every minute that decrements the counter.
      You can query the counter or the value of the virtual device that HS creates to reflect the counter value.
      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


        #4
        Originally posted by sirmeili View Post
        You can do this with @spud's easytrigger plugin. You can set the device to it's own value - 1.

        You just have to create a couple of events.

        1) setup an event with a recurring trigger for every minute with a condition that the VDs value is less than 30 (or 31?) and greater than zero

        2) Set up another event that states when the value is zero, it goes back to 30.


        The above will of course will cause an infinite loop that loops every 30 minutes or so, so you may need more logic to prevent that if that is not what you want.
        Thanks,

        I've been wanting to purchase that plug-in for a while now - it looks quite useful. This may be what it takes for me to pull the trigger

        mark

        Comment


          #5
          Originally posted by Uncle Michael View Post
          You can do this with a counter (Tools/Global Variables, Timers, Counters).
          One event can reset the counter to 30 if it reaches 0.
          Another event can be recurring every minute that decrements the counter.
          You can query the counter or the value of the virtual device that HS creates to reflect the counter value.
          Ahh - does HS create a virtual device for each counter? I didn't realize that. That may be the way to do this. It would be great if you could reflect a counter value in HS3Touch but so far there's no easy way.

          How does HS name the virtual device? I just tried incrementing a counter but don't see a virtual device with a similar name. The problem with counters is there's no one-to-one representation in HSTouch - same with Timers

          mark

          Comment


            #6
            Actually I suppose an easy way to do this would be to use a counter for the value with a recurring event to increment it. The only stumbling block for me is how to get the value of the counter into a virtual device that I can display in HS3Touch?

            mark

            Comment


              #7
              Originally posted by MarkJames View Post
              Actually I suppose an easy way to do this would be to use a counter for the value with a recurring event to increment it. The only stumbling block for me is how to get the value of the counter into a virtual device that I can display in HS3Touch?

              mark
              HomeSeer creates devices for both Counters and Timers. I should have thought of this to begin with I don't use HSTouch, but I assume these will show up there.
              Attached Files

              Comment


                #8
                Originally posted by MarkJames View Post
                Ahh - does HS create a virtual device for each counter? . . . I just tried incrementing a counter but don't see a virtual device with a similar name. The problem with counters is there's no one-to-one representation in HSTouch - same with Timers.
                As I recall, HST introduced devices that track counters and timers precisely because that was the easiest way to get the results to appear in HSTouch. To see the devices in the device list you need to be sure Counters-Timers are selected in the drop down list. They act just like other devices except that you cannot control them directly, they only reflect the underlying counter or timer.
                Attached Files
                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


                  #9
                  Weird - I can't seem to find them.

                  I've done a check all on all rooms, all floors, and all devices.

                  Is there a different view option that needs to be checked somewhere else?

                  mark

                  Comment


                    #10
                    Originally posted by MarkJames View Post
                    Weird - I can't seem to find them.
                    Is there a different view option that needs to be checked somewhere else?
                    Check the Device Type drop down.
                    Attached Files
                    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


                      #11
                      hmmm...

                      I don't have that choice in my device type list. I've got everything checked but that's not there. I even started a timer going, incremented a counter, and created a new one called 'testcounter'.

                      I wonder if I need to upgrade my HS3... maybe it's in a newer version only.

                      mark

                      Comment


                        #12
                        OK. One more place to check.
                        Setup/General tab
                        Be sure the check box to create the devices is checked.
                        Attached Files
                        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


                          #13
                          Originally posted by Uncle Michael View Post
                          OK. One more place to check.
                          Setup/General tab
                          Be sure the check box to create the devices is checked.
                          Ahh - must be my old version. I haven't allowed an update in ages. I got bit too many times with HS2 taking updates and making a mess of things that I leave things be when they're working.

                          I'll make a full backup and take the update.

                          Thanks!

                          mark

                          Comment

                          Working...
                          X