[RELEASE] ReCirc

ReCirc enables you to control your hot water recirculation system with Hubitat modes, schedules, and numerous dynamic triggers (e.g., switches, motion sensors, etc.). Substantial flexibility in controlling recirculator, with simple setup. Examples:

  • turn on when bathroom light turns on, except when Hubitat is in night mode
  • turn off when Hubitat is in night or away mode, unless dishwasher or washing machine is running
  • always turn on in the morning, even if Hubitat is still in night mode (to warm up before wake up)





Install with HPM under the tag "Water Heater" or "Water". Or install manually with the link below.

Install Instructions

Thanks to @ritchierich especially for help in automating my recirc system and consult on this app!d

6 Likes

The app does not yet do anything with water temperature sensors. How exactly are people using these? What does this app need to do to with those sensors?
@GuyMan @mluck

In theory, I can see why someone who uses a temperature sensor on a fixture’s warm water inlet might want to use temp as a trigger on recirc, but I’ve never done it nor have I heard of anyone else doing it. And I guess (and I’m really sttttretching here) if weather were cold, one might want to be more aggro in recirc’ing hot water.

But imho I think you’re right not to prioritize this. Nice job on v1 btw!

1 Like

Fairly simple to do:

  1. Add an input to get access to the sensor device(s)
input("sensorDev","capability.temperatureMeasurement", title:"Temperature Sensor", width: 4, submitOnChange:true, multiple:true)
  1. Add a subscription to capture temperature changes
sensorDev.each{
    subscribe(it, "temperature", "temperatureChange")
 }
  1. Add a method to act on the temperature change event
def temperatureChange (evt){
     if(evt.value.toInteger() < minTemperature) {
         ...
     } else if (evt.value .toInteger() > maxTemperature){
       ....
    }
}

As always thank you for the guidance. I don’t believe he needed coding help more use cases of using a temperature sensor in the app.

@JustinL thr topic of circulation pumps has come up many times over the years in this community. I remember one person who wanted to only run the pump until the desired temp reached the shower. So that could be a use case where you run it until temp X is met. Maybe delay it by X minutes too.

2 Likes

Sorry, I should have been more clear in my question. I meant to ask how might one want to control the recirculation based on the recirc line temp? (as opposed to how to code it)

There's a number of options that I can envision. None of them apply to my system, since my system has internal controls related to the water temp. But I think I've gathered that other systems don't do this.

Option 1 (maybe along the lines of what you suggested?)
Turn the recirculator pump on if the water temp falls below a lower threshold, and off if the water temp reaches an upper threshold.

But option 1 would keep the water heated all the time, which can't be the desired operation. So....

Option 2: when the recirculator is otherwise triggered to be on, then turn the pump on/off as needed to keep the temp between the temp setpoints.

Option 3: use the hot water recirc line temp to decide whether the recirc is on/off?

Might just require waiting for someone who actually uses these temp sensors to explain why they want/need them....

1 Like

The crux of my currrent algorithm is based on 4 inputs

  1. Time Windows per schedule (Binary T/F - Is hot water scheduled or not)
  2. Hot Water Supply Temp
  3. Hot Water Return Temp
  4. Hot Water Flow Sensor (basically a demand sensor that hot water is flowing, indepenant of recirc pump being on/off)

The general psuedo code is roughly:

