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

climatecontrol
temperature
thermostat
smartapp_hvac
project_secondhome

(www.rboyapps.com - Make your home your butler!) #21

First post in this thread


#22

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.


(www.rboyapps.com - Make your home your butler!) #23

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.


(Kevin Jones) #24

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.


(www.rboyapps.com - Make your home your butler!) #25

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)


(John) #26

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


(John) #27

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


(www.rboyapps.com - Make your home your butler!) #28

Try rebooting your ST hub.


(Isriam) #29

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?


(www.rboyapps.com - Make your home your butler!) #30

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.


(www.rboyapps.com - Make your home your butler!) #31

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.


(Isriam) #32

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.


(Isriam) #33

rboy, i'd like a request for future versions. i'd like a hold button smile


(www.rboyapps.com - Make your home your butler!) #34

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


(Isriam) #35

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.


(www.rboyapps.com - Make your home your butler!) #36

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.


#37

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.


(Andrew Cockburn) #38

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.


(www.rboyapps.com - Make your home your butler!) #39

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


#40

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!