In my bathroom, I have a Sonoff SNZB-02 temperature & humidity sensor that I use to detect when the active ventilation should run. The flow to start ventilation just checks if the humidity rises over 90% and starts the fan which runs for an hour or so. This worked fine in the summer when the base temperature in the bathroom was relatively high by itself.
Unfortunately, with the dropping outside temperatures, the base temperature in the bathroom is low. When starting shower, the inside temperature shoots up faster than the (absolute) humidity. As a result, the relative humidity is no longer reaching the 90% threshold. Changing the threshold is possible ofcourse, but than I have to continuously do that to adjust for ambient temperatures.
I do see, however, the temperature and humidty climb quickly, Example reading (from this morning, note that I switched the fan on by hand when leaving the shower, thus the sudden fall in RH after a couple minutes):
So, I am looking for a way to check the rapid change in temperature and/or RH, along the lines of a check against a value some minutes earlier. How can I do that using standard flows only? Can the new advanced flow system help? I tried with the “Flow utilities” app, but I cannot access variables from other apps there and vice versa.
With Adv. Flows you can do it with the Device Capabilities app. It can read out the insights values
With Standard flows, you can write a value to a variable every x seconds / minutes
This way, you can compare the actual value with the value of x seconds / minutes ago.
I have the exact same issue - and tried getting chatGPT to write me a Homeyscript that would log values and compare… Though that didn’t work well.
So I am wondering: Did you manage to find a good solution?
Basically what I have been trying to hunt for (and code using Homeyscript - which didn’t work) is a flow card that would be able to detect if the current slope of the graph is statistically unusual compared to normal behavior over the last 24 hours.
Does anyone here know of a way to accomplish this?
Could you be a little bit more specific in what actual values you are seeing? I wasn’t here when op started his thread, but from looking at his values, op actually had a bigger problem. Humidity inside the house, even the bathroom, should be between 40 and 60 %. Any higher than that and you risk the chance of mould and it is generally not good for your health. With a constant humidity of over 75% at 18c, that bathroom is a health hazard for sure!
Besides mechanical ventilation, your house and bathroom should also have proper passive ventilation. If the humidity inside the bathroom is consistently higher than 60%, you just need more passive ventilation anyway.
Now during a shower, humidity easily peaks over 70 tot 75% for a very short time, even when temperatures are low. So normally you would start the mechanical ventilation when humidity reaches 70 or 75%, and turn it off again when it drops below 65%. If you have proper passive ventilation, you don’t need to turn on the mechanical ventilation when the humidity doesn’t reach 75%, as it should naturally drop to 60% on itself.
Mechanical ventilation is meant for convenience only. It is meant as a sudden boost to keep humidity below the dew point so that the walls and the mirror don’t fog up. It is not meant as a solution to chronic humidity or moisture problems. If you experience high constant humidity anywhere in your house, please consult a professional.
i have a flow which is enabled when the bathroom lamps are switched on. then this flow runs every 4 minutes and checks the current humidity against the last measurement, 4 minutes ago. if the difference between the two is more then 10%, then a variable is set showing that shower is on.
(sudden increase of humidity)
the variable is used in other flows to start a fan, and is immediately reset by the fan starting flow
when the bathroom lights are off, then the flow is disabled again.
i have this for several months and works perfectly
Could you post a screenshot of the values you are seeing?
Again, if your general humidity levels are normal and below 60%, you should easily see a spike of 10% increase during a shower. Here are my humidity levels. As you can see, the general humidity in winter is actually lower than in summer, due to the higher difference in temperature inside vs outside. This causes an even bigger spike in winter than in summer actually. In winter, the general humidity is around 45%, in summer the humidity is around 60%. During a shower, the humidity easily spikes over 70%.
On top of this. Most zigbee humidity sensors that run on battery are programmed to report the humidity back every 10min or so, or when humidity changes more than 5 or 6%. When that happens, Homey needs to process that information anyway. So rather than make a flow that runs every 4 minutes, it is better to make a flow that runs every time the humidity changes. This way, it runs less often, but certainly when it needs to, and it also runs directly at a time when homey is active anyway. This will improve the performance and stability of Homey.
Also, when you only poll every 4 minutes, if someone only showers 5 or 6 minutes, it could be that you measure first just 2 minutes into the showering when humidity is still not that high, and then you measure again when the person already stopped and you missed the actual peak.
Generally, if you have the choice between push or poll, push is normally the better option. You should definitely not introduce a polling mechanism on top of a pushed value.
My data looks like this (the downward trend after the spike is due to an open window in the bathroom after the shower).
The spike represents someone taking a shower.
I have previously tried to use a defined threshold value but the background humidity and temperature changes too much from summer to winter to work all year.
That is why I was looking into an adaptive solution that would measure the slope of the graph and compare the slope to the slope average over the last 24 hours and detect if the slope increase is an outlier (a significant change indicating a shower).
Well then, that data looks perfect! You should not experience any moisture or humidity problems, and with a humidity below 70% and an ambient temperature of over 22C, surfaces should also be well below the dew point to prevent fogging up the mirrors. What exactly are you using the humidity sensing for?
TBH, when I look at your data I found ambient temperature actually quite high. I know it’s more of a cultural thing and northern countries generally keep indoor temperatures high. But scientifically speaking, the optimum temperatures for a human being to live in are between 20 and 22 degrees for passive living spaces, 18 and 20 degrees for active living spaces and between 16 and 18 degrees for bedrooms. Having temperatures higher this, is not only preventing your body from properly regulating its own internal temperature, it is also causing humidity indoors to drop too low. General indoor humidity below 40% may cause issues with dry skin, sore throat, increased reaction to allergies, flu like symptoms or many other health related issues. Besides that, it also uses waaaay more energy to keep the house at 25C than it is to keep the house at 20C.
With a temperature of 25C, it is indeed very hard to see spikes in RH for two reasons. 1. humidity is relative to temperature. Warmer air can hold way more moisture then colder air, so an increase of 1l water vapor in a colder room will cause a higher increase in RH than in a warmer room. 2. With warmer temperatures it is also easier to get rid of moisture through ventilation because of the higher dew point.
I would actually suggest to lower ambient temperatures as it is generally better for your health, and for your wallet, and for the environment. And it will probably fix your problem with the humidity detection as well.
hehe, I get the struggles. It took me some time to get my wife onboard with this as well. But now that she is adjusted, she’s also feeling much better as well. Previously she would always suffer from dry skin which she would combat with kilos of moisturizer and cremes, (evening )shiffers which she would combat by turning the heater on even more, sore throat which she would combat with cough syrup and pastilles, and general lack of energy in winter. All of these issues went away in one winter by just keeping the house at the same temperature as it was in summer! Just keep presenting scientific data. And transition into it naturally over fall/winter. If you are able to cope with temperatures of 20-22C in spring/summer, why wouldn’t you during winter?
Also, even if you do manage to detect if someone is taking a shower, I doubt that the plan will actually work. Electric heaters will need about 2 minutes to fully heat up. It will then require at least 20min to fully heat up a towel. While it is generally advised to keep showers below 7min. That is pretty short, but even a long shower of over 10min will still not be enough for the towel heater to heat up the towels. You would barely be able to get a small warm patch that will immediately cool down again as soon as you unfold it.
I think a towel heater is meant as a general heating device that also warms up the towels. If heating is equally distributed throughout the house and regulated per room, you could set the thermostat of the heating in the bathroom to 19C at night and 21C or 22C in the morning and the heater would just heat up the room and the towels in time for use. That’s how it is meant to work.
Here’s how the temperatures are regulated per room in my house. I don’t have a towel heater (yet), but if I would, I would simply turn on the heater at 6:30 or so and turn it off again at 8:30.
I appreciate the effort to change our habits, but this also based on the perception of whether it works.
The shelly relay and the towel heater was specifically bought and installed by our electrician last year (as part of getting our new bathroom built) with the specific plan of getting it to work automatically.
When the Shelly relay is turned on the towel heater is also turned on - and this can both be felt and seen (there is a red light at the bottom of the heater that lights up). Right now we just want to demonstrate that we have built the setup that we envisioned last year - regardless of how warm the towels are straight out of the shower (the fact that the red light is turned on is currently more important as this indicates it works).
So we are still looking for input on how to detect this correctly for both variables and when both variables indicate their slope is rising sharply then turn on relay.
Well, with your current setup (ambient temperature, hand humidity spikes), the only way I can think of is making sure you use the “when humidity changes” card and just lowering the percentage increase to 68%. something like this:
I just don’t see how this will ever work. I cannot think of any device that is capable of heating up the towels to any considerable degree in such a short timespan. Even professional towel heaters used in spas require at least 15min to heat the towels. The only apparatus that is physically capable of heating things up that quickly is a 1000w microwave and it requires water molecules in the object you wish to heat in order to work. A towel heater is just not designed to work that way. I think you’ll have a better chance of success by just turning the heater on at a programmed time about half an hour to an hour before you wish to take a shower.
I’m sure your electrician had that in mind when he installed the heater and relay with the specific plan of getting it to work automatically as well.
The towel heater is used for both pre-heating (currently minimal) but also afterwards to help dissipate water from the towels after use.
If we want to increase the pre-heating effort it is an option to include other input as triggers - like when we turn on both the bathroom ceiling light and the bathroom mirror (with backlight + heating to prevent condensation). This trigger could then auto-turn on the towel heater.
HOWEVER, in order to save electricity for the towel heater this should turn off the moment you turn off the lights again - UNLESS a “shower event” was detected. In that case the towel heater should continue for 90 minutes to help dry the towel.
And that means we are back to looking for a great way to reliably detect a shower event.
Whether preheating even makes sense requires that I calculate the cost of turning on the towel heater each time we turn on lights - if we use that as trigger.
But the main issue is still to reliably detect a shower event.