[RELEASE] Thermostat Manager - An alternative to Thermostat Mode Director

thermostat
climatecontrol
temperature
smartapp_hvac

#61

richardjroy, The hold-down timer you requested has been implemented and uploaded to the repository. The current build number is: 2018112307. This took some significant changes to accomplish. I tested everything as best I could. Everyone, please let me know if you run into any problems.

I’ll be continuing to work on other updates. Right now I’m looking at adding in support for multiple thermostats with one instance of the program as well as a system that enumerates the home modes so that Thermostat Manager can be easier to work with in that area. These are both very big changes that will take some time. Happy Thanksgiving!


#62

Just installed Thermostat manager and it has resolved a scenario i have been looking for a solution on for a while (Turn thermostat off when there is a window open and then turn back on when the window closes). Much Appreciated!!!

I am still a bit confused as to how I would use the Cooling and Heating threshold. Can anyone explain the use case to me.


#63

Hi, vadao, I’m glad Thermostat Manager is working well for you. If you want to use Thermostat Manager to control your thermostat’s modes such as heating and cooling mode, then you need to set thresholds. So for example, if you set the cooling threshold to 80, and the temperature in your house rises to 81, then Thermostat Manager will set cooling mode. Of course, if you don’t want to use Thermostat Manager for this purpose then you don’t need to.


(Laurentiu S Pintilie) #64

Thanks for the smartapp, it is very usefull!
I have though 2 issues:

  1. Can be implemented an option to open the valve after a number of minutes after a contact closes?
    Practical utility is when window gets opened/closed several times in a row.
  2. Probably not related to this smartapp: there is a posibility to set DH/smartapp to override manual settings when an event occurs?
    In practice, if I adjust or switch on/off valve from local control, next trigger (like open contact sensor) doesnt take control of valve unless i do this from smartapp.

#65

Yes, this feature was actually implemented by request. In settings, under the, “Energy Saver” page, the setting is labeled, “Minimum Pause Time (minutes)”. The number specified here is the minimal number of minutes that the thermostat stays off when a contact has remained open for too long.

