PLEG for Thermostat Schedule

Currently using PLEG to configure my 3 Trane thermostats for the 3 Zones in my house. A feature benefit is the Energy Saving Mode (ESM) which will drop the temperature set points for heat/cool to bare minimums. For reference, I use H-60/C-80for this setting.

The issue I have, is that if ESM is turned on (which I have a virtual switch for), when I turn ESM back off (via the switch), the thermostat reverts to the set points that were set before the ESM was set. For example, let’s say I have 2 Schedules input into PLEG (9AM and 11AM). When 9AM hits, the PLEG successfully changes the temp to 68/75. When 11AM hits, PLEG successfully changes the temp to 65/79. The problem, is that if ESM is turned on around say 10AM, and turned off around 1PM, the thermostat goes back to 68/75 per the last setting it had.

Anyone successfully running a schedule with Trane Thermostats that have the ESM function? OR perhaps a similar thermostat that behaves similarly? I’d like to get this resolved once and for all so I can effectively program the thermostats to drop when I leave the house and return to whatever the scheduled temperature is according to the schedule being set.

The only workaround I know of is to have the PLEG resend the most recent PLEG limits when it detects the ESM mode for the thermostat is turned off.

Ok, and how would one go about doing that? I’m not sure I get how to resend those limits.

Post what you have currently and we can start from there.

This explains what I’m seeing with my Trane thermostats. I didn’t realize shutting off ESM would revert the setpoints. I’m using ESM mode during the day with PLEG, but when my schedule stops & I send the command to switch from ESM to Normal, the desired setpoints don’t get set.

Maybe it just needs a delay between ESM off & sending setpoints.

Here’s what I did. I’ll find out later if it has worked:

In my PLEG Actions - Advanced tab, I selected “when all devices are properly set,” and then in the drop-down below, added new setpoints for both thermostats. Hopefully, that means that when my “away” schedule expires, the thermostats will go from ESM to Normal, and only when that’s done, the PLEG will send the new setpoints.

I’ve had this issue for a week or two but haven’t had time to do anything about it. We’ll see if this works.

@RichardT

Here is the current readout from the PLEG I have for the thermostats.

Triggers
Name Description Last Trigger State
ESMOn Energy Saving Mode is turned on 2013-11-07 22:13:15.928 false
ESMOff Energy Saving Mode is turned off 2013-11-07 22:13:28.958 true

Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
W0809 Weekly 08:00:00 1,2,3,4,5 None None None false 2013-11-08 08:00:00.100
W0917 Weekly 09:00:00 1,2,3,4,5 None None None false 2013-11-08 09:00:00.100
W1721 Weekly 17:00:00 1,2,3,4,5 None None None false 2013-11-08 17:00:00.100
W2108 Weekly 21:00:00 1,2,3,4,5 None None None true 2013-11-08 21:00:00.000
WE08AM Weekly 08:00:00 6,7 None None None false 2013-11-09 08:00:00.100
WE10AM Weekly 10:00:00 6,7 None None None false 2013-11-09 10:00:00.100
WE05PM Weekly 17:00:00 6,7 None None None false 0
WE10PM Weekly 22:00:00 6,7 None None None false 2013-11-03 22:00:00.100

Conditions
Name Expression Last True State
CESMOff ESMOff 2013-11-07 22:13:28.960 true
CESMOn ESMOn 2013-11-07 22:13:15.930 false
CW08AM W0809 and ESMOff 2013-11-08 08:00:00.104 false
CW09AM W0917 and ESMOff 2013-11-08 09:00:00.105 false
CW05PM W1721 and ESMOff 2013-11-08 17:00:00.106 false
CW09PM W2108 and ESMOff 2013-11-08 21:00:00.007 true
CWE08AM WE08AM and ESMOff 2013-11-09 08:00:00.107 false
CWE10AM WE10AM and ESMOff 2013-11-09 10:00:00.108 false
CWE05PM WE05PM and ESMOff 0 false
CWE10PM WE10PM and ESMOff 0 false

Can I see the actions as well ?

Actions

Actions for Condition: CESMOff

Immediate

Device Action Arguments
Basement SetEnergyModeTarget NewModeTarget=Normal
Family Room SetEnergyModeTarget NewModeTarget=Normal
Master Bedroom SetEnergyModeTarget NewModeTarget=Normal
Actions for Condition: CESMOn

Immediate

