Humidifier Auto adjust based on outdoor Temperature in Edge

I used a smartapp for years that worked perfectly for this purpose but with the old groovy apps going away I had to come up with a different way of doing this. You have to create 40 routines but that took me about an hour with the copy function in routines. Basically, one routine for Humidifier on and one for off for each temperature range. This prevents raising the humidity in your house too much and frost and ice forming on your windows and water damage and mold inside your walls. Originaly I didnt want to do this because of the 200 routine limit, then they raised it to 1000 so I went this route.

Create the routines and then just keep using the copy function and changing the values each time.

  1. If outside temp is 38.6F or higher (precondition) and inside humidity is 44% or lower then turn on Humidifier.

2, If outside temp is 38.6F or higher (precondition) and inside humidity is 50% or higher then turn off Humidifier.
3. If outside temp is between 36.6F and 38.5F (precondition) and inside humidity is 43% or lower then turn on Humidifier.
4. If outside temp is between 36.6F and 38.5F (precondition) and inside humidity is 44% or higher then turn off Humidifier.
Keep going untill you get all the way down to the lowest temprature you will see in your area. My outside strips thermomter only goes down to -4 F so thats where I stopped. After I figure out a new way to create a weather tile then I may create more routines based on the current temprature in my area.

It gets cold here sometimes in North East PA, I have seen - 36 F here a few years. Below you will find the logic for all the routines. I have tested this against the original smartapp and it works perfectly. Let me know if you have any questions.

DS = deck strips thermometer (outside Temp ) DA – Dining room Aeotec (inside Temp) DH= Dining room Humidifier (smart plug)

  1. If DS = 38.6F or higher and DA = 44% or lower then turn on DH.
  2. If DS = 38.6F or higher and DA = 50% or higher then turn off DH
  3. If DS = 36.6F and 38.5 and DA = 43% or lower then turn on DH.
  4. If DS = 36.6F and 38.5 and DA = 44% or higher then turn off DH
  5. If DS = 34.6F and 36.5 and DA = 42% or lower then turn on DH.
  6. If DS = 34.6F and 36.5 and DA = 43% or higher then turn off DH
  7. If DS = 32.6F and 34.5 and DA = 41% or lower then turn on DH.
  8. If DS = 32.6F and 34.5 and DA = 42% or higher then turn off DH
  9. If DS = 30.6F and 32.5 and DA = 40% or lower then turn on DH.
  10. If DS = 30.6F and 32.5 and DA = 41% or higher then turn off DH
  11. If DS = 28.6F and 30.5 and DA = 39% or lower then turn on DH.
  12. If DS = 28.6F and 30.5 and DA = 40% or higher then turn off DH
  13. If DS = 26.6F and 28.5 and DA = 38% or lower then turn on DH.
  14. If DS = 26.6F and 28.5 and DA = 39% or higher then turn off DH
  15. If DS = 24.6F and 26.5 and DA = 37% or lower then turn on DH.
  16. If DS = 24.6F and 26.5 and DA = 38% or higher then turn off DH
  17. If DS = 22.6F and 24.5 and DA = 36% or lower then turn on DH.
  18. If DS = 22.6F and 24.5 and DA = 37% or higher then turn off DH
  19. If DS = 20.6F and 22.5 and DA = 35% or lower then turn on DH.
  20. If DS = 20.6F and 22.5 and DA = 36% or higher then turn off DH
  21. If DS = 18.6F and 20.5 and DA = 34% or lower then turn on DH.
  22. If DS = 18.6F and 20.5 and DA = 35% or higher then turn off DH
  23. If DS = 16.6F and 18.5 and DA = 33% or lower then turn on DH.
  24. If DS = 16.6F and 18.5 and DA = 34% or higher then turn off DH
  25. If DS = 14.6F and 16.5 and DA = 32% or lower then turn on DH.
  26. If DS = 14.6F and 16.5 and DA = 33% or higher then turn off DH
  27. If DS = 12.6F and 14.5 and DA = 31% or lower then turn on DH.
  28. If DS = 12.6F and 14.5 and DA = 32% or higher then turn off DH
  29. If DS = 10.6F and 12.5 and DA = 30% or lower then turn on DH.
  30. If DS = 10.6F and 12.5 and DA = 31% or higher then turn off DH
  31. If DS = 8.6F and 10.5 and DA = 29% or lower then turn on DH.
  32. If DS = 8.6F and 10.5 and DA = 30% or higher then turn off DH
  33. If DS = 6.6F and 8.5 and DA = 28% or lower then turn on DH.
  34. If DS = 6.6F and 8.5 and DA = 29% or higher then turn off DH
  35. If DS = 4.6F and 6.5 and DA = 27% or lower then turn on DH.
  36. If DS = 4.6F and 6.5 and DA = 28% or higher then turn off DH
  37. If DS = 2.6F and 4.5 and DA = 26% or lower then turn on DH.
  38. If DS = 2.6F and 4.5 and DA = 27% or higher then turn off DH
  39. If DS = 0.6F and 2.5 and DA = 25% or lower then turn on DH.
  40. If DS = 0.6F and 2.5 and DA = 26% or higher then turn off DH

