*** No longer supported *** [OBSOLETE] Introducing ScheduleTstatZones: multi zoned heating/cooling solution for your home

Today, I made the following changes to the smartapp:

  • Added “Ask Alexa” Notifications in the Notifications Page. By setting to true, you’ll be able
    to read and play messages from the smartapp by interacting with Amazon echo/Ask Alexia.

Some safeguards notifications will be sent to Alexa when applicable (ex. ratio of open vents/total vents is too low) and when your thermostat is set to away or present based on motion.

  • Please note that you need version 2.1.3a of Ask Alexia to make it work. Please refer to this thread below for more details.

The new version is available at my store:



P.S. The new version has been sent to all my contributors.

1 Like


Today, I made changes to the UI to use the same icons throughout the setup and config pages.

For more details:


You can download the new code at


P.S. The new code was sent to all my contributors.


Here is a referral link to get the Keen Home Vents for $25 less:


Here are some explanations about electro mechanical zoning vs. smart vents



Today,I released a new version of ecobeeSetZoneWithSchedule, ScheduleTstatZones, and ScheduleRoomTempControl with better logging & notification control.

The new versions are available for download at my store:

For more details about the capabilities of the smartapps, please refer to the top of the thread
and to the ST community wiki:



I am seeing this error:


java.lang.Boolean cannot be cast to java.lang.Integer @ line 3090

How do I fix it?

Hi @XFighter, I sent you the corrected version. Just copy and paste the code into the IDE, save & publish.


P.S. If you have any other issue, please send me an email at services@maisonsecomatiq.com, it’s easier for me to respond thru gmail conversions as I get the context of all emails.

Thanks for the quick response, will do next time.

Is there a way to create a rule like "if SM Mode is Night and no motion for 15 minutes in sesors a,b,c then set Tstat to “Sleep”
"If SM Mode is Home and motion in sensors a,b,c then set Tstat to “Home”?

CoRE has a several task for Tstats like “aSleep” and “asHome”, but I not sure how to configure them.

Hi @XFighter, my smartapp is a zoned heating/cooling solution, it’s not a rule engine like core, so there is no way to add rules such as those in my smartapp.

However, if you’re using my smartapp with ecobee or Nest (or any thermostat that supports the away and present modes), it can set your thermostat to away or present based on motion detection at your home.

You need to enable this option in GeneralSetup.

Please refer to (use case no 8)




BTW, you should rely on the ecobee schedules (programs) as much as possible, and not use ST to switch from one program to another (ex. from home to sleep).

Ecobee’s has already the Sleep, Home, and Away programs set by default.

Please read the following before coding anything in Core:


ecobeeSetZoneWithSchedule’s own schedules relies on the ecobee programs (it’s a 1-to-1 mapping), so there is no need to use ST to switch from one program to the next.

You don’t need to reinvent the wheel. Just rely on the ecobee programs in place.

If you need assistance for the smartapp configuration, just contribute to one of my support packages and I will help you for its configuration.


Is there a way to update the Sleep climate in ecoBee settings?

I would like to have EcoBee enter “Sleep” when mode is Night and there are no motion in all sensors except the sensors in the bedrooms and exit Sleep mode in 6 hours or when Sunrise + 30 minutes, which ever is larger.


In order to do this, you need to leverage the ST “Good Morning” & “Good Night” routines.


  • Update the “Good Night” routine with your requirements (no motion except the bedrooms)
  • Update the “Good Morning” routine with your requirements (Sunrise + 30 minutes)

You can then use a rule engine (such as “Core” and SmartRules) for these kinds of scenarios.

P.S. You can use then MyEcobee device in core with the setClimate method to switch to Sleep or Home.

ecobee.setClimate("", “Sleep”) or ecobee.setThisTstatClimate(“Sleep”)
ecobee.setClimate("",“Home”) or ecobee.setThisTstatClimate(“Home”)


Instead of core, you can also just simply use my ecobeeChangeMode smartapp based on the ST hello mode change which would be dependent on your routines changes.


Previously I had been using a cobbled together combination of AverageThings temperature sensors, a custom modified Keep Me Cozy II and Thermostat Mode Director, I just bought ScheduleTstatZones hoping to eliminate most if not all of these and have a better integrated solution. Unfortunately I’m not sure my use case works out of the box. Here are a few issues I noticed when trying to set it up yesterday:

###Using modes to define temperatures:
Previously I set my temperatures based on mode, of which I have three. Home, Night, and Away. I don’t have any scheduling configured on my thermostats and don’t do any scheduling via smartapps. The only place I have schedules defined are in the routines which change modes. In ScheduleTstatZones you can use modes, but you also have to have a schedule defined. In my opinion the schedule could be optional if using particular modes. To dance around this I made three schedules one for each mode and set the start time to 0:00 and 23:59 for each. In my mind this would accomplish the same thing.

