Thermostats not changing setpoint


#1

1) Give a description of the problem
I have 6 Radio Thermostat CT-100 Plus thermostats. I run one piston to set a variable (for temperature) based on my electric utility’s time of day rate. Then I run a for each loop to set each thermometer heating point to that temperature. The problem is the thermostats don’t always change to the right temperature. Some do, some don’t. Seems fairly random which ones don’t get set. Logs in webcore look good. Seems like the z-wave network is not “ready” to accept all the commands all at once. So I put a delay in. Still randomly not all setting right.

2) What is the expected behavior?
All thermostats set to right temperature.

3) What is happening/not happening?
They are not all setting to the right heating set point.

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

5) Attach any logs (From ST IDE and by turning logging level to Full)
+0ms ╔Received event [Home].time = 1513627226526 with a delay of -665ms +151ms ║RunTime Analysis CS > 20ms > PS > 61ms > PE > 70ms > CE +154ms ║Runtime (37139 bytes) successfully initialized in 61ms (v0.2.100.20171211) (153ms) +156ms ║╔Execution stage started +231ms ║║Executed physical command [Office Thermostat].setHeatingSetpoint([19.0]) (54ms) +232ms ║║Executed [Office Thermostat].setHeatingSetpoint (56ms) +237ms ║╚Execution stage complete. (82ms) +238ms ╚Event processed successfully (238ms) 12/18/2017, 4:00:21 PM +290ms +1ms ╔Received event [Home].time = 1513627222612 with a delay of -1322ms +130ms ║RunTime Analysis CS > 28ms > PS > 53ms > PE > 49ms > CE +132ms ║Runtime (37140 bytes) successfully initialized in 53ms (v0.2.100.20171211) (130ms) +134ms ║╔Execution stage started +220ms ║║Executed physical command [Nans Bedroom Thermostat].setHeatingSetpoint([19.0]) (64ms) +221ms ║║Executed [Nans Bedroom Thermostat].setHeatingSetpoint (66ms) +228ms ║║Cancelling statement #6's schedules... +235ms ║║Executed virtual command [Office Thermostat].wait (1ms) +236ms ║║Requesting a wake up for Mon, Dec 18 2017 @ 4:00:26 PM AST (in 5.0s) +242ms ║╚Execution stage complete. (109ms) +244ms ║Setting up scheduled job for Mon, Dec 18 2017 @ 4:00:26 PM AST (in 4.993s) +251ms ╚Event processed successfully (251ms) 12/18/2017, 4:00:16 PM +259ms +0ms ╔Received event [Home].time = 1513627217782 with a delay of -1524ms +116ms ║RunTime Analysis CS > 16ms > PS > 53ms > PE > 47ms > CE +118ms ║Runtime (37140 bytes) successfully initialized in 53ms (v0.2.100.20171211) (117ms) +119ms ║╔Execution stage started +1336ms ║║Executed physical command [Master Bedroom Thermostat].setHeatingSetpoint([19.0]) (1198ms) +1337ms ║║Executed [Master Bedroom Thermostat].setHeatingSetpoint (1199ms) +1343ms ║║Cancelling statement #6's schedules... +1351ms ║║Executed virtual command [Nans Bedroom Thermostat].wait (2ms) +1352ms ║║Requesting a wake up for Mon, Dec 18 2017 @ 4:00:22 PM AST (in 5.0s) +1358ms ║╚Execution stage complete. (1239ms) +1359ms ║Setting up scheduled job for Mon, Dec 18 2017 @ 4:00:22 PM AST (in 4.994s) +1367ms ╚Event processed successfully (1366ms) 12/18/2017, 4:00:12 PM +344ms +1ms ╔Received event [Home].time = 1513627213665 with a delay of -1321ms +344ms ║RunTime Analysis CS > 16ms > PS > 56ms > PE > 272ms > CE +346ms ║Runtime (37141 bytes) successfully initialized in 56ms (v0.2.100.20171211) (344ms) +348ms ║╔Execution stage started +415ms ║║Executed physical command [Living Room Thermostat].setHeatingSetpoint([19.0]) (47ms) +416ms ║║Executed [Living Room Thermostat].setHeatingSetpoint (49ms) +426ms ║║Cancelling statement #6's schedules... +435ms ║║Executed virtual command [Master Bedroom Thermostat].wait (1ms) +437ms ║║Requesting a wake up for Mon, Dec 18 2017 @ 4:00:17 PM AST (in 5.0s) +446ms ║╚Execution stage complete. (99ms) +448ms ║Setting up scheduled job for Mon, Dec 18 2017 @ 4:00:17 PM AST (in 4.991s) +471ms ╚Event processed successfully (471ms) 12/18/2017, 4:00:08 PM +450ms +1ms ╔Received event [Home].time = 1513627209635 with a delay of -1185ms +126ms ║RunTime Analysis CS > 16ms > PS > 64ms > PE > 46ms > CE +129ms ║Runtime (37140 bytes) successfully initialized in 64ms (v0.2.100.20171211) (127ms) +130ms ║╔Execution stage started +184ms ║║Executed physical command [Lian Bedroom Thermostat].setHeatingSetpoint([19.0]) (32ms) +185ms ║║Executed [Lian Bedroom Thermostat].setHeatingSetpoint (34ms) +196ms ║║Cancelling statement #6's schedules... +207ms ║║Executed virtual command [Living Room Thermostat].wait (2ms) +213ms ║║Requesting a wake up for Mon, Dec 18 2017 @ 4:00:13 PM AST (in 5.0s) +221ms ║╚Execution stage complete. (91ms) +222ms ║Setting up scheduled job for Mon, Dec 18 2017 @ 4:00:13 PM AST (in 4.994s) +230ms ╚Event processed successfully (230ms) 12/18/2017, 4:00:04 PM +134ms +1ms ╔Received event [Home].time = 1513627205603 with a delay of -1469ms +400ms ║RunTime Analysis CS > 45ms > PS > 311ms > PE > 43ms > CE +402ms ║Runtime (37142 bytes) successfully initialized in 311ms (v0.2.100.20171211) (400ms) +403ms ║╔Execution stage started +483ms ║║Executed physical command [Basement Thermostat].setHeatingSetpoint([19.0]) (59ms) +483ms ║║Executed [Basement Thermostat].setHeatingSetpoint (61ms) +490ms ║║Cancelling statement #6's schedules... +498ms ║║Executed virtual command [Lian Bedroom Thermostat].wait (1ms) +500ms ║║Requesting a wake up for Mon, Dec 18 2017 @ 4:00:09 PM AST (in 5.0s) +508ms ║╚Execution stage complete. (104ms) +509ms ║Setting up scheduled job for Mon, Dec 18 2017 @ 4:00:09 PM AST (in 4.992s) +515ms ╚Event processed successfully (515ms) 12/18/2017, 4:00:00 PM +463ms +0ms ╔Received event [Home].:f921f7ebbe53cde012ebfeecd88adb60: = @ToD_rate_test with a delay of 73ms +112ms ║RunTime Analysis CS > 15ms > PS > 61ms > PE > 37ms > CE +115ms ║Runtime (37168 bytes) successfully initialized in 61ms (v0.2.100.20171211) (114ms) +116ms ║╔Execution stage started +124ms ║║Comparison (integer) 19 changes = true (1ms) +125ms ║║Condition #4 evaluated true (3ms) +126ms ║║Condition group #1 evaluated true (state did not change) (5ms) +133ms ║║Cancelling statement #6's s chedules... +139ms ║║Executed virtual command [Basement Thermostat].wait (1ms) +140ms ║║Requesting a wake up for Mon, Dec 18 2017 @ 4:00:05 PM AST (in 5.0s) +145ms ║╚Execution stage complete. (30ms) +146ms ║Setting up scheduled job for Mon, Dec 18 2017 @ 4:00:05 PM AST (in 4.994s) +174ms ╚Event processed successfully (175ms)


