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

Try giving your hub a reboot also

Tried that as well.

So far it is all working again, but we’ll see how long it lasts.

A minor bug fix for fan mode when using and External temperature sensor

So I am still having problems with my programmable thermostats. I have figured out that after 1-2 weeks, the program set points stop being updated and never come back. It is not systemic, as I have 6 thermostats, and they seem to die one at a time. In order to restart them I just need to change any setting in the app - which immediately updates the thermostat to the correct setting and then it will work again for a week or so. It seems that it is an issue with the app or scheduled events becoming ‘hung up’. Any one else having this problem? Is there anyway to put a watchdog in the code, that reinitializes the scheduled events every x days?

Definitely wierd, one thermostat has been running for close to 2 months now without any changes. I’m curious you say it runs for 2 weeks and then the timers stop. Do all timers stop firing or just some times?

What you’re saying while it makes sense, is EXACTLY what the app is doing. Everytime the it changes the temperature (at the set time) it “reinitializes” the entire app/timers. It’s exactly what’s done when you change the settings and click done. it calls initialize().

So what I’m trying to see what’s different.

Thanks for the help RBoy!

It seems that all the timers stop - ie the thermostat just stays at a single set point once it has ‘frozen’. There have been notices that ST has been having issues witch scheduled events. If it schedules the next change during the current scheduled event, won’t everything stop running if a scheduled event is missed?

One thought - my thermostats are all CT30’s running on battery power as I don’t have a C wire. Sometimes these are quite slow to respond to update or command requests - could a slow response from the thermostat be causing issues with the code?

Most definitely if one timer is missed/times out (which I’ve seen happen some time ago and I thought ST had fixed it) then the entire chain stops, so when you change settings it bootstraps it. So adding another timer to bootstrap won’t help, the root of the issue needs to be found as to why a timer would not fire.
And no it doesn’t matter if the thermostat doesn’t respond or is even offline the app runs independent of the device.
Maybe start a separate thread on why timers won’t fire and some users can throw in their thoughts. here’s one thread where I had reported that timers don’t fire.

I have two Ct-100 Thermostats running this App. I have been complaining to ST support about sporadic, somewhat random skipped events. Most often, it is either the early morning or the late night changes that don’t fire, which means I either wake up to a cold house, or it gets heat all night. I changed the times to “odd” clock settings to avoid the potential “peak” traffic. I reboot my hub at least once per week. After support suggested that I uninstall and re-install the App I decided to uninstall and update one of the thermostats (I was running a version of the App from December), and leave the second one on the old version. Strangely, since I did that about two weeks ago, the thermostat on the old version has performed perfectly, while the other on the new version has had numerous missed temperature changes, mostly on weekends. One thing I noticed is that there seems to be no activity (such as ambient room temperature) being reported for a long period prior to the missed events. As @rando mentioned, all I have to do to get it working again is to enter the App and hit “done”. I don’t even make any changes. I am convinced that this is a system issue (communication, polling) and not a problem with the App.

Very frustrating
 last thing I want is to constantly worry about something as basic as a thermostat setting
 Progress? Not at this point


@Ben, @bflorian, @duncan. any thoughts on why a scheduled timer would not execute ? Is there a fail safe timeout on the system. We know that timers sometimes run late for various reasons but can a scheduled timer timeout if it doesn’t execute within a specified duration? I’ve seen in tests that some timers just don’t execute (see my thread above) but can’t seem to find a reason and consequently so a workaround.

Try this. The next time it doesn’t execute - try to change the mode. Say from home to night or vice versa. The app is designed to “kick start” and re initialize itself when a mode change is detected (pretty much like opening the settings and hitting done). If that also doesn’t get it working then I think the issue may be related to the mode changes. Can you verify the app is set to run in all modes in the settings?

I did not have any modes selected within the App
 I actually only use “Morning”, “Evening”, and “Night” now that I have this App to control my temperature settings at specific times. Nevertheless, I have now selected all the available modes. I currently change to “Morning” at sunrise, “Evening” at sunset, and "Night at 10:55pm. I will try your suggestion the next time the issue presents
 Thanks

I woke up to a cold living room this morning, and tried your suggestion to change the mode - it worked! The ‘stuck’ thermostat went back to the correct programmed temperature.

