# \[DEPRECATED\] Trigger Happy!

**URL:** <https://community.smartthings.com/t/deprecated-trigger-happy/29960>\
**Category:** Community Created SmartApps\
**Created:** [November 24, 2015, 4:45pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960 "2015-11-24T16:45:55Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 1, 2015, 12:52am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/81 "2015-12-01T00:52:02Z")

</div>

Updated Github. I think that bug is fixed. Let me know… Thanks!!

---

<div class="post-metadata">

**Author:** ![jsulliweb](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jsulliweb/32/12886_2.png) [@jsulliweb](https://community.smartthings.com/u/jsulliweb)\
**Post date:** [December 1, 2015, 4:00pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/82 "2015-12-01T16:00:56Z")

</div>

Question about Temperature Comparison. It’s a little unlcear as to whether the symbol stands for greater than or less than. I want to set up a trigger if a temp goes above 75, for example. Do I use:

Sensor  
.\>  
75

or

Sensor  
\<  
75

Just looking for a clarification. This is really awesome work! Thanks!!

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 1, 2015, 4:02pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/83 "2015-12-01T16:02:36Z")

</div>

The symbol is relative to the second operand, so \> means greater than x; \< means less than x.

---

<div class="post-metadata">

**Author:** ![jsulliweb](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jsulliweb/32/12886_2.png) [@jsulliweb](https://community.smartthings.com/u/jsulliweb)\
**Post date:** [December 1, 2015, 4:04pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/84 "2015-12-01T16:04:07Z")

</div>

Ok, that’s what I was thinking… The screen layout was just throwing me a little. Thanks for the quick response!

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 1, 2015, 7:50pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/85 "2015-12-01T19:50:16Z")

</div>

New version released: Version 1.1.4

Now supports setting the SHM alarm state. [https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/trigger.src/trigger.groovy](https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/trigger.src/trigger.groovy)

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 1, 2015, 11:21pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/86 "2015-12-01T23:21:25Z")

</div>

And, yet another update, Version 1.1.5.

Release notes:

- Fixed a bug concerning using presence as a trigger

