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

I published the 3.1.1 code, but it is still showing 3.0.3 in the app. Usually it updates pretty quickly, but it has been about ten minutes now.

My usage case might be different than what I previously posted, so let me update it here:

I basically just have one schedule right now, from 7AM to 1AM, where I want to keep the entire house at a temperature of 76 degrees. I have two zones (upstairs and downstairs) with several temperature sensors in rooms in each zone. I want the app to make adjustments based on the average temperature of all the sensors throughout the house, but I only want it to consider sensors in rooms where there has been motion. I also want to be able to override the app’s calculations when I am in a room that currently does not have any sensors (it gets too hot because the app doesn’t detect any motion and sets the thermostat too high).

P.S. I can’t wait to get my Keen vents!

@DreamPunk,

So basically, you need to configure all your rooms with the following parameters populated:

a) Set this one to ‘true’

		section("Room ${indiceRoom}-Do temp adjustment when occupied room only [optional]") {
			input "needOccupiedFlag${indiceRoom}", title: "Will do temp adjustement only when Occupied [default=false]", "Boolean", metadata: [values: ["true", "false"]], 
				required: false

		}

b) Specify the number of minutes here

		section("Room ${indiceRoom}-Do temp adjustment with this occupied's threshold [optional]") {
			input "residentsQuietThreshold${indiceRoom}", title: "Threshold in minutes for motion detection [default=15 min]", "number", 
				required: false, description: "Optional"

		}

except the one(s) where you do not have any motion sensors.

Probably, those rooms should not be part of your zone(s) affected by the 7AM to 1AM schedule.

My app will not be able to do the following requirement:

Regards.

P.S. Make sure to publish the new version of the smartapp in the IDE.

FYI, I’ve tested the smartapp v3.1.1 and it works fine on my end…

I was able to update the app to 3.1.1. I made all the changes you recommended and only included rooms with motion sensors in the zones. The thermostat has not changed from 74 degrees which I had set manually yesterday. How can I make sure the app is working? It doesn’t send any push notifications. I only see the polling messages it sends to the thermostat every five minutes.

@DreamPunk,
Please try first to set detailed tracing to true at the last page (Notications & other settings)…

Also, if you are familiar with the IDE, you can use live logging…

Regards

I activated the app manually and checked the live logging. One of the lines says “setZoneSettings>No schedule applicable at this time”. Does that mean it isn’t running at all?

I also noticed this line: setZoneSettings>found schedule Constant Temp, startTime=2015-10-10T07:00:06.000-0500,endTime=2015-10-13T02:00:15.000-0500,nowInLocalTime= 2015-10-13 13:41,startInLocalTime=2015-10-12 07:00,endInLocalTime=2015-10-13 02:00,currTime=1444761690268,begintime=1444651200000,endTime=1444719600000,lastScheduleName=Constant Temp, lastStartTime=null

Does that mean that the schedule isn’t triggering because it thinks it is outside of the set time? Why does the start time include the date 10/10/15?

You may want to verify the time slots for you schedule(s): make sure that the time of the week and the start & end times are set properly. For example, 7h00am to 1h00 am should be divided into 2 schedules: 1h00am to 7h00 am, and 7h00 to 12h00 am.

Bye for now

Yep, that fixed it. So basically you can’t have a schedule that runs overnight? It needs to stop at 11:59PM and the next schedule needs to start at 12:00AM.

Yes, it is actually based on time slots during the day… If your schedule spills over to the next day, the smartapp does not handle it at the moment…

@DreamPunk, I made a change in the new version (v3.1.2) at my github that should fix schedules that run overnight…

Please test it and let me know,

Regards.

I tested it and 3.1.2 fixes the overnight scheduling issue. Thanks!

FYI, I have included the following safeguards into my smartapps:

  • the ecobeeSetZoneWithSchedule and ScheduleTstatZones (for generic ST connected thermostats) check each vent’s temperature and make sure that it’s within the minimum and maximum range to provide safe operation.

  • the smartapps check the ratio of closed vents/total connected vents and will ensure that the ratio is not higher than 50%.

  • When the zone settings are applied, the smartapps ensure that there is a minimum open level for any vents inside the zone(s) scheduled at a given time.