In general I don’t really use modes, but it sounds like I should set them up to change each day to keep my thermostats working. Is that correct?

Thanks for the help with this!

Well what that tells me is that one of your timers on your thermostat is not being fired by the platform. If you can share your settings (time AND temp) I’ll try to replicate here to see if it’s reproducible or a bug in the platform.

The workaround for now would be to have the system change modes which causes the thermostat to reinitialize itself and reset the timers.

Hi @RBoy ,

First off, thank you very much for your work on this App, best I have seen out there. I am brand new to this forum, and am not a programmer. However I am pretty competent and have figured my way around all the complexities I have seen so far. Until this new thermostat
I am unable to implement what I want, and was wondering if you might have a solution and/or be able to help. I have a Honeywell TH8320ZW, which I am very comfortable programming traditionally on the screen.

What I need may actually be simpler than what you have created, but can be solved with an add on or slight variation. I simply want to use my external Everspring thermometer as the as the temperature sensor for the for the Honeywell thermostat. Thats it. Don’t care for the sensor on Honeywell thermostat at all, as its in a bad location. I want to make it as if it doesnt exist.

Here is the sample issue, as I am experiencing it: In heat mode, your app allows my Everspring thermometer to set the heating temperature point. That works. The two issues are:

  1. The thermostat will not actually start heating if the temperature sensor on the Honeywell device is greater than the setpoint sent by the Everspring device.

  2. There is no ability for the the thermostat to be told to stop heating, until the temperature as measured by the Honeywell is equal or lower than the setpoint. So the heating up of the Everspring sensor has no say.

What I envision to fix this is the following (in heat mode):

  1. If the temperature of my Everspring sensor is below the “heat temp” for the period we are in, make the setpoint 99 degrees, or something very high.
  2. Once the Everspring has reached the “heat temp” that has been set, change the setpoint to 50 degrees, or something very low.

Does that make sense? I would be very grateful for any help on this. I really like the existing app, just essentially am looking for a custom add on I suppose.

Please let me know your thoughts.

Thank you, Aaron

yes it does you’re basically asking for a programmable thermostat using an external temperature sensor. I’ve been dabbling with that for a while. There is an app called Cozy II in the ST app store which does that but only with one set point. Have you tried using that? Let me know if that’s the concept you’re looking for then I can look into it from there.

Hi Rboy, thanks for the reply. Yeah, i tried that app, didnt have nearly enough functionality. I was pretty shocked to not find anything available to meet my needs. After looking at the code for that, the code for the 5-2 theremostat (when am i awake, when am i asleep, when am i away, is it the weekend etc), and others I have actually built a solution thats working really well. Includes humidity sensor as well for same room. Would add on more bells/whistles but not really needed, at this time
 Is this kind of code of interest to you? I could post it for sharing i suppose, dont see why not, nothing too sexy! Aaron

Yes sure absolutely. If you want I can try to reverse integrate them

Added support to control multiple thermostats simultaneously

@jpuser and others (like myself) who are facing issues with timer not being fired, I checked in with ST Support today. I’ve been getting a few missed timers myself (events not firing, mostly timers) of late.

I was pleasantly surprised when ST told me that they are aware of the issue and it’s been there for a while. Apparently for some reason the timers in the cloud die or app the die (possibly as a result of timers dying). They are aware but don’t know why it’s happening and the dev’s are looking in it.

For now the only solution seems to be to restart the app manually. Kinda sucks that the platform is unstable, pretty basic stability issues IMHO. Ofcourse the implications are far reaching (think security apps etc) but I know ST is aware of it. I just hope they find out why and fix it soon.

1 Like

@RBoy great smartapp, thanks! My Honeywell thermostats internal program works about 95% of the time. I called Honeywell support and they suggested I use ST to control the programming aspect. This was great to find and easy to setup.

Question: I’m trying to expand upon this script a little bit to hook it into my server to POST some JSON formatted items. The $thermostat variable comes across as [Thermostat Floor 2] with the square brackets. Do you know why that is? If I try to do $thermostat.name or .displayName or .label it all has the square brackets. Looking to get rid of them if possible

Thanks