Bathroom Humidity Fan

yeah, that was my thought. Save on resources when in the modes not selected. Don't even check humidity events.

FYI, thank you very much

quick question.... based on the running logs below. I can't figure out what tripped the "Turning fan off in 10 min" mine seems to be doing that 10 min in and then turning the fan back on when the humidity rises. Did I possibly misunderstand the "How long after the humidity starts to drop should the fan turn off (minutes):*" parameter.

EDIT: I think I answered my own question. Looks like this was triggered by the threshold vs the rise. Not sure though why the rise from 60 to even 74 wouldn't have triggered the normal turn on.

app:2112019-06-20 11:29:55.131 am infoHumidityHandler:running humidity check: 64.0

app:2112019-06-20 11:29:25.048 am infoHumidityHandler:running humidity check: 66.0

app:2112019-06-20 11:29:15.031 am infoHumidityHandler:running humidity check: 68.0

app:2112019-06-20 11:29:04.998 am infoHumidityHandler:running humidity check: 70.0

app:2112019-06-20 11:28:54.995 am infoHumidityHandler:running humidity check: 73.0

app:2112019-06-20 11:28:44.976 am infoHumidityHandler:Turn Fan off in 10 minutes.

app:2112019-06-20 11:28:44.961 am infoHumidityHandler:running humidity check: 76.0

app:2112019-06-20 11:28:35.765 am infoFanSwitchHandler::Switch changed

app:2112019-06-20 11:28:35.262 am infoFanSwitchHandler::Switch changed

app:2112019-06-20 11:28:35.004 am infoHumidityHandler:Turn On Fan due to humidity increase

app:2112019-06-20 11:28:34.986 am infoIsHumidityPresent: Humidity is above the Threashold

app:2112019-06-20 11:28:34.983 am infoHumidityHandler:running humidity check: 74.0

app:2112019-06-20 11:28:24.985 am infoHumidityHandler:running humidity check: 73.0

app:2112019-06-20 11:28:21.000 am infoHumidityHandler:running humidity check: 69.0

app:2112019-06-20 11:27:34.833 am infoHumidityHandler:running humidity check: 59.0

app:2112019-06-20 11:26:20.684 am infoHumidityHandler:running humidity check: 60.0

app:2112019-06-20 11:24:34.465 am infoHumidityHandler:running humidity check: 61.0

app:2112019-06-20 11:24:20.426 am infoHumidityHandler:running humidity check: 62.0

app:2112019-06-20 11:23:45.319 am infoHumidityHandler:running humidity check: 64.0

app:2112019-06-20 11:23:24.284 am infoHumidityHandler:running humidity check: 66.0

I live in Arizona, I don't think I have ever hit my threashold

:rofl: I just raised my to 85...if it ever gets THAT high it may as well just come on....

I live in the mid-Atlantic. I have my threshold set to 100, because otherwise the fan will be coming on every other day the windows are open :stuck_out_tongue:

1 Like

huh, maybe I should make it an optional input...

1 Like

also to note...I added the humidity reading the running logs for the humidity check.... :slight_smile: just sayin.... made it pretty easy to see what was going on.

app:2112019-06-20 11:23:24.284 am infoHumidityHandler:running humidity check: 66.0

line 121:

infolog "HumidityHandler:running humidity check: ${state.currentHumidity}"

you know to reduce the amount of effort to add it. :smiley:

I can add this pretty easily. need help on logging gives a huge amount of logs :slight_smile: I probably can cut down on that.

I actually thought your logging efforts were really well thought out. The massive need help logging is perfect when you can't figure out what's going on. Kudos!

I love this app BTW

also seems like @epj3 idea of setting to 100% makes sense to basically turn it off.

2 Likes

Yeah, but since the threashold is optional, and I don't check if someone put one in... that is an issue waiting to happen.

And I should add an infolog of being over threshold

you already have that:

app:2112019-06-20 11:28:34.986 am infoIsHumidityPresent: Humidity is above the Threashold

Assuming the log above was because it crossed that threshold?

That's how I figured out what happened. But yeah, I see your other point. Option switch might be a good idea.

Option, or if it isn't entered, don't check. The first is easy for people to understand, the second is good because I hate cluttered guis...

1 Like

Just checking (and sorry if already discussed): if I turn the fan on manually (e.g. Stink mitigation) with a 20 min timer, and 15 min later the humidity starts to rise from a shower, the fan turns off from the manual-on time and doesn't stay on for humidity. Is this expected? Probably revealing a lot about our morning routines here :joy:

That would be correct... some day I am going to rewrite this to fix that, 2 back to back showers, and some other fun stuff that I have seen.

1 Like

I have been using this, it works pretty well once you tune it. I had trouble understanding the on and off settings. Here is an explanation of what I found to work for me.

First off, I tried 3 different brand/type sensors, and some are better than others. The Iris motion and humidity appears to be the least sensitive to humidity changes (despite being best at motion). The Zooz 4-in-1 works moderately well at humidity, (but not as good at motion). I ended up using the Aqara temp & humidity sensor as it reported more often than the other two sensors and generally seemed more responsive. So I have separate sensors for motion and humidity now. Placement in the bathroom also made a difference, higher up is better for detecting steam obviously. I ended up putting the sensor almost at the top of the wall.

The next thing I ended up doing was using a virtual switch and bench testing things. It was apparent that showing alone would take too long to tweak the settings. I would breathe into the sensor, watch the on and off humidity points, and see how the virtual switch reacted. This got me much closer faster than waiting for the day between showers.

Here is what I found to work best for me.

  • For the "Humidity Increase Rate" (When to turn the fan on) Lower numbers made the fan turn on earlier (more sensitive), but would sometimes wrongly turn on due to minor changes in weather, or the leftover moisture bounce after the fan turned off. Conversely, too large of a number and the fan turned on too late or never. I settled on 5 for the setting.

  • The "Humidity Threshold " was pretty common sense. I set this to 100% at first until I was happy with the previous setting. I then set it back to 85% as a backup in case the "Increase Rate" didn't work. I feel this is a less important setting than the "Increase Rate". I don't think it has missed an increase rate trigger yet, and I don't think the app has used this.

  • I found the "What percentage above the starting humidity before triggering the turn off delay" setting should probably be tweaked next before the turn off delay time. This is where I struggled the most. I couldn't figure out the math and the fan kept running for hours if left alone. This is mostly due the way the sensors report, none of my 3 different types/brand of sensor report for small decrease of humidity so they "stick" at one value for a while. What I also finally figured out is that this setting is a percentage of highest minus lowest humidity and added to beginning humidity. In other words, if beginning humidity was 55 and highest was 95, and I set the percentage at 50, it would be (95-55=40) and (0.5 of 40=20) and (20+55=75). So off timer would begin once your sensor fell below 75% humidity. I tried many different settings here, and too low the fan would never shut off, and too high makes it turn off prematurely. I settled at somewhere between 60 and 65 as the best number for me.

  • This leads to the "How long after the humidity starts to drop should the fan turn off" timer. I think this should be set last. This was pretty easy once I got the "percentage above starting humidity" setting figured out. I simply started at 10 minutes, and watched the humidity. At the settings I outlined above, and 10 minutes delay, the fan ran about 30 minutes total. I ended up at 8 minutes, but 5-6 probably would be sufficient.

Thanks again for the app. I hope this helps somebody.

15 Likes

I've modified this so that it can use a 2nd humidity sensor as a baseline sensor. The percentage points above to turn on and off are configurable. Glad to send the link to the github if you want to use any of it. I haven't shared it because I pretty much swiped your code and modified it.

I did modify it so that if you turn on the fan manually...and then the humidity rises above the threshold, The automatic mode takes over and doesn't shut the fan off till the humidity drops.

Share away! I am open source and all for sharing. I swiped the original code and then re-wrote it from ST 3-4 years ago...

Have at it...would honestly be cool to combine with an option for either the original with 1 sensor or this one with both sensors...clearly I took the easy path and just eliminated the other..but honestly wouldn't be that hard to combine. A few more selections on the config page.

I actually want to refactor the whole thing. Some of the original programming just drives me up a wall. I need to sit down and outline what I want. I can add baseline capability and manual to auto as well, when I have time :slight_smile:

Question: Should I be worried about this error:

(It appears that my Temp/Humidity sensor is reporting OK.)