Whole house fan needs virtual thermostat
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
.....
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
Edit the piston, then click âadd a new conditionâ in the position of line 28.
Choose âIF switch is onâ
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)
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.
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
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.
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âŚ
There is more I want to this piston. Should I start another thread or stay on this one for advice?
up to you, if itâs related to the same piston may as well carry on with the same thread though.
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.
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)
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.
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?