Edit the piston, then click ‘add a new condition’ in the position of line 28.
Choose ‘IF switch is on’
Edit the piston, then click ‘add a new condition’ in the position of line 28.
Choose ‘IF switch is on’
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:
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.
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?
I got the chart from cattle stress temperature because there is no human chart and it looked good as a reference.
I think @WCmore is correct it is feel like temperature.
To answer you previous question
All white blocks regaudless if theres a number in it should be Fan On
The second part of the question is
I want the virtual thermostat to catch the lower temps below 68 degrees.
At your request, I created a formula that essentially cuts a diagonal path across all possible numbers.
When the current data is to the upper left of the line, the fan turns ON.
When the data is to the lower right of the line, the fan turns OFF.
When the temp is less than 68, or greater than 79, the fan turns OFF
Here is a precise breakdown:
Temp & Humidity
FanOn | FanOff
¯¯¯¯¯¯¯¯¯¯¯¯¯|¯¯¯¯¯¯¯¯¯¯¯¯¯¯
| 80° or higher
79° & 0% | 79° & 1-100%
78° & 0- 7% | 78° & 8-100%
77° & 0-14% | 77° & 15-100%
76° & 0-21% | 76° & 22-100%
75° & 0-28% | 75° & 29-100%
74° & 0-35% | 74° & 36-100%
73° & 0-42% | 73° & 43-100%
72° & 0-49% | 72° & 50-100%
71° & 0-56% | 71° & 57-100%
70° & 0-63% | 70° & 64-100%
69° & 0-70% | 69° & 71-100%
68° & 0-77% | 68° & 78-100%
| 67° or lower
… and of course, the highly anticipated piston.
I added a bunch of comments to help you make sense of it all…
When importing this, make sure you pause any other pistons that are controlling the fan when testing this new piston. (It updates, and corrects the fan every 15 minutes)
It surely is a remarkable tool, and one that I can see myself using for many years to come