Whole house fan needs virtual thermostat


#21


ok got it. Whats the next step?


#22

That should be it… just set your upper and lower setpoints in the ST app (your new virtual device) and the fan should run when needed.

Though as I designed an on/off switch into the virtual device, you may want to add that below line 17, i.e.

IF
   Bedroom Tem Sensor's temperature rises to or above fan Temp's upperSetpoint
   AND
   Fan Temp's switch is ON
THEN
.....

#23


Something is missing. There is no sliders
Edit: I see you have to tap on the sliders to enter a value.

I will see if the temperature drops tonight and if the pistons works.
Thanks


#24

Not sure how to add a line at the point.


#25

Edit the piston, then click ‘add a new condition’ in the position of line 28.

Choose ‘IF switch is on’


#26

It didnt work.
Received event [Bedroom Temp Sensor].temperature = 97 with a delay of 179ms
+84ms ║RunTime Analysis CS > 16ms > PS > 40ms > PE > 27ms > CE
+86ms ║Runtime (38346 bytes) successfully initialized in 40ms (v0.3.10f.20190822) (84ms)
+87ms ║╔Execution stage started
+98ms ║║Comparison (decimal) 97.0 rises_to_or_above (string) 72 = false (1ms)
+99ms ║║Condition #2 evaluated false (8ms)
+100ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+109ms ║║Comparison (decimal) 97.0 drops_to_or_below (string) 71 = false (1ms)
+110ms ║║Condition #10 evaluated false (8ms)
+111ms ║║Condition group #9 evaluated false (state did not change) (9ms)
+113ms ║╚Execution stage complete. (26ms)
+114ms ╚Event processed successfully (114ms)


#27

no no no no no lol


#28

Boy. I really messed that one up.
I’m really trying here.
Thank for fixing it.


#29

I am having zero luck with this.
╔Received event [Bedroom Temp Sensor].temperature = 74 with a delay of 1898ms
+66ms ║RunTime Analysis CS > 24ms > PS > 31ms > PE > 11ms > CE
+68ms ║Runtime (37966 bytes) successfully initialized in 31ms (v0.3.10f.20190822) (66ms)
+69ms ║╔Execution stage started
+79ms ║║Comparison (decimal) 74.0 rises_to_or_above (string) 69 = false (1ms)
+80ms ║║Condition #2 evaluated false (7ms)
+81ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+90ms ║║Comparison (decimal) 74.0 drops_to_or_below (string) 65 = false (1ms)
+91ms ║║Condition #10 evaluated false (7ms)
+92ms ║║Condition group #9 evaluated false (state did not change) (9ms)
+94ms ║╚Execution stage complete. (25ms)
+95ms ╚Event processed successfully (94ms)

Comparison 74.0 is definitely above 69.


#30

I apologize for interrupting, but a quick observation:

The command:
IF X "rises to or above" Y
is a trigger. (a precise moment in time)
This means for it to fire, it has to first be the opposite.
(IE: For the state to change, X must begin less than Y)
The piston will run when X rises above Y, and will not be true again until a full cycle has happened

Same with:
IF X "drops to or below" Y
will not fire unless X starts out greater than Y


This logic functions similarly to the command:
IF Lamp switch changes to on
Which will only trigger when going from off to on.
(not when there is no change going from on to on)


Basically, with your current code:

  • When X changes, the comparison will be made
  • If the IF block stays true (or false), then no commands are executed
  • When the temp crosses the threshold, the commands beneath will execute once
  • Furthur commands will not run until the the conditions have inverted

#31

If what you’re saying is true then it’s not a very good thermostat piston. The room would have to cool down below the set point and then rise to or above to work. My wife is kickn my but because I can’t get the fan to work the right way so she puts it in manual and by 3am it’s 62° in the bedroom and we are both shivering.


#32

This was exactly what you asked for in the original post

The only time you might not be happy is shortly after a recently edited piston. Depending on the current temperature, it may temporarily get out of sync. (the piston has to be functioning at the moment the threshold is crossed to capture the change)


Pro Tip:
If you make your edits when the temp is inside the “5 degree window”, your fan will never get out of sync.

If it ever does get out of sync because of an edit, you can just manually turn the fan on or off once… The piston can take it from there…


#33

Thanks for that. I will have to remember it next time.


#34

There is more I want to this piston. Should I start another thread or stay on this one for advice?


#35

up to you, if it’s related to the same piston may as well carry on with the same thread though.


#36

Ok. This is related to the piston.
I would like the fan only to work under certain conditions.
both are related.
Temperature and humidity. But just not upper and lower limits of either.
I’ll Insert a chart.


Anything in the white blocks. I would like the fan to come on.
Anything in the yellow or orange and red to shut off.


#37

What do you want to happen at the solid white blocks? (such as 69° at 5%)

If your answer is “Turn off Fan”, the code will be twice as complex since two lines would have to be calculated… If your answer is “Turn on Fan”, then only one line has to be calculated

You could also simplify it by saying:
IF temp is less than 64°, Then Turn off Fan
This could catch all the low temps in one simple line
(and your math can focus on the warmer end of the spectrum)


#38

It’s more complex than that.
The virtual thermostat will take care of the low end around 67°. The high end is more complex. Depending on the the humidity I can see a nice 75° at 5% humidity sleeping temperature. But not if it’s 30% humidity.


#39

What is the maths making the coloured numbers?

i.e. 100 divided by Temperature times humidity?? Nothing seems to fit?

How does 68 degrees at 35% humidity = 64?


#40

I think the white boxes are “Feels like” temperature