Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Humidity control, RH Control


TRicky

Question

Hi all Fibaro developers and fanatics,

 

I can do quit a bit with LUA scene's and other Fibaro hardware tricks but I'm still struggling with a (very) simple solution for controlling the Humidity in my bathroom.

I've seen quit some solutions that are working by triggers like door open/closed, lights on/off, comparing the humidity with the values of Netatmo and so on.

 

What I'm looking for is a solution like:

A scene that is responsive to the humidity changes in my bathroom and not depends on humidity elsewhere in the house or outside.

I have one humidity sensor (AEON MS-6) in my bathroom. I want a scene that checks the humidity, let's say every 2 minutes, and checks if there is an increase or decrease of, let's say 5%,

and turns the ventilation On or Off.

 

Can someone give me a hint / example of such a code?

 

Thanks in advance!

 

TRicky

Link to comment
Share on other sites

Recommended Posts

  • 0

Not what you asked for, but here's another solution.
The humidity in the bathroom is compared with another room in the house.
If the humidity rises more than the set value, the fan starts.


This method works well whether the sun is shining or it's a rainy day.

No time loop is needed because a change in humidity triggers the script.

 

Please login or register to see this code.


 

Edited by RH_Dreambox
Link to comment
Share on other sites

  • 0
7 hours ago, TRicky said:

Hi all Fibaro developers and fanatics,

 

I can do quit a bit with LUA scene's and other Fibaro hardware tricks but I'm still struggling with a (very) simple solution for controlling the Humidity in my bathroom.

I've seen quit some solutions that are working by triggers like door open/closed, lights on/off, comparing the humidity with the values of Netatmo and so on.

 

What I'm looking for is a solution like:

A scene that is responsive to the humidity changes in my bathroom and not depends on humidity elsewhere in the house or outside.

I have one humidity sensor (AEON MS-6) in my bathroom. I want a scene that checks the humidity, let's say every 2 minutes, and checks if there is an increase or decrease of, let's say 5%,

and turns the ventilation On or Off.

 

Can someone give me a hint / example of such a code?

 

Thanks in advance!

 

TRicky

 

Hi @TRicky

I have a vd that checks the humidity in the bathroom using a MS6

It checks it every 5 mins using @Sankotronic Main Scene 

For me it turns on a mirror demist using a fibaro relay which could be easily adapted to a fan 

If this is any use to you I can send on ...

 

_f

 

 

Link to comment
Share on other sites

  • 0

This is my scene for controlling the mechanical fan. Is does a few things:

- it checks if the humidity in the bathroom (Everspring) rises with more than 5% in a few minutes and if so, it drives the fan to 75% power

- if humidity in the bathroom drops below the default humidity in the rest of the house (netatmo reading) it drives the fan back to 20% power (default)

- If CO2 (measured by Netatmo) rises above a certain level than the fan will be powered up (in three steps). Obviously it will be powered down accordingly.

 

the scene gets triggered by the humidity sensor in the bathroom and the co2 readings from netatmo.

 

The mechanical fan is controlled by a fibaro rgbw (0-10V) module.

 

If you still don't a reference humidity sensor, you can skip this part easily and compare it with the hum value before it rose (sp?) with an extra global var.

 

ps. I'm not a programmer, so it's probably ugly at some points ;-)

Please login or register to see this code.

ajuus

emiel

