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

First post in this thread

OK, Iā€™ve been trying to get this to work consistently, but canā€™t. I can get it to work fine for the current temp setting when I initially set it up. In order to get it to set the temp on the next scheduled time I have to reopen the app on my phone and click on the Done button inside of your interface. This then seems to refresh the program and then it updates my thermostat with the correct temp for whatever time period. Iā€™ve tried it based on not using any modes, and with using all modes. Same results either way, I am not using the outside temp settings. Any thoughts or suggestions? Iā€™ve uninstalled the app and recopied the code twice.

1 Like

It seems to be working for me for weeks now. I suspect either the ST platform is running slow (there was degradation of the platform in the past few days) or not firing the timer.

Try this:

  1. Uninstall/delete your app.
  2. Reboot your hub
  3. Create and publish the app for yourself
  4. Start the Live Logging terminal in a new window
  5. Install the app (and you can monitor the debug messages in the live logging window to see whatā€™ happening)
  6. Use a test, since there are 4 daily times for the weekday and 4 for the weekend, check the day today (e.g. Thursday so in the weekday section setup the times 5 minutes apart and set 1 degree different temps. E.g. if the current time is 10:00am then set the 4 times and heat/cool temperatures as 10:05 (65/75), 10:10 (66/76), 10:15 (67,77) and 10:20 (68,78). Click Done
  7. Now watch the live logging window, you should immediately see the current temp being set and the next timer being scheduled for 5 minutes later (ensure the difference is atleast 2 minutes apart since the ST platform has a minimum resolution of 1 minute and will not fire any timers scheduled in less than a minte). Watch the temp on the thermostat also. In 5 minutes you should see the live logging terminal show the timer being fired and next temp being setup and next timer being scheduled. If it isnā€™t then the platform is facing an issue and we try to debug it. Then check your thermostat after the timer was fired to see if the temp was updated. If not then the communication is an issue. Hope you see where Iā€™m going with this to isolate your issue.

Thanks for sharing the code @RBoy . Iā€™ve been having issues with the temp not being set on the weekend. From what I can tell line 249 (in the Saturday case section) needs to be changed from:

else if (timeNow >= (midnight - 1).time && timeNow < timeToday(time11, location.timeZone).time) { // Are we between midnight yesterday and 1st time, schedule today

to:

else if (timeNow >= (midnightToday - 1).time && timeNow < timeToday(time11, location.timeZone).time) { // Are we between midnight yesterday and 1st time, schedule today

as midnight is not a defined variable but midnightToday is.

Making that change fixed the issue for me.

Awesome thanks @KevinJ that was a good catch. Wish the ST IDE was better at catching these types of issues. Iā€™ve fixed it and republished it.

BTW I also realized that you can get all the apps Iā€™ve published from the IDE now with all my updates. When you create a new apps, select the option on the top right to Select code from Sample App, there you can browse the user submitted apps and find this (and other apps)

Ahhhā€¦ thanks for the fix!

I have a new ct100 that I paired and setup this app with a few days ago, but didnā€™t swap out with my old thermostat b/c I wanted to see the schedule work for a few daysā€¦ which it did just fine!

So yesterday (Saturday) I put it up on the wall, and I noticed setpoints not being triggered properly, after it seemed to work fine all week! ughā€¦

I was extremely frustrated until I saw this post this morning, and Iā€™m hoping this takes care of the problem.

Iā€™m hoping this also caused my first Sunday setpoint change to not fire when scheduled at 5:30, but instead at Sunrise (7:10)ā€¦

Thanks,
John

Yeahā€¦ not having a lot of luck with thisā€¦ One day it works fine, the next (another weekday) setting setpoints are late (by many hours) or missed completelyā€¦ Iā€™m not sure where to go with this. Is it Smartthings? Is it the way schedules events are handled? is the system just too flaky to trust it to do this? IDK

Try rebooting your ST hub.

could you post this on github or somewhere we can check the logs for changes? Its hard to know if we have the most up to date code. or maybe version number in comments?

also, two questions:

  1. is there a way to bypass leave/home? i want wake to be all day temp and asleep to be all night temp.
  2. is there a way to put a perm hold on, or hold until i change back to program?

The codes are posted back into the first thread and the code is kept updated. Whenever itā€™s updated the Updated Date is also changed to let users know the last time it was updated. Will look at putting up the code on a website also.

For now Iā€™ve hosted it on the MCEBuddy server at http://files.mcebuddy2x.com under the SmartThings folder for all the apps written by me and my team.

You can always select the modes when it operates, e.g. Iā€™ve selected Home / Night as the modes when the app is active and I have a separate app I use for away mode.
I donā€™t know of any way to permanently put the app on ā€œholdā€, you just need to delete it or change the thermostat to a different one. I would suggest create a ā€œfakeā€ device thermostat in your devices and use that as the thermostat when you want to put the app on hold.

thanks rboy. not trying to make you jump through hoops, just figured you could kinda follow acti0n app style, i think heā€™s using github.io to post his project since these forums are terrible for version tracking.

rboy, iā€™d like a request for future versions. iā€™d like a hold button :slight_smile:

I think you may be confusing the device interface with the app interface. The app has no ongoing status/configurable interface. Once you set the parameters it continues to run in the background until you chnage it.
The device interface (for the thermostat) however may be able to provide a hold button but youā€™ll have to get Smartthings to make that change or write a custom device type for it.

Correct me if Iā€™m missing something here @duncan @chrisb @urman

Actually my problem is if I change the thermostat it seems to automatically reset it to the temp the app maintains instead of waiting until the next phase to change the temp? Maybe Iā€™m wrong but thatā€™s how it seems to act for me.

Itā€™s not this app, you have something other app thatā€™s changing the temperature (like when mode changes or phrases are executed). Open your thermostat in SmartThings app, click on Smartapps and see what other smart apps are controlling the temperature/device.

First, thank you RBoy for sharing this app, it does exactly what I need for the 6 (!) thermostats in my house.

However, I was wondering if anyone else running this app, or other scheduled thermostat apps has been having issues with missing scheduled mode changes?

During the last week or so, several but not all of my thermostats have been missing the scheduled change from night (56F) to morning (63F) leading to chilly mornings. If I open the thermostat settings from the ā€˜thingsā€™ view in the iphone app, then open the 5-2 smart app and change any setting and hit ā€˜OKā€™ it seems to re-sync things and go to the current set point. It is almost as if the app is getting hung up and needs to be killed and restarted. As far as I can tell (and I havenā€™t been very scientific about this) once it stops updating the setpoint, it doesnā€™t come back until I make the change to ā€˜restartā€™ the app. Or maybe it just another smartthings back end problem.

Most likely this. There have been a number of missed timer events over the last few days - my outside lights refused to come on a couple of days running, but are fine when I manually switch them on from my dashboard.

@rando I had similar issues a while back and reported it to support@smartthings.com. These are the things I did to resolve it:

  1. Get Support to update my firmware (at the time it was in BETA but I believe itā€™s been released now with some fixes related to scheduling)
  2. Reboot my hub once post the update
  3. I ALWAYS use non standard timings where possible, e.g. I donā€™t use 11:00pm instead Iā€™ll use 11:03pm. Iā€™ve seen that at the hour/30/15 minute marks the system tends to slow down probably due to many scheduled timers and at these times either the timer eventually times out and never fires or fires very late, going a minute or so off avoids this issue itā€™s been very stable for some since.

I also reported this to support@smartthings.com, and while they were polite and all there was not much they could suggest except reinstalling the app.

I will try modifying my timing to be a an odd number and see if that helps.

Thanks!