Announcement

Collapse
No announcement yet.

Humidity sensor to tun bath fan on and off. Help Needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Humidity sensor to tun bath fan on and off. Help Needed

    Thank you in advance for giving this some brain power. I am trying to get a GE/Jasco zwave switch that controls the bath exhaust fan to turn on when the humidity in the bathroom reaches 70% during a shower as measured by the humidity sensor on a Zooz ZSE40 multi sensor. What is happening of course is that when the sensor looks for 70, the target has been missed. How can I get the fan to turn on when the humidity reaches ~70% or >70%


    Click image for larger version

Name:	Bathfan screenshot.jpg
Views:	430
Size:	56.0 KB
ID:	1484445

    Further, yo end the routine, I set it to run a "guestimated" amount of time. Is there a way to also have the fan remain on until the humidity level returns to below a specifid level then turn the fan off?





    #2
    You can use an EasyTrigger Trigger

    Click image for larger version

Name:	668A4C0A-706F-4F55-AAE4-8999B2B8A5B8.jpeg
Views:	313
Size:	27.8 KB
ID:	1484455

    If I was doing it I would use a recurring Trigger, check the humidity and turn the fan off if it is on and below 50% or on if it is off and above 70%. These would be reliable.

    Click image for larger version

Name:	D7C33A3B-BFE7-466D-9EF3-94E494AD41A0.jpeg
Views:	320
Size:	42.3 KB
ID:	1484456

    Click image for larger version