Oddly though when switching modes ScheduleTstatZones would log the following for a fairly long period of time before picking up the mode change:

04f710c6-1cab-431a-9142-74d9b1b4b40d  8:55:02 PM: info schedule Night:avg temp= 63.0,main Tstat's currentTemp= 70.0,temp adjustment=7.0
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:55:01 PM: info rescheduleIfNeeded>scheduling takeAction in 5 minutes..
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:55:01 PM: info initialize>scheduling setZoneSettings every 5 minutes to     check for zone settings to be applied
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:52:31 PM: info setZoneSettings>No schedule applicable at this time 2016-11-05 20:52
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:52:31 PM: info setZoneSettings>No schedule applicable at this time 2016-11-05 20:52
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:12:31 PM: info setZoneSettings>No schedule applicable at this time 2016-    11-05 20:12
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:12:31 PM: info setZoneSettings>No schedule applicable at this time     2016-11-05 20:12    
04f710c6-1cab-431a-9142-74d9b1b4b40d  8:07:31 PM: info schedule Home,in zones=[1:Living Space],heating setPoint now =67.0,adjusted by avg temp diff (1.0) between all temp sensors in zone

###My thermostat is physically in a different zone
My second issue is related to the way my house is set up. I added a second physical zone after the fact, so now my upstairs and downstairs are two different zones with two different thermostats. The catch is both thermostats are physically located upstairs. I’ve always relied upon a remote sensor downstairs to turn things on and off because in the winter the upstairs will plenty warm while downstairs will be cold. I modified Keep My Cozy II to always setHeatingSetpoint to currentTemperature + 2 and keep it that way until the remote sensor reads the desired temperature for downstairs. ScheduleTstatZones doesn’t seem to work this way. I’ve set the max differential to 1F. Looking at the logs I see things like:

04f710c6-1cab-431a-9142-74d9b1b4b40d  7:32:27 PM: info schedule Home,in zones=[1:Living Space],heating setPoint now =67.0,adjusted by avg temp diff (1.0) between all temp sensors in zone
04f710c6-1cab-431a-9142-74d9b1b4b40d  7:32:27 PM: info schedule Home:avg temp= 65.0,main Tstat's currentTemp= 71.0,temp adjustment=6.0

So the desired temp is 66F. The current temp of the zone is 65F. The thermostat is currently reading 71F (because it’s upstairs). It looks like ScheduleTstatZones sets the thermostat to 67F trying to warm things up to the requested 66F, but of course that doesn’t do anything because the thermostate currently reads 71F. This seems broken to me, the thermostat should be set to 72F (and adjusted upwards as necessary in case the upstairs temp also increases) until the zone reaches 66F. Is my thinking wrong here? Obviously in the case of cooling the offset would be kept in the negative direction.

###More than one temp sensor in a room
ScheduleTstatZones already averages temperatures between zones for a given schedule. Unfortunately only a single sensor is supported per room. I can dance around this with VirtualThings, but it would be nice to be able to define multiple sensors in a room and average them together. This might also make good sense when using smart vents because you may have more than one vent per room.

###Turning the thermostat off when doors/windows are open
I know there are other smartapps which do this, but the problem is if you’re using an outdoor sensor to control the thermostat mode in ScheduleTstatZones that and the Door/Window smart app will fight for control of the mode. The Door/Window app may turn the thermostat off, but if ScheduleTstatZones noticed a change in the outdoor temperature it may switch to Heat/Cool until the other app has a chance to change it back and the battle continues.

It’s certainly possible that I’m just doing things wrong or perhaps this is was the wrong choice for my particular setup. Any help is greatly appreciated.



My smartapp is a zoned heating/cooling solution and was built with some specific requirements as stated at the beginning of the thread.

So, It is probably not possible to replace all the smartapps that you’re using now with a single smartapp…

1- Using modes to define temperatures

Yes, you’d need to define schedules as the smartapp was built with the capability of creating zones at a specific times of the day. The zones can be different in the mornings that in the evenings.

2- As indicated at the beginning of my thread, my smartapp is always averaging the temps at multiple sensors. It does not reproduce the Keep MeCozy II smartapp’s behavior.

And, the temp adjustment is always a setpoint adjustment (not based on the current temperature at the thermostat)… So, if you specify a max temp adjustment of 1F (you could set it to 6F or even higher), then based on your setpoint of 65F, it will try to reach your desired temp of 66F for the zone with the max temp adjustment possible so, the revised setpoint will be 67F. That’s the way the smartapp was designed, and it seems to be working fine according to its original design.

