Announcement

Collapse
No announcement yet.

Set Timer to Variable

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

    Set Timer to Variable

    Is there any way to set a Timer to a variable (i.e. Global Variable or value stored in an HS3 device) either through an event or a script?

    Thanks,

    JimO.

    #2
    Originally posted by jameseoconnor View Post
    Is there any way to set a Timer to a variable (i.e. Global Variable or value stored in an HS3 device) either through an event or a script?

    Thanks,

    JimO.
    you could do something like this:
    PHP Code:
    hs.setDeviceString(805,hs.TimerValue("Attic Fan 1").Hours " hrs  " &      hs.TimerValue("Attic Fan 1").Minutes " mins",True
    Replace the 805 with your virtual device reference id.
    HS4Pro Running on a Raspberry Pi4
    68 Z-Wave Nodes, 175 Events, 359 Devices
    UPB modules via OMNI plugin/panel
    Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
    HSTouch Clients: 3 Android, 1 Joggler

    Comment


      #3
      Great - Thanks for the sample code...

      I will try it tonight!

      JimO.

      Comment


        #4
        Hi Rob,

        That script looks like it would change a device to a timer value. I need the opposite. I would like to set the Minutes of a timer to the value stored in a Virtual Device. Example (IF Device:Time1 is 2, SET Timer:Timer1 to 2 Minutes. Do you or anyone know if that is possible?

        -Travis

        Comment


          #5
          Hmmmm... Not sure on that one. Might need one of the experts to chime in

          Sent from my SCH-R970X using Tapatalk
          HS4Pro Running on a Raspberry Pi4
          68 Z-Wave Nodes, 175 Events, 359 Devices
          UPB modules via OMNI plugin/panel
          Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
          HSTouch Clients: 3 Android, 1 Joggler

          Comment


            #6
            You can't set the timer to anything by script, you only have two options, reset and get it's current value. I'm not sure what to suggest, you can join the rather lonely Bugzilla club as similar options were requested in 2013 - http://bugzilla.homeseer.com/bugzill...ug.cgi?id=1222

            Comment


              #7
              Yeah, Spud had pointed me to that bugzilla a couple of months back. I +1'd it back then but nothing happened. Was hoping it could be something that his EasyTrigger plug-in could handle if HS would add it.

              Thanks guys,

              -Travis

              Comment


                #8
                Unfortunately the value for the timer is stored as some sort of complex object in the database so you can't make some sort of direct update of it's value there (probably a million and one reasons not to do that anyway), I think everyone is stuck until there is some traction on that bug. I could use it myself also...

                Comment


                  #9
                  Just out of curiosity, what would this be used for? I would think you could create some script logic that calculates a delta value from a timer as a substitute.
                  Mike

                  Comment


                    #10
                    My use for this would be the option to run a suspend action for an amount of time that is constantly changing, ie Thanksgiving, christmas break, mid winter break, spring or easter break. Trigger the event that suspends along with a value for how long to suspend it for thru an email.

                    Comment


                      #11
                      Is there a solution today to this 5 years old problem?

                      Comment

                      Working...
                      X