Status of Relay (Pool Pump)

I am struggling to figure out how to accomplish a specific task. I have hubitat and I am using zwave relays to control the speed of my pool pump. I am trying to find a way to show the status/speed of the pump. For example, if relay #1 is on, the speed is 3100 rpm, if relay #1 and #2 are on, the speed is 2800 rpms. I only use a handful of speeds, so I’m hoping the configuration isn’t overcomplicated. I have a dashboard set up with lights, fans, and other devices, just don’t know where to start on this one.

Thanks!

My first thought is to use a rule to set a variable with the relevant text. How many different Relays and speeds are there?

Alternatively, is there a driver specifically suited for your Z-wave device that might already have an understanding of the different speeds and let you set the speed that way?

For the rule approach, I was thinking something like the following, but it seems like it would get nested deep and easy to lose track of really fast.

IF Relay1 is 'on' AND Relay2 is 'on'
THEN 
   Set $PoolSpeed to $2800 rpm
ELSE
  IF Relay1 is 'on'
  THEN
       Set $PoolSpeed to '3100 rpm'

Alternatively, you could capture all the relays into variable(s) and it would make it easier to use those within an expression.

Hey @Colin_Armentor, what pump are you using? The pump I use only has physical buttons or an app to control the speeds. I havent found a way to automate it yet.

I had looked into the Intermatic PE653 for controlling my dad’s pool pump a few years ago… I’m not sure if that’s still the go-to solution or what people are using nowadays. :smiley:

I am using Hayward variable speed pump. There are connections inside of the pump that can trigger 8 preset speeds on the pump. I have a zwave relay that sends DC to one or multiple of the connections to engage the various speeds. It took me a while to figure it out, happy to help if your pump is capable.

The pump has 8 presets that I can assign a speed to, I only use 2-3 speeds. Thanks for the input, will work on it tonight!

Still struggling, hoping you can point me in the right direction. I have a variable created named $poolspeed, I have a rule created that states if Relay1 is on and all others off, speed is $2800 (another variable). I added the $poolspeed variable tile to a dashboard and it’s not currently doing showing any speed. I assume I’m missing a step that triggers the rule to go into effect?

Thanks!

Can you share a screenshot of the rules? Or feel free to PM @support with the rule IDs and I can take a closer look.

Thanks for PM’ing the Rule ID! You’ll need to add whatever events that you want to trigger the rule in the Rule Triggers section.

So if you wanted the rule to be triggered when any of your relays changed to on or off, you would need to add both the ‘on’ and ‘off’ triggers for all the devices into the Triggers section.

As a side note, you could just set the $poolspeed variable with text directly rather than copying the value from another variable if you want. I wasn’t sure if you had some other reason for storing the speeds in variables though as perhaps you are using those some other way.

I mentioned it briefly before, but this might be a situation where capturing the Device Statuses to variables and then running an expression might simplify things. It would also be slightly more efficient as it would have fewer calls to SmartThings to retrieve statuses. Otherwise with each of the nested IF conditions, the system has to ask SmartThings for the status of each device for each condition, so it asks for the values multiple times and adds some minor delay (probably not noticeable, but I figured I would mention it).

Do I understand correctly that the relay mappings are as follows:

On Speed
R4 off
R2 2800
R1 3100
R1+R2 1850

If so, you could do something like the following:

I understand that everyone has their own preferences and each person will find one approach more intuitive than the other, so do what makes sense to you!

The overall concept in my rule screenshot above is the rule is triggered when any of the switch statuses change (on/off), then I snapshot each of the switches into text variables so I can use their values in an expression.

In the expression, the first thing I do is map the switch statuses (“on” or “off”) to a boolean value where "on" = true so I can more easily use them in the comparison. Then the last thing I do is a series of comparisons (ternary conditions: condition ? trueExpression : falseExpression). I start with the heaviest weighted scenario (Relay 4 is on), into compound scenarios (R1 + R2), and work my way toward the least weighted scenarios.

:information_source: The last step of the expression is assigning the value to an expression local variable aribitrarily named speed. This variable only exists within the expression, but the output of it will be assigned to your variable (in my screenshot that’s $AATmp, but you would select $poolspeed in your dropdown).

The output text in my example was just to make it clear what the result was… of course you would want to change those to your descriptive speeds. :slight_smile:

Josh - thank you for the quick reply. Will go through your feedback and change up what I had configured. I don’t think I have ever received input so quickly and someone so willing to assist. I appreciate your time and expertise!

Thank you,

Colin

1 Like

Josh - I got it all figured out and working. I was also able to add an additional status of all relays being off and that associated speed. My first please with support has been absolutely amazing, thank you!

Colin

1 Like