Announcement

Collapse
No announcement yet.

Help with an event?

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

    Help with an event?

    Hi,

    Here is what I want to do but I am not sure exactly how to setup the event in order to accomplish it.

    I have a device called "Home Tristas Bed Warmer Enabled" and it is either on or off.

    I have a new event that I want to set up that is called "Turn on tristas bed warmer", but I only want it to turn on if the Enabled device above is on.

    I tried setting up a condition trigger that said if "Home Tristas Bed Warmer Enabled is ON", and put the Bed warmer device set to on in the Device Actions tab, but all that did is turn on the bed warmer when the "Home Tristas Bed Warmer Enabled" device was changed to on. That is no good.

    This event can be triggered manually or by phone. So when I execute the event, I want the bed warmer to only come on if the "Home Tristas Bed Warmer Enabled" is ON.

    I know I can do it in a script, but I would like to keep it in the event if possible.

    TIA
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    #2
    I think you will need a virtual device, let's say bed warmer on/off. Your event woould look something like:

    If Home Tristas Bed Warmer Enabled is ON
    And virtual device is CHANGED to ON
    Then tristas bed warmer set ON

    Comment


      #3
      MSekelsky,

      Thanks for the response.

      Home Tristas Bed Warmer Enabled is a virtual device that I use to decide if the bed warmer comes on. I was doing it in a script, but I would like to do everything in the event if possible.

      There has got to be a way.

      I was hoping that when the event was execute that the bed warmer device being turned on would be wrapped in the condition I set, which was "If Home Tristas Bed Warmer Enabled is ON"

      It does not look like it works that way.

      Hmmm. I thought it would be simple. Because in my script that is all I do and it works like a charm.

      I want to setup everything in the event tho.
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        I agree that this should be able to be done via an event. Can you post the script you use? That may give me a better idea of what you are doing.

        Comment


          #5
          Sure thing. Here is the script.

          '*********************************************************** *******************************
          ' This turns on Tristas bed warmer
          '*********************************************************** *******************************
          Sub Turn_On_Tristas_Bed_Warmer()

          if hs.IsOnByName("Home Tristas Bed Warmer Enabled") then
          hs.ExecX10ByName "Master Bedroom Tristas Bed Warmer", "on"
          else
          hs.writeLog "Tristas Bed Warmer Info", "Tristas bed warmer is not enabled, so it will not turn on."
          end if

          End Sub


          I cannot believe that this is not doable in an event.
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


            #6
            What determines if "Home Tristas Bed Warmer Enabled" is ON? And what triggers this script?

            Comment


              #7
              Right now, I set the "Home Tristas Bed Warmer Enabled" virtual device manually and it will remain this way, but I would like to mimic the script in an event.

              Currently the event is calling the script.

              I would like the event to so the processing of the script.
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #8
                But what triggers the event? For example, I have a virtual device named "it's hot." This device is set to on anytime the temperature upstairs is greater than 74 degrees (sorry, no celcius ) When I go to bed I press a keypad which changes my sleep status to "asleep" (virtual item). SO if "Asleep" is changed to ON and "it's hot" is ON, the ceiling fan turns on. This seems pretty similar to what you are trying to do. In my case "asleep" triggers the event.

                Comment


                  #9
                  My wife controls it by picking up the phone and speaking a command. The event then executes, which calls the script I posted and if the virtual device is on, it turns on her bed warmer.

                  The reason I set up a virtual device for it is so I can turn it off in the summer and then the bed warmer will not come on in case it is turned on accidently.

                  So to sum it up, I am manually triggering the event in question, but I would like to mimic the script in the event, which should be doable.
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                    #10
                    Well, I am far from an event expert, but I think you will need another virtual device. From what I can see if you have an event sent to manual you cannot apply any conditions, which is what you want to do. I'd create a virtual device that is triggered on by the wife's voice command. Then you can have an event that is triggered by that device being changed to ON. You can have that same event shut that new virtual device OFF so it is ready to go next time she needs it.

                    Comment

                    Working...
                    X