Help with heating please - ON / OFF button


I have a Secure SRT321 thermostat and boiler receiver and in the Imperihome app I wanted a simple ON / OFF button to turn the heating on and off. Off being 10 degrees and On being 23 degrees.

However the available thermostat widgets in Imperihome only allow you to manually control the set point temp up / down etc. See screen shot.

So in Vera I created a virtual switch on the Multiswitch and I setup PLEG to turn on / off the heating when the virtual switch is operated.

This works well and I now have my simple on / off button in the Imperihome app as a result. See screen shot.

My problem is if I manually turn the dial on the Thermostat to change the set point temp or if I press the Plus or Minus buttons on the thermostat device in Vera / Imperihome then my virtual switch is not changed to then reflect the current status of the heating e.g. on or off.

How can I get the virtual switch to show the correct On / Off status when I manually change the thermostats set point temp ? Without it running the PLEG actions to set the temperature.

Thank you

Reading round the forum it seems some people are using the MultiString Variable plug-in.

I have installed the plug-in and setup the following in PLEG to send the current set point value of the Thermostat to the Variable1 of the MultiString plug-in.



Name Device Name Device Variable

Current_Setpoint Thermostat[189] CurrentSetpoint[urn:upnp-org:serviceId:TemperatureSetpoint1]


Name Logic Expression

cCurrent_Setpoint Current_Setpoint


Device Action newVariable1

MultiString SetVariable1 {(Current_Setpoint)}

This works so what ever the current Setpoint value of the Thermostat is? Is then sent to the MultiString plug-in Variable 1

However I am not sure what to do next ?

How can I use this to change the status of the MultiSwitch virtual switch to ON or OFF without PLEG running the 10 or 23 degree actions, when I manually change the dial on the Thermostat device ?


Reading this comment on this post here

[i]"One thing I do is in the same pleg action as setting the thermostat set point I also write the value into a variable container.

If the thermostat set point later changes, the change triggers a check against the variable container.

If it’s different I have my thermostat go to a “manual mode” for 4 hours then it checks what the set point should be set to afterwards and reverts into automatic mode."[/i]

I added a new name for Variable 2 on the MultiString plug-in called “Heating VS” (Virtual Switch).

Then in the original PLEG actions for the Multiswitch virtual switch I am writing either 10 or 23 in to Variable 2 of the MultiString.

So if I turn on the Virtual switch “23” is written to variable 2, if I turn off the virtual switch “10” is written to variable 2.

So now I have a variable that tells me when the heating was turned on or off by using the virtual switch.

So in PLEG I need some additional logic.

If I now turn the thermostat manually down to 10 degrees using the dial, the Current Setpoint value would change to 10. But the Heating VS variable value would still be 23 and the virtual switch would still be turned On.

Need some logic to work that change out and change the virtual switch to off status etc.