Update, these routines ran fine when they were running in the cloud. After I finished my migration to Edge and the same routines were running locally on the hub, they would only work once in a while. Sometimes they would work for a half a day or so and then stop. I have moved away from this and started using Sharptools and moved all my migrations over there. The Smartthings routines are just to buggy and disappear and change by themselves. Smartthings told us we could migrate all of our Webcore pistons and smartapps to routines, which you can but then they don’t run reliably.

2 Likes

So, I’m not along in trying to do something like this…

Wish there was an easier way to tally up routines…but I got up over 400 (probably shed 50…could be more, if I can’t remember why I did things the way that I did or why its getting into a state where its rapidly turning a light on and off, which causes the smart bulb to reset and.) And, I think the wheels fell off because I hit 300 devices. Was down to 292 on Tuesday, and now I’m at 277.

Partly, because I can use TP-Link Kasa outlets directly…also some stuff got trimmed now that IFTTT is starting to work again, but presence triggers are gone (so mapping that to a virtual contact switch…) Plus bathroom heater responds to motion detector nearly instant now that its a KP401… instead of virtual that tell alexa to call IFTTT to control Smart Life (there’s some query/filter code in the IFTTT rule, so that a Smart Life thermometer factors in…though plan to get an zigbee sensor here eventually… the humidity updates from the WiFi sensor is 5%…it stores much finer detail, but the minimum reporting preference is a 5% change… plus it eats a couple of AA batteries every few months…) The split between on and off is 2%… top span is: 42% or lower, humidifier on / 44% or higher, humidifier off.

I have coded, but the routine to mirror the Kasa outlet that my white noise machine is on to a virtual switch hasn’t been omitted, some work to shift between sensors for temperature/humidity in living room or bed rooms… and a fan that moves air between the two areas (well, it could change the direction [if I wasn’t overriding the fan control], but working through the 100 routines to handle changing it from current daytime speed to now nighttime speed and back. Creating the step up/step down changes when things are flipped, was one thing…but figuring out how many step ups or step downs to get the correct spot is hard. The fan control is circular, max speed wraps around to min speed…(and the fan remembers what speed it was at when off or loses power…) It has up/down for speed control, but the mode control is weird…there’s a jump in and out of turbo mode, or a cycle through 3 modes, where turbo is one of the 3 modes… there’s a sleep mode and a regular mode…it has 3 sleep speeds and 9 regular speeds, and an auto/manual mode…where the auto is supposed to vary speed based on a temperature sensor…but it doesn’t do anything meaningful (to me.) There’s a 0 speed…which has an on/off button to get… when its off the digit stays let all the time, it only blanks after a minute when its on. It eats the first remote button press to wake up the display…which of course makes things more fun. Temperature isn’t allowed to change while it switching between “I am Asleep” and “I am Awake” states.

Need to go back and rework my Lamps containing WiFi bulbs and controlled with WiFi plugs…to avoid the state where get’s into turning them on and off quickly and resetting the bulbs. The intent was so that they lamps remember to stay off after a power outage… but being able tune white after sunset… except having trouble getting sunset to start. I used to do just dimming of 6500K bulbs, using Leviton Zigbee dimmer plugs…but got one tunable white bulb last year…and now I have 4…