SmartThings Community

[RELEASE] Introducing ScheduleTstatZones: the ultimate flexible smartapp for your thermostat(s) and multi zoned heating/cooling solution for your home

Hi, I do not know as I don’t have any Nest Thermsostat at home. My contributors use different Nest DTHs with ScheduleTstatZones, and I do not keep track of which one(s) they are using.

I don’t see why my smartapp would not work with the Nest Manager DTH, but I cannot guarantee it.


So if I purchase it and for some reason it does not work with my nest will you refund me?

Hi, the terms of service are indicated at my store. I’m asking for a contribution based on the work I’ve done in the past 18 months.


So I am thinking of buying 2gig CT100 Z-Wave thermostat. What I am wondering is can this app monitor my zwave motion sensors to decide if anyone is home and lower the temp when no one is home, and raise it based on geofencing and motion detectors? I absolutely do not mind paying the money. I believe you should be compensated. Especially if this app will make that thermostat work like an eccobee would by monitoring my sensors.

Hi @Thackston,

With a Z-wave thermostat (which does not support the away or home presence modes similar to the ecobee or Nest thermostats), the ScheduleTstatZones smartapp can do it this way:

  1. You can create a specific schedule associated to each of your ST hello modes (ex. Home, Away, Night, etc.)

This will allow to run the right schedule (with the right setpoints) when somebody is back home or away after the ST “I’m Back” or when the “GoodBye” routines have executed.

  1. The motion sensors are then not used in this use case, only the ST hello modes.

EDIT: However, the motion sensors are used to establish the right zones in your home and control your vents (if any) based on each room’s occupancy.


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, 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.