Reversing Valve Control

I didn’t think through how i was going to control the O/B wire. I saw your earlier reply to jrbender on this matter but I’m not super clear on where to concentrate my effort.

Your note linked above directs to edit the rules file. I think you’re referring to default.rules? Can you provide an example of how this should look? I stuck my orange wire in the water heater terminal. Otherwise, I matched up the terminal labeling with the Nest.

If the trick to turn on cooling is to activate both heating and cooling (and for heating you need to activate only the heating pin) then parse the default.rules (in /etc/openhab2/rules) and change any line that turns cooling ON to also turn heating ON and any line that turns cooling OFF to also turn heating OFF.
So one example (note the example below is in different location):


Change from this:

rule "CoolingPin changed"
when
    Item CoolingPin changed
then
    switch(CoolingPin.state) {
      case ON: {
        Pin23.sendCommand(ON)
        //CoolingPinTopic.sendCommand(ON)
        logInfo("Default","CoolingPin set to ON.")
      }
      case OFF: {
        Pin23.sendCommand(OFF)
        //CoolingPinTopic.sendCommand(OFF)
        logInfo("Default","CoolingPin set to OFF.")
      }
    }
end

To this:

rule "CoolingPin changed"
when
    Item CoolingPin changed
then
    switch(CoolingPin.state) {
      case ON: {
        Pin23.sendCommand(ON)
        Pin16.sendCommand(ON)
        //CoolingPinTopic.sendCommand(ON)
        logInfo("Default","CoolingPin set to ON.")
      }
      case OFF: {
        Pin23.sendCommand(OFF)
        Pin16.sendCommand(OFF)
        //CoolingPinTopic.sendCommand(OFF)
        logInfo("Default","CoolingPin set to OFF.")
      }
    }
end

This is the main logic you need to follow.
There is a big BUT though… Next release has a major rewrite of the way rules work and your edits will not work. As it is a great optimisation that is coming up I would suggest to wait and get the update and then follow this great guide by Rich to apply similar logic there from the convenience of your browser without editing files like above. Till then you can experiment with my above suggestion and see if the logic works for your system.

Thanks bro, you saved my weekend. I was so confused because I thought i was going to have to activate the water heater pin some way to send charge through to orange wire. Loving the design.

1 Like

The change won’t be quite so easy with the changes coming up because I have a lot more checking in place to prevent heating and cooling from activating at the same time. But when the time comes let me know and I’ll tell you all the places you need to make the changes. It will be the same overall approach, you’ll just have to disable the checks that prevent heating and cooling from being on at the same time in addition to adjusting the pins.

Wild guess but could a diode or something (between cooling and heating pin) work on an strictly electrical level so you dont touch the files etc?
Alternatively an appropriate additional relay could help in sending the signal to both contacts when needed.

Oh you mean like just a jumper?

Just a piece of wire won’t do as it will always be like activating both, hence cooling when you only want heating. Ask an electrician though

I think I’m understanding how this works, I just connected the orange wire to the 3rd terminal from the left and set pin 32 to high. What i found is that when the orange wire is NOT energized the reversing valve’s default state is cooling.

Hi, I’m in the USA and also have a heat pump system where 5 wires are available inside. I found the manual for the heat pump and it also has a reversing pump. Since I live in a warm climate we didn’t connect the emergency heat wire.

The US version of HestiaPi at crowd supply looks like it has 4 relays, I was wondering if it’d be reasonable to adapt the W2 relay to control the reversing pump.

The reversing valve control either FAILS cool or FAILS hot. For rheem and ruud, it FAILS cool, so you don’t need to energize the reversing pump to get cool air. For hot air though, you would need to energize Relay1. In openhab, that would evolve revising default.rules to energize it on heating state, i think it refers to it as “Pin12”. @rlkoshak can help you with that part.

I mostly know the software part of things, not the electrical stuff.

For the US mode the pins are:

Pin Purpose
Pin12 Heating
Pin16 Second Stage Heating
Pin23 Cooling
Pin18 Fan

For EU Mode the Pins are:

Pin Purpose
Pin23 Heating
Pin16 Second Stage Heating
Pin12 Hot Water
Pin18 Humidity

Unfortunately what I don’t know is how those pins map to the physical relays. But you ought to be able to figure that out through the wiring diagrams on the wiki or through trial and error.

Once you’ve identified which Pin controls which relay, search default.rules for those sections that turn on/off the heat. You will want to modify that code to also sendCommand(ON/OFF) to the additional relay. If you are not using 2nd stage heating, you can remove that code and does that. There will be three or so places where the same change needs to be made. In the v1.2 code, there is only one place and you can make the edits through the browser. But that will require an upgrade and willingness to test beta software.

1 Like

I don’t mean to hijack the thread, but I’m curious about the 1.2 beta, and searching the forum brought me to this question.

Is there a document (or forum post, or github comment, etc) that could get me started on the upgrade?

I think @HestiaPi is working on a new SD card image. In the mean time you can follow the steps at: Interoperability with other OpenHAB instance. I think you will also need to update the LCD UI. Follow the instructions at https://github.com/HestiaPi/hestia-touch-one-ui for that.

Awesome, thank you very much!

We tried to upgrade to Buster together with the 1.2 version of the code but we have had many problems with the LCD drivers and running the browser in kiosk mode without a desktop to save resources but we have had many problems. At some point it got postponed and we need to revaluate and decide what will go on the next release. Can’t give a date at the moment though

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.