Edited by emielstroeve
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi @RH_Dreambox@AutoFrank @emielstroeve and @jimicr,

     

    I would like to try the solution of @AutoFrank, so if you could sent it to me?

    The script of @emielstroeve I've seen before, but I just want check this room without comparing to other rooms.

    Same for the solution of @RH_Dreambox

    @jimicr, you're right;)

     

    Edited by TRicky
    Link to comment
    Share on other sites

    • 0

    What all sensors measure is the relative humidity.

    Humidity in a bathroom is the sum of two humidity sources :

     - the humidity level in the house (call it the baseline)

     - the humidity that's produced in the bathroom.

    What you want is that the humidity in the bathroom is near the humidity in the house.

    If you want to elimate the humidity factor in the house you have to build a "clean room" as found f.e. in many labotories in universities .

    A clean room in your house would be nice but I think the wife wont want that lol (even not talking about that it costs a lot)

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @diedvdyk, that's true but then you also have to calculate with the temperature.

    Humidity and temperature are close related.

    Some rooms in my house are less heated then others so they have different a different humidity level.

    I tried comparing the humidity level of my bathroom with the average humidity level of my house but then

    it can happen that the ventilation keeps on trying to reach a level which can't be reached.

     

    Therefore I'm looking voor a script that is triggered by sudden increases of the humidity in the bathroom and

    turns the fan on until the previous humidity level is back again (+ / - a few %).

     

    B.t.w. like you're clean room remark ;)

    @diedvdyk,

     

    I tried such a comparing script earlier. This the debug result.

    The green lines are rooms with their doors all within 2 meters to each other.

    Though the humidity measurements are quite different.

     

    [DEBUG] 11:24:23: RH Outside Devided by: 4
    [DEBUG] 11:24:23: Average RH Outside 46.95%
    [DEBUG] 11:24:23: Actual measurements:
    [DEBUG] 11:24:23: RH targeted Master Bathroom 43 %
    [DEBUG] 11:24:23: Actual measurements:
    [DEBUG] 11:24:23: RH Hal Midden 36 %
    [DEBUG] 11:24:23: Temp Hal Midden 20.4 Degrees
    [DEBUG] 11:24:23: RH Hal Achter 42 %
    [DEBUG] 11:24:23: Temp Hal Achter 19.5 Degrees
    [DEBUG] 11:24:23: RH Walk-In Closet 40 %
    [DEBUG] 11:24:23: RH Overloop (New) 39 %
    [DEBUG] 11:24:23: RH HC-2 (External)53.8 %
    [DEBUG] 11:24:23: RH Values outside:
    [DEBUG] 11:24:23: RH Veranda 47 %
    [DEBUG] 11:24:23: RH Achterdeur Out 53 %
    [DEBUG] 11:24:23: RH voor Garage 34 %
    [DEBUG] 11:24:23: RH Tuinhuis 30 %
    [DEBUG] 11:24:23: RH Garage 51 %
    [DEBUG] 11:24:23: RH Showroom Oost 44 %
    [DEBUG] 11:24:23: RH Showroom West 45 %
    [DEBUG] 11:24:23: Delta RH inside = 39.25 %
    [DEBUG] 11:24:23: Ventilatie wordt nu gestart

    Link to comment
    Share on other sites

    • 0
    2 hours ago, TRicky said:

    Hi @RH_Dreambox@AutoFrank @emielstroeve and @jimicr,

     

    I would like to try the solution of @AutoFrank, so if you could sent it to me?

    The script of @emielstroeve I've seen before, but I just want check this room without comparing to other rooms.

    Same for the solution of @RH_Dreambox

    @jimicr, you're right;)

     

     

    Hi @TRicky

     

    It actually manages three bathroom but you can trim according

    here you go...

    The process button (button # 4)

    I click the summary (last label) as the main/favorite and it display in the WebUI

     

    I can't post a picture as I have run out of attachment space in the forum and am waiting for admins to expand  for me.

    _f 

     

     

    Please login or register to see this attachment.

     

    code of Process BUtton for anybody interested

    it's pretty basic

    Please login or register to see this code.

     

    Edited by AutoFrank
    Link to comment
    Share on other sites

    • 0

    My remarks on this method are that if you use an absolute value for humidity, it could take some time before the fan starts. If you use delta's it is more responsive.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • That's my vision to @emielstroeve,

     

    If you set an absolute value you get problems with the local outside and inside Humidity (mostly due to the season of the year).

    Now I have a 'standard' ventilation' system with a 'standard' humidity sensor in it. I have to set it to a 'absolute' value (like 75%)

    but due to changes in the total Humidity in and outside the house, this doesn't work good enough.

    That's why I believe in acting on 'sudden' changes in the Humidity in a room.

    Link to comment
    Share on other sites

    • 0
    On 4/29/2017 at 7:18 PM, RH_Dreambox said:

    Not what you asked for, but here's another solution.
    The humidity in the bathroom is compared with another room in the house.
    If the humidity rises more than the set value, the fan starts.


    This method works well whether the sun is shining or it's a rainy day.

    No time loop is needed because a change in humidity triggers the script.

     

    Please login or register to see this code.


     

     

    @pwadan like this

     This one is comparing it with another rooms humidity .

    Edited by Jamie mccrostie
    Link to comment
    Share on other sites

    • 0

    I'm still quite new to this stuff, but isn't what you are asking for easily made by adjusting the existing script?

    If you take the script by RH_Dreambox and instead of comparing to another room you compare to an earlier reading of the same room (just stick the value in a variable at the end of the script). You will just have the do some experimenting with how often the script should run in relation to how quickly the moisture level rises normally.

     

    Link to comment
    Share on other sites

    • 0
    2 hours ago, activ said:

    I'm still quite new to this stuff, but isn't what you are asking for easily made by adjusting the existing script?

    If you take the script by RH_Dreambox and instead of comparing to another room you compare to an earlier reading of the same room (just stick the value in a variable at the end of the script). You will just have the do some experimenting with how often the script should run in relation to how quickly the moisture level rises normally.

     

    There are many ways of doing it, this was just one example.

    If you click on that post, there are a few other examples which other users have posted.

    Edited by Jamie mccrostie
    Link to comment
    Share on other sites

    • 0

    You might end up pulling warm and humid air from the outside into your house when you just turn on the fan based on temperature or humidity deltas. Why don't use use the dew point for fan control. Turn it on when the dewpoint inside is a few degrees above the outside one, unless the room temperature becomes too low. This will result in a really intelligent solution that will minimize the humidity in your bath room. If you have no outside sensor you can use e.g. the Wunderground api, or inbuilt YR Weather. 

     

    I'm using this kind of control for my basement and it works quite well.

    Link to comment
    Share on other sites

    • 0
    11 minutes ago, jayrock said:

    You might end up pulling warm and humid air from the outside into your house when you just turn on the fan based on temperature or humidity deltas. Why don't use use the dew point for fan control. Turn it on when the dewpoint inside is a few degrees above the outside one, unless the room temperature becomes too low. This will result in a really intelligent solution that will minimize the humidity in your bath room. If you have no outside sensor you can use e.g. the Wunderground api, or inbuilt YR Weather. 

     

    I'm using this kind of control for my basement and it works quite well.

     

    How would you then get rid of the extra moisture from when you take a shower?  Not sure what type of climate you are in, but where I am (Holland) you need to pull the moisture out of the shower or it will linger there and mess up the woodwork over time. Most houses here have ventilation thats on 24/7 but will pull more or less air out as needed. 

    Link to comment
    Share on other sites

    • 0

    When you pull out air from the bathroom, the same volume of outside air will come in somewhere. Ideally the dew point of that air is lower than the air you pull out. If it isn't then you actually increase the humidity in your house. In particular during summer, when the outside air is hot and can accept more water (in terms of mass), you should exchange inside/outside air at the time of day when it can actually lower the humidity in your house. 

     

    Running 24/7 makes sense of course if the house is pretty airtight. Including pairs of fans where one is pulling air in and the other one out, probably alternating over time. 

    Link to comment
    Share on other sites

    • 0

    Hmm, interesting. Have you got any example Lua scripts that take the dew point into account?

    I might do a baseline measurement of the current situation and then try your way and see what the difference is. Have a database and grafana running anyway.

    Link to comment
    Share on other sites

    • 0

    In my setup I run the calculation off-box in a Python module. Here is the code - the approximation is taken from wetterochs.org: 

     

    def calc_dewpoint_wo(temp, hum):

        # taken from wetterochs.org
        a = 7.5
        b = 237.3
        T = temp
        r = hum

        SDD = 6.1078 * pow(10,((a*T)/(b+T)))
        DD = r/100 * SDD
        v = math.log((DD/6.1078), 10)
        TD = b*v/(a-v)
        dewpoint = TD

        return dewpoint

     

     

    Alternatively I have a Red Node flow which does the same calculation. I never took it into production, though. Here is the flow; the screenshot shows how to use it:

     

    [{"id":"9531601a.08655","type":"tab","label":"Dewpoint"},{"id":"eabb36f7.fdc718","type":"http in","z":"9531601a.08655","name":"dewpoint","url":"/dewpoint","method":"get","swaggerDoc":"","x":81,"y":215,"wires":[["61f95a67.d38264","2de3e843.24db58"]]},{"id":"58056325.7015ac","type":"http response","z":"9531601a.08655","name":"","x":747,"y":165,"wires":[]},{"id":"61f95a67.d38264","type":"function","z":"9531601a.08655","name":"calc_dewpoint","func":"temperature = msg.req.query.temperature;\nhumidity = msg.req.query.humidity;\n\na = 7.5;\nb = 237.3;\nT = parseFloat(temperature);\nr = parseFloat(humidity);\n\nSDD = 6.1078 * Math.pow(10,((a*T)/(b+T)));\nDD = r/100 * SDD;\nv = Math.log10(DD/6.1078);\nTD = b*v/(a-v);\n\nmsg.payload.temperature = temperature;\nmsg.payload.humidity = humidity;\nmsg.payload.dewpoint = TD.toString();\n\nreturn msg;","outputs":1,"noerr":0,"x":334,"y":213,"wires":[["9b95a1e3.5a38f","58056325.7015ac"]]},{"id":"9b95a1e3.5a38f","type":"debug","z":"9531601a.08655","name":"2nd","active":true,"console":"false","complete":"payload","x":526,"y":323,"wires":[]},{"id":"2de3e843.24db58","type":"debug","z":"9531601a.08655","name":"first","active":true,"console":"false","complete":"payload","x":217.16668701171875,"y":312,"wires":[]}]

     

    Please login or register to see this attachment.

     

    Hope it helps. Let me know about your results. I don't have enough history data  to use as a baseline comparison, just a snapshot of the last 30 days in my basement, see other screenshot. The  vertical bars indicate times when the fans were running. Of course the climate parameters in a basement are very different to a bathroom  I'm be really curious to see if you can validate the dew point approach.

     

    Please login or register to see this attachment.

    .

     

    Cheers,

    jayrock

    Link to comment
    Share on other sites

    • 0

    Thanks, my humidity sensor for the bathroom should be in the post on Thuesday. At the moment my script only takes co2 into account (it's a whole house ventilation system). Once I get an idea of the current situation I'll start experimenting with ways of taking bathroom moisture into account.

    It will take me a bit of time to get some data and try different thing, but feel free to PM if you want to exchange ideas or if I forget to let you know how it turns out.

    Link to comment
    Share on other sites

    • 0

    I've had the humidity sensor installed for a few days now and adjusted my scene to also take humidity into account. What I have done now is keep all the code I had for co2, but added some code that check the humidity difference between my kitchen and shower. If the shower humidity is too high and the dew point outside is lower than that in the shower I switch the fan to full speed. In all other circumstances the system is co2 driven as I want co2 sucked out regardless of the humidity. 

    Seems to work great so far.

     

     

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...