[RELEASE] Ultimate Mode Based Thermostat - Control Multiple Thermostats Temperature / Remote Temperature Sensors when Changing Modes

thermostat
modes
temperature
smartapp_hvac
rboyapps

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

EDITED - Okay since there is no ST solution I’ve written my own app here. Thanks for your support.

There are two apps here:

1. Mode Change Thermostat Single Temperature
This app can be used to change the temperature of multiple thermostats when the mode is changed. Select the thermostats you want to control, enter the heating and cooling temperatures and finally select the Modes for which you want the thermostats to use these temperatures.

2. The Ultimate Mode Change Thermostat Temperature
This is the utmost flexible app for configuring thermostats and mode changes.This app can be used to change the temperature of multiple thermostats when the mode is changed.

  • You can configure thermostat temperatures for each mode individually or a group all the modes together
  • You can configure all thermostats to use a common heating/cooling temperature or each thermostat have its own heating/cooling temperatures.
    This app is available on the RBoy Premium Apps server.

If you like the Apps consider supporting our development efforts. Visit our Facebook page to updates on new apps and to get Access to all our Premium Apps Server. http://www.facebook.com/RBoySTApps

The latest version of these apps with udpates are available on the RBoy server at http://smartthings.rboyapps.com. Refer to our Facebook page to get access to the server.

Mode Change Thermostat Single Temperature

/* **DISCLAIMER**
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * Without limitation of the foregoing, Contributors/Regents expressly does not warrant that:
 * 1. the software will meet your requirements or expectations;
 * 2. the software or the software content will be free of bugs, errors, viruses or other defects;
 * 3. any results, output, or data provided through or generated by the software will be accurate, up-to-date, complete or reliable;
 * 4. the software will be compatible with third party software;
 * 5. any errors in the software will be corrected.
 * The user assumes all responsibility for selecting the software and for the results obtained from the use of the software. The user shall bear the entire risk as to the quality and the performance of the software.
 */ 
 
/**
 *  Mode Change Thermostat Single Temperature
 *
 * Copyright RBoy, redistribution of any changes or modified code is not allowed without permission
 * Updated: 2015-5-17
 *
 */
definition(
		name: "Mode Change Thermostat Single Temperature",
		namespace: "rboy",
		author: "RBoy",
		description: "Change the thermostat temperature (single temp for all thermostats) on a mode change",
    	category: "Green Living",
    	iconUrl: "https://s3.amazonaws.com/smartapp-icons/GreenLiving/Cat-GreenLiving.png",
    	iconX2Url: "https://s3.amazonaws.com/smartapp-icons/GreenLiving/Cat-GreenLiving@2x.png",
    	iconX3Url: "https://s3.amazonaws.com/smartapp-icons/GreenLiving/Cat-GreenLiving@3x.png")

preferences {
	section("Choose thermostat (s)") {
		input "thermostats", "capability.thermostat", required: true, multiple: true
	}

    section("Set mode temperatures") {
        input "opHeatSet", "decimal", title: "When Heating", description: "Heating temperature for mode"
        input "opCoolSet", "decimal", title: "When Cooling", description: "Cooling temperature for mode"
    }
}

def installed()
{
	subscribeToEvents()
}

def updated()
{
    unsubscribe()
	subscribeToEvents()
}

def subscribeToEvents() {
    subscribe(location, modeChangeHandler)
}

// Handle mode changes, reinitialize the current temperature and timers after a mode change
def modeChangeHandler(evt) {
    thermostats.setHeatingSetpoint(opHeatSet)
    thermostats.setCoolingSetpoint(opCoolSet)
    log.info "Set $thermostats Heat $opHeatSet°, Cool $opCoolSet° on $evt.value mode"
    sendNotificationEvent("Set $thermostats Heat $opHeatSet°, Cool $opCoolSet° on $evt.value mode")
}