Device Action Arguments
Basement SetEnergyModeTarget NewModeTarget=EnergySavingsMode
Family Room SetEnergyModeTarget NewModeTarget=EnergySavingsMode
Master Bedroom SetEnergyModeTarget NewModeTarget=EnergySavingsMode
Actions for Condition: CW08AM

Immediate

Device Action Arguments
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=77
Family Room SetCurrentSetpoint NewCurrentSetpoint=77
Family Room SetCurrentSetpoint NewCurrentSetpoint=65
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=67
Actions for Condition: CWE10PM

Immediate

Device Action Arguments
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=65
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=75
Family Room SetCurrentSetpoint NewCurrentSetpoint=60
Family Room SetCurrentSetpoint NewCurrentSetpoint=80
Actions for Condition: CWE05PM

Immediate

Device Action Arguments
Family Room SetCurrentSetpoint NewCurrentSetpoint=67
Family Room SetCurrentSetpoint NewCurrentSetpoint=75
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=64
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=77
Actions for Condition: CWE10AM

Immediate

Device Action Arguments
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=64
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=78
Family Room SetCurrentSetpoint NewCurrentSetpoint=78
Family Room SetCurrentSetpoint NewCurrentSetpoint=64
Actions for Condition: CWE08AM

Immediate

Device Action Arguments
Family Room SetCurrentSetpoint NewCurrentSetpoint=77
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=77
Family Room SetCurrentSetpoint NewCurrentSetpoint=65
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=67
Actions for Condition: CW05PM

Immediate

Device Action Arguments
Family Room SetCurrentSetpoint NewCurrentSetpoint=75
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=77
Family Room SetCurrentSetpoint NewCurrentSetpoint=67
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=64
Actions for Condition: CW09AM

Immediate

Device Action Arguments
Family Room SetCurrentSetpoint NewCurrentSetpoint=78
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=74
Family Room SetCurrentSetpoint NewCurrentSetpoint=64
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=67
Actions for Condition: CW09PM

Immediate

Device Action Arguments
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=75
Master Bedroom SetCurrentSetpoint NewCurrentSetpoint=65
Family Room SetCurrentSetpoint NewCurrentSetpoint=60
Family Room SetCurrentSetpoint NewCurrentSetpoint=80

With some changes to your PLEG we can easily fix this.
Currently your timers are single point in time events.
The strategy will be to edit/modify each of these times. The change is similar for all of them … so let me walk you through one of them.

Edit the W0809 schedule.
Define the Stop Type to be Day of the Week.
Specify this for Mon-Friday with a stop at 08:59:59.
Do this similarly for all of the other schedules. Note that the W2108 and WE10PM have off times the following day … For W2108 the off time days are Tu-Sat.

That’s IT!

Now your Timers will turn ON and OFF for Intervals. Later when the ESMOff becomes true … one of the conditions will also become true … and it will call the associated actions to reset your temperatures.

@RichardT

I was thinking this would be the way to go, but was a little confused based on the response in a separate thread. I’ve gone ahead and made the changes and believe I set the schedules properly. Unfortunately, I’ve now got a funky issue it appears. The schedule is showing a random schedule item as true even though it clearly shouldn’t be. I’ve verified the setting about 5 times now to make sure I’m not missing something stupid. Readout below. I even went so far as to create a whole new PLEG, with some of the schedule items to test, and it came out with NONE of the schedule items being True. I’m wondering if this is a bug, or am I missing something easy here? (And yes the PLEG is armed :slight_smile: )

Thermostat Schedule
Device ID: 262013-11-11 15:08:07.856 PLC Version: 5.1 <------------Note actual time here

Triggers

Name Description Last Trigger State
ESMOn Energy Saving Mode is turned on 2013-11-11 14:55:49.815 false
ESMOff Energy Saving Mode is turned off 2013-11-11 14:55:56.511 true

Schedules

Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
W0809 Weekly 08:00:00 1,2,3,4,5 None Weekly 08:59:59 1,2,3,4,5 None false 2013-11-11 08:00:00.100
W0917 Weekly 09:00:00 1,2,3,4,5 None Weekly 16:59:59 1,2,3,4,5 None false 2013-11-11 09:00:00.100
W1721 Weekly 17:00:00 1,2,3,4,5 None Weekly 20:59:59 1,2,3,4,5 None false 2013-11-08 17:00:00.100
W2108 Weekly 21:00:00 1,2,3,4,5 None Weekly 07:59:59 2,3,4,5,6 None true 2013-11-08 21:00:00.000 <---------------Not true
WE0810 Weekly 08:00:00 6,7 None Weekly 09:59:59 6,7 None false 0
WE1017 Weekly 10:00:00 6,7 None Weekly 16:59:59 6,7 None false 0
WE1722 Weekly 17:00:00 6,7 None Weekly 21:59:59 6,7 None false 0
WE2208 Weekly 22:00:00 6,7 None Weekly 00:00:00 1,7 None false 0

