Virtual Thermostat Piston with IFTTT not working


#1

Hello guys,
Im trying to create a piston for controlling Air Conditioning with BroadLink RM Mini 3 and RM Pro. For Some reason everything was fine and suddenly stopped working from what Im seeing in the Full log is not creating the Virtual command to IFTTT I also tried with GET parameters. Here is some info.

Here is some screenshots and logs.

12/9/2019, 8:45:21 PM +277ms
+2ms ╔Received event [Климатик Таван].thermostatMode = off with a delay of 71ms
+76ms ║RunTime Analysis CS > 18ms > PS > 34ms > PE > 24ms > CE
+79ms ║Runtime (45693 bytes) successfully initialized in 34ms (v0.3.110.20191009) (76ms)
+80ms ║╔Execution stage started
+88ms ║║Comparison (enum) off changes_to (string) heat = false (0ms)
+89ms ║║Condition #2 evaluated false (4ms)
+90ms ║║Condition group #1 evaluated false (state did not change) (6ms)
+96ms ║║Comparison (enum) off is (string) cool = false (1ms)
+98ms ║║Condition #6 evaluated false (5ms)
+99ms ║║Condition group #5 evaluated false (state did not change) (6ms)
+105ms ║║Comparison (enum) off is (string) off = true (1ms)
+107ms ║║Cancelling condition #10’s schedules…
+108ms ║║Condition #10 evaluated true (6ms)
+110ms ║║Cancelling condition #9’s schedules…
+111ms ║║Condition group #9 evaluated true (state changed) (10ms)
+113ms ║║Cancelling statement #11’s schedules…
+357ms ║║Executed virtual command iftttMaker (241ms)
+368ms ║║Condition #42 evaluated false (7ms)
+369ms ║║Condition group #41 evaluated false (state did not change) (9ms)
+378ms ║║Condition #38 evaluated false (6ms)
+380ms ║║Condition group #37 evaluated false (state did not change) (7ms)
+389ms ║║Condition #14 evaluated false (6ms)
+390ms ║║Condition group #13 evaluated false (state did not change) (8ms)
+399ms ║║Condition #18 evaluated false (6ms)
+400ms ║║Condition group #17 evaluated false (state did not change) (7ms)
+409ms ║║Condition #22 evaluated false (6ms)
+410ms ║║Condition group #21 evaluated false (state did not change) (7ms)
+430ms ║║Condition #26 evaluated false (17ms)
+431ms ║║Condition group #25 evaluated false (state did not change) (18ms)
+440ms ║║Condition #30 evaluated false (5ms)
+442ms ║║Condition group #29 evaluated false (state did not change) (7ms)
+450ms ║║Condition #45 evaluated false (5ms)
+452ms ║║Condition group #33 evaluated false (state did not change) (7ms)
+454ms ║╚Execution stage complete. (374ms)
+455ms ╚Event processed successfully (455ms)
12/9/2019, 8:45:01 PM +118ms
+1ms ╔Received event [Климатик Таван].heatingSetpoint = 23 with a delay of 61ms
+91ms ║RunTime Analysis CS > 19ms > PS > 42ms > PE > 30ms > CE
+94ms ║Runtime (45692 bytes) successfully initialized in 42ms (v0.3.110.20191009) (92ms)
+95ms ║╔Execution stage started
+107ms ║║Condition #2 evaluated false (7ms)
+108ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+119ms ║║Comparison (enum) heat is (string) cool = false (2ms)
+121ms ║║Condition #6 evaluated false (10ms)
+122ms ║║Condition group #5 evaluated false (state did not change) (11ms)
+132ms ║║Comparison (enum) heat is (string) off = false (1ms)
+135ms ║║Condition #10 evaluated false (8ms)
+136ms ║║Condition group #9 evaluated false (state did not change) (11ms)
+144ms ║║Comparison (decimal) 23.0 changes_to (integer) 18 = false (0ms)
+145ms ║║Condition #42 evaluated false (5ms)
+146ms ║║Condition group #41 evaluated false (state did not change) (7ms)
+153ms ║║Comparison (decimal) 23.0 changes_to (integer) 19 = false (1ms)
+155ms ║║Condition #38 evaluated false (5ms)
+157ms ║║Condition group #37 evaluated false (state did not change) (8ms)
+163ms ║║Comparison (decimal) 23.0 changes_to (integer) 20 = false (0ms)
+164ms ║║Condition #14 evaluated false (5ms)
+166ms ║║Condition group #13 evaluated false (state did not change) (6ms)
+172ms ║║Comparison (decimal) 23.0 changes_to (integer) 21 = false (0ms)
+173ms ║║Condition #18 evaluated false (5ms)
+174ms ║║Condition group #17 evaluated false (state did not change) (6ms)
+180ms ║║Comparison (decimal) 23.0 changes_to (integer) 22 = false (1ms)
+181ms ║║Condition #22 evaluated false (4ms)
+182ms ║║Condition group #21 evaluated false (state did not change) (6ms)
+189ms ║║Comparison (decimal) 23.0 changes_to (integer) 23 = false (0ms)
+190ms ║║Condition #26 evaluated false (5ms)
+191ms ║║Condition group #25 evaluated false (state did not change) (6ms)
+197ms ║║Comparison (decimal) 23.0 changes_to (integer) 24 = false (1ms)
+199ms ║║Condition #30 evaluated false (4ms)
+200ms ║║Condition group #29 evaluated false (state did not change) (5ms)
+206ms ║║Comparison (decimal) 23.0 changes_to (integer) 25 = false (0ms)
+207ms ║║Condition #45 evaluated false (5ms)
+209ms ║║Condition group #33 evaluated false (state did not change) (6ms)
+210ms ║╚Execution stage complete. (115ms)
+212ms ╚Event processed successfully (211ms)