#2

Why use ‘for each’ rather than just setting all the thermostats at the same time, in a single ‘with’?

Anyway, maybe the ‘changes’ is timing out after the 5 second waits?

Try on event from @variableName
for each…


#3

These thermostats can occasionally be a bit stubborn if you send the setpoint command during certain wait states. I solved this by using a repeat-until loop with a 20-30 second wait between loops.

repeat
set thermostat to {setpoint}
wait 20 seconds
until
thermostat setpoint equals {setpoint}
end repeat

You could insert a counter as a precaution to prevent an endless loop if one thermostat absolutely refuses to change setpoints, but I’ve never found it necessary.

As Robin suggested, I’ve always used a single “with” rather than a “for each” but I don’t have six thermostats, either.


#4

Thanks @Robin. At first I did try a single with statement. I thought it might be congestion on the z-wave network. Is that possible? That’s why I added the wait 5 seconds. So set one thermostat, wait 5 seconds, set next, wait… Would the single with statement run synchronously achieve the same thing?

Perhaps I was looking at it wrong. It’s not congestion on the network, it’s the wait state as @bthrock suggested. I will try the repeat until.

For now I just set a 30 minute timer to set the heating point to @variable for each thermostat. That seems to catch them all eventually.

@bthrock thanks for your help and is this what you had in mind?


#5

Yes. Let me know if that works for you.


#6

:+1: One little edit in the until statement. Changed to all instead of any.


#7

Actually, after a second look, under the “until” you need “all” instead of an “any.” You don’t want the piston to stop if just one thermostat is set correctly.

Edit: NVM, you caught it before I posted.


#8

Sorry one other question. Do I need to reset the counter? If it’s local it’ll reset itself every time the piston fires right?


#9

Yes, it’ll reset.


#10

Happy to say this seems to be working well. I did have to repair the z-wave network because one thermostat was not updating. Seems like that might be more of the issue than any method I’m using. I do like the extra checks in this method. Thanks @bthrock.


#11

Glad to hear. I’ve had to repair my network as well just once, but I’ve also seen the thermostats not respond when they’re waiting or cycling. At one point early on, I sent myself a push notification when the counter went past 1 or 2 so I could check the log. So I know it doesn’t happen often, but either way the extra checks are a painless way to address that.