Irrigation Controller Question

I’m getting around to including my Rachio irrigation controller in a dashboard. I am using four valves. The available things are the four valves and the controller itself.

My question is: what would opening and closing the controller do? In other words, would I even want the controller to be included on a dashboard? I can control each of the valves.

@Stan_Silverman
If I remember correctly, you’re using Hubitat, right? I haven’t tried the Hubitat Rachio integration, so I’m not sure exactly what capabilities it’s exposing for each of the zones/valves and the main controller. Unfortunately, the Hubitat documentation seems to be missing the page for their Rachio integration.

Can you share a screenshot of the device details page for your Rachio controller?

  1. Open your SharpTools.io user page
  2. Tap the … next to your Hubitat location
  3. Tap on your Rachio controller in the device list

I’d be interested to see a screenshot of the reported device details (especially the capabilities section).

Josh - this is the Rachio controller page:

Stan-
My guess would be that turning ‘on’ the main controller or opening the ‘valve’ on it with the Hubitat driver might be similar to just telling the unit to run from the app. I had a Rachio at my previous home and if I remember correctly, you could either tell an individual zone to run or you could just tell it to start and it would cycle through the zones.

I suggest giving it a try and seeing what happens!

Since the controller seems to report both Switch and Valve capabilities, you’ll be able to pick from either of those tile templates. The switch template sends a virtual toggle method which calls the on() and off() commands behind the scenes… and the Valve template has options to open() and close() the valve.


Edit: Also keep in mind that you can create a rule using the SharpTools.io Rule Engine and then run that from your dashboard. That enables you to run any command that the device exposes. So if there’s a specific one of those custom commands from the controller that you want to run from a dashboard, you can do that as well!

2 Likes

Thanks for the helpful info, Josh. I will indeed give it a try.

1 Like

I have been semi-successful in incorporating Rachio in dashboards. I didn’t find anything exciting to do with the controller, so have just been using the valves themselves.

Open/Close works some of the time - actually not very often. I always get the “Command sent” pop-up, and the circular “busy” icon appears, but the command is usually ignored by the controller. (The controller works flawlessly from the iPhone app.)

At one point I signed out of SharpTools and then signed-in again. I successfully opened and closed a valve immediately afterwards so thought I was on to something. But further signout/signin sequences have not been helpful.

Any ideas on how to get Rachio more cooperative with dashboards? I’m still so new at this that I always suspect that I’m the cause of problems.

Stan-
Thanks for the update and sorry to hear that it’s working intermittently!

The first step would be to test the device directly from your hub to make sure the integration is working properly and consistently. Since you’re seeing the green command sent messages, it sounds like SharpTools is successfully able to send the device commands over to your hub.

Since you’re using Hubitat, you can open the ‘Devices’ list from the Hubitat administration UI and try controlling the zones/valves directly from there using the open() and close() buttons.

  • Rachio valves always open/close correctly from Hubitat device pages.
  • They also work consistently from a Hubitat dashboard.
  • SharpTools dashboard operation is unchanged, i.e. they don’t work very often.

Please let me know if I can provide more info.

Thanks for the help!

Stan-
Thanks for the additional information. Can you provide a screenshot of what you are seeing for each of the three bullet points you listed above? I just want to confirm which commands and layouts are being tested in each scenario.

Edit: Can you enable logging in the SharpTools app on Hubitat? Then watch the logs to confirm which commands are being sent across and if Hubitat is showing any errors (and copy them here).

From the Hubitat administration UI:

  1. Select Apps
  2. Select SharpTools from the list
  3. Toward the bottom, switch on Enable logging below the device selection preferences:
    image
  4. Tap Next
  5. Tap Done

OK - I figured it out! I’ll divide the blame between my fat fingers and the tile design.

It hit me as soon as I saw the log:

It looked like I was requesting valve closure when it was already closed. What? Isn’t it a toggle?

Here is the default Hubitat dashboard valve tile in the closed position:

And here it is in the open position:
Valve%20Open%20Hubitat

It’s a toggle control, and you can press anywhere on the tile to change its state.

Now here is the Hero layout SharpTools dashboard valve tile in the closed position:

I quickly realized that you can’t press anywhere on the tile, but you have to press in the thin area near the “open close” legend. But I assumed it was a toggle. It ain’t! You have to choose either of the states by careful positioning of your finger, and my finger is just too large to accurately do that.

No problem accomplishing it with a mouse on the PC and, not surprisingly, we get:

The reason I chose the Hero layout rather than the default layout is the valve state is easy to see in its large font.

Possible improvements:

  • Enlarge the usable area for the user to press
  • “Open” on one side, “closed” on the other side
  • Convert to toggle
  • Currently, color is different for the states in the default layout. It would be helpful if the graphics changed too

Thanks!

2 Likes

Thanks for the feedback. I agree that the valve tiles probably need a bit of love to bring them closer to the other tiles. I’ve added your feedback to the list - thanks! :smiley:

2 Likes

What I’m trying to do with the irritation - OOPS - irrigation controller is to use the tile to turn standby mode on/off. The StandbyMode attribute is available in Hero layout, and I’ve selected it as the primary and secondary attributes. However nothing changes on the tile or on the controller when pressing Open or Close. The tile legend always says ON and the state of Standby Mode on the Rachio controller is unchanged.

If I change the controller’s standby mode via the Rachio app, the tile reports ON no matter what state the controller is in. So it seems that I’m unable to use the tile to either change or view the controller’s standby state.

I’ll just bet I’m not approaching this correctly! Right?

It sounds like there are a couple of things going on here, so let’s cover them one-by-one. :smiley:

  1. When Standby mode is changed in the Rachio app, the Hero Attribute tile with standbyMode as the primary attribute doesn’t change
    When you change the standby mode in the Rachio app, what does the standbyMode attribute of the device show when you view it from Hubitat? The first step in troubleshooting is going to be to verify that the integration with your hub is working as expected. If the hub isn’t getting the right data, then the dashboard won’t either.

  2. (In)ability to control the standby mode from a tile
    Keep in mind that the open and close buttons literally map to the commands open() and close(). If your goal is to change the standby mode, we’ll need to use the relevant commands from the device. Looking back at the screenshots you shared of the device details before, I would guess the standbyOff() and standbyOn() methods do this.

    The first step would be to manually use those commands from the device details screen in the Hubitat administration UI to verify they do what you expect (eg. the Rachio app updates the standby mode and the Hubitat device standbyMode attribute updates)

    There are several ways we could use the standbyOff() and standbyOn() commands. You can either create a SharpTools Rule that issues the correct standby command based on the current mode… or you can create a virtual switch that does the same thing. The first approach is a bit easier but requires one tile to view status and one tile to control status. The second approach consoldates everything into a single tile but is a bit more work to setup.

1 Like

Option 1: SharpTools Rule that toggles standby mode

The concept here is that we’ll create a rule that issues the relevant standbyOn() or standbyOff() command based on the current value of the standbyMode attribute. Since the standbyMode is currently reporting a value of "on", I’m going to assume that the valid values are "on" and "off" but you should double check this as I don’t have a Rachio available to test with at the moment.

Something like:

#Flow:
IF standbyMode is 'on'
THEN standbyOff()
ELSE standbyOn()

Here’s what the rule would look like. The ‘trigger’ will be completely empty as we will trigger the rule directly from a dashboard:

Option 2: Virtual Switch approach - view and control status

The virtual switch approach is similar, but instead of running the command as a toggle from a rule tile, we’ll create a separate ‘Virtual Switch’ which is just responsible for controlling the standby mode. You’ll create rules that map the switch on/off commands to the standbyOn() and standbyOff() commands… as well as a rule to map the standbyMode state into the switch state (whenever it changes from the Rachio app or outside Hubitat)

The high level steps are:

  1. Create the Virtual Switch in your Hubitat admin UI
  2. Create a Rule that when the virtual switch turns on, the standbyOn() command is issued, otherwise the standbyOff() command is issued
  3. Create a Rule that when the Rachio standbyMode attribute changes to on, the on() command is issued to the switch, otherwise the off() command is issued.
  4. Authorize the virtual switch in SharpTools and use it on your dashboard like a normal switch. :slight_smile:
