Routine to Replace Webcore using math comparisons to multiple sensors (>, etc)

I am migrating a Webcore piston that used math to multiple routines in the Smartthings app. The purpose of the routines is to interrogate a humidity sensor, check the local weather, and determine if the furnace-mounted humidifier should be on or off.

If the outside temperature is >20deg F and inside humidity is >40%, the humidifier should be off. If the humidity is less than 40% and the temp is >20F, it should be on. Seems pretty simple. These are duplicated for different temp ranges (<0, 0-10, 10-20).

I have these routines. The “Turn Off” routine works every time the humidity goes above 40%. The “Turn On” routine never works. Thoughts? If I can’t get this working, then I will explore putting the math function into SharpTools.

Turn Off

Turn On

This probably won’t make a difference, but maybe: I see that both routines use “equal to or”. Try changing the Turn On routine to “below 40” without the equal to.


Below is not a choice. You can only pick greater than or equal to, or less than or equal to

39 or below then. You can’t have the trigger for turning on be the same as the trigger for turning off. If you do only one will work. I am doing essentially the same thing with my dehumidifiers in the summer. I have the additional precondition that it also be between 7am and 7pm.

1 Like

@KenW48360 did you ever get this to work, im doing something similar with my whole house Humidifier and cant get it to work either. it either goes on and dosent turn off or turns off and then dosent turn back on ?

@BartschLabs can you explain this a little clearer for the older folks like me. These have different conditions so why wouldnt it work?

Im using 1st routine if humidity is equal to or below 40% and Temp is between 30.6F and 32.5F then turn on
2nd routine if humidity is equal to or above 41% and Temp is between 30.6F and 32.5 then turn off.

again, to me these look like totaly different if this and this than statements.

Look at SharpTools Rules Engine

@mlchelp - Unfortunately, we have not had enough temperature variation to check. If it doesn’t cycle properly, I will likely move to Sharptools.

1 Like

@KenW48360 I figured it out, the precondition can be the same but the and condition has to be different so I change it around and made it.
1st routine if Temp is between 30.6F and 32.5F and humidity is equal to or below 40% then turn on
2nd routine if Temp is between 30.6F and 32.5 and humidity is equal to or above 41% then turn off. Works perfectly now and I have 42 routines all the way from 40F to - 4F to automatically adjust my humidifier based on an outdoor temp sensor. I used a smartapp that I found in the community for years but no more Groovy so….
@jkp I looked at sharptools and its awesome and super cheap but if everything else is going to run local then I want the logic to as well.

My comment was merely to point out that in the screenshots you included the humidity percentage was 40 in both routines. One equal to or above 40 and one equal to or below 40.

I see you’ve changed that to one equal to or above 41 and one equal to or below 40.

In the screenshotted routines, there could be the condition where the humidity is 40 exactly and both routines’ conditions would be met at the same time. As I mentioned, it probably wouldn’t make a difference, but maybe the fact that the conditions overlapped at that one point was causing unwanted behaviour.


Yea, I just approximated every 10 degrees. Laziness won out over precision.

I’ve been thinking about getting a whole house humidifier… Any suggestions on one that integrates well with SmartThings?

I recommend that you ask this in a new topic. The users in this topic may only have experience creating DIY dehumidifiers out of exhaust fans and humidity sensors.

It depends on whether you have a furnace that you can connect the humidifier to or if you have baseboard or other type of non-centralized heating. I have baseboard heaters so my options were limited. The best way to do this in a non-centralized heating setup is to get a Aprilaire 350 or 360 through the wall humidifier. Then you need a smart plug, indoor humidity sensor and an outdoor temperature sensor. The 350 and 360 connect directly to your hot water supply.

Before the end of Groovy I used a Smartapp called Automatic Humidifier for years and it worked perfectly. Then in preparation for the migration and Groovy shutdown, I created about 45 routines that would control the unit from 38.6 F all the way down to -10F. This worked perfectly when it ran in the cloud, after I migrated everything to Edge drivers and the routines were running locally, sometimes they would run and sometimes they wouldn’t. Then I went to Sharptools and was able to create all the logic and get it working in a few hours and it works perfectly. Basically, you take the outdoor temperature and multiply it by .05 and then add 25 and that’s what you should maintain your indoor humidity at to prevent the growth of mold inside your walls and keep ice or frost from forming on your windows. Sharptools performs the calculation using variables and turns on and off the humidifier based on the indoor humidity sensor and outdoor temperature sensor. Sharptools cost 2.50 a month and yes it runs in the cloud but is way more reliable then the ST routines. I been experimenting with this for a long time and was never able to find a all in one unit that integrated with ST directly. You can also go the cheap route and buy one of the console type humidifiers but I’m not going to fill it twice daily and go through all of the extra work.