Thermostat/HVAC control off an external temperature sensor

( - Make your home your butler!) #1

I'm trying to see how I can adapt the existing 5-2 thermostat code I've written to run off an EXTERNAL temperature sensor.

So my kid sleeps in a room that's pretty far from the thermostat and it's always colder in his room that what the thermostat reports. I want to the thermostat to turn on/off the HVAC based on the temperature sensor (monoprice) in his room.

My issue is that the thermostat can be programmed with a temperature and it basically takes over from there.

Can anyone point me in the direction on how logically this should work? How can I turn on/off the HVAC based on the the temperature taken from a sensor in a different room? One solution I'm thinking would be to set the thermostat to 90 degrees and set to heat when temperature is low and vice versa for cooling. The problem I see here is that it's basically running off the smart things cloud and if the internet goes down or cloud goes down the HVAC gets stuck in on or off mode.

What other ways can I control the HVAC using a remote temp sensor?

@minollo @duncan @tslagle13 @chrisb - just throwing this at your guys for your 2 cents. thanks.

(Sully) #2

@tslagle13 already has an app to change the mode on the thermostat based on temp. The app he wrote can use any temp sensor, internal or external. For my house, that app made more sense than a scheduler app like you're doing. Here's a link to the post where he told me about it:

If nothing else, it should give you an idea about how that kind of coding works.

Edit: Sorry, after a re-read that may not be what you're looking for...

(Aaron) #3

There's an 'action' already in the ST app that sort of does this called Keep Me Cozy II. It seems to work by comparing a remote sensor you chose to what the thermostat is reporting and then makes an offsetting correction to the set point in the thermostat. I think there are better ways to do this, however, that I am looking into now:

Most thermostats have 'calibration' settings that let you adjust the temperature the thermostat senses. You could compare the remote sensor value to the value reported by the thermostat and then make a 'calibration' adjustment. Put another way, make the thermostat 'see' the same temperature the remote sensor sees.

Another approach would be to use a thermostat that has remote sensing capability already. In the one I am looking at, I think it should be possible to make the hub report a temperature to the thermostat in a way the thermostat would interpret as a remote sensor value.

Both the approaches I mentioned require device handlers that do more than the basic, standard things the standard handlers do.

I am well-versed in HVAC but quite new to ST and coding so it might be a while before anything comes from my effort. Maybe someone has already done this. . . I'm still trying to figure out how to find stuff here wink

( - Make your home your butler!) #4

@AaronZON Keep me Cozy only resets the temperature like you said by looking at the difference right? It's more like calibration. Does it keep doing it constantly because the difference may be not be linear. Given the layout of the house the thermostat temp would change 3degrees to a 1degree change in the remote room. So for the remote room to go up 3 degrees the thermostat would have to reset the temp by 9 degrees.

Using remote sensing, the only thermostat I know of natively that can do that is ecobee3 which I'm trying to avoid because of the cost.

@jsulliweb that functionality is there in the 5-2 program I wrote. If I understood what @tslagle13 did was to switch the thermostat mode from heat to cool and vice versa based on an external temperature. But the heat/cool level is still controlled by the thermostat (i.e. local temperature). What I need to do is turn on the Heater until the room reaches a temp and vice versa. So I have a thermostat that controls the HVAC and a external temp sensor that tells me what the room temp needs to be. How do I get to control the HVAC?

(Aaron) #5

Not exactly. From what I can tell, it changes the set point. As far as I know, this is the only way this could work without a model-specific device handler.

The RCS TZ45 I have here has a calibration setting - a manual offset for the internal sensor - not the same as changing the set point. It can also be paired with a z-wave temperature sensor and use its value instead of the internal sensor. Both of these functions are exposed in the z-wave profile but how to get at that is beyond my capabilities.

Your right, regardless of the technique used, there would have to be frequent re-evaluation. I haven’t looked into this yet.

( - Make your home your butler!) #6

right that's what I meant, Cozy sets the heat/cool setpoint right? As you said it would be all about constantly polling and resetting the temperatures until the desired temp is achieved.

Wondering if there's any way to achieve the target temp without the constant polling. Probably unlikely but never hurts to ask the gurus

(Aaron) #7

Yep! And, for the reasons you mentioned earlier in the thread, you’d have to poll fairly regularly. You’d also have to somehow keep track of the unadjusted set-point, I think, if you did poll regularly. Then, I don’t know what happens when someone changes the set-point on the actual thermostat. I could have this all wrong but since I don’t think this is done in a very robust way, I have been afraid to actually connect my stats to the equipment and try this. The stats I got for the ST system are powered, connected to the hub, but not to the HVAC for now.

( - Make your home your butler!) #8

Here's an idea, what I subscribed to the thermostat and temp sensor and everytime the temp changed I so would set a 3 degree difference between the set thermostat temp and the temperature sensor until the temp sensor reported the user requested temperature. This way the thermostat would force the HVAC on/off (auto mode so no messing with heat/cool) until the desired temp is achieved and there would be no run away, a maximum of 3 degrees higher/lower incase of a communciation/cloud failure. What's the downside of this approach?

(Aaron) #9

Yea, so basically moving the thermostat logic into ST. Might work. You will be missing any s/w strategy the thermostat manufacturer has built into the firmware to manage overshoot and instability. Before I tried that, however, I would at least try Keep Me Cozy II. My guess is that it would be at least as good as the strategy you proposed. If you do try it, let me know!

(Aaron) #10

@RBoy - did you do anything with this?

( - Make your home your butler!) #11

smile not yet, havne't bought the external temp unit.

( - Make your home your butler!) #12

but it sounds like Keep me cozy II would do the same thing as what I proposed above

(Aaron) #13

No. I think you are proposing to force the equipment on and off based on the remote temperature compared to the set-point. If you do this, you will have to decide how to manage the deadband (the difference between the turn-on point and the turn-off point - they can’t be the same).

I think Cozy looks at the remote sensor, compares it to the internal sensor in the thermostat, then offsets the thermostat set-point accordingly. The thermostat still manages deadband along with any kind of anticipation and/or anti-short-cycling logic coded into the firmware.

( - Make your home your butler!) #14

Yep that was my logic too. There's no way to force the A/C on or Heater on as far as I know. Once can only force the FAN ON and Set the mode to Cool or Heat. My logic was to offset the temp by 3 degrees until the desired external temp was achieved which is what Keep me Cozy II also appears to do.

(Aaron) #15

OK. Yes, your right. I looked at the code for Cozy II and it pretty much does as you propose (some differences in the details but fundamentally the same). Cozy II subscribes to the sensor temperature, the thermostat temperature (sensor in the t-stat), and the thermostat mode. So, anytime these change, Cozy II evaluates and adjusts the set-point if necessary. I think this will work but I don't think the control is going to be very tight. Also, if you walk up to the actual thermostat, the set-point displayed is going to be irrelevant and could change often.

I think there are better ways to do this by tapping into the remote sensor and/or internal sensor calibration functions of the thermostat, but, until there are device handlers and SmartApps to do this, I think using Cozy II should be fine.

(Austin) #16

You could also get something like this, EV100 Z-Wave Vent/Register. This way you could just shut off the vent when his room reaches the desired temp rather that trying to manage turning off and on your HVAC.

( - Make your home your butler!) #17

That's assuming you have a controllable vents, most HVAC's dont
But a good idea never the less