First I need a little bit more info. Under what circumstances do you need to do this? Only for cooling and during heating you only activate the heating pin? The reason I ask is there are some checks in place in a couple of places and what needs to be changed where depends on the answer.
First, let me show an activity diagram for how the rules interact.
The flow is from top to bottom. The rounded rectangles are separate rules which you can find in PaperUI under Rules.
When a sensor reading changes, the setpoint changes, or the mode changes the Heating/Cooling Check rule gets kicked off. This Rule determines whether the current temp, setpoints, and mode indicate that the cooling should be ON or OFF. Depending on what it determines it may trigger the Cooling Control rule. This rule does the actual work of turning on/off the heating/cooling pins.
NOTE: I drew this before implementing the two setpoints so some of the little notes and conditions on the lines are not quite right, but it should be obvious what they mean when you look at the code.
So at a minimum you will need to modify the Cooling Control rule to turn on/off both HeatingPin and CoolingPin. Where it gets complicated is that in the “but only if…” clause of that rule and I also think the Heating/Cooling Check
rule there are some checks in place that prevent the heating and cooling pins from being on at the same time. You will need to remove those checks as well.
Luckily everything you need is in just those two rules.
I don’t have easy access to my HestiasPi at the moment but when I do I’ll comeback and add more detail.
I’m back at my desk and can look at the rules. It looks like there is nothing at all that needs to change in Heating/Cooling Check
so all you need to look at is Cooling Control
.
- In the “but only if…” clause there is a condition named “Prevent the Heating and Cooling from being ON at the same time”. Remove that condition.
- In the “then…” clause add a line to
commandIfDifferent
toHeatingPin
where ever you see a command being sent toCoolingPin
. There are only two but they are inside of Timers (the actual heating/cooling is turned ON/OFF 10 seconds after the Fan).
That appears to be all you need to do.
Have a look at How to customize a Rule for a way to backup the default rule before you customize it so you have a nice backup to review in the future.
Let me know if you have any questions or problems.
It occurs to me another approach would be to create another Pin Item, maybe Cooling2Pin. Add an entry in defaults.js to map Cooling2Pin to the same Pin12 as the HeatingPin in the PIN_MAP. Then you can keep the “but only if…” condition in place and all you have to do is add the two commandIfDifferent
lines to command Cooling2Pin.
This might be slightly safer as there might be interactions and implications I’m not thinking of when HeatingPin and CoolingPin are both ON as these two Items represent to OH the actual state of the devices.
A third approach which is a bit hacky would be to modify the Map Pin to GPIO
rule to also command Pin12 when ever CoolingPin is commanded. Logically though, that sort of stuff really belongs in Cooling Control
as that’s the whole reason I separated that out into it’s own rule.