How to link two thermostats ?

Hi Guys,

I’m new to z-wave and my network is working OK so far, just a few Switches, Thermostats and just a Vera light.

I try to link two thermostats (one Danfoss with one StellarZ) together so that I e.g. manually change the temperature on the Danfoss the StellarZ is set to the new target temperature too.

in the Vera Light menu of the StellarZ I can set it to be controlled by the Danfoss, but somehow it does not work.

Does anybody have an idea how to do that, and please excuse my z-wave lingo.

Cheers
alfaraser

I’m assuming when you stated “in the Vera Lite menu of the StellarZ I can set it to be controlled by the Danfoss, but somehow it does not work” that you meant you were going into the StellarZ device in Vera, went to settings > advanced > controlled via and set that to Danfoss? Whatever you do, don’t do that lol. It goes against intuition but that doesn’t mean that you’re having one device controlled by another. Always leave that setting at the default (it should select “ZWave[]”. If you mess with this setting it can do weird things to your devices and make them completely disappear and then you’d have to pair them again. I forget what that setting is actually for but it’s not for what you’re trying to do.

To actually get one t-stat’s manual change to control the other via Vera… to be honest I really can’t think of a way. I don’t think Vera’s built-in scenes are advanced enough to do something like this. Perhaps a PLEG (which is pretty advanced) plugin could help here but off the top of my head I can’t think of a simple way to accomplish what you’re trying to do, if it’s possible at all. I only have a single z-wave tstat so I’ve never had the opportunity to mess with an option like that.

Will you always be setting the same thermostat manually, or do you want either one to control the other?

If nothing else, you could use pleg to schedule the retrieval of the controlling temp and change the other target temp to the same number. Could just check it every so many minutes or hours, whatever you need.

Easily done with PLEG or with Lua.

You can use the attached in PLEG for the two thermostats.

What is PLEG?

Thanks for your example Bulldog. I have 2 Nests and I want to do the same thing. Unfortunately, it’s not so easy with Nests!

It looks like I have variables for cool setpoint, heat setpoint, and mode. So I’m going to have at least 6 inputs. I lreday have those laid out, noe I just have to layoit the logic to tie them together.

Thanks for your example Bulldog. I have 2 Nests and I want to do the same thing. Unfortunately, it’s not so easy with Nests!

It looks like I have variables for cool setpoint, heat setpoint, and mode. So I’m going to have at least 6 inputs. I lreday have those laid out, noe I just have to layoit the logic to tie them together.[/quote]

Hmmm…this may be more difficult than I thought. Nest uses the same variable name for 2 different setpoints. It uses 1 for target cool and 1 for target heat when it is in Auto mode (as opposed to cool, or heat). See the attachment below…

There are two with the same variable name … but they have different service IDs.

Richard, thanks for that info. I was able to continue with that.

I can’t seem to get to work. It looks like the condition is met, but when I change one, it does not update the other.

Device Properties
Name Device Name Device Variable Value Last Change Previous Change
nestDownLow Nest Downstairs CurrentSetpoint 80 2014-03-28 07:26:04.102 0
nestDownHigh Nest Downstairs CurrentSetpoint 80 2014-03-28 07:00:48.678 2014-03-28 07:00:48.649
nestUpHigh Nest Upstairs CurrentSetpoint 81 2014-03-28 07:26:04.144 0
nestUpLow Nest Upstairs CurrentSetpoint 81 2014-03-28 06:59:47.405 2014-03-28 06:59:47.374
nestModeDown Nest Downstairs ModeTarget Off 2014-03-28 13:23:08.244 2014-03-28 13:17:15.218
nestModeUp Nest Upstairs ModeTarget AutoChangeOver 2014-03-28 13:22:54.338 2014-03-28 13:11:57.869

Conditions
nestDownChange No (nestDownLow != nestUpLow AND (nestDownLow;nestUpLow)) OR (nestDownHigh != nestUpHigh AND (nestDownHigh;nestUpHigh)) OR (nestModeDown != nestModeUp AND (nestModeDown;nestModeup)) true 2014-03-28 13:17:02.570 0
nestUpChange No (nestUpLow != nestDownLow AND (nestUpLow;nestDownLow)) OR (nestUpHigh != nestDownHigh AND (nestUpHigh;nestDownHigh)) OR (nestModeUp != nestModeDown AND (nestModeUp;nestModeDown)) true 2014-03-28 13:17:02.578 0

Actions for Condition: nestDownChange
Immediate
Device Action Arguments
Nest Upstairs SetModeTarget NewModeTarget={(nestModeDown)}
Nest Upstairs SetCurrentSetpoint NewCurrentSetpoint={(nestDownHigh)}
Nest Upstairs SetCurrentSetpoint NewCurrentSetpoint={nestDownLow)}