I’m not sure I understand this question. You can override manual settings to a degree. Under settings, the option marked, “Allow Manual Thermostat Off to Override Thermostat Manager” allows a user to override Thermostat Manager for off mode only. If you want Thermostat Manager to override a user who sets the thermostat to off mode, make sure this setting is OFF. Other than that, manual settings take precedence until an event takes place that triggers a change, such as the temperature rising too high or setting the Smart Home Monitor security mode (in the case that you are using Smart Home Monitor Based SetPoint Enforcement.

But I would guess that I am not understanding your question. Please elaborate.


(Laurentiu S Pintilie) #66

I’ve seen that, but I am talking abt opening again valve when window is closed. Let’s say I keep window open for some time and I want trv to open and start heating only after few minutes. There are two reasons: 1. some windows are swinged and hinged, and by doing this contact closes and open briefly, thus triggering valve closing, and 2. my metering is the difference between temp of radiator elements and surrounding radiant temp, thus it goes sky high after opening a window, with cold air and valve opened.
I have seen this option to delay a switch/action in generic smart lightning apps (i used for a while, it works with trv), but it works only either for opening or closing, not both.

I know this setting you mention, is set to OFF. I tested though with setting to ON, no change. Real situation tested several times: I close valve on local, manually (temp less than 8). A while later related window is open for few minutes. When contact/window closes the valve doesnt open; no event is triggered. Same scenario, but using for ex smartlighting app to control trv, valve opens after contact/window closes.


#67

Let me be sure I understand, you want to automatically re-enable the thermostat even if a contact (door/window) remains open? If this is what you want, I don’t understand the reasoning. You mention something about hinged windows closing and that this might re- enable the system – sure, but that is what the hold down timer (Minimum Pause Time) is for. Please elaborate.

This sounds different than what you mention above … This one sounds like you want a delay before the thermostat is turned off when a window or door is opened? Really, there already is; there is a countdown timer that runs as soon as a contact is opened. The thermostat is turned off when the timer reaches zero. This timer can be set at any number of minutes that you like. This setting is called, “Open Contact Time (minutes)” and is under Energy Saver Settings.

For clarification, when you say that the, “valve” is open, I assume that you mean that the thermostat is turned on? If the thermostat was manually turned off, it won’t be turned back on by the Energy Saver system because it wasn’t turned off by the Energy Saver system. The thermostat will be turned on once it reports that the temperature has risen above or fallen below your set thresholds, however.

Please help me if I misunderstand anything.


(Laurentiu S Pintilie) #68

Simple put, I wanted to have the same delay at starting trv after window is closed (as it is for window opening).

Yes, i mean trv is not turned back on by Energy Saver if it was turned off manually. Worse, it stays like this forever even if room temp drops well below setpoint. So Thermostat Manager app doesnt take back trv control after manual adjustment. Other smartapps like SmartLightning do take back trv control after manual adjustment.


#69

I see. I’ll consider this but it seems a bit redundant. I’m wary of adding in too many obscure features like this for fear it will clutter up the interface and confuse users. What does everyone else think?

This was intended. The system is designed to set the thermostat to, “off” mode until the contact that you specified has been closed. As soon as you close the contact, the system will come back on. If you don’t like how this works, I would suggest disabling it. Here is the problem: if we allow the thermostat to come back on while the contact is open, first, what is the purpose of turning it off to begin with, but also, under what conditions do you want it to come back on? After the temperature inside changes? Given that you have a door or window open this should be a matter of minutes. Such a feature would be highly unpredictable and I suspect would not operate in a way that most people would like. Most people who use this feature want the thermostat to remain in, “off” mode while the door/window is open.


(Laurentiu S Pintilie) #70

Maybe is just me, but i think is more practical to have a delay after window is closed because it prevents trv to open valve while air in the room is stil cold (energy saving reasons: air is heated initialy by radiant heat from room objects and later by the heating elements). Like i explained above, in many cases billing is dependant of the temperature difference between heating elements and room air.

Because most of the time one doesnt know how long a window will be kept open, i think this option is more usefull than Minimum Pause Time.

Looks like I didnt make myself understood, so i revert to a practical situation:

-trv is temporarely switched off manually for any reason

-after a while window in the room is opened.

-window is closed

-trv is NOT switched on again by Thermostat Manager, but stays off until switched on again manually on local or smartthings app. (Yes, setting in Thermostat Manager to bypass local control is ON)

I will revert with some logs to show this.

P.S. Again, thank you for the app you wrote, but it is not my intention to ask you to change it for me; i was merelly looking if there is somewere this option to delay both closing and openning of trv valve; but i cannot ask someone to write this code for me for free.


#71

The purpose of the setting, “Allow Manual Thermostat Off to Override Thermostat Manager”, is that if the slider is enabled (allow manual override), that means that you don’t want Thermostat Manager to override the fact that you’ve manually turned off your thermostat. This functionality was added by request, for people who want to be able to manually turn off their thermostats without TM turning them back on again.

In your scenario, “Allow Manual Thermostat Off to Override Thermostat Manager” is enabled. So when you turn the thermostat off, it will stay off. Turning this slider on tells TM that you don’t want TM to automatically re-enable the thermostat if you have manually turned it off. When you open the window, no action is taken, because the thermostat is already in off mode. When you close the window, no action is taken because the thermostat was never paused in the first place. You manually turned it off. Changing this functionality would change or negate the purpose of the, “Allow Manual Thermostat Off to Override Thermostat Manager” setting. If you want TM to be fully automated, leave this setting off.

If you disable this setting, TM may behave closer to how you want, but the Energy Saver system was not designed to activate the thermostat in the case that it is off. It is designed to turn the thermostat off when a door or window is left open for too long so that you aren’t wasting money heating/cooling the great outdoors. Thermostat changes are based on reported temperature; so as soon as the temperature changes, the mode will be changed if necessary and according to your settings. It is an interesting idea to add this check to Energy Saver functionality, but my initial thought is that this could result in a lot of wasted CPU cycles and could even cause problems in a high traffic situation (doors constantly opening and closing).

You’re welcome! And it is no problem. I wrote this app for myself and I use it in my home. Publishing it and responding to feature requests and bug reports helps me to perfect the system. I felt that, “Thermostat Mode Director” was sorely lacking and needed replacement. Also, I am a software engineer by trade so doing things like this helps me to keep my skills sharp. I’m always happy to look into any feature requests or bug reports anyone may have. And the code is open source, so if you disagree with my opinion on something, you are welcome to fork my code and start your own branch. I am not offended when people do this. As they say, “Imitation is the sincerest form of flattery.”


(Laurentiu S Pintilie) #72

You still dont get it, the setting doesnt work, even "Allow Manual Thermostat Off to Override Thermostat Manager” is OFF, Thermostat Manager doesnt start again trv after being shut manually. This setting doesnt do nothing, either ON or OFF, app behave the same.
Settings:


Those are logs for normal function, when all is controlled by automation

Logs

Clear

06034ce4-2cf0-4499-aabc-16baa1c44056 18:44:20: debugThermostat_Manager.verifyAndEnforce(): Thermostat has successfully entered heat mode. (1/3)

06034ce4-2cf0-4499-aabc-16baa1c44056 18:43:17: infoThermostat Manager - All contacts have been closed. Setting heat mode.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:43:14: debugThermostat_Manager.esConflictResolver(): esConflictResolver() will be run again in 1 seconds.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:16: debugThermostat_Manager.verifyAndEnforce(): Thermostat has successfully entered off mode. (1/3)

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Thermostat Manager standing by.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Indoor Temperature: 25.89

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Cooling Setpoint: 22.0 | Heating Setpoint: 28.0

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Mode: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Fan Mode: null

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Hello Home Mode: Home

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Smart Home Monitor Status: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): Thermostat Manager is currently paused.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.tempHandler(): At least one contact is open: false

