Help with A/C Scheduler


#1

1) Give a description of the problem
I have this setup to control my air conditioner based on temperature, but I’m looking to streamline it and/or restrict it to only run when the mode is Home A/C. Right now it runs every 5 minutes for the set time, but can I make it only poll when the mode is Home A/C?

2) What is the expected behavior?
Working as expected, but I’d like to slim it if possible.

3) What is happening/not happening?
Trying to get it to run / poll only during Home A/C mode

**4) Post a Green Snapshot of the piston![image|45x37]

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

5/29/2018, 8:01:14 AM +55ms
+0ms	╔Received event [Home].time = 1527595275099 with a delay of -1045ms
+164ms	║RunTime Analysis CS > 13ms > PS > 37ms > PE > 114ms > CE
+166ms	║Runtime (39874 bytes) successfully initialized in 37ms (v0.3.104.20180323) (165ms)
+168ms	║╔Execution stage started
+189ms	║║Comparison (decimal) 71.2 is_greater_than_or_equal_to (integer) 77 = false (2ms)
+191ms	║║Condition #5 evaluated false (11ms)
+192ms	║║Condition group #2 evaluated false (state did not change) (13ms)
+196ms	║║Fast executing schedules, waiting for 910ms to sync up
+1139ms	║║Comparison (decimal) 71.2 is_less_than_or_equal_to (integer) 76 = true (2ms)
+1141ms	║║Condition #11 evaluated true (9ms)
+1149ms	║║Comparison (enum) off is (string) on = false (2ms)
+1151ms	║║Condition #12 evaluated false (9ms)
+1152ms	║║Condition group #8 evaluated false (state did not change) (20ms)
+1156ms	║╚Execution stage complete. (989ms)
+1158ms	║Setting up scheduled job for Tue, May 29 2018 @ 8:06:15 AM EDT (in 299.887s), with 1 more job pending
+1166ms	╚Event processed successfully (1166ms)

#2

I think to start with I would use “Temperature Rises Above” as a trigger and then qualify it based on the mode, in lieu of the every 5 minutes condition.


#3

Maybe try wrapping the whole thing in an if statement, and remove the polling from the conditions and location mode from the action.

Something like…

If Thermostat 1 temperature changes
and
Location mode is Home

Then

  If Thermostat 1's temperature is greater than or equal to 77
  and Thermostat 1 switch is off 
  Then
  With Thermostat 1
  do Turn on 

Which thermostat are you using? Interesting you’re not using thermostatMode rather than switch.

I’d be happy to share my piston if you are interested. I’m using an outside temp rather than months of the year – but I’m in a weird climate where it could be 80 degrees or snowing at any point during the winter.


#4

So it’s actually a wall AC, using a Sensibo Sky as the thermostat & switch to control it.

I was thinking that wrapping it all with something other than the timer would be good, but wasn’t sure how to do so after the fact (and haven’t had a chance to look into it further).

Would love to see what you’re using for sure.


#5

Here you go.

There may be better ways to accomplish what I’m doing, as there may be some redundancies, but it’s worked very well for me.

I have push notifications set up just so I could confirm the piston is firing as expected.

I also have another piston that does the same thing for my second-floor thermostat, but I look at the temperature in multiple rooms in an effort to minimize hot/cold spots on that floor.


#6

This should help me a bunch. Appreciate it!


#7

Here’s what I morphed my last piston into. Only issue is that the “rises to or above” and “drops to or below” don’t seem to register at all. Any ideas?

5/29/2018, 9:08:46 PM +102ms
+1ms	╔Received event [A/C].temperature = 75.9 with a delay of 82ms
+10295ms	║RunTime Analysis CS > 24ms > PS > 10182ms > PE > 90ms > CE
+10297ms	║Piston waited at a semaphore for 10133ms
+10300ms	║Runtime (41320 bytes) successfully initialized in 10182ms (v0.3.104.20180323) (10298ms)
+10301ms	║╔Execution stage started
+10311ms	║║Comparison (decimal) 75.9 rises_to_or_above (decimal) 77.1 = false (1ms)
+10313ms	║║Condition #5 evaluated false (5ms)
+10314ms	║║Condition group #2 evaluated false (state did not change) (6ms)
+10320ms	║║Comparison (decimal) 75.9 drops_to_or_below (decimal) 76.1 = false (1ms)
+10322ms	║║Condition #11 evaluated false (4ms)
+10322ms	║║Condition group #8 evaluated false (state did not change) (6ms)
+10328ms	║║Comparison (string) :d68b04cd41c6833ee3b89c9a5a8d712c: changes_to (string) :d68b04cd41c6833ee3b89c9a5a8d712c: = false (0ms)
+10330ms	║║Condition #21 evaluated false (4ms)
+10331ms	║║Condition group #18 evaluated false (state did not change) (5ms)
+10342ms	║║Condition #17 evaluated false (8ms)
+10343ms	║║Condition group #14 evaluated false (state did not change) (10ms)
+10345ms	║╚Execution stage complete. (44ms)
+10347ms	╚Event processed successfully (10346ms)

#8

I think a problem may be with using IF repeatedly. I’d try changing the second If to ELSE IF


#9

I’ll give that a shot, thanks.