1 Like

Josh, thanks for the crystal clear instructions.

This is my rule; looks pretty much like your example:

This is my tile. I’m using Switch mode:
Standy%20Tile

Control from the dashboard tile does not work. “Busy” indicator spins a little, but no change on the tile legend or the Rachio controller. Nothing is recorded on the Hubitat log.

However it does work from Hubitat. Pressing StandbyOn or StandbyOff is recorded on the event log and the controller status displayed on the iPhone App follows along.

Thanks for your help!

Thanks for the screenshots, @Stan_Silverman. It looks like a bit of each approach was mixed together. My apologies if I didn’t make it clear that there were two different distinct approaches. I’ve updated the headers on my previous post to clarify.

Option 1: Hero Attribute + Rule Tile

If you want to use Option 1 you’ll need:

  1. Hero Attribute Tile showing the standbyMode attribute
  2. Rule Tile which executes the rule shown in your first picture (check the video in my post above for how to add this).

The end result would look something like:
image

Option 2: Virtual Switch (via custom rules)

If you want to have just a single tile that displays the standbyMode as a switch and lets you toggle the standbyMode as shown in your second screenshot, you’ll need to wire that virtual switch up to actually control the standby mode.

You can create the rules in SharpTools -OR- in Hubitat. Whichever you prefer. Here’s an example of how to do it in SharpTools Rules:

First Rule:

Second Rule:

1 Like

Josh - I feel that I’m taking an inordinate amount of your time with this project, so please feel free to leave me to my own devices at any time!

I’m trying to implement Option 2 - a single tile to toggle and display Standby Mode.

I’ve added a Virtual Switch (named Rachio Virtual) in Hubitat and authorized it in SharpTools. It’s device screen looks like this:

I’ve added its tile on a dashboard using the Switch layout.

The two rules were created in SharpTools following your example. I will send screen shots if you wish.

Toggling the switch does not cause an event in Hubitat; I do get the Command Sent popup on the dashboard. Here is the event screen. These four events appeared after I created the switch and no further events have been logged.

Thanks for the screenshots. It looks like that’s some other type of device driver (maybe the Rachio Controller?). The Virtual Switch should be setup as a Virtual Switch driver:

image

This Virtual Switch is intended be a simple on/off switch. We’re effectively using rules to map the virtual switch’s on/off commands to the Rachio Controller’s standbyOn and standbyOff commands. :slight_smile:

2 Likes

Here’s what it looks like is happening:

  1. Assume that Switch is Off
  2. I press it and turn it On
  3. First Rule sees that the Switch state has changed
  4. Since it is On, First Rule commands controller to StandbyOn
  5. Assume controller take a finite amount of time to respond
  6. Second Rule sees that StandyMode has been triggered
  7. StandbyOn requested, but controller is still in Standby Off
  8. Since it is Off, Second Rule commands Switch Off
  9. First Rule sees that the Switch state has changed
  10. Since it is Off, First Rule commands controller to StandbyOff

The entire round trip - Swich Off, Switch On, Switch Off - takes about 5 seconds. This analysis is only valid if #5 above is correct. There may be something else going on, but it’s all I can think of.

Here’s the event log for the Switch:

This is the corresponding history log from the Rachio App:

Just for testing you could try temporarily disabling the Second Rule. With just the First Rule enabled, you should still be able to flip the virtual switch which and the First Rule should send the standbyOn() command.


Once you verify that the first rule works as expected, we can try tweaking the second rule. The first thing I would try is adding a delay before the IF condition in the flow. Maybe 10 seconds for initial testing and then we can tweak it down to 5 seconds or whatever works.

Once you add the Delay to your rule, you can use the little handle in the top-right corner to drag it above your IF condition.
image

This Second Rule is really just for making sure the virtual switch is updated if you ever control the Standby Mode directly from the Rachio app or directly from the Rachio Controller device in Hubitat. So adding the delay here means that if you change the standby mode in one of those two places, then the virtual switch would be delayed in reflecting the new state by however many seconds you set in the rule delay.

1 Like