The time in the banner for the report get’s it’s time from the PC where the browser is running.
Also the time shown on the Vera Desktop is the time from your local computer.

The time in the reports for events … get their time from the time things are happening on your Vera.
Can you login to your Vera using putty or ssh to see what the time is that your Vera think’s it is.
I wonder if you have a time skew.

Interesting. Logging in I find that my Vera thinks it is 2012-01-09 12:40:42 PST. Currently it’s 15:40 EST. Which lines up time wise properly.

How does that get set? I’ve not noticed any problems with any other timers or anything else, but this worries me if this is the cause that some other timers haven’t been operating properly either.

Is there somewhere I can correct this?

So I thought a little further, this funky view on the device, can’t be affecting the schedule as you might have suggested based on the secondary device I created. I setup the same schedule and everything the same. Just no actions. Based on this thought, it should have the same result currently as my actually PLEG for thermostat controls. Here is the readout from the brand new device:

[code]New Thermo

Device ID: 552013-11-11 16:20:06.849 PLC Version: 5.3

Triggers

Name Description Last Trigger State
ESMOn Energy Saving Mode is turned on 2013-11-11 16:01:19.039 false
ESMOff Energy Saving Mode is turned off 2013-11-11 16:01:23.539 true
TArmed Alarm Panel is ARMED 0 false
TDisarmed Alarm Panel is DISARMED 0 false
Schedules

Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
W0809 Weekly 08:00:01 1,2,3,4,5 None Weekly 09:00:00 1,2,3,4,5 None false 0
W0917 Weekly 09:00:01 1,2,3,4,5 None Weekly 17:00:00 1,2,3,4,5 None false 0
W1722 Weekly 17:00:01 1,2,3,4,5 None Weekly 22:00:00 1,2,3,4,5 None false 0
W2208 Weekly 22:00:01 1,2,3,4,5 None Weekly 08:00:00 2,3,4,5,6 None false 0
WE0810 Weekly 08:00:01 6,7 None Weekly 10:00:00 6,7 None false 0
WE1017 Weekly 10:00:01 6,7 None Weekly 17:00:00 6,7 None false 0
WE1722 Weekly 17:00:01 6,7 None Weekly 22:00:00 6,7 None false 0
WE2208 Weekly 22:00:01 6,7 None Weekly 08:00:00 1,7 None false 0
Conditions

Name Expression Last True State
CESMOn ESMOn 2013-11-11 16:01:19.040 false
CESMOff ESMOff 2013-11-11 16:01:23.541 true
CW0809 ESMOff AND W0809 0 false
CW0917 ESMOff AND W0917 0 false
CW1722 ESMOff AND W1722 0 false
CW2208 ESMOff AND W2208 0 false
CWE0810 ESMOff AND WE0810 0 false
CWE1017 ESMOff AND WE1017 0 false
CWE1722 ESMOff AND WE1722 0 false
CWE2208 ESMOff AND WE2208 0 false[/code]

Until one of the Schedules actually fires this is out of sync.
You can for this by changing the start time for the what should be the current schedule as 5 minutes from now … After it triggers … them reset it back … Then you will be currently synced.

Now that one of the schedules is active … Toggle your ESM.

@RichardT

Looks like you are correct. The schedule started kicking in normally after the next threshold was crossed. Looks like it’s working as expected now. TY!!

UPDATE

So for the sake of helping anyone else who might run into this issue, I now know why this didn’t work the first time around that I tried setting it up this way with the off timers. It turns out, that the thermostat was actually not reverting the temperature reported fast enough or that the Vera was not truly updating the thermostat properly after changing off ESM. If there was an altered temperature, the altered temperature was sticking. I had to put in a 5 second delay on the action of changing the temperature. This made sure that the old temperature reading didn’t stick.

@RichardT - anything you can think of that would make this easier outside of putting the delay in? Or knowledge I may not understand about how quickly your plugin will send the changes after turning the ESM off? Perhaps being sent at the same time, thus getting overwritten by the thermostat so quickly?

The delayed action is probably the best solution.