[RELEASE] 5-2 Day Programmable Thermostat Scheduler (Weekday, Weekend) with Remote Temperature Sensor for each Schedule
Automation, two (soon three) thermostats, different temperatures
[RELEASE] 5-2 Day Programmable Thermostat Scheduler (Weekday, Weekend) with Remote Temperature Sensor for each Schedule
[RELEASE] Enhanced Z-Wave Plus Thermostat (CT30/CT50/CT80/CT100/CT101/CT110/ZTS110/ZTS500/GoControl/Honeywell/Universal) Device Handler with Battery, Humidity, Clock Set, Alarm, Swing/Temp, Deadband Configuration and Updated User Interface
Thermostat mode change in Routines
[RELEASE] Unlimited customizable thermostat
Iris radio thermostat ct101
(Bruce) #2

Just give yourself more than one Good Morning Hello Home phrase. In each Hello Home phrase you can setup “Automatically perform “Good Morning!” at …” So if you want Good Morning! to run at Sunrise, you can do that. Then you could have Good Morning Upstairs, and Good Morning Basement, each with its own thermostat, and each running at Sunrise, or whatever time.


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

That’s interesting thanks, I think it’s an overload for a simple function. Perhaps the app should be modified to allow control of multiple devices.

The other alternative I found was to setup a multiple Cosy SmartApp isntances, one of each mode like you mentioned, I ended up with 9 apps just for the thermostat!

Am sure that there would be an easier way to do this as things scale.


#4

A created to action phrase: “Good Morning Upstairs” and “Good Morning Downstairs” to control the upstairs and downstairs thermostats individually. The purpose is that if a motion is detected upstairs of downstairs between 6am-10am (using “Things Start Happening”), the corresponding thermostat is set accordingly, and changes mode to “Home”. I set the that the actions do not happen when mode is “Away”.
It turns out that the action phrase the gets triggered first disables the other one. Ex. if “Good Morning Upstairs” is triggered, the “Good Morning Downstairs” does not work. So every winter morning, I either get the upstairs or downstairs nice and cozy. I have to manually execute the other action phrase to get the other floor cozy.

bravenel, how did you get your’s working?

Has anybody else experience this?

Last, does anybody know of a SmartApp that controls multiple thermostats independently, especially one that can apply to my purpose?


#5

I’m in the same boat as OP and others. I have 3 thermostats.

Has anyone come up with a less awful solution than what’s been discussed? It would be so simple if the mode change config allowed for a unique heat/cool temp per thermostat instead of only allowing one heat/cool temp for all thermostats.

Edit: I had 9 Keep my cozy apps, but during automatic mode changes (time based for example), but just recently (within the past week or so) none of the new temps for the mode would be set. I’d have to force a mode change by hand, and then the thermostats would adjust.


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

I just ended up writing my own thermostat program which I configure for modes. I can control multiple thermostats with this single app.


#7

The app looks good, but it pins the temp per thermostat to times, not modes.


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

Yes right, I actually ended using a combo, during Home and Night this thermostat and when Away set to one temp


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

Okay I’ve written an app for you, you can now control multiple thermostats on a mode change. See my first above for the code and feel free to support the dev effort :smile:


#10

lol that was quick. However, the goal is to be able to set a unique heat/cool temp on a per thermostat basis, per mode basis. Something to simplify this:

Mode Home:
Thermo1 - 60 heat / 70 cool
Thermo2 - 65 heat / 75 cool
Thermo3 - 70 heat / 75 cool

Mode Away:
Thermo1 - 60 heat / 70 cool
Thermo2 - 60 heat / 80 cool
Thermo3 - 60 heat / 75 cool

Mode Night:
Thermo1 - 64 heat / 71 cool
Thermo2 - 62 heat / 85 cool
Thermo3 - 64 heat / 72 cool


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

This was more challenging but I’ve managed to come up with a solution finally.
There are 2 version of the app, the single temp for all thermostats which I’ve posted above and another one where you can set the temp for each thermostat as you’ve indicated. However you cannot set by mode within the app, you will need to install a new instance if you want to set different temperatures for each mode (but you can set different temperatures for each thermostat).

Mode Home:
Mode Away:
Mode XXX:
Mode YYY:
Thermo1 - 60 heat / 70 cool
Thermo2 - 65 heat / 75 cool
Thermo3 - 70 heat / 75 cool
ThermoXXX - XX heat / YY cool

