Action based on comparison of two temp sensors?

Back in the good old days I could do this with manual programming in webCORE.

Is there any way to do this in the new SmartThings architecture?

I want a window fan (outlet) to only come on if one sensor’s temperature is higher than another sensor’s temperature. All I can see now is comparing one sensor’s temp to a specific value.

1 Like

Something like this? If either one of these temperature values is above 75, turn on a fan:

Not quite. Basically:

if (TEMP1 > TEMP2) then: turn on FAN1;
if (TEMP1 < TEMP2) then: turn off FAN1;

Not based on any specific temperature.

Ah yeah, something like that is supposedly coming with the rules API (I can’t remember what it’s called anymore).

1 Like

Hmm, so that could be promising… eventually? But I wonder is there anything I can do that would work today. Even if it makes use of a legacy system that will be going away eventually. webCORE is no more, right?

As far as I know webCore still works, but it days are numbered. They have not said when it will be shut down. I would guess before the end of 2022, but I could be wrong.

1 Like

Yes, the Rules API has been able to do that for a very long time.

1 Like

From what I can see about the “Rules API”, it is a far lower-level language that what we’ve been accustomed to with webCoRE. Something that used to take a few lines of Groovy code now take pages of Rules API code. It’s not a practical replacement for the same niche. I’m not looking to be a commercial ST app developer… I just want a bit more flexibility than the incredible over-simplified options in the Android Automations UI.

Is there anything in-between? Groovy even made sense for non-programmers (although I have a programming background, I have no interest in maintaining 3 pages of code to toggle a fan on/off). I don’t mind changing gears, but there’s a difference between “sorry your old cell phone doesn’t work, here’s the new phone you need to buy” and “sorry your old cell phone doesn’t work, here’s a slab of silicon and a book on how to make ICs.”

3 Likes

As a Rule you could compare the temperature from two devices and switch another device on as the result in one line of text if you really want to. I’d probably use twenty-six because I like it that way. A fairer comparison with webCoRE would be twenty. It is logically at the same level, and the webCoRE piston language is just a front end presentation like Routines are. We haven’t seen the rules creator yet.

Each to their own though.