If x AND Y, then

Apologies if this is covered already, but searching didn’t reveal anything useful.

I’m trying to control my pond pump so that it only turns off after midnight, and only between 35° and 85°. So I need If (time) and (temp) then….

I picked up a GE/Jasco outdoor module that works just fine with ST. I have time based triggers. I have temp based triggers. But I don’t have both, together. I also can’t imagine that:

  1. IF X AND Y logic isn’t already present in some cases in ST (for example: presence detection. IF A & B are absent, set to away)
  2. It isn’t wildly useful for many many other things.

Now, I’m a tech guy, really. But I’m not a programmer. And more to the point for the long term success of ST with non-technical user adoption, it seems entirely unreasonable to me that I might need to learn Groovy in order to get this functionality.

Yeah, for now, I think the only way to to do what you want is writing your own app.

Maybe you can get something going with IFTTT?

IFTTT is also limited to one IF. I’ve been trying to figure a two step method of doing it, but it immediately becomes cumbersome. Especially since IFTTT can’t access or change ST modes.

Steve28, you say “for now.”

Any idea how long “now” is? 3 months? 6 months? 4 years?

I am also forced to once again mention that “writing your own app” is absolutely not the answer ST needs if you guys ever hope to sell to the broader consumer market.

I’m on the same boat, technical but not programming savvy. My ST gadgets are limited to time, spotty presence, sun/rise/set, and a manual push of a button every now and then.

I am also forced to once again mention that “writing your own app” is absolutely not the answer ST needs if you guys ever hope to sell to the broader consumer market.

I don’t think SmartThings expects all customers to learn Groovy. I guess their idea is that by opening an API to third-party developers they will quickly build up a critical mass of smart apps to meet the needs of most non-programming customers. The problem is that there’s no app store and no easy way to share the apps other than copy-pasting them in the IDE, which is very cumbersome and error-prone.

I don’t know how long. I bought my system in Oct last year and there has been a device or two added and phone app updates, but nothing at all about apps or being able to build rules without scripting.

@DifferentComputers,

The new “Dashboard” style mobile app is still relatively new. It isn’t even out of Beta yet for Android. While the Dashboard does give simple (ie, single conditional) If-Then abilities, the previous version of the mobile ONLY did this via SmartApps. So there may be some hope that double conditionals are coming.

FWIW, I haven’t done any real programming since the mid 90s, but looking at the various apps I’ve been able to create a number of apps that I needed. Usually there’s enough examples out there to piece together what you need, and you can always request help in the developer forum if you run stuck.

That said, I think iGoControl hit the nail on the head. I believe the hope is that developers would add apps along the way that would meet most people’s needs, and if they didn’t that a request would probably see a developer design something quick.

I’ve already written… or perhaps it’s more correct to say I’ve already modified a handful of apps for others upon request. I’m certainly not the most skilled developer here… not by a long shot! But if it’s something not too complex I can take a look and try my hand at it.

And, interestingly, there appears to be a new app in the Shared apps that’s called: IF [too cold] AND [after sunset] THEN [turn off switch]. No idea if this thread prompted this app to be written, but it does look like it’s at least similar to what you’re looking for.

On a side note, @DifferentComputers, are you using modes for anything right now? It should be pretty easy to setup so that a specific mode comes on at midnight. Then install a temp trigger setup: If the temp is in the range you want, turn on the pump. But only have this run in the specific mode you setup to come on at Midnight.

It isn’t a smooth process and doesn’t work if you’re using modes for something else, but it should for a temporary band-aid if you’re not using modes.

@chrisb,

Thanks for pointing it out, but yes, that was written in response to my query about IF AND IF in my feed. Unfortunately there’s some sort of permissions problem with me and shared apps and I can’t see that link!

Hmm… that’s strange. Are you able to log into the IDE and create new apps? Are you able to see any of the shared apps?

Here’s a strawman idea that may prompt some of you and ST too. We have Apps and they are adding more almost Wizard-driven templates.
However, they all ask us to choose among a fixed set of Device Types.
Why?
There is a method to get the list of installed Devices and a method to get the events and attributes they have.

Perhaps, a Wizard/ that showed you the possible triggers with some basic AND/OR logic and then showed the possible Actions from above could then create a Really Smart App with if x and/or y then z…

This seems to be just outside of our capabilities with the system now, but maybe one of the SmartST folks could do this for us?

@Iotdit,

I agree with you.

the start of my IF X and Y issue is because there’s no way for me to select a temp sensor and create a smart app that turns off a switch if the temp is >40° and the mode is Sleep.

Or if there IS a way to do that, I can’t figure it out!