[DEPRECATED] Trigger Happy!

How are you doing this? A power meter?

I did some minimal testing on Android, and didn’t have that problem. If you continue to have this problem, please go into Live Logging in the IDE to see what error, if any, Trigger Happy is throwing.

I know they were updating the Android app today, supposedly so it wouldn’t crash anymore. Ya, sure. Whatever…:grinning:

There is no way for the app to do this. Trigger identifies its parent to be Trigger Happy, and you were in Trigger Happy when this happened. This one is on ST, but not a clue why.

Hey, I can confirm that the Android app without an apparent update seems to work fine now. Platform update maybe? Your info, not sure where you saw that, led me to check. Excellent. And thanks!

I shoulda known, but thanks for confirming. I’ve already rebuilt, so no point in me reporting to ST.

@bravenel

I’ve got a question.

I have a contact sensor (Iris Sensor) that is not running local. It is on my closet door. I have a GE Link bulb in the closet that turns off/on when the door opens/closes.

I’ve set this up as a simple rule in Rule Machine.

What, if any, are the advantages of moving this simple rule to Trigger Happy?

Thanks

Note *** If the Iris sensor ran local, I would run this in Smart Lights to have local control***

1 Like

You answered your own question: It would take two triggers to do what you’re doing with one rule! If a rule has both actions for true and actions for false, a single trigger can’t do it.

Ok, so am I thinking about this wrong. If the trigger is the door opens, and the action is the light comes on… It will not go off when the door closes?

Nope, it subscribes to door.open, so it never even sees the door closed event. A rule on the other hand, subscribes to all events for the door, and proves true when you open the door (turn on light), and then proves false when you close it (turns off the light).

A trigger is the most basic element of event—>action. It is very specific as to what action it’s looking for – you select that when you define the trigger events. Most devices throw two events: on/off, lock/unlocked, open/closed, etc. If you need to act on both you need a rule. A trigger will act on just one side of it.

4 Likes

Got it… This app is for very specific uses, and when needed is very powerful

1 Like

Thanks for the latest scenario, I was having trouble determining when I would use one over the other. I got I now, sometimes it take a little to get though to me :smile:

Event driven systems like SmartThings can be confusing to anyone.

There are two completely different ways to think about it. The first way is device control centric. Smart Lighting and Routines are this way, where SL makes you choose the device you want to control, and then how you want to control it. The second way is event centric. Rule Machine and Trigger Happy are this way, where you start with the events/conditions that you are interested in doing something in response to, and then deciding what to do to which devices in response.

Both ways are totally valid ways to present the functionality of SmartThings to the user. Which makes more sense for a given user (overlooking local processing bias) depends on how you think. Some people prefer the device control view, and some people think about events. Reading these Community topics, I’ve heard more people needing to work on event responses (I get home, it gets dark, closet door opens, etc) than device control. That may be because ST provided basic tools for device control in their standard apps, both in V1 and V2, and they mostly ignored the event view in their offerings. At any rate, that was the need I heard from the Community, and am enjoying attempting to fill with these two apps.

5 Likes

Ok so maybe I’m a bit confused here. As I said before, I used Trigger Happy to get my lights to dim to 20% when my projector pulls over 100w. However, during that time, the app continues to reapply the 20% dimming if I try to turn the lights on or off so I’m guessing it’s based on state. (as long as this condition exists, do this) How do I make it just a one time event?

***Update: I found a temporary fix for my issue. I created a new “mode” in ST and called it “Projector in Use”. I have the dim trigger set only to trigger when in “home” mode and to put it in “projector in use” when the projector comes up. This stops the trigger from constantly firing. Then I set the trigger to turn the lights back on to put raise the lights to 100% and put it back in “home” mode. I can’t think of any other way to accomplish a single-use trigger.

Yes. I’m using the Smartpower Plug.

Small bug fix update: Version 1.0.1

Release notes:

  • bug in disable trigger identified and fixed

To update: copy code for Trigger from Github 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!

1 Like

Hey thanks. Will this solve the issue I mentioned? Also, where is “rule”? Are you saying I should just replace the existing code and click save?

I highly recommend NOT using a mode. The problem is that the trigger is going to fire everytime the power meter reports its power. So, this isn’t the way to go about this.

You could use a Rule to do it instead of a Trigger. The conditions of the Rule would be the same, namely power over 100. The difference is, that the Rule will only do the action when the rule truth changes. It shouldn’t change until the power goes below 100, at which point, if you want, it could rebrighten the lights.

Github integration is now live for Trigger Happy. See the OP above for the links.

3 Likes

How do I set up a rule? I’m not sure how to tell the difference between a rule and a trigger? Is it a different app?

Sorry, go here to get started: