[RELEASE] 5-2 Day Programmable Thermostat Scheduler (Weekday, Weekend) with Remote Temperature Sensor for each Schedule

@RBoy Thanks for the reply. The regex seems wrong? I received unexpected char: 0xA error when trying it. So I tried it using the replaceAll to remove the brackets individually, and I get this:


log.info "Setting $thermostat cool to ${tempSetpointCool}°"
sendPOST("${schedule} is now active on $thermostat")

def sendPOST(message) {
	log.debug message
	log.debug message

In the logs, I see my first log.debug message (and it contains [Thermostat Floor 2]). After the replaceAll(), all I get is java.lang.NullPointerException: Cannot invoke method replaceAll() on null object

Through (a lot) of trial and error, this seems to have worked for me (for now)

def tstat
thermostat.each { 
    tstat = it
log.info tstat

or you could use thermostat[0]

in the previous replaceAll you need to use

message = message.replaceAll(xxx)

replaceAll returns a string in this case

1 Like

Makes sense. Thanks for the explanations @RBoy!

Has something changed with the way SmartThings handles this SmartApp recently?

I’m noticing my thermostats are no longer following the schedule after about a day. The temporary fix is to go into the SmartApp and Re-Save the settings and it begins working again.

It’s been broken for about a week now.

Any thoughts?

@drsprite, the issue is not related to a specific smartapp, it is a ST platform wide issue:


Bugfixed an issue after the recent platform upgrade. Update the code and DON’T forget to go back in and recheck your settings. You will need to reselect your thermostat(s) after the code update.

This fixes and issue of the mode always falling back to cool settings after the recent platform changes which changed the way some objects are returned.

@RBoy how do we get the update? If I go to your site, looks like I need a login. Is the only option now to pay? Thanks

I usually post the updates to the free apps after some time. The code here in the first post has been updated to reflect the fixes (see date stamps and change log)

But, yes if you want immediate access to the code updates, support and all of my other premium apps and devices I am asking for a one time fee to get access to the website. This is to continue supporting and building new apps and features.

Good to know, thanks. I’ve been pretty disappointed with the scheduling system lately where my system runs at the wrong times. Hopeful ST fixed their problems, and the new version of this app works too. Trying it out now!

Anyone interested in an option to turn off the HVAC for some scheduled instead of just programming it? Note however that this put the thermostat in Auto mode.

This time of year in Arizona we just turn off the HVAC :grinning: Instead of reprogramming your 5-2 app or uninstalling, I created a “Idle” mode and assigned it to run only in that mode. When/if it gets cold, I will put it back to the Home/Sleep modes.

Hi RBoy

I have a difficulty to get the 5-2 days works with my CT100. I tried reinstall the apps and reboot the hub couple times. I tried to control the thermostat using smartthings app without any issue. Since I am using Celsius, I also tried change to Fahrenheit, but it still not working at all. Any idea?

I double checked. The 5-2 Day did fire on schedule, and send “Setcoolingsetpoint” command to thermostat, but the thermostat did not do the job.

Looks like your thermostat has trouble communicating with your hub. Try repairing it or repairing your z-wave network

Hi RBoy,

Thanks for the suggestion. Just one more thing wanna make sure. Will the thermostat work if it is at “Off” mode?

The SmartApp doesn’t change the thermostat mode. It only detects the mode and appropriately configures the temperatures. So if it’s off, it won’t do make any difference.

Having some trouble where the heat set points are not updating, but the cooling set points are. Manual changes to the set point through the device work. Here’s a section of the log:

2:31:02 PM:
Parse returned [[value:79, unit:F, displayed:false, 

name:coolingSetpoint, isStateChange:true, linkText:_Thermostat,
descriptionText:_Thermostat cooling setpoint is 79°F]]


2:31:02 PM:
THERMOSTAT, latest mode = heat


2:30:30 PM:
setCoolingSetpoint(79.0, 30000)


2:28:43 PM:
Parse returned [[value:77, unit:F, displayed:false, 

name:coolingSetpoint, isStateChange:true, linkText:_Thermostat,
descriptionText:_Thermostat cooling setpoint is 77°F]]


2:28:43 PM:
THERMOSTAT, latest mode = heat

Heat setpoint should got to 69 and cooling set point should go to 79 at 2:30. Current temp is 72.

I can’t make out much from your post the formatting is messed up. Was it working and the suddenly stopped? (because it’s working fine here). If so then there’s a communication issue between your hub and thermostat, try resetting the hub (unplug) and thermostat (remove batteries).
Also keep in mind that the heat and cool are set only if the thermostat is in Auto mode otherwise only one is set.

ok, I think it is an auto mode issue. I can cycle through the modes in the device on the ST app, but it only does heat/cool/off. It will no longer cycle to auto. When in heat it will only update the cool setting.

All manual changes through the ST app work otherwise, so I don’t think this is a communication issue.