Opening the valve according to the water pressure

  • Platform information:
    • Hardware: Raspberry Pi 4 4gb ram
    • openHAB version: 3.3.0.M5

Hello Friends, I have 2 lines for garden irrigation.
The valve on the 1st irrigation line opens completely when irrigation starts. How can I write the rule that allows the valve on the 2nd irrigation line to open gradually when the water pressure sensor 2 passes. Valves have Servo motor. I can open the valves by angling. (For example: 5,15,30,45,60 etc.)

Number Bar_G_Outlet					"Outlet Bar [%s bar]"
Number Valve_Walnut					"Walnut Valve [%s]"	
Number Valve_Fruit					"Fruit Valve [%s]"	

Passes what?

In general you’ll need something to trigger the rule. Presumably that would be when the Item linked to sensor 2 passes some value.

In the rule you’ll send a command to the valve, wait for a bit or schedule a timer to increment the valve and repeat until the valve is open.

The rule should check to see if the valve is open or opening before running again since the rule is likely to be triggered multiple times and you only want to open the valve once.

Hello, what a write up. I need an example.

Well, I’m not going to write it for you (and you’ve provided far too little information to do that anyway). But there are tons of examples on the forum. Look at some of the many irrigation tutorials, looping timer examples, etc.

For future readers of this thread. What sort of additional information would I need?

  • Names and types of all the Items involved.

  • What states/values would one expect on each of those values under what circumstances? For example, like I said, when pressure sensor 2 passes what?

  • Which of those three Items listed is sensor 2 (if any?)?

  • How much does the value fluctuate on the sensor(s)?

  • How are the valves commanded?

  • What bindings/technologies are involved? Sometimes that matters.

  • What rules language?

  • UI or text based rules?

  • What turns it off? When? How? Does that need to slowly turn it off?

  • But most importantly of all, what have you tried so far? Have you even tried something? Posting an initial attempt, no matter how feeble, will show us:

    • the answers to most of the above questions without our having to ask for them in a game of 20 questions
    • much more clearly understand what you are really trying to do
    • identify your knowledge and experience with the language to tailor the level of the response
    • identify where confusions and misunderstandings lie and correct those.

The OP asked for a very complicated and unique “example” which will have to be maintained. Based on my experience, it’ll probably take many hours of my time to help build it in the first place and in the long run, even if I did build it OP wouldn’t understand it and at some point they’d be back asking for help again. I’ve been down that road and it’s no fun for anyone involved.

2 Likes

I’m not helping you. I didn’t even reply to you. You can go jump in a lake for all I care. Probably won’t get much help from anyone else though with that attitude.

But this is a public forum. I’m helping the future readers who may have a similar question since this thread will remain and appear in search results.

I wish you well in your future endeavors.