Temperature comparison with offset?


#1

I would like my piston to compare temperatures between 2 sensors and then do something if the difference is more than 2 degrees. I had it like that in Core, but don’t see the ± here in WebCore.

I likely just need to click something I haven’t clicked, but I just can’t find it. Or I’m using the wrong Comparison maybe?

thanks for any help!!


#2

Create two variables, one for each temperature sensor

Then add a new condition, what to compare = “Expression”. Enter varible1 - variable2. Kind of comparison = “is outside of range” value = 2 and value = -2.

I’m pretty new to this, so there might be a better way, but that will do it.

EDIT: Looking more into it, you can just as well do without the variables with the expression
"[sensor1 : temperature] - [sensor2 : temperature]" is out side of range -2 and 2.

or, even easier "abs([sensor1 : temperature] - [sensor2 : temperature]) is greater than 2


#3

i did it using 2 variable but you can do it with only the first variable
1- Dynamic = RealDifference,
Expression : "{([Sensor1: temperature]}-{[Sensor2: temperature])}"
2- String = WantedDifference
Value : 2 in this case you want 2 degrees

If: {RealDifference} is greater than {WantedDifference}
Then do : put what you like


#4

Or, since there are multiple ways to skin a cat…

IF (SensorOneTemp - SensorTwoTemp) is outside the range of -2 and 2 then do ______


#5

I want to do something similar to this. I am getting 2 humidity sensors in a week or so. 1 will go outside to determine the outside humidity. The other inside to determine the inside humidity. When the inside humidity is greater than the outside by 10%, I want to turn on a fan.
The problem I have is I’m not following the examples in these replies because I need some direction on writing the variable or expression. I can’t find the basic information to do that. Once I understand that, I think I can follow the advice in these replies. I have 2 temperature sensors that I can use in the meantime to try this out. Thoughts??


#6

I, actually, was never able to get this to work in WebCore. But it works great in Core. Easy as pie. Core had some seriously newbie user friendly options. And that is where I had my original fan to sensor piston. So I just never brought it over to WebCore (which is a little more manual in this sort of thing and I’m just not that good.)

You could follow this but use humidity instead of temperature. Good luck!

Here are the snapshots from Core. Works perfectly. The last 2 are the same screen just too long for my phone.

This is the overview of the piston.

This is the detail of the Condition. 2 shots of a long screen.