Bathroom Humidity Fan

Is your log showing the switch being turned off? the logs think so

[app:1967])2018-06-01 16:27:30.454:infoFanSwitchHandler::Switch turned off

I'm not at home to properly observe this. Will keep an eye on it and let you know. Thanks for all your efforts and quick replies. This app is exactly what I was looking for.

Latest test appears to be successful :wink:

Exhaust fan switch log still shows two ON responses to the apps command however the app appears to properly respond and leave the fan running (not seeing the ON/OFF cycle I saw before latest version.

I'm still a little confused as to why the logs for exhaust fan switch are showing multiple responses to the commands, but I guess as long as it doesn't confuse the app it's OK.

Even more curious is why the log is showing 4 responses to commands sent via the dashboard app (perhaps an error in that app). I'll ask in the appropriate forum.

Again, thanks for all your work on this. I'll see if I notice any response time slow downs but I'm guessing I won't since you discovered the cause.

Edit: I noticed that the response from the switch changing states (in logs) isn't registered in the device events only in the logs. It also seems to show double responses only when controlled by apps or by local dashboard access. It shows the quad response when controlled by "cloud" dashboard.

Thanks for all of your patience to help me fix everything!

If I was going to make a feature request... It would be an option to configure the percentage drop/increase in humidity before the auto-cycle begins/ends.

I’ll look into it when I have a chance. Shouldn’t be too hard.

2 Likes

Been busy, but sat down and added the code for setting the rate of change for turning off.

1 Like

Updated the code to turn off after it reduces to X% of the max increase.
Example, you set it to 25%, the fan turns on at 41% humidity. The humidity increases to 49%. The Fan will not turn off until it gets back to 43% or lower. You can also set a delay for how long until it turns off after it reaches that humidity.

1 Like

I have added this code but when I go to 'Apps' I don't see it there. Could someone tell me why?

Click "Load New Apps" on that apps page.

Adding the code does only that.. adds the code to the Hub. You then have to tell the Hub to Use the Code via the Load New Apps button. Built-in (Hubitat created) apps are at the top of the list, added code (custom apps) are at the bottom.

Since this app appears to be very stable and not much extra development seems to be necessary, perhaps an option to disable some of the logging might be prudent?

Not a bad idea, I might add the versioning code others are using

Only reason I mention it, is that the "past logs" will fill up pretty quick with logs from your app which would be unnecessary assuming everything is working properly?

Yes, Andy's version checking code is really nice too.

Thanks again!

Logs updated, versioning is not there... I need to find a place to host the json file.

There are 3 levels:
none. No logging will be displayed
running. minimal logging showing when the fan was turned on and off
needhelp. Full debugging

1 Like

Wow, didn't expect you to get to this so quickly! Thanks.

I had the code from another app, so it was a port, replace, and clean.

1 Like

Added versioning.

1 Like

I had a situation where the fan was kicking on/off I noticed this in the logs:

app:6432018-12-09 10:05:32.640 am debugHumidityHandler: state.targetHumidity = 28.250

app:6432018-12-09 10:05:32.639 am debugHumidityHandler: state.HumidityChangeRate = -1.0

app:6432018-12-09 10:05:32.637 am debugHumidityHandler: state.HighestHumidity = 32.0

app:6432018-12-09 10:05:32.636 am debugHumidityHandler: state.StartingHumidity = 27.0

app:6432018-12-09 10:05:32.634 am debugHumidityHandler: state.currentHumidityDate = Sun Dec 09 10:05:32 EST 2018

app:6432018-12-09 10:05:32.632 am debugHumidityHandler: state.currentHumidity = 26.0

app:6432018-12-09 10:05:32.630 am debugHumidityHandler: state.lastHumidityDate = 2018-12-09T15:04:52+0000

app:6432018-12-09 10:05:32.629 am debugHumidityHandler: state.lastHumidity = 27.0

What stood out to me was the GMT vs EST times. Also that the target humidity is above the current humidity but the fan is on.

more logs. here at the bottom you see me manually turning the fan off, then it turning it back on.

app:6432018-12-09 10:10:53.250 am debugHumidityHandler: state.targetHumidity = 28.000

app:6432018-12-09 10:10:53.249 am debugHumidityHandler: state.HumidityChangeRate = -1.0

app:6432018-12-09 10:10:53.247 am debugHumidityHandler: state.HighestHumidity = 31.0

app:6432018-12-09 10:10:53.246 am debugHumidityHandler: state.StartingHumidity = 27.0

app:6432018-12-09 10:10:53.245 am debugHumidityHandler: state.currentHumidityDate = Sun Dec 09 10:10:53 EST 2018

app:6432018-12-09 10:10:53.243 am debugHumidityHandler: state.currentHumidity = 27.0

app:6432018-12-09 10:10:53.241 am debugHumidityHandler: state.lastHumidityDate = 2018-12-09T15:10:33+0000

app:6432018-12-09 10:10:53.240 am debugHumidityHandler: state.lastHumidity = 28.0

app:6432018-12-09 10:10:53.238 am debugHumidityHandler: state.TurnOffLaterStarted = true

app:6432018-12-09 10:10:53.237 am debugHumidityHandler: state.AutomaticallyTurnedOn = true

app:6432018-12-09 10:10:53.235 am debugHumidityHandler: state.OverThreshold = false

app:6432018-12-09 10:10:53.232 am infoHumidityHandler:running humidity check

app:6432018-12-09 10:10:33.182 am debugHumidityHandler: state.TurnOffLaterStarted = true

app:6432018-12-09 10:10:33.180 am infoHumidityHandler:Turn Fan off in 10 minutes.

app:6432018-12-09 10:10:33.179 am debugHumidityHandler: state.targetHumidity = 28.000

app:6432018-12-09 10:10:33.176 am debugHumidityHandler: state.HumidityChangeRate = -1.0

app:6432018-12-09 10:10:33.174 am debugHumidityHandler: state.HighestHumidity = 31.0

app:6432018-12-09 10:10:33.171 am debugHumidityHandler: state.StartingHumidity = 27.0

app:6432018-12-09 10:10:33.169 am debugHumidityHandler: state.currentHumidityDate = Sun Dec 09 10:10:33 EST 2018

app:6432018-12-09 10:10:33.168 am debugHumidityHandler: state.currentHumidity = 28.0

app:6432018-12-09 10:10:33.166 am debugHumidityHandler: state.lastHumidityDate = 2018-12-09T15:10:24+0000

app:6432018-12-09 10:10:33.165 am debugHumidityHandler: state.lastHumidity = 29.0

app:6432018-12-09 10:10:33.163 am debugHumidityHandler: state.TurnOffLaterStarted = false

app:6432018-12-09 10:10:33.162 am debugHumidityHandler: state.AutomaticallyTurnedOn = true

app:6432018-12-09 10:10:33.161 am debugHumidityHandler: state.OverThreshold = false

app:6432018-12-09 10:10:33.157 am infoHumidityHandler:running humidity check

app:6432018-12-09 10:10:25.043 am debugHumidityHandler: state.targetHumidity = 28.000

app:6432018-12-09 10:10:25.042 am debugHumidityHandler: state.HumidityChangeRate = -1.0

app:6432018-12-09 10:10:25.040 am debugHumidityHandler: state.HighestHumidity = 31.0

app:6432018-12-09 10:10:25.039 am debugHumidityHandler: state.StartingHumidity = 27.0

app:6432018-12-09 10:10:25.037 am debugHumidityHandler: state.currentHumidityDate = Sun Dec 09 10:10:24 EST 2018

app:6432018-12-09 10:10:25.035 am debugHumidityHandler: state.currentHumidity = 29.0

app:6432018-12-09 10:10:25.028 am debugHumidityHandler: state.lastHumidityDate = 2018-12-09T15:10:20+0000

app:6432018-12-09 10:10:25.023 am debugHumidityHandler: state.lastHumidity = 30.0

app:6432018-12-09 10:10:25.020 am debugHumidityHandler: state.TurnOffLaterStarted = false

app:6432018-12-09 10:10:25.018 am debugHumidityHandler: state.AutomaticallyTurnedOn = true

app:6432018-12-09 10:10:25.015 am debugHumidityHandler: state.OverThreshold = false

app:6432018-12-09 10:10:25.010 am infoHumidityHandler:running humidity check

app:6432018-12-09 10:10:20.637 am debugHumidityHandler: state.targetHumidity = 28.000

app:6432018-12-09 10:10:20.635 am debugHumidityHandler: state.HumidityChangeRate = -1.0

app:6432018-12-09 10:10:20.634 am debugHumidityHandler: state.HighestHumidity = 31.0

app:6432018-12-09 10:10:20.632 am debugHumidityHandler: state.StartingHumidity = 27.0

app:6432018-12-09 10:10:20.630 am debugHumidityHandler: state.currentHumidityDate = Sun Dec 09 10:10:20 EST 2018

app:6432018-12-09 10:10:20.625 am debugHumidityHandler: state.currentHumidity = 30.0

app:6432018-12-09 10:10:20.623 am debugHumidityHandler: state.lastHumidityDate = 2018-12-09T15:10:03+0000

app:6432018-12-09 10:10:20.618 am debugHumidityHandler: state.lastHumidity = 31.0

app:6432018-12-09 10:10:20.616 am debugHumidityHandler: state.TurnOffLaterStarted = false

app:6432018-12-09 10:10:20.615 am debugHumidityHandler: state.AutomaticallyTurnedOn = true

app:6432018-12-09 10:10:20.613 am debugHumidityHandler: state.OverThreshold = false

app:6432018-12-09 10:10:20.610 am infoHumidityHandler:running humidity check

app:6432018-12-09 10:10:03.260 am debugHumidityHandler: state.AutomaticallyTurnedOn = true

app:6432018-12-09 10:10:03.256 am debugFanSwitchHandler: ManualOffMinutes = 20

app:6432018-12-09 10:10:03.254 am debugFanSwitchHandler: ManualControlMode = After Set Time

app:6432018-12-09 10:10:03.253 am infoFanSwitchHandler::Switch changed

app:6432018-12-09 10:10:03.162 am debugHumidityHandler: new state.targetHumidity = 28.250

app:6432018-12-09 10:10:03.160 am debugHumidityHandler: new state.HighestHumidity = 31.0

app:6432018-12-09 10:10:03.159 am debugHumidityHandler: new state.StartingHumidity = 27.0

app:6432018-12-09 10:10:03.149 am infoHumidityHandler:Turn On Fan due to humidity increase

app:6432018-12-09 10:10:03.148 am debugHumidityHandler: state.targetHumidity = 28.250

app:6432018-12-09 10:10:03.146 am debugHumidityHandler: state.HumidityChangeRate = 4.0

app:6432018-12-09 10:10:03.144 am debugHumidityHandler: state.HighestHumidity = 32.0

app:6432018-12-09 10:10:03.143 am debugHumidityHandler: state.StartingHumidity = 27.0

app:6432018-12-09 10:10:03.141 am debugHumidityHandler: state.currentHumidityDate = Sun Dec 09 10:10:03 EST 2018

app:6432018-12-09 10:10:03.139 am debugHumidityHandler: state.currentHumidity = 31.0

app:6432018-12-09 10:10:03.138 am debugHumidityHandler: state.lastHumidityDate = 2018-12-09T15:09:33+0000

app:6432018-12-09 10:10:03.136 am debugHumidityHandler: state.lastHumidity = 27.0

app:6432018-12-09 10:10:03.135 am debugHumidityHandler: state.TurnOffLaterStarted = false

app:6432018-12-09 10:10:03.133 am debugHumidityHandler: state.AutomaticallyTurnedOn = false

app:6432018-12-09 10:10:03.131 am debugHumidityHandler: state.OverThreshold = false

app:6432018-12-09 10:10:03.127 am infoHumidityHandler:running humidity check

app:6432018-12-09 10:09:50.338 am debugFanSwitchHandler::Switch turned off

2 things, 1 I updated on Sat, you can try that, but it seems to be running way to often, how often is the humidity sensor reporting?