[SOLVED] OH3 Gardena Water Control - Set pause timer

Dear community, I am using OH3 on an Raspi 3B+. Basically all is running smooth from a basic setup perspective. At the moment I am trying to setup several rules to make all those things work together. One thing I am stuck at right now is the Gardena water control. I have the Gardena binding installed and the API linked to my account. It has also detected my water control properly. However the description of the binding is comparably “slim” - no offense here to anyone involved.

I can start watering and stop it and so on. All good. But I am struggling with pausing or respectively (re-)starting the schedule for watering based on my rain detection.

Pausing and restarting the schedule is setup as a switch item. Hence, if I switch the pause mode on, it pauses the schedule for exactly 60 minutes. But the binding explanation tells, that you can set the time individually. I don’t get how to do that.

Here is the description from the addons website (Link):

//All channels are read-only, except the command group and the lastUpdate timestamp
openhab:send WC_Valve_cmd_Duration.sendCommand(10) // set the duration for the command to 10min
openhab:send WC_Valve_cmd_OpenWithDuration.sendCommand(ON) // start watering
openhab:send WC_Valve_cmd_CloseValve.sendCommand(ON) // stop any active watering

How do I use this command in my items file to specify a duration, if the switch to pause the schedule is hit? At the moment, my items file for Start and Pause look like this:

Switch Gardena_Garten_Bewaesserung_Zeitplan_Starten "Gardena Garten Zeitplan starten" {channel="gardena:water_control:XXXXX:valve_commands#unpause"}
Switch Gardena_Garten_Bewaesserung_Zeitplan_Pause "Gardena Garten Zeitplan Pause" {channel="gardena:water_control:XXXXX:valve_commands#pause"}

Any help is appreciated.

I think you’re supposed to use a duration (time quantity) not a simple number.

Thanks @rossko57 for the quick feedback.

Quick question in return:
I have at the moment just a simple switch in my items file. Based on the binding it already acts, if switched. So where do I need to place this „sendCommand“ piece? Do I need to create a rule which interacts if the switch is hit? Or where do I put this?

When do you want this to happen?
If someone pokes a button on a UI? Then use a UI widget that links to your Switch Item.
At some time of day? Write a rule that triggers at time of day, and does what you want, sends a command to your Switch Item.
When something else happens e.g. temperature goes over XX? Write a rule that listens for temperature changes, tests if it is over XX, and if so then it does what you want.

I don’t think I understand the question really?

Okay, so let me try to explain to you step by step, what I did and what I am looking for / try to understand:

Initially on PaperUI:

  1. I installed the “Gardena Binding” in my OH3 instance on an RP3B+
  2. I connected the Gardena bridge to my Gardena account to discover the related accessories
  3. Using the Scan/Discovery of OH3, I added the water control accessory, which is installed in the garden

Afterwards in Visual Studio Code:

  1. I added a new section to my items file, adding the relevant items for the Gardena water control based on existing Gardena binding channels
  2. One of the added items is the switch to pause the current schedule, which looks like this (I did not change anything besides the item id and the naming)
Switch Gardena_Garten_Bewaesserung_Zeitplan_Pause "Gardena Garten Zeitplan Pause" {channel="gardena:water_control:XXXXX:valve_commands#pause"}
  1. I added the switch to my sitemap in the garden section
  2. I hit the switch in the Basic UI to see, if it does, what is expected
  3. The switch turned on, and after a few seconds, it turned off again
  4. Checking my Gardena app on my smartphone, I could see, that the schedule for watering the garden has been paused for exactly 1 hour

Hence, my question is now, how do I adjust this duration? This is where I came across the section in the Gardena binding documentation, mentioning this part:

openhab:send WC_Valve_cmd_Duration.sendCommand(10) // set the duration for the command to 10min

At the moment, I do not understand, how I change the duration for the existing (not amended at all) switch for the predefined Gardena channel.

Writing a rule for whatever scenario is clear, I can trigger the switch at given conditions, but it will still remain at pausing the schedule for exactly 1 hour, right? Is it really that complex to create a manual switch, and a rule saying, “if triggered”, first run “duration command” and then subsequently switch the original Gardena “pause switch” to ON?

You can’t change the duration of a switch, its ON or OFF. Duration here is some other property of the Gardena setup that you have to change first. But I think you’ve already realized this.

No, not complex at all. Have you tried?

Perhaps the blind spot is that you can create any Item you like, you don’t have to link it to any real device or binding.
You can still put such Items on your sitemap.
You can have rules listening for activity on such Items.

Here you might create a Switch type Item called “do Plan B for 20 minutes”. Put it on your sitemap as a button. Have a rule that listens for the button command, then sends duration command and
Plan B commands as required.
After thats working, you might add some detail that stops you pressing it again for 20 minutes or offers a cancel button instead etc.

Was assuming so @rossko57. Will try my way around and return here, in case I need further help. :slight_smile: