[RELEASE] Smarter Humidity Fan

I've been having some issues with the port so I will check this out

1 Like

I've submitted the PR for that earlier today. As soon as it's merged it will be.

5 Likes

I've released v1.1.0, which simplifies setup a bit. Smart mode now just requires you to define your own range over which it engages -- the bottom should be higher (but only a little) than typical humidity, and any increase over the configured sensitivity within that range will trigger the fan until it drops back below that range, or the auto-off timer kicks in. Updated the screenshot in the first post.

1 Like

Just following up to say this is now available on HPM!

2 Likes

Thank you! This is exactly what I needed to keep my bathroom humidity in check ( with three daughters).

1 Like

Released v1.2.0, which adds an "excessive change threshold" to turn on the fan on the first report in a long while, if it exceeds a certain increase.

For those who saw my other post, I've gone all-in on the Aqara Temp/Humidity sensors, which I'm loving. I've only found two downsides:

  1. They tend to be less chatty about their status than the Zooz sensors, in certain cases.
  2. The more current driver, from Markus, doesn't allow for the option to send humidity events even if the humidity hasn't changed from a previous report, and "helpfully" even avoids sending events when it does change, if the change is small enough.

These two things conspire to sometimes yield a very long period between updates, which plays havoc with calculations of change rate based on a more reasonable reporting frequency. I considered a number of workarounds for this, but the one I felt would be the simplest for the user to understand is to simply trigger on a sufficiently-large increase regardless of how the math would indicate the change rate since last report to work out.

Hope this is useful!

2 Likes

@erniemiller.... I have used this app for a couple of days now and it works great. No problems or issues. Thanks!

So glad to hear this!!

Hey Ernie,
I just installed your Smarter Humidity Fan app. Looks like exactly what I need and saves me writing my own RM code. Just a question on the absolute maximum humidity setting. When I set this to less than the current humidity reading (ie. Current humidity is 62% and I set smart max to 60%) should the fan be running? My fan has not turned on with this 60% maximum setting in the app parameters.
Steve

Hey @steve007,

If the humidity is at that level on the sensor's next checkin, then yes, it should. Making the adjustment won't cause the fan to kick on, as smart fan control engages based on the humidity checkins from the sensor.

I you're sure there's been a checkin, then please send your logs my way and I'll have a look!

For reference, here's the relevant part of the code, which should hopefully be somewhat readable even if you don't write groovy, yourself :smiley:

  if (changeRate >= sensitivity) {
    logDebug "Sensitivity criteria met. Humidity $change at $changeRate%/min."
    sensitivityTriggered = true
  }
  if (state.smart) {
    if (
      state.humidityChange < 0 &&
      currentHumidity < minHumidity
    ) {
      logInfo "Humidity dropped to bottom of smart range ($minHumidity%)."
      fanOff()
    } else {
      logDebug "Humidity still above $minHumidity%. No action taken."
    }
  } else { // State is not (yet) smart
    if (
      sensitivityTriggered &&
      state.humidityChange > 0 &&
      currentHumidity > minHumidity
    ) {
      logInfo "Humidity passed $minHumidity% at $changeRate%/min."
      fanOn()
    } else if (
      excessiveChange > 0 &&
      state.humidityChange >= excessiveChange
    ) {
      logInfo "Change of $state.humidityChange% exceeds configured " +
              "excessive change threshold of $excessiveChange%."
      fanOn()
    } else if (currentHumidity > maxHumidity) {
      logInfo "Humidity exceeded $maxHumidity%."
      fanOn()
    } else {
      logDebug "Humidity change within defined thresholds. No action taken."
    }
  }
}

Thanks Ernie, all good now. The RH refreshed and the fan kicked on. Great app, thanks for sharing.

2 Likes

Glad it’s working for you!

1 Like

Loving the app, but the update has confused me, my fan comes on bit doesn't seem to go off. I'm assuming I have my settings wrong

@Shaneb Could you attach your settings and paste any logs you saw? Generally if you have all logging enabled you should be able to see why it’s turning on, and why it turns off (or doesn’t).

I don't think it's an issue with the app just my settings keeping it on

Yeah, I tend to agree -- that's a very wide smart range, and keep in mind that sometimes there's a bit of a humidity rebound right after a fan goes off. I could see a rise of 2% happening after the fan shuts off, or also tripping the .33% sensitivity setting again.

Of course, if it just flat out doesn't go off at all, for hours, then that's a different story. So long as the humidity is within the range you defined and the fan has been running for at least the auto-off time, it should shut off.

Check the logs the next time, and see what they say.

@Shaneb Oh, and FWIW, the settings in the screenshot on the initial post are of the current version, and reflect what I am currently using "in production" :smiley:

1 Like

@erniemiller I changed them to that today to see how it went but not had chance to try yet. I'll try same as your screenshot

This morning I released v1.3.0.

  • Added a child virtual switch to signal to other apps that smart mode is active
  • Added additional switches to turn on/off when smart mode goes active/inactive
  • Improved readability of settings page via disclosure triangles for instructions

Long story short, I've added motion sensors to my bathrooms, but when I'm in the shower, behind a thick pane of glass, they can't see me. I've added a virtual switch child of the app which can signal to apps like Motion Lighting to disable auto-off while I'm in the shower. Additionally, these auto-created switches can trigger more complex rules from things like Rule Machine, if desired.

Lastly, I've added a secondary optional input for additional switches to turn on/off with Smart Mode. This way, I can have my motion sensors trigger the bathroom lights, and when smart mode kicks in and turns on the fan, it also turns on the shower lights, for instance.

3 Likes

Great work on the app @erniemiller, I plan to give this a go in the next day or two for the dehumidifier in my garage.

One question I have is, I would like to introduce a condition where if any of the doors to my garage have been open for X minutes (say 20 minutes), I would like to turn my dehumidifier off, as it is somewhat wasted trying to run when open to the outside air. Can the app do this for me already or would you consider introducing something like this? Essentially a switch or set of switches that can disable the app? I'd be happy to set up a virtual switch to reference in the app and then define my own rules to manage the toggling of that switch.

Thanks,
Simon