As far as supporting many sensors per room is concerned, if I have other people asking for that feature, I may add it later. At the moment, you’re the only one to ask for this requirement. It’d then be considered as custom development (and you’d need to pay for it if you’re still interested).

3-Turning the thermostat off when doors/windows are open

Yes, you’d use a separate smartapp for that: windowOrDoorOpen. If you use both smartapps, there may be some side effects with the outdoor threshold for switching modes. I must say that you’re the only one who reported this issue.


EDIT: For your specific use cases, I’d recommend to hire a HVAC technician, and rebalance the airflow in your house as there are too wide temperature gaps between your upstairs and downstairs.

As an alternative, you could also try to use smart vents to control the airflow.

In all cases, I’d recommend to position a thermostat downstairs instead of having 2 thermostats upstairs. A zone thermostat should always be physically positioned in its own zone.

Hi @flemming,

  • I sent a new release that corrects the issue with multiple schedules having the same time windows but with different ST hello modes.

  • I also added a masterSwitch in WindowOrDoorOpen! which can control my zoned heating/cooling smartapps by suspending (off) or restarting (on) their processing. You’d need to use the same virtual switch in both smartapps.

Those new releases won’t correct your HVAC imbalance. As I wrote earlier, you’d need to either consult an HVAC technician or try to use smart vents to direct more efficiently the airlflow in your house.

Also, as I wrote earlier, I’d strongly recommend to reposition one of your zone thermostats downstairs.


Great, I saw that. I haven’t had a chance to verify that it solves the previous problem I was seeing, but I have faith :slight_smile:

That’ll do the trick, thanks.

Smart vents are an option, but I think there is also a fair amount of info out there about how closing vents and thus creating pressure imbalances actually decreases efficiency. That’s another topic though.

The house was originally a single zone and that was pretty terrible. The upper floor has a ton of floor to ceiling glass and the lower floor is partially below grade. Needless to say the temperature difference between the two can be quite spectacular. I had a contractor split it into two zones and that has helped a lot. Unfortunately fishing a wire for the thermostat from the attic down two stories wasn’t really feasible so I’ve always just used a remote sensor. At first it was a thermostat with a proprietary wireless remote sensor, then I switched to SmartThings and used Keep Me Kozy II to do the trick. Pretty much everything about my house was done wrong and resizing all the ducting and switching to two smaller sized systems (rather than one large one) are not really a solution I’m interested in pursuing, so I’m trying to make the best of a sub-optimal situation.

Going back to the previous message:

I assumed the max differential related to how far above/below the setpoint the temperature would need to be before adjusting the thermostat. I think that’s still correct, but I sounds like your saying that’s also the amount added or subtracted to the current average zone temperature which is then used as the setpoint for the thermostat.

I think even in a house not as screwy as mine this could be problematic. If you’re using the average zone temperature to decide when to heat/cool the thermostat itself should really be acting as a dumb switch. When the average zone temperature is off, toggle the thermostat on until that’s no longer the case. Since a thermostat isn’t a dumb switch the way to fake that is to set it +/- some amount based on its current temperature and maintain the offset until the desired average zone temperature is reached and then toggle it off by apply the offset in the other direction.

What you have works because in most cases the temperature at the thermostat is close to that of the zones, but it may not always be that way. From my perspective thinking of the thermostat as a switch makes more sense. I may look into modifying the code myself, but I need to go through and try to get a handle on it since it’s just a wee bit more complex than the other smartapps I’ve tinkered with :slight_smile:

Thanks for your help and the latest updates.


Hi @flemming,

  • If you have a big temperature gap in your zone (at least 6F in your case), then you just set max temp adjustment to at least 6F in the smartapp (this can be adjusted on a schedule to schedule basis). Most people want to control the adjustment to the setpoints as they don’t want to necessarily have their energy bill increases a lot for more comfort (which also explains why I don’t make adjustment to the setpoints based on the temperature of the thermostat).

  • My smartapps have safeguards to avoid closing too many smart vents. Please read the first post for more details. Ducts are usually not hermetically sealed, so the chances that pressure inside the ducts will damage your HVAC are pretty slim. I’ve used smart vents for more than 2 years now, and I haven’t had any issue. You can purchase some smart vents (for your colder rooms) at Lowes and try it out. If you’re not happy, just return them after 1 month.

  • Otherwise, an HVAC techician can rebalance your airflow so that more of it will go towards downstairs.


EDIT: I don’t consider the thermostat as a switch, actually, there are many reasons why you want to have your zone thermostat inside your zone. Amongst others, smart thermostats usually provide other information about its environment such as humidity which can be critical for smarter HA scenarios.

I have recently installed Honeywell Evohome. Their app is pretty poor. I’m a little unclear can I use your app to schedule and control Evohome, which zones are integrated into ST. Thanks