DeltaT = Hot Water Supply Temp (#2) - Hot Water Return Temp (#3)

If (Hot Water Scheduled (#1) = True) Then
If DeltaT > Turn On Limit (8 Degrees) Then Turn On Recirc Pump
If DeltaT < Turn Off Limit (5 Degrees) Then Turn Off Recirc Pump
If Pump Run Time > Max Pump Run Time Then Turn off Recirc Pump
Else
If Hot Water Flow > 1 Then
If DeltaT > Turn On Limit (8 Degrees Then Turn On Recirc Pump
If DeltaT < Turn Off Limit (5 Degrees) Then Turn Off Recirc Pump
If Pump Run Time > Max Pump Run Time Then Turn off Recirc Pump
End If
End If

If (PumpFlow < 1) for more than 48 hours !Basically if no hot water flow, assume vacation..
If Hot Water Schedules enabled - Then Disable all Hot Water Schedules
Else
if Hot Water Schedules disabled - Then Enable All Hot Water Schedules
End If

I would like to modify the above, and add addition "pump on triggers" based on various lights, fans, motion sensors, but I could incorporate all that logic into some RM virtual switch, with is just an input trigger to your app. - And given all that, I could incorporate wakeup, Washer On, and Dishwasher on logic in RM, to basically just be an "trigger input" to start the pump. - and eliminate all the scheduling logic that I have today.

The core part of the trigger on/off is the DeltaT value between HW supply and return, to know when to turn the pump off, given that the entire loop is up to an even temp. - The key is not to reply on absolute temps, rather just the supply HW temp and return loop temp to indicate that the loop is "cold" from the supply temp - The flow sensor basically indicates that something is demanding hot water, and if the loop is cold (or were in a scheduled period for HW (wakeup)), then run the pump to warm up the loop.

Hope that makes a bit more sense, and let me know if additional questions.
-gfa

Ok so i think you would just need the app to turn on/off the pump based on deltaT when the pump is otherwise triggered to be on (in your case, when the pump is triggered to be on based on a schedule or based on flow). My recirculation system does that automatically, so it sounds like yours does not. That should be an easy addition to the app, as I'm sure you're not alone in how your system works. I think the rest of the app would work well as-is for you, as there are already time schedules and water flow triggers.

To tell you the truth, I have used a temp sensor on the hot water side just before the recyrc pump but it's used to stop the pump when the water reaches a certain temperature, not to trigger the recyrc pump. This way you are not pushing back hot water for nothing and wasting energy. So the system we had was not smart triggered, it was on a timer, every hour during working hours (it was in a commerce), the pump would start up and 10 seconds later start checking the water temp, when it would reach a certain temp it would stop the pump. Those lines (almost 140 ft long were double insulated to keep it warm as long as possible and most of the time, the pump would run for 10-30 seconds depending on the use it was getting except for the first few runs in the morning.

So yes temp option could be a great option but more so for stopping the pump more than starting it. But both options could be nice :slight_smile:

Kinda jealous here. I use this Grundfos. Timer settings every 15 minutes despite water temperature. Would like better control with temperature measurements. I probably could use a temperature sensor on the line and a smart plug on the pump. Seems overkill though.

Love these ideas -- thanks for sharing @nclark!

1 Like

Just released in the last hour an update that will require reconfiguring the app if anyone has installed it already. Adjusted to where you can configure how long of a delay before turning off the physical relay as a momentary switch.

My approach to this with the timer and smart functions of my Grundofos pump disabled. Pump runs for ten minutes and off for 30 if there is motion in the kitchen or master bath. I have had it set this way for a couple of years and quite happy with how livable it is.

1 Like

At first, before I was the maintenance manager there, this thing would run 10 minutes every 30 minutes, After some testing we found out that after about 30 seconds hot water was already available at the tap, a quick calculation had shown us how much money we were actually wasting by doing this, adding the temp sensor and some logic system to it (not HE) payed for itself in to time.

Good thing we had a dedicated hot water return line, some recirc systems use the cold water line as the return line, if you leave the pump on to long, when someone goes to use the cold water, they get a not so nice surprise and if your hot water tank is set to high, you could actually burn someone since they are expecting cold water and might not be careful as you would do when opening hot water.

Wonder if there would be a way to calculate optimal settings in the app, based for example on how long it takes for your system to come up to temp? Do you think it's possible to recommend from that how long the max running time should be or the min period it should be off? I don't know a lot about the calculations invovled here, but you make it sound "easy" and "quick" :slight_smile:

Along these same lines, I wonder if there's a point where it will cost more (power, gas, money) to reheat water that has been allowed to cool than it would be to just maintain water at the desired temp? If so, that might inform settings and time limits in this app...

There are so many variables to take in to account here, it's pretty much on a per basis approach, insulated pipes or not, how much insulation, quality of the insulation, length of piping, even where the piping is run can affect things, Then the actual temps you are working with and willing to be ok with. Some even have automatic mixing valves that will regulate the max temperature at the faucet, I've even seen automatic mixing valves that regulate the hot water side only of the faucet because the hot water lines were well over 60°C (140°F), so they were mixing it down to 49°C (120°F) so to not burn anyone if someone opens up the hot water only.

Not really, it took about a month of sensor readings (we already had the equipment to do it so no extra cost to us), then took another month of readings after re insulating with high performance insulation, about 2 inches of insulation on a 1" pipe on the supply line and 1" insulation on the return line (this part could have been ok with regular pipe insulation just for the sweating). Then we started changing the recyrc pump timings and after that we finally decided to add a small PLC we had laying around.

That could be good, but then again, the person would need to fill out a survey to get the correct info, cost of electricity/gas etc. is the water tank electric or gas or even a heat pump water heater. So many things that could affect things, it would be hard to get a universal way to get a definative answer.

1 Like

FYI found some issues with modes and schedules. Addressing now along with adding water temp sensors.

EDIT: latest update fixes those issues, so modes and schedules should be working well. Also optimized dynamic trigger subscriptions to be less chatty. Will add water temp sensors in the next update.

What sort of differential is typical for your system, as perhaps a starting point for me to try with my system? I have the app coded for this now and ready to test.

Some typical data from the logs for the past few days. My current parameters/limits are:
DeltaT on > 8 F
DeltaT off < 5 F
Max Run = 8 mins
Min Run = 1 min
Required Idle = 10 mins

Given that hopefully the below makes sense...

1 Like

Major update to 0.3.0:

  • added ability to prioritize select schedules over select modes
  • added ability to prioritize select dynamic triggers over select modes and/or select schedules
  • added support for two custom devices as dynamic triggers, where you can specify what value of a selected attribute will turn the recirculator on. Example: when the dishwasher status attribute changes to 'washing'
  • added ability to create exceptions to the maximum duration for which the recirculator turns on in response to dynamic triggers, e.g., so that the recirculator stays on for the full dishwasher cycle
  • adds support for cycling the recirculator on/off based on inline water temperature sensors @GuyMan

Example use cases now possible:
(1) turn the recirculator off when the Hubitat mode changes to Night. But turn the recirculator on at 5:30am even if the mode is still Night

(2) turn the recirculator off when the Hubitat mode changes to Night or Away. But turn the recirculator on/off as needed in response to the dishwasher cycle starting/stopping, even if the mode is Night or Away (usually dishwasher is set to run with a 4 hour delay so that it runs at night). Ignore any other non-prioritized triggers during night or away mode. Also ignore limit on maximum recirculator duration if the dishwasher is running.

As you can see from these examples and the screenshots, there is now significant flexibility to handle many preferences or use cases for recirculator control.

I believe that this release includes all of the features that I envision for release. So any beta testing for bugs/issues would be appreciated as a prelude to release.