Those safety measures are already implemented and tested with the beta vents that I have…

I will test again with a larger number of vents later when I receive the production ones…

Regards

Hi @DreamPunk, you may want to grab my latest release at my github, as I made some changes today that corrected the way the temp adjustments are made to the main thermostat.

Regards.

Thanks for letting me know! I updated to 3.1.8.

One issue I’m having right now… Just set it up yesterday, along with a new CT101 from Lowes. I’m seeing this in the log right now:

7:00:40 AM: error java.lang.IllegalArgumentException: Command 'poll' is not supported. Supported commands: [configure, refresh, setHeatingSetpoint, setCoolingSetpoint, off, heat, emergencyHeat, cool, setThermostatMode, fanOn, fanAuto, fanCirculate, setThermostatFanMode, auto, setSchedule, switchMode, switchFanMode, quickSetCool, quickSetHeat] @ line 522
7:00:40 AM: debug Begin of setZoneSettings Fcn

I’m just using the built-in device type for my CT101 right now… Does this look like a problem with the default device type not supporting a poll command? Or something else?

Second item is, there’s just so many options in here that I’m trying to figure out how to set everything up. Basically I want to do something like this:

  1. Set up 3 rooms - living room, master bedroom, basement rec room
  2. Use the living room / thermostat reading during the day when the mode is set to “Home”
    (2a. Optionally use the basement rec room temperature when motion is detected… this is very optional
  3. Use the master bedroom temperature reading when the mode is set to “Night”, and have the setback changed
  4. Use the thermostat reading when the mode is set to “Away”, and have the setback changed (why heat / cool an empty house?)

I haven’t thought much about actual time based schedules yet, as our old 7 day programmable thermostat just lived on a single temperature on permanent hold all the time after a while.

Any ideas on how to set up the SmartApp to do what I want?

Hi @talz13,

Please update to version 3.2, I made some changes to use refresh() instead of poll() (which is supported by your thermostat). Just grab the new code at my github and save&publish in the IDE.

Now, you need to be aware the the smartapp will use your temp sensors throughout the house to
average out your main thermostat’s temperature reading. This is similar the ecobee3’s follow me
feature. It will not take one reading over the other.

To answer your set up questions:

1a- In the 1st page, you need to specify that you want to configure at least 3 rooms, 2 zones (Ground Floor & Upstairs), and 3 schedules: Home, Night, Away (you can change the number later if needed)

1b- As you want in 2a to optionnally adjust the cooling & heating setpoints according the basement rec
temperature, you need to set the following parameter to true:

	section("Enable temp adjustment based on indoor temp/motion sensor(s) [optional, default=false]") {
		input (name:"setAdjustmentTempFlag", title: "Enable temp adjustment based on avg temp collected at indoor sensor(s)?", type:"Boolean",
			metadata: [values: ["true", "false"]],required:false)
	}

1c- In Rooms setup, just configure the 3 rooms as desired.

2a- In the Basement Rec Room setup, you need to specify the motion sensor for that room and
its temp sensor by using these input parameters:

		section("Room ${indiceRoom}-TempSensor [optional]") {
			input "tempSensor${indiceRoom}", title: "Temp sensor for better temp adjustment", "capability.temperatureMeasurement", 
				required: false, description: "Optional"

		}

		section("Room ${indiceRoom}-MotionSensor [optional]") {
			input "motionSensor${indiceRoom}", title: "Motion sensor (if any) to detect if room is occupied", "capability.motionSensor", 
				required: false, description: "Optional"
		}

2b- For that room, you need to set the following flag parameter to ‘true’ and the number of minutes (or time window) used to determine whether the room is occupied or not.

		section("Room ${indiceRoom}-Do temp adjustment when occupied room only [optional]") {
			input "needOccupiedFlag${indiceRoom}", title: "Will do temp adjustement only when Occupied [default=false]", "Boolean", metadata: [values: ["true", "false"]], 
				required: false

		}

		section("Room ${indiceRoom}-Do temp adjustment with this occupied's threshold [optional]") {
			input "residentsQuietThreshold${indiceRoom}", title: "Threshold in minutes for motion detection [default=15 min]", "number", 
				required: false, description: "Optional"

		}

3- For your Master Bedroom, you need to only indicate your temp sensor (with the same parameter as above), but no motion sensor during the Night Schedule as there is no motion anyway.

4-[quote]Use the thermostat reading when the mode is set to “Away”, and have the setback changed
[/quote]

Answer: This is done by default with the proper ‘Away’ Schedule settings.

5- The way I see it (I can only assume here), you have at least 2 zones in your home: Ground Floor (including the basement), and Upstairs (for the Night Schedule) and include the rooms in the proper zones that you want to control later with your schedules.

6- You need to configure at least 3 schedules for all your routines (Home, Away, Night). The time slots (begin & end times) and the heating/cooling setpoints associated to these Schedules are up to you: I don’t know your day-to-day habits, and it really depends on your own requirements.

You can even define some specific schedules for the weekend vs. weekdays using the same zones/rooms. Then, you need to configure the HomeWeekDays, HomeWeekend, NightWeekEnd, NightWeekDays, etc. schedules.

7- You then need to associate your newly configured schedules to your ST hello modes or routines by using the following input parameter:

	section("Schedule ${indiceSchedule}-Set for specific mode(s) [default=all]")  {
		input (name:"selectedMode${indiceSchedule}", type:"enum", title: "Choose Mode", options: enumModes, 
			required: false, multiple:true,defaultValue:settings."selectedMode${indiceSchedule}", description: "Optional")
	}

8- In the last page (Notifications & Other Settings), set the following input parameter to true (at least at the beginning) to get detailed notifications on what the smartapp does:

	section("Detailed Notifications") {
		input "detailedNotif", "Boolean", title: "Detailed Notifications?", metadata: [values: ["true", "false"]], required:
			false
	}

That’s it… You should be allset, this is the basic configuration for your use case.

Please support the developer :grinning:!!

Hi, thanks for the quick reply!

I set up the rooms and zones, and schedules for Home, Away, and Night. I set the schedules to run from 00:00 to 23:59, with the appropriate modes set, since I wasn’t sure how else to make an “anytime it’s in this mode” schedule.

I’m seeing the ScheduleTstatZones log messages now, but it doesn’t seem to be setting the temperature on the thermostat. Should the set temperature be listed in the log messages? I have my “Home” schedule set to 70F heat, “Away” to 65, and “Night” to 66. When I went from “Night” to “Home” this morning, I checked the thermostat in ST afterwards, and didn’t see it change to 70. Cycling between “Home” and “Away” with the log up this morning showed:

7:10:46 AM: debug End of setZoneSettings Fcn
7:10:46 AM: debug setZoneSettings>No schedule applicable at this time 2015-10-18 07:10
7:10:46 AM: debug ScheduleTstatZones>No schedule applicable at this time 2015-10-18 07:10
7:10:46 AM: debug sending text message
7:10:46 AM: debug setZoneSettings>schedule=Night does not apply,location.mode= Away, selectedModes=[Night],foundMode=false, continue
7:10:46 AM: debug setZoneSettings>found schedule Away, startTime=2015-10-16T00:00:00.000-0400,endTime=2015-10-16T23:59:00.000-0400,nowInLocalTime= 2015-10-18 07:10,startInLocalTime=2015-10-18 00:00,endInLocalTime=2015-10-18 23:59,currTime=1445166646027,begintime=1445140800000,endTime=1445227140000,lastScheduleName=Home, lastStartTime=1445140800000
7:10:46 AM: debug setZoneSettings>schedule=Home does not apply,location.mode= Away, selectedModes=[Home],foundMode=false, continue
7:10:46 AM: debug Begin of setZoneSettings Fcn
7:05:40 AM: debug End of setZoneSettings Fcn
7:05:40 AM: debug setZoneSettings>schedule=Night does not apply,location.mode= Home, selectedModes=[Night],foundMode=false, continue
7:05:40 AM: debug setZoneSettings>schedule=Away does not apply,location.mode= Home, selectedModes=[Away],foundMode=false, continue
7:05:40 AM: debug setZoneSettings>schedule Home,currTime= 1445166340404, current time is OK for execution, we're in the middle of a schedule run
7:05:40 AM: debug setZoneSettings>found schedule Home, startTime=2015-10-16T00:00:00.000-0400,endTime=2015-10-16T23:59:00.000-0400,nowInLocalTime= 2015-10-18 07:05,startInLocalTime=2015-10-18 00:00,endInLocalTime=2015-10-18 23:59,currTime=1445166340404,begintime=1445140800000,endTime=1445227140000,lastScheduleName=Home, lastStartTime=1445140800000
7:05:40 AM: debug Begin of setZoneSettings Fcn

Edit: It would help if I posted the log from the CT100 as well!

7:10:48 AM: debug CT100 Thermostat parsed 'zw device: 0A, command: 6006, payload: 01 00 31 05 01 2A 02 8F ' to [null]
7:10:48 AM: warn Unexpected zwave command MultiInstanceCmdEncap(command: 49, commandClass: 0, instance: 1, parameter: [5, 1, 42, 2, 143])
7:05:42 AM: debug CT100 Thermostat parsed 'zw device: 0A, command: 6006, payload: 01 00 31 05 01 2A 02 8F ' to [null]
7:05:42 AM: warn Unexpected zwave command MultiInstanceCmdEncap(command: 49, commandClass: 0, instance: 1, parameter: [5, 1, 42, 2, 143])

Edit 2: Here’s what is shown on the CT100 log when I manually set the heating temperature to 70:

7:34:58 AM: debug CT100 Thermostat parsed 'zw device: 0A, command: 4303, payload: 01 09 46 ' to [[value:70, unit:F, displayed:false, name:heatingSetpoint, isStateChange:true, linkText:CT100 Thermostat, descriptionText:CT100 Thermostat heating setpoint is 70°F]]
7:34:56 AM: trace setHeatingSetpoint(70.0, 1000)

Hi @talz13,

I’ve tested my last version (v3.4.1) and it works fine for me. Please grab it at my github and save&publish
in the IDE.

Please make sure that your configuration is set correctly.

Have you set this parameter to ‘true’ in the 1st page (as specified in step 1b in my previous post)?

1b- As you want in 2a to optionnally adjust the cooling & heating setpoints according the basement rec
temperature, you need to set the following parameter to true:

section("Enable temp adjustment based on indoor temp/motion sensor(s) [optional, default=false]") {
	input (name:"setAdjustmentTempFlag", title: "Enable temp adjustment based on avg temp collected at indoor sensor(s)?", type:"Boolean",
		metadata: [values: ["true", "false"]],required:false)
}

And, please set the Detailed Notification flag to ‘true’ as specified in step 8 above (to get more tracing):

8- In the last page (Notifications & Other Settings), set the following input parameter to true (at least at the beginning) to get detailed notifications on what the smartapp does:

section("Detailed Notifications") {
	input "detailedNotif", "Boolean", title: "Detailed Notifications?", metadata: [values: ["true", "false"]], required:
		false
}

Regards.

Thanks, I uninstalled my previous setup of ScheduleTstatZones, saved and published your latest 3.4.1 version, and set up with ONLY 2 zones, 2 rooms, and 3 schedules (home / away / night). Appears to be working correctly now, will verify when my wife gets home that the thermostat is adjusted :smile:

Have you thought about adding a boolean setting for “all day” operation? In my case, I have to make the schedule run from 12:00 am to 11:59 pm for it to recognize it all the way through.

Edit: SmartThings says my wife just got home… ScheduleTstatZones SMS says:

ScheduleTstatZones>No schedule applicable at this time null

Did the version just jump from 3.4.1 to 4.3.1?