Announcement

Collapse
No announcement yet.

HAI button trigger

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HAI button trigger

    I've got some triggers set up by a device value change for a HAI button press. If I press the button twice in a row, the button only triggers the first time. It has to change from a different button to the new button to activate the trigger. Is there an easy way around this or am I mistaken?

    -Shane

    #2
    Shane,

    Use the "Set To" option on device value change. That triggers if the value is SET TO a a value regardless of whether it was there already or not.

    Regards,

    Rick Tinker
    HomeSeer Technologies

    Regards,

    Rick Tinker (a.k.a. "Tink")

    Comment


      #3
      The only way I can get "set to" is to use "any device". How do I pick the HAI button under these circumstances?
      Thanks,
      -Shane

      Comment


        #4
        Well to put it technically, "oh darn" - I forgot that the other trigger options disappear for a device with device value/status pairs associated with it.

        I would like to find an easy way to do it using the UI but I have to think about it some more. I think this will definitely change something in the plug-in in a future build.

        The way I can think of without using all UI of course involves a tiny bit of script. After the event triggers, if you put in the script line the command:
        &hs.SetDeviceValue (device),0 Then it would reset the value to zero. Since changing the device value does not cause the plug-in to "press the button" it is OK to do this. Changing the value to zero will always leave the device such that a 2nd press of that button re-triggers the event.

        I am a little pressed for time or I would look up how to cascade another script command to allow you to reference the (device) part by using the device name, but if somebody does not help you out then I will send you the complete script line this weekend or early next week. You can't simply put the device code (e.g. "A1") in for (device) because plug-in created devices always hide their house code.


        Regards,

        Rick Tinker
        HomeSeer Technologies

        Regards,

        Rick Tinker (a.k.a. "Tink")

        Comment


          #5
          Rick,
          I actually found a slightly different way to do it. On the event for the button press, I added an HAI trigger to a another button that doesn't do anything. That way it sets it to the new button after being triggered by the first one. Not good at scripting so I avoid it when I can.

          -Shane

          Comment


            #6
            <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Shane:
            Rick,
            I actually found a slightly different way to do it. On the event for the button press, I added an HAI trigger to a another button that doesn't do anything. That way it sets it to the new button after being triggered by the first one. Not good at scripting so I avoid it when I can.

            -Shane<HR></BLOCKQUOTE>

            Shane,

            I've got a script called "Button Reader" that will return a value of the button # pressed as I had the same problem you did on this very issue.

            Hopefully, Rick will add this in a future version (hint,hint,wink,wink)

            Lemme know if you want a copy.

            Paul

            Comment


              #7
              Paul,

              Please post your script so I can try it out. I also hope this changes in future versions of the plug-in. (hint,hint,wink,wink)
              Thanks,

              -Shane

              Comment


                #8
                Actually, Rick can code a workaround, but the proper fix lies within HomeSeer. HomeSeer does not have a SET VALUE option like the SET STATUS trigger option when the device value/status pairs are in use. This really should be addressed. Without it, HomeSeer is the one deciding that "since the value did not change, I do not need to trigger anything even though I was just told that something happened with that device's value"...

                As a workaround, I could set the value and then set it right back to a known value that perhaps corresponds with "(Unknown)", but then when a button is pressed, you might catch an instant at which it displays the button name, but all of the rest of the time "(Unknown)" will display and you will never know which button was the last one pushed.

                So I would rather see HomeSeer "adjusted" and Rich and I have talked about it - he is OK with making the change, but we have not had a chance to do it.


                Regards,

                Rick Tinker
                HomeSeer Technologies

                Regards,

                Rick Tinker (a.k.a. "Tink")

                Comment


                  #9
                  <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Shane:
                  Paul,

                  Please post your script so I can try it out. I also hope this changes in future versions of the plug-in. (hint,hint,wink,wink)
                  Thanks,

                  -Shane<HR></BLOCKQUOTE>

                  Here ya go.

                  Basically, just replace the name of the event you want triggered with your own event macro names. The X value relates to the button number pushed.

                  The event to trigger this script is set to trigger when DEVICE STATUS CHANGE and the device is set to HAI System Button Pushed and the Status is Set Any Status.

                  Let me know if you have any questions,

                  Paul
                  Attached Files

                  Comment

                  Working...
                  X