Name:	6AD91468-6259-4DA8-B17D-27A349789517.jpeg
Views:	312
Size:	42.4 KB
ID:	1484457
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      What I do is turn the fan on when the humidity in the bathroom is high (<90%), and then use a delay (as opposed to a 'wait') to turn it off. The event also removes any exiting 'delayed' fan actions. That way the event can re-trigger until the humidity is less than 90% without a whole stack of delayed off actions. The event is set so that it can not be re-triggered for 10 minutes though. I think a screenshot will explain things better:

      Click image for larger version  Name:	Screenshot_20210718-092101_Edge.jpg Views:	0 Size:	71.7 KB ID:	1484509

      So for example: humidity rises above 90%, fan is turned on and a 15 minute delayed off action is set (you see this in the 'Delayed Actions' section of the events tab). The event can not be retiggered for 10 minutes. If after 10 minutes the humidity is still greater than 90% the event is retriggered, the stored fan off action is removed and a new fan off action is set for 15 minutes. This will continue until the humidity is less than 90%, in which case the fan will turn off 15 minutes after the event was was triggered.

      This works perfectly for us, has been like that for over 3 years, and never missed a beat.

      Using 'Delayed Actions' and removing them when the event is re-triggered is also a good way of controlling motion sensetive lighting. The lights will stay on until x minutes after the last movement was detected for example. Just make sure you set the 'cannot re-run' time to slightly less than the delayed off time.

      By the way, you might find 70% is a pretty low threshold to trigger your event. Where we live sometimes the ambient humidity gets above 70% so the event would trigger even though no one is taking a shower. We found 90% to be a better threshold.
      iCore5 Win 10 Pro x64 SSD

      HS3 Pro Edition 3.0.0.435 Windows

      BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:

      Comment


        #4
        Hi Randy, Thank you for the reply. I have paid for, but not yet installed. HS4, would I get the same options with HS4 instead of buying Easy Trigger?


        Hi Mminehan, Based on what you told me I tried to recreate in HS3 what you showed. Not everything matched . For example the custom value range would not accept % signs, just raw numbers. Please review what i did, and let me know if I am on the right track, or what tweaks need to be made. Thanks in advance.
        Attached Files

        Comment


          #5
          Originally posted by joeld1053 View Post
          Hi Randy, Thank you for the reply. I have paid for, but not yet installed. HS4, would I get the same options with HS4 instead of buying Easy Trigger?


          Hi Mminehan, Based on what you told me I tried to recreate in HS3 what you showed. Not everything matched . For example the custom value range would not accept % signs, just raw numbers. Please review what i did, and let me know if I am on the right track, or what tweaks need to be made. Thanks in advance.
          The two recurring (automatic) trigger events use all native HS4 triggers and actions.
          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Originally posted by joeld1053 View Post
            Hi Mminehan, Based on what you told me I tried to recreate in HS3 what you showed. Not everything matched . For example the custom value range would not accept % signs, just raw numbers. Please review what i did, and let me know if I am on the right track, or what tweaks need to be made. Thanks in advance.
            I think the % is just there because I have " %RH" in the suffix property of the device (device status graphics tab). So your settings should work. But I would set the range in your event to include 100 as I'm not sure how often your zwave device reports the humidity and it is possible the readings could jump from below 78 to above 82 in which case your event would not trigger.
            iCore5 Win 10 Pro x64 SSD

            HS3 Pro Edition 3.0.0.435 Windows

            BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:

            Comment


              #7
              Thank you Randy for the information.

              Thank you mminehan for the details. It works like you suggested.

              Comment


                #8
                I’m using a script which trigger the fan based on a delta of humidity. I did it because based on the season (temp and humidity change) and i would like to have the fan on as soon as possible as someone takes a shower instead of waiting until a higher humidity.


                an event which is triggered by every change (lower and higher) of the humidity will trigger the script below. In my case it is a sensor with rfxcom setup. My fan has 3 speed values and i have events defined for each speed which i use in the script. And at the startup at homeseer i initialize the global variables ( savedtime And savedhumidity) for the first time . The statements i can post later on. It’s not perfect programming but it works for me undepended of the season and when you take a the shower it reacts very fast. (I’m still on hs3)

                So the code below will be executed by a event which looks like:

                If "humidity sensor" had its value set to any value the run script below.


                Sub Main(parm as object)
                Dim LastTimeChanged As DateTime
                Dim CurrentTimeChanged as DateTime = DateTime.Now
                Dim LastHumidity as Integer
                Dim CurrentHumidity as Integer
                Dim ReturnValue as Integer
                Dim difference As long
                dim errst

                'initialize the saved Humidity and the measured time
                LastHumidity = hs.GetVar("savedhumidity")
                LastTimeChanged = hs.GetVar("savedtime")


                'get the current Humidity and calculate the difference in time
                CurrentHumidity = hs.DeviceValue(hs.GetDeviceRef("I8"))
                difference = (CurrentTimeChanged- LastTimeChanged).TotalSeconds

                hs.WriteLogEx("Debug", "Difference (Hum) :" & (CurrentHumidity - LastHumidity) &"% ","#008000")
                hs.WriteLogEx("Debug", "Difference (s) :" & difference & "s ","#008000")
                hs.WriteLogEx("Debug", "Save Humidity :" & LastHumidity & "% " ,"#008000")
                hs.WriteLogEx("Debug", "saved time :" & LastTimeChanged ,"#008000")
                hs.WriteLogEx("Debug", "CurrentHumidity: :" & CurrentHumidity & "% ","#008000")
                hs.WriteLogEx("Debug", "CurrentTimeChanged:" & CurrentTimeChanged ,"#008000")


                'If within 150 s the Humidity has raised with more then 1 or Humidity procent 70 or the delta in humidity has raised more then 3 procent independed of time
                if ((difference < 150) and ((CurrentHumidity - LastHumidity) > 1)) or ((CurrentHumidity - LastHumidity) > 3)or (CurrentHumidity > 70) then
                hs.WriteLogEx ("Debug", "Script to execute ventilator 3" ,"#D58000")
                hs.WriteLogEx ("Debug", "CurrentHumidity: " & CurrentHumidity & "% ","#D58000")
                hs.RemoveDelayedEvent (0,"Woonhuis ventilator stand 1")
                hs.TriggerEvent ("Woonhuis ventilator stand 3")
                hs.DelayTrigger (900, "Woonhuis ventilator stand 1")

                end if

                'Save existing humidity and time in the global variable
                errst = hs.SaveVar("savedhumidity", CurrentHumidity)
                errst = hs.SaveVar("savedtime", CurrentTimeChanged)


                End Sub





                ----------------------------------

                And this is what i added to the startup.vb file of HS to initiate the global vars and values


                Dim errst
                Dim CurrentTimeChanged as DateTime = DateTime.Now
                errst = hs.CreateVar("savedhumidity")
                errst = hs.SaveVar("savedhumidity",hs.DeviceValue(hs.GetDeviceRef("I 8")))
                hs.WriteLogEx ("Debug", "CurrentHumidity: " & hs.DeviceValue(hs.GetDeviceRef("I8")),"#008000")
                errst = hs.CreateVar("savedtime")
                errst = hs.SaveVar("savedtime", CurrentTimeChanged)

                Comment


                  #9
                  renevk, very impressive

                  Comment


                    #10
                    Originally posted by joeld1053 View Post
                    renevk, very impressive
                    Thnx .

                    And now also added the startup part of the script . Just in case everything also worked if HS does a restart.

                    Comment


                      #11
                      I tried several ways of doing this all of which gave some flaky or less-than-consistent results. Below is what ended up working the way I want. I'm using HS4, but should be the same in HS3.

                      I use a Jasco switch to control the exhaust fan and an Aeotec Multisensor 6. I found that when using battery power, the sensor either didn't poll often enough and there was a delay in the fan turning on. If I increased the polling frequency, the battery drained too quickly, so I opted to plug the sensor into USB power and I have it polling every 10 seconds.

                      The fan is controlled by in 2 events, each using EasyTrigger. The first event turns the exhaust fan on at a specific humidity level and it's set to run 45 minutes:
                      Click image for larger version

Name:	Master Bath Fan ON.PNG
Views:	198
Size:	584.1 KB
ID:	1488740

                      I'd prefer the fan doesn't run the full 45 minutes unless necessary, so the second event turns the fan off if the humidity level lowers to a specific percentage:
                      Click image for larger version

Name:	Master Bath Fan OFF.PNG
Views:	183
Size:	613.0 KB
ID:	1488739

                      Hope this method helps/makes sense.
                      Buy Aeotec Multisensor 6, Z-Wave Plus 6-in1 motion, temperature, humidity, light, UV, vibration sensor: Motion Detectors - Amazon.com ✓ FREE DELIVERY possible on eligible purchases

                      Comment

                      Working...
                      X