To update: copy code for Trigger from Github [https://github.com/bravenel/SmartThingsPublic/blob/master/smartapps/bravenel/trigger.src/trigger.groovy](https://github.com/bravenel/SmartThingsPublic/blob/master/smartapps/bravenel/trigger.src/trigger.groovy)  
Paste it into Trigger in IDE, overwriting previous version, and Save. Do not publish!

---

<div class="post-metadata">

**Author:** ![Mbhforum](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mbhforum/32/93879_2.png) [@Mbhforum](https://community.smartthings.com/u/Mbhforum)\
**Post date:** [December 1, 2015, 11:25pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/87 "2015-12-01T23:25:44Z")

</div>

Bruce, I noticed when updating from github, I believe you are forced to publish for the update to work. For some reason the parent app (I.e: rule or trigger) gets updated while rule engine and happy trigger don’t require an update.

Why is publishing bad?

---

<div class="post-metadata">

**Author:** ![jcarrano](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jcarrano/32/20417_2.png) [@jcarrano](https://community.smartthings.com/u/jcarrano)\
**Post date:** [December 2, 2015, 1:17am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/88 "2015-12-02T01:17:53Z")

</div>

I concur. I very much appreciate both apps, but would love to see them together.

What is really cool is that there are people like Bruce who are willing to put so much effort into helping the community.

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 2, 2015, 1:28am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/89 "2015-12-02T01:28:11Z")

</div>

> [@jcarrano](#):
>
> I very much appreciate both apps, but would love to see them together.

You would have several intractable problems to solve, each of which on its own leads to confusion of purpose and outcome. For example, some triggers have no state, so can’t be used as conditions to a rule. Triggers can cause actions that a rule cannot meaningfully do, due to contextual issues. Look at the list of actions for Rule and for Trigger, and you’ll see some of these differences. And, look at the list of conditions for the two apps, more differences.

From a UI perspective, one could perhaps slap the two apps together, and attempt to sort out the above issues, but the result would confuse everybody.

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 2, 2015, 1:42am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/90 "2015-12-02T01:42:27Z")

</div>

For what it’s worth, I have 10 rules and 27 triggers. Triggers are far and away the more common type of automation. Most of the custom small smartapps that I used to write for people were triggers, simply an odd combination of event and action not covered by ST’s standard apps. I bet you that half the rules people have written are in fact triggers (single condition, only true actions). Each has it’s place in automating your home.

---

<div class="post-metadata">

**Author:** ![JH1](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jh1/32/37723_2.png) [@JH1](https://community.smartthings.com/u/JH1)\
**Post date:** [December 2, 2015, 1:42am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/91 "2015-12-02T01:42:37Z")

</div>

Bruce -

Have you looked at the UI and logic in the SRBuilder app?

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 2, 2015, 1:59am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/92 "2015-12-02T01:59:08Z")

</div>

Yes I have.

There are significant differences of approach, with similarities. SRBuilder is single trigger driven, leading to condition rule testing. Rule Machine is entirely state based only on conditions / rule, driven by any event that affects the state of the conditions. The example rule in the OP for Rule Machine can’t be done in SRBuilder without limiting it to a single trigger, or using multiple rules, because it’s logic wasn’t based on a single triggering event. Trigger Happy also allows multiple triggers for a set of actions, of course with no rule at all.

---

<div class="post-metadata">

**Author:** ![jcarrano](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jcarrano/32/20417_2.png) [@jcarrano](https://community.smartthings.com/u/jcarrano)\
**Post date:** [December 2, 2015, 2:04am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/93 "2015-12-02T02:04:47Z")

</div>

I see your point. The thing is, there are apps that do this already. Some functions are missing and none of them work within ST like yours.

Here is a prime example of the usefulness of combining these concepts.  
Trigger: press button  
Conditions:  
If Garage is open  
Then close garage  
If garage is closed And after sunset  
Then open garage and turn on light  
Else open garage

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 2, 2015, 2:14am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/94 "2015-12-02T02:14:46Z")

</div>

> [@jcarrano](#):
>
> Here is a prime example of the usefulness of combining these concepts. Trigger: press buttonConditions: If Garage is open Then close garage If garage is closed And after sunset Then open garage and turn on light Else open garage

So you want a button to toggle the open / close state of the door, with an added action of turning on the light if it’s after sunset. Correct?

The way garage doors are set up they have virtual momentary buttons that open / close them. So your case devolves to a single trigger (push button, turn on virtual momentary button), and a single rule (conditions: virtual momentary on, door open, time between x and y; rule: door open and time between x and y; action: turn on light).

This works, even if you use a different method of opening the garage door.

---

<div class="post-metadata">

**Author:** ![jcarrano](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jcarrano/32/20417_2.png) [@jcarrano](https://community.smartthings.com/u/jcarrano)\
**Post date:** [December 2, 2015, 2:31am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/95 "2015-12-02T02:31:47Z")

</div>

It was just one example. I can come up with several. For each I’m sure an alternative method can be imagined. The point is an engine with a trigger, condition, action model covers them all.

---

<div class="post-metadata">

**Author:** ![Toasty](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@Toasty](https://community.smartthings.com/u/Toasty)\
**Post date:** [December 2, 2015, 2:33am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/96 "2015-12-02T02:33:02Z")

</div>

But trying to create, manage, and debug such an engine is near impossible. At least while having a life.

---

<div class="post-metadata">

**Author:** ![jcarrano](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jcarrano/32/20417_2.png) [@jcarrano](https://community.smartthings.com/u/jcarrano)\
**Post date:** [December 2, 2015, 3:18am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/97 "2015-12-02T03:18:02Z")

</div>

Now that’s just silly. It is no more effort. If Bruce doesn’t want to do it that’s his prerogative, but to say it’s ‘near impossible’ is absurd. We all still appreciate everything he has already done.

Simple Rule Builder already does it. It is a third party web app, so there are the inherent issues that come with that, but it has triggers, conditions and actions. So does Smart Rules, but that’s a mobile app, so there’s that. Also Smart Rules has limited conditions.

Anyway, I was simply agreeing with another poster who thought it would be a good idea. I am not trying to start an argument. I don’t really care enough about this topic to continue this line of discussion.

---

<div class="post-metadata">

**Author:** ![bravenel](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bravenel/32/13223_2.png) [@bravenel](https://community.smartthings.com/u/bravenel)\
**Post date:** [December 2, 2015, 3:51am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/98 "2015-12-02T03:51:00Z")

</div>

New version posted: Version 1.1.6

Release notes:

- Added Smart Home Monitor alarm state changes as triggers

This completes the integration of Smart Home Monitor into Trigger Happy. You can test and set SHM alarm state.

To update: copy code for Trigger from Github [https://github.com/bravenel/SmartThingsPublic/blob/master/smartapps/bravenel/trigger.src/trigger.groovy](https://github.com/bravenel/SmartThingsPublic/blob/master/smartapps/bravenel/trigger.src/trigger.groovy)  
Paste it into Trigger in IDE, overwriting previous version, and Save. Do not publish.

---

<div class="post-metadata">

**Author:** ![AndrewP](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/andrewp/32/20212_2.png) [@AndrewP](https://community.smartthings.com/u/AndrewP)\
**Post date:** [December 2, 2015, 8:16am UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/99 "2015-12-02T08:16:11Z")

</div>

Bruce

Thanks so much for Trigger Happy and Rules - now using this for everything

Would it be possible to add camera support - so for example, when a door is opened (triggered by contact sensor) a camera takes a photo?

---

<div class="post-metadata">

**Author:** ![maXiom](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@maXiom](https://community.smartthings.com/u/maXiom)\
**Post date:** [December 2, 2015, 1:39pm UTC](https://community.smartthings.com/t/deprecated-trigger-happy/29960/100 "2015-12-02T13:39:10Z")

</div>

As I learn more about groovy, I’m interested to know what I might alter to change the ability to delay a switch from Minutes (your default) to Seconds.

Is it solely contained within this…  
input “delayedOffTrue”, “capability.switch”, title: “Turn on/off these switches after a delay (default is OFF)”, multiple: true, required: false, submitOnChange: true  
if(delayedOffTrue) {  
input “delayOnOffTrue”, “bool”, title: “Turn ON after the delay?”, multiple: false, required: false, defaultValue: false, submitOnChange: true  
input “delayMinutesTrue”, “number”, title: “Minutes of delay”, required: true, range: “1…\*”, submitOnChange: true  
if(delayMinutesTrue) {  
def delayStrTrue = "Delayed " + (delayOnOffTrue ? “On:” : “Off:”) + " $delayedOffTrue: $delayMinutesTrue minute"  
if(delayMinutesTrue \> 1) delayStrTrue = delayStrTrue + "s"  
setActTrue(delayedOffTrue, delayStrTrue)

If so, what would I change?  
The reason being… I have a contact relay on the Christmas wishlist with the plans to control a garage door, but everything I read says it needs to be turned on, then toggled off 3-4 seconds after (which I’m hoping to automate with your app).

[Previous page](https://community.smartthings.com/t/deprecated-trigger-happy/29960.md?page=4)

[Next page](https://community.smartthings.com/t/deprecated-trigger-happy/29960.md?page=6)