06034ce4-2cf0-4499-aabc-16baa1c44056 18:42:04: debugThermostat_Manager.esConflictResolver(): esConflictResolver() will be run again in 70 seconds.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:41:36: debugThermostat_Manager.esConflictResolver(): esConflictResolver() will be run again in 98 seconds.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:41:36: debugThermostat_Manager.esConflictResolver(): All contacts have been closed. Discontinuing any existing thermostat pause countdown.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:41:36: debugThermostat_Manager.contactClosedHandler(): A contact has been closed.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:41:15: infoThermostat Manager is turning the thermostat off temporarily due to an open contact.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:40:12: debugThermostat_Manager.contactOpenHandler(): A contact has been opened. Initiating countdown to thermostat pause.


(Laurentiu S Pintilie) #73

This is the moment when i put off manually the thermostat

6cb80e0f-a05b-4554-8e0a-3dcf20b65db0 18:48:16: tracePOLL [SensorMultilevelGet(), ThermostatSetpointGet(setpointType: 1, reserved01: 0), SwitchMultilevelGet()]

6cb80e0f-a05b-4554-8e0a-3dcf20b65db0 18:48:16: tracerefresh

6cb80e0f-a05b-4554-8e0a-3dcf20b65db0 18:47:07: infoRepRecived ThermostatModeReport(reserved01: 0, mode: 0), off, idle

6cb80e0f-a05b-4554-8e0a-3dcf20b65db0 18:47:07: debugraw secEncap SecurityMessageEncapsulation(secondFrame: false, commandIdentifier: 3, commandClassIdentifier: 64, commandByte: [0, 0], sequenceCounter: 0, sequenced: false, reserved13: 0)


(Laurentiu S Pintilie) #74

This is the log from Thermostat Manager when trv is off manually and a contact was opened

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Thermostat Manager standing by.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Indoor Temperature: 25.43

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Cooling Setpoint: 22.0 | Heating Setpoint: 20.0

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Mode: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Fan Mode: null

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Hello Home Mode: Home

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): Smart Home Monitor Status: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:54:30: debugThermostat_Manager.tempHandler(): At least one contact is open: false

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Thermostat Manager standing by.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Indoor Temperature: 25.52

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Cooling Setpoint: 22.0 | Heating Setpoint: 28.0

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Mode: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Fan Mode: null

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Hello Home Mode: Home

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): Smart Home Monitor Status: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:42: debugThermostat_Manager.tempHandler(): At least one contact is open: false

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:15: debugThermostat_Manager.contactClosedHandler(): A contact has been closed.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:52:15: debugThermostat_Manager.contactClosedHandler(): A contact has been closed.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:29: debugThermostat_Manager.contactOpenHandler(): A contact has been opened.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Thermostat Manager standing by.

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Indoor Temperature: 25.79

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Cooling Setpoint: 22.0 | Heating Setpoint: 28.0

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Mode: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Fan Mode: null

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Hello Home Mode: Home

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): Smart Home Monitor Status: off

06034ce4-2cf0-4499-aabc-16baa1c44056 18:48:18: debugThermostat_Manager.tempHandler(): At least one contact is open: false


#76

Some things you may not understand are; Energy Saver doesn’t have the authority to activate new modes. It can only re-activate the mode it was previously in before the thermostat entered a paused state. Also, the way that the TM thresholds work is that they trigger modes when the temperature exceeds temperature thresholds (these are the Heating/Cooling Thresholds on the main page of the settings). To be certain, you will need to tell me what your temperature thresholds were during this test, but I’m sure that your thermostat temperature (25C) will fall within these temperature threshold boundaries.

Had your temperature risen above your cooling threshold or fallen below your heating threshold, THEN TM will kick in and activate a new mode. TM does not enforce modes when it is unnecessary to do so. My prerogative has always been to give the user deference when it comes to manual overrides. If the thermostat is within thresholds and the user changes a setting, TM will not intervene. If you want it to do so, then I would suggest tightening your temperature thresholds, but TM is not designed to override manual settings and enforce modes until the user specified temperature thresholds have been reached.


(Den) #77

Hi Jordon, i have been very impressed by all the work you have put into making this app work and have been trying it out for a few days.
The main reason I got this app was for it automatically disabling the thermostat when one of the windows/doors are open. And that feature works great. But the issue I run into is when my wife will open a window upstairs, forgets about it when she goes down stairs, feels that its cold, walks up to the thermostat and turns the heat back on. ( so the TM did its thing, it turned off the thermostat due to an open contact ) but then thermostat is manually turned back on.
I looked in the TM and couldn’t find an option to monitor the thermostat state and either override it or act upon the change in any way. If I missed it somewhere, please let me know.
I think it would be great to have something built in to monitor the state of the thermostat and have ability to override it, or push a notification.
Basically something like:
If contact is open and thermostat setting changes from the Pause/off state to heat/cool, wait 5 minutes, if contact does not close, turn thermostat off again.
(make timer setting adjustable)
I don’t know how hard it would be to add that to the code, but I thought I would throw an idea out there.
Anyway, thanks for this awesome app.
I love it and it helps me save on the energy bill.


#78

An interesting problem. I’ve had 1 or two other requests for something that solves similar problems. The wife problem is the reason for my, “Maintain Auto Fan Mode” setting. My wife likes to set the fan in, “on” mode and then forgets about it :slight_smile:

I’ll see what I can do. Am a somewhat busy at the moment so it may take some time.

R/