The second app I’m hosting on my premium apps server, if you have purchased access to it please go ahead and download it. If not please see my first post on how to get access to it and all the other apps.


#12

I snagged the app from the premium server, but when switching modes, I get the following error for each of the 3 thermostats.

“Set Lower Level Thermostat Heat null(degree symbol), Cool null(degree symbol) on Night mode.”

The thermostat name changes based on the thermostat.


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

Is this from the Live Logging in the IDE?

Did you enter the temperature for all the thermostats?
Can you add this this line to the subscribeToEvents() function:

log.debug "Selected Modes -> $mode, settings -> $settings"

Then can you post back from the IDE Live Logging what you see from this app. I’m using it here so I’m guessing it some boundary condition.


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

Also try removing and readding the app. It appears it might not have taken the values properly. Technically you can’t enter null because the value is mandatory (required) and it’s a number so it can’t be null unless the app somehow got corrupted while installing (which happens sometimes).


#15

Wont let me upload a screenshot, but here’s a cut and paste after removing/installing the app.

55bd801e-502d-47c0-98ef-7dc950d87fd0 6:26:38 PM: info Set Lower Level Thermostat Heat null°, Cool null° on Night mode
55bd801e-502d-47c0-98ef-7dc950d87fd0 6:26:37 PM: info Set Great Room Thermostat Heat null°, Cool null° on Night mode
55bd801e-502d-47c0-98ef-7dc950d87fd0 6:26:37 PM: info Set Bedrooms Thermostat Heat null°, Cool null° on Night mode
b1b60a2b-7f28-49eb-804a-d8b077618925 6:26:38 PM: trace setCoolingSetpoint(80.0, 30000)
b1b60a2b-7f28-49eb-804a-d8b077618925 6:26:37 PM: trace setHeatingSetpoint(60.0, 30000)
f0eab0c2-0c98-4909-8f32-0c51460576b0 6:26:37 PM: trace setCoolingSetpoint(80.0, 30000)
f0eab0c2-0c98-4909-8f32-0c51460576b0 6:26:37 PM: trace setHeatingSetpoint(60.0, 30000)
8d6f909c-c6bf-4eb7-bb27-990bf10d468e 6:26:37 PM: trace setCoolingSetpoint(71.0, 30000)
8d6f909c-c6bf-4eb7-bb27-990bf10d468e 6:26:37 PM: trace setHeatingSetpoint(68.0, 30000)


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

hmm, try this please. Take the latest code on the server, I’ve added some debug code to it.

Uninstall/delete your smart app from the IDE. Then Create a new app from code and paste the new code.
Then START the LIVE LOGGING before installing the app. Now install the app.
Filter the IDE logging to ONLY the app you just installed.

Please paste those logs or PM them to me directly. thanks


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

Okay I’ve rewritten the app which now allows more control over thermostats and temperatures and mode, it can do exactly what you had mentioned in your original post above. Each mode and each thermostat separately.

Try out the new code (from scratch please).


#18

Thanks, it works perfectly for setting the temp in all thermostats. Though I’m still getting the null temperature messages in the mode activity log.


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

The Ultimate Mode Change Thermostat Temperature:
Version 2.0.0
This is the utmost flexible app for configuring thermostats and mode changes.This app can be used to change the temperature of multiple thermostats when the mode is changed.

  • You can configure thermostat temperatures for each mode individually or a group all the modes together
  • You can configure all thermostats to use a common heating/cooling temperature or each thermostat have its own heating/cooling temperatures.

Also fixes some bugs with modes and thermostat settings.


(Antongiulio La Corte) #20

Which app can I use across the above ones if I want to do the following:

  • main heating system controlled by a thermostat with its own schedules (perfectly working within Smartthings)
  • secondary temperature sensor (also controlled by Smartthings) in a garden room where the central heating system is not present
  • power outlet in the same garden room, also controlled by Smartthings, which is connected to an electric heater
  • I’d like to have the temperature in the garden room always controlled by the same temperature settings of the main thermostat / heating system, basically comparing the two temperatures and controlling the power outlet accordingly (switching on/off the electric heater)