#2

Two observations about your logs:


8:45:01 PM
╔Received event [Климатик Таван].heatingSetpoint = 23
║╔Execution stage started
║║Condition #26 evaluated false
║║Condition group #25 evaluated false (state did not change)

In this first log, the heating point went from 23 to 23, so there was no change, so no IFTTT command was sent…


8:45:21 PM
╔Received event [Климатик Таван].thermostatMode = off
║╔Execution stage started
║║Condition #10 evaluated true (6ms)
║║Condition group #9 evaluated true (state changed) (10ms)
║║Executed virtual command iftttMaker

In this second log, it looks like the IFTTT command was sent…


#3

Yes on the states is working but the temperature is not working. And I`m 100% sure that the heatingSetpoint was on different degree I did the check with all of them from 18 to 25.


#4

Not sure on your specifics, but thermostats are notoriously slow to respond / report back to the hub… Unfortunately, 30 seconds up to a minute or longer is quite normal.

If you are testing a sequence of tests, you should give ample delays between each test. Without seeing your thermostat setup, I usually recommend 3 minutes or more between tests, to let everything “settle down”… (although each device can be quite different)

Also, keep in mind that adding IFTTT to the mix will easily add even more of a delay…


#5

Just to clarify:

Is only 23 degrees broken, or is all temperature numbers failing?


#6

No to all of the values is not working. Im seeing it live that the state is coming to the webcore but for some reason cant parse it from my understanding.


#7

The States like Off/Heat/Cool works instantly in the same second.


#8

Here I created a simple piston with only one if. And look the log.

12/11/2019, 10:44:44 AM +799ms
+1ms ╔Received event [Климатик Таван].heatingSetpoint = 25 with a delay of 48ms
+64ms ║RunTime Analysis CS > 17ms > PS > 36ms > PE > 11ms > CE
+67ms ║Runtime (36995 bytes) successfully initialized in 36ms (v0.3.110.20191009) (65ms)
+68ms ║╔Execution stage started
+76ms ║║Comparison (decimal) 25.0 changes_to (integer) 25 = false (0ms)
+78ms ║║Condition #2 evaluated false (5ms)
+79ms ║║Condition group #1 evaluated false (state did not change) (6ms)
+82ms ║╚Execution stage complete. (13ms)
+83ms ╚Event processed successfully (83ms)
12/11/2019, 10:44:30 AM +290ms
+2ms ╔Received event [Климатик Таван].heatingSetpoint = 23 with a delay of 53ms
+69ms ║RunTime Analysis CS > 17ms > PS > 37ms > PE > 15ms > CE
+72ms ║Runtime (36995 bytes) successfully initialized in 37ms (v0.3.110.20191009) (69ms)
+73ms ║╔Execution stage started
+81ms ║║Comparison (decimal) 23.0 changes_to (integer) 25 = false (0ms)
+83ms ║║Condition #2 evaluated false (5ms)
+84ms ║║Condition group #1 evaluated false (state did not change) (6ms)
+86ms ║╚Execution stage complete. (14ms)
+88ms ╚Event processed successfully (88ms)


#9

Look what I did and is working like that just for the test, but I can`t use it in real.

+1ms ╔Received event [Климатик Таван].heatingSetpoint = 26 with a delay of 45ms
+58ms ║RunTime Analysis CS > 15ms > PS > 31ms > PE > 12ms > CE
+61ms ║Runtime (37094 bytes) successfully initialized in 31ms (v0.3.110.20191009) (58ms)
+62ms ║╔Execution stage started
+71ms ║║Comparison (decimal) 26.0 is_greater_than (integer) 25 = true (2ms)
+73ms ║║Cancelling condition #2’s schedules…
+74ms ║║Condition #2 evaluated true (7ms)
+75ms ║║Cancelling condition #1’s schedules…
+76ms ║║Condition group #1 evaluated true (state changed) (10ms)
+78ms ║║Cancelling statement #3’s schedules…
+381ms ║║Executed virtual command iftttMaker (299ms)
+384ms ║╚Execution stage complete. (321ms)
+385ms ╚Event processed successfully (385ms)

#10

It just dawned on me that you are using a “BroadLink RM Mini 3” to talk to your air conditioner… (I am assuming it is a “dumb” AC, and you are using the BroadLink to wirelessly send commands to the AC)

If I am correct, then I will also guess that your “Thermostat 2” is the virtual thermostat.

If this is also correct, then it sounds like you want to:

  • Load an app on your phone
  • Spin the dial on the virtual thermostat…
  • Which will trigger a piston…
  • Which will trigger IFTTT…
  • Which will trigger the “BroadLink RM Mini 3”…
  • Which will send an IR signal to the dumb AC to change…

*whew*

Am I right?


If so, then I would make all of your testing using “Log to console” as your only action. (leave IFTTT out completely at this stage) In other words, just focus on a single trigger, and a single “Log to console” for now.

Once you get solid code that reliably writes to the logs as expected, then you can focus on the IFTTT aspect.


Please keep in mind, if all of my assumptions are correct, then SmartThings (and therefore, webCoRE) will never know the true status of your AC unit…

WebCoRE may send a command, but will not get any confirmation back.

This also means if the AC unit is changed manually (or with a normal remote), then your virtual thermostat would NOT be updated or correct.

In other words, it sounds like you have created a strict one-way-only communication…
(that has to hop thru at least five different company’s devices)


For the record, I am not trying to discourage you… there are some old devices that still work great, even though they are as dumb as a box of rocks. Bringing them into the Smart world (even if only a little bit) can be worth it… Just realize the limitations you will likely be facing.