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

Guest muhmuh

Question

Guest muhmuh

Hello,

im looking for a HC3 Script which switch a Bathroom Fan on/off with dependency relative humindity.

I found a HC2 Script from kapitano1 (https://forum.siio.de/t/lua-taupunktlueftung-im-keller/5206)

My Lua skill is very low, so i tried to change the code to hc3 and add my ids.

The script will run correctly when humidInAbs - humidOutAbs > 1 but the switch off fan code is not correct.

And sorry for my english, but it is not my native language; i tried my best.

Can anyone correct it please?
Debug:
28.08.2020] [12:44:00] [DEBUG] [SCENE218]: - 28.08.2020 12:44:00 AußenTemp 21.59°C rel. Feuchtigkeit 57.0%
[28.08.2020] [12:44:00] [DEBUG] [SCENE218]: - 28.08.2020 12:44:00 absolute Luftfeuchtigkeit Außen 10.969697021231g/m³
[28.08.2020] [12:44:00] [DEBUG] [SCENE218]: - 28.08.2020 12:44:00 InnenTemp 25.4°C rel. Feuchtigkeit 51.0%
[28.08.2020] [12:44:00] [DEBUG] [SCENE218]: - 28.08.2020 12:44:00 absolute Luftfeuchtigkeit Innen 12.211619119493g/m³
[28.08.2020] [12:49:00] [ERROR] [SCENE218]:

Please login or register to see this code.

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

@muhmuh

 

do not forget setup Id's via variables

 

 

pressure device - optional. default is Standard sea level pressure is 1013 hPa

switch - also optional.. default only self on / off.

 

 

 

 

 

 

Please login or register to see this attachment.

Edited by 10der
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 0

@muhmuh

Please login or register to see this image.

/monthly_2020_08/image.png.32b187fff8840b83629c8d7bfc6171a1.png" />

Link to comment
Share on other sites

  • 0
Guest muhmuh
  • Inquirer
  • thanks for the input, but this is only humidity a suboptimal value in terms of ventilation or info to open window.  therefore the rel. Humidity is a better value. the formulas are correct and are used in other forums (homematic). it's just about how I adapt the code, that it checks when the script is running and if the value inside ist lower than outside, the code turns off the fan.

    Link to comment
    Share on other sites

    • 0

     

    @muhmuh If I run the script (with some fixed values to make it work for my setup and easy testing), it turns on or off the fan

     

    Please login or register to see this code.

    Please login or register to see this code.


     


     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    Please login or register to see this image.

    /monthly_2020_08/image.png.1ed4474aa6ff717b7ffbeb6e439c38ad.png" />image.png.aedc355c229cec490ede8caf4cf08366.png

     

     

    Link to comment
    Share on other sites

    • 0

    Is the absolute humidity “kg/m3” or “g/m3” instead of “%” ?

     

     

     

    Edited by SmartHomeEddy
    • Thanks 1
    Link to comment
    Share on other sites

    • 0
    Guest muhmuh
  • Inquirer
  • @SmartHomeEddy g/m³ is the absolute humidtiy.

    no errors? ok, i will restart the hc3 and will try it again.
     

    @10der I'll look at your script tomorrow when i'm at home.

     

    at the moment the script will trigger every minute and sends every minute the fan off command.

    an idea how the script only sends the off command if the script was previously running and the values are lower now ?

     

     

    Link to comment
    Share on other sites

    • 0
    10 hours ago, muhmuh said:

    at the moment the script will trigger every minute and sends every minute the fan off command.

    an idea how the script only sends the off command if the script was previously running and the values are lower now ?


    yes, use the QuickApp of @10der ?

    Link to comment
    Share on other sites

    • 0

    V3.

     

    now you can not setup inside temperatrure and humidity device.

    just move this device to room what you want to control and this device hook your defaul temp and hum sensor automaticaly!

    Please login or register to see this image.

    /monthly_2020_08/image.png.9adc8920d1e85bbd46036bd60797623d.png" />

     

    Edited by 10der
    Link to comment
    Share on other sites

    • 0

    V4,

     

    1) fix round for calculation,

    2) now device is driving ON / OFF mode. for example i you DO NOT want to automatical;y turing on / off your vent device simple turn off this device.

     

     

    Please login or register to see this image.

    /monthly_2020_08/image.png.36670f673203b1df3b5ecd13d63b3bd0.png" />

    Edited by 10der
    Link to comment
    Share on other sites

    • 0
    Guest muhmuh
  • Inquirer
  • thank you for your work.  I'm coming home late today, so I will test it tomorrow.

    Link to comment
    Share on other sites

    • 0
    Guest muhmuh
  • Inquirer
  • @10der thx u so much, i added the QuickApp and it is fantastic. I added my decive id for temp and hum inside in the code, because i have 2 sensors in the bathroom and the default sensors are the thermostat sensors not the shower sensor.

    can u also add a delay for the turnoff fan? so i can add 5 minutes for expample?

    the next test myself is, if i can stop the quick app at night with a blockscene because my fans are very loud and if they goes on in the night and my little daughter wakes up, my wife will kill me :)

    Link to comment
    Share on other sites

    • 0

    @10der

    I have a problem with the QA Humidity Controller that I do not understand.
    I take tInside ID 113 and hInside ID 114 from a Fibaro Smart Implant that has a combined humidity and temperature sensor (DHT22).


    But this QA insists on retrieving and displaying the temperature from the built-in temperature sensor (ID 112) which has a much higher temperature (31°C).

    It does not matter which ID I enter for tInside, it always shows the wrong temperature.
    The variables are written correctly, but the input is incorrect (humidity is correct). So, what is wrong?

     

    tOutside = 63 
    hOutside = 62
    tInside = 113
    hInside = 114
    pressure = 59
    switch = 130

     

    Link to comment
    Share on other sites

    • 0

    @RH_Dreambox IMHO I have override your ID by default sensor from room 

    ok I’ll rewrite logic and make ids in setting are main 

    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    I use a script to measure the outside humidity level (in %). The higher the outside humidity level, the higher I set the on (and off) level of my MCO Humidity sensor in the bathroom, that works with an association with a Fan. 
     

    But sometimes the inside humidity level is more influenced by the outside humidity level and other times it is not. 
     

    Is this relative humidity of this topic more reliable for that purpose? 

    Link to comment
    Share on other sites

    • 0
    Guest muhmuh
  • Inquirer
  • I think this is a good Site in english which explain the rel. humidity. 

    Please login or register to see this link.


    For your fan and for fresh up the air u need the rel. humidity.

     

    Link to comment
    Share on other sites

    • 0
    Guest muhmuh
  • Inquirer
  • @10der can u add a delayin X Minutes, so we can config a minimal runtime for the fan?

    Edited by muhmuh
    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...