Full house fan test is failing


#1

1) Give a description of the problem
The fan rapidly switches from Low to Off when the A/C is running, or if I change the piston the fan runs but doesn’t turn off.

2) What is the expected behavior?
The fan should turn on to the low setting any time the A/C is running, either hear or cooling, and turn off again once the A/C returns to idle. If the fan is currently in use, it should continue what it is doing. I intend to expand this to the other fans in the house.

3) What is happening/not happening?
When the piston begins to run, the fan rapidly cycles between Low and Off.

**4) Post a Green Snapshot of the piston!

5) Attach any logs (From ST IDE and by turning logging level to Full)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

what happens if you move the with dimmer 1 turn off to the else section of the IF block?

and if you want various levels of the fan according to the temperature, you can use case levels…


#3

That’s how it was when I started messing with it. Same problem.

I hadn’t considered doing different levels for temps. That would be pretty good.


#4

You’re going to need to add some more logic to this whole thing in order to get it to work the way you want.

You need to capture the state of the fan as it is before the Thermostat comes on so that you know what to do when the thermostat goes back off again (per your requirement of having the fan keep doing what it was doing).

What I’d suggest is that you nest the IF statements and split them up based on the current state of the fan. So you’d end up with something like this:

IF thermostat is not idle then
IF Fan is not on
then turn on fan
Else set a variable to remember that the fan was already on.

IF thermostat goes back to idle
IF variable (probably a boolean) is false (meaning was the fan already off)
Turn off fan (otherwise leave it alone)


#5

You nailed it, Mike. I sorely needed to figure out how to create and use variables. I think this will do it. Will test it tomorrow when the family isn’t around to hear the A/C going on and off.


#6

Looks good. A couple changes…don’t set a value for your variable at the beginning of the piston. Just leave it set to nothing and let the piston set it when it runs the first time. Also, you may want to “Never subscribe” to the “trigger” on line 25… (I say trigger because the piston is using it as a trigger based on the little lightning bolt next to it). You’re really just using that as a condition and not a trigger…so you don’t necessarily want the piston to wake up and process events if you simply turn the fan on or off by itself (which it would based on what it’s showing there).


#7

I do the same with my AC/Fans. The way I set it up was to use the “changing to” state of the AC unit. This way I had a bit more control over things between summer and winter. During the summer I want the fans to run if the house rises above 75 and then kick over to medium if the AC comes on (at 78). In winter, I only want the fans to come on when the AC heating is on.

If anyone has ideas how to optimize this, I would love to see them!!


#8

That’s a good simple design @unibass . Efficient and effective. (Can I ask, what are you using to bring your Nest into ST?)

If you want to take it to the nth degree though…technically the first four and the last two triggers are all mutually exclusive. Therefore you could put the first four into one IF ELSE IF block and then the same for the bottom two. All that would change though is that some of the IF statements could possibly be skipped some of the times that this piston runs. Will that make a significant impact on things…not likely.

The other option might be to use a “Select Case” statement…but again you’d need one for the top 4 and one for the bottom 2…not sure if that would even work though…again probably not worth it. :slight_smile:

As the saying goes, don’t let the perfect be the enemy of the good.


#9

@mike1616,

lol. I use to code back in another life and it’s starting to come back. That horrible desire to write the perfect minimal amount of code that kept me up for 4 days (and single). Looking at your comments, it got me thinking that my initial look was individual requirement centric. Now that I look at it, I see really 3 results to code to, 4-30%, 1-60% and 2-off states. I could probably just do a complex “or” for the 30% and the off states. Yeah…who needs a significant other when you can program?

I used @tonesto7’s Nest SmartApps and Device handler.


#10

Nice! You kind of answered a question I’d yet to ask. “Does it make sense to pack several items for a single device into a single piston?” It looks like yes. My next step is to fine tune what I want out of temperature control and fan speed.


#11

Cleaned up a bit.