Actions for Condition: nestUpChange
Immediate
Device Action Arguments
Nest Downstairs SetModeTarget NewModeTarget={(nestModeUp)}
Nest Downstairs SetCurrentSetpoint NewCurrentSetpoint={(nestUpHigh)}
Nest Downstairs SetCurrentSetpoint NewCurrentSetpoint={(nestUpLow)}

Any ideas why the code above wouldn’t work? ???

You have your sequence expressions backwards.

When the following is true:
(nestDownLow;nestUpLow)

It means the Upstairs has a newer value than the downstairs unit.

[quote=“RichardTSchaefer, post:12, topic:180301”]You have your sequence expressions backwards.

When the following is true:
(nestDownLow;nestUpLow)

It means the Upstairs has a newer value than the downstairs unit.[/quote]

Geeze… I don’t know how I missed that. Thanks Richard, that did the trick. I now have the temperature setpoints changing the way they should, but the operating mode (heat, cool, auto) is not changing. I’m pretty sure I have the wrong variable (SetModeTarget) in my actions. I’ll report back once I get that figured out.

Okay, so the temperature setpoints work just fine. But, when changing the operating mode, it is intermittent and sometimes causes luup to restart.

Thanks Guys,

I will have a try as soon as I get my head around all the new parameters, variables & phrases you used OK? Is there anything that really explains what you are writing about?

does e.g. setpoint mean the temperature the thermostat is set to or the temperature that currently is ?

how do I find out what functens - despite the common template for the device in vera are actually working ?

what does each function ectually mean,? e.e. what does the cool button do on a thermostat ?

Thanks for your Help

[quote=“alfaraser, post:15, topic:180301”]Thanks Guys,

I will have a try as soon as I get my head around all the new parameters, variables & phrases you used OK? Is there anything that really explains what you are writing about?

does e.g. setpoint mean the temperature the thermostat is set to or the temperature that currently is ?

how do I find out what functens - despite the common template for the device in vera are actually working ?

what does each function ectually mean,? e.e. what does the cool button do on a thermostat ?

Thanks for your Help[/quote]

Setpoint will probably be the target temperature (the desired temperature).

I found what variables were available by using PLEG > Inputs > Device Properties. You can even see what the value is.

Good thread… I see the solution using PLEG… Just wondering what the Lua cod would look like…

I used this until I converted to PLEG; attached to a scene when the thermostat set point was changed.

and another on the other thermostat.

-- get the house temperature in the Master Hallway
local lul_temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1_Cool","CurrentSetpoint", 22) 

--test to see if it was set low  
--in this case less than 87F
  if (tonumber(lul_temp) < 87) then
--Set the other thermostat to match the temperature
  luup.call_action("urn:upnp-org:serviceId:TemperatureSetpoint1_Cool","SetCurrentSetpoint",{NewCurrentSetpoint=tonumber(lul_temp) },4)
end

Thanks for the code… It seems that this will work if you have a “master” thermostat where you always adjust the setting to the “slave” thermostat… Is there a way to “detect” which thermostat had the latest set point change and transfer the setting to the other thermostat?..

To explain what I try to achieve : I have several heating zones but only one cooling zone. I want to control the cooling from any thermostat… If the house is already in cooling mode but I want to change the cool setpoint of the house temperature from any thermostat without changing the mode (cooling, heating, off)… How can I do that?

What I am missing to use your code is a trigger that will detect a setpoint change on any thermostat… And then I could use the code on 2 scenes, one per thermostat… But I don’t see such trigger in vera…

Thanks.

There are some PLEG examples where users have synchronized thermostats.