Fan turning Off not working due to switch from day to night not triggering a threshold boundary?


#1

After the latest upgrade, my Temp/Fan Piston is turning on my fan (happens during the day) but not turning it back off (happens at night). Not sure if time of day is related or not(?)

I have noticed it a couple times after the upgrade so yesterday I turned on full logs and captured where it has dropped below the threshold but did not take any action.

Any thoughts? Thanks!


#2

It does look like it fails on the time comparison, right after the temperature evaluation.

@ipaterson or @bangali?


#3

Sorry, I may have grabbed the wrong log. It should have actually turned off earlier then that due to the 3rd if statement (Condition #14 I think?) - drops below 90.1 and time is NOT between sunrise and sunset.


#4

Actually, is the “rises above” and “drops below” just a threshold boundary?

If so, I wonder if this is because the temp was below 90.1 but above 85.1 during the day and then it swapped to night? There then would be no boundary to cross?


#5

I think there is a conceptual issue here related to rises/drops rather than (or maybe in addition to) a bug, consider this scenario:

  1. during the day temperature rises to 90° so the fan turns on
  2. during the day temperature falls to 88°, fan is still on
  3. Sun sets
  4. Temperature continues falling from 88°
  5. Fan stays on all night

#6

Yep you’ve got it.


#7

Ahh, gotcha. Ok so Layer 8 issue in understanding. :wink:

Thanks! I will re-work it and post it in the other section of the forum if I run into questions.


#8

You also might want to look at the “enter range” and “exit range” conditions …


#9

Thanks @elf. I’ll check that out.


#10

I haven’t had a chance to look into the enter/exit range yet but wanted to get people’s thoughts about using a Virtual Switch? I use VSs with my camera and lights so figured I would try the same here.

Basically, it should always automatically turn off the fan if the VS is also on. But, if the real switch is on, but the VS is not, it will keep the fan on. Idea is I can then turn on the fan manually and not have the system turn it off.

Thoughts?

In the green snapshot, “Switch 7” is the real switch while “Switch 11” is the VS. The first two IF statements are during the day while the 3rd and 4th are the same thing but at night.


#11

And this is what it just fired in the logs (fan and VS were already off):