Pleg help - setpoint changes

Looking for some help coding the following scenario

Condition:
When set point on thermostat changes, not above or below something but just changes

Action:
Take the set point from that same thermostat and make the set point on another thermostat the same.

Thanks!

M

No idea about pleg

Trivial in Reactor, however

Get a variable from the setpoint on Thermostat A, triggered but change.
Set Thermostat B set point to equal variable.

C

1 Like

A setpoint would only change if you change it, perhaps you mean if there is a change in Temp regardless of the setpoint?
If you are wanting a change from the setpoint either up or down then just use < or > in the condition.
Trigger: Setpoint
CurrentTemp

Condition: (CurrentTemp< setpoint) or (CurrentTemp> setpoint)

Action: What you want it to do.

You might need to change the order or CurrentTemp and setpoint.
Have a read of PLEG Basics if in doubt. ( I just play around with it until I get the desired result)

I did mean setpoint. I have a wall thermostat that i’d like to use to control a virtual thermostat - so setting the wall to 71 should set the virtual to 71 as well. Thanks for the <> advice.

Re the Action, how do you pass the actual setpoint variable from one device to the other? I couldn’t figure this out in either PLEG or Reactor.

Ty

M

In reactor, you need to get the current setpoint and assign that to a variable.
In the Expressions tab add a new variable, call it what you want then hit the cog wheel. That’ll give you a drop down. Grab the device and the attribute.
You then need to toggle the up and down arrows which exports the variable
Then in the activities you can use that as the value to send to the virtual thermostat

Does that help?

(Hopes i"ve not screwed this up) Maybe it should be in another thread…

C

Thanks will try that. I have just about everything written in pleg and I’m not really in the mood of rebuilding everything in reactor nor did I find it very easy to use with multiple ands and ors. I have a few hundred conditions that would need to be rewritten.

Can anybody help me with the same question for pleg?

I dont have a vera running right now, so this is all from memory.

You could use pleg to detect a change in set point, then run a scene with luup that pulls the set point from the physical thermostat and applies it to the virtual.

local thermostat=44
Local virtual=45

local target_temp =luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”,“CurrentSetpoint”, thermostat)

luup.call_action(“urn:upnp-org:serviceId:TemperatureSetpoint1”,
“SetCurrentSetpoint”, {NewCurrentSetpoint = target_temp},
virtual)

This is what i use in a scene:

As a triger i use when setpoint temperature goes above 6 C (or minimim F)
in action i use the following luup code

local lul_temp = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1_Heat”,“CurrentSetpoint”, id of wall thermostat)
luup.call_action(“urn:toggledbits-com:serviceId:AutoVirtualThermostat1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = lul_temp}, id of virtual thermostat)

You don’t need a scene to “pull” a setpoint in PLEG.

Just select it in Device Triggers.

So how do you push that value to another device?

I not sure if we are talking about the same thing now, this was about Setpoints?
I had to look at what I did on the VL which is still humming away doing what it was designed for. :wink:

The reality is that Temp changes are detected by the Temp Sensor in the Thermostat.
The below is in UI5, not all triggers,conditions and actions can be shown, this was a limitation of this version of PLEG.

The temp changes are used in conditions with other triggers, properties & schedules.
Note: cDuctedHeatingOn.

Actions set the Setpoint(s), in my case I have different Setpoints for times of Days or Days.

In short Setpoints are just that…a point that has been set and in the case of Thermostats, it is the Thermostat that maintains the Temp, not the HA System.


The above illustrates how you can get a value from your thermostat in PLEG (really simple as it in the drop down), select what temp you want then use this trigger in your Conditions to do whatever you want to do.

Hope that this answers all the queries?

The question was to monitor a thermostat for manual changes, then clone that set point to a different thermostat.

So both tstats are at 75. Somebody makes tstat1 73. We now need tstat2 go to 73.

My suggestion was to have pleg trigger a scene that copies the set points from tstat1 to tstat2 when tstat1 changed.

and the above show you how to do it…

© 2019 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy