Water valve via OpenHAB

Hi all!

I’m completely new to openHAB, and I’m yet to set up the device I want to have everything working on. But I like doing research in advance :slight_smile: And along with other project I plan, I would like to operate a water valve via openHAB.

I’ve looked into what’s already been written about water valves in this community, but I haven’t found anything I see fitting my situation. I’ve read about ‘opensprinkler’, but that seems to require its own hardware, which seems overkill for the one valve I would like to operate. Or do I misunderstand how ‘opensprinkler’ works?

I thought googling for WiFi valves would surely render results, but lists like these (The 10 Best WiFi Water Valve Reviews in 2023 - ElectronicsHub) don’t seem to result in openHAB connections… So maybe I should turn to z-wave or zigbee valves? I’m not looking for high-market solutions here, so if anyone has any suggestions, those would be welcome :wink:

And does openHAB work with every kind of z-wave or zigbee device? Or is this Mosquitto MQTT thing something I need to use…?

I understand there are a lot of holes in my knowledge, and my question might seem too noob to merit a response, but I hope some good samaritan can still point me in the right direction.

Kind regards,


Hi friend, and welcome to the community:).
First up, I found it funny that you say this:

But then you never actually detail your specific situation :).
But, I’d like to point you to AliExpress and the relay valves they have there. They are easily (usually) flashed with tasmota and you can directly integrate them to openHAB just with that :slight_smile:

1 Like

To operate a valve you need a switch with dry contacts because valves normally do not use mains, but some sort of transformer (mine use 24VAC). In my garden I have 3 valves, to operate them I use a Sonoff 4CH-PRO (there are cheaper devices out there).

Some switches come with their own firmware, others you need to flash with tasmota or esphome. This will determine what binding you need to use to communicate with the switch (bindings are OH add-on’s that allow communication with devices)

The beauty of OH is that you can link it to wheather forecast services and/or soil sensors to decide when and how much watering you need,

1 Like

so as others have mentioned you really have not given us much information to help you along.
but most of valves you listed will work if you are looking to control 1 main water valve say to shut off water to your whole house or even to a single source. Those valves are called ball valves and are most often used for your main water supply shut off to your entire house or a perhaps a branch pipe to an area that you want to only turn on and off occasionally. You can connect it to your wifi and then manage it via its app or a cloud service such as Alexa. and you can set up Openhab to tell Alexa to manage it .
Other approaches if this was for some kind of sprinkler even if it is a single zone watering solution you can take a regular 24 volt valve like this

and a 24 volt transformer like this
And then if you want wifi and even a remote you could add this to have it controlled via a relay like this.

The relay module can be either 1, 2 or up to 4 relay version 1 for each zone (water valve)
or you could use the zigbee or zwave version to do same thing.
stick it in a project box and you are done.
Also the 24 volt transformer can be used to provide power to both the relay board as well as the water valve. when you wire the transformer to the water valve and one wire of it through relay contacts.
you add a switch in Openhab to control the relay board and a rule to turn the relay on and off based on conditions such as time of day or a moisture sensor or what ever you deem a reason.
Also the above relay board if you choose a multi relay could control that and some other type device as well as the relay contacts for each relay are separate and rated for ac or dc switching.
Lots of options many ways to solution this just need to have a better idea of what you are trying to accomplish.
So more details really could help to provide you the correct answer.


Welcome to openHAB!

Are you using this valve for garden watering? You could get a generic 12V solenoid, buy a 12 adapter for it (DC/AC, according to what it needs), and plug that adapter to a “smart plug / socket”. There are many smart plugs out there, Tuya, Wifi, Tasmota, ESPHome, Zigbee (e.g. IKEA).

From there, you can connect the smart plug to openhab. How to do that depends on which smart plug you chose. If you can pick one, we’ll help further. The easiest is to buy a smart plug pre-flashed with either Tasmota or ESPHome. If you are not familiar with either of these, then pick Tasmota. I started out with Tasmota then migrated to ESPHome. I prefer ESPHome but it’s harder to get started with it.

If you choose Zigbee plug (e.g. IKEA’s), it would be a bit more complicated, because you’ll need a Zigbee adapter (i.e. dongle) to plug into your openhab computer to interface with openhab. I would also recommend this route if you’re willing to “geek out” on home automation.

So that’s option 1 (buy a generic solenoid)

Option 2, if you know how to flash an ESP8266 chip, you could buy a wifi garden irrigation timer from Aliexpress. This is what I use right now. You’d flash it with either Tasmota, or ESPHome then you can control it from openhab the same way as above.

Option 3: Get something like Orbit BHyve, or Link-Tap - these are battery powered “timers”. I don’t have a lot of experience connecting them to openhab but I believe it’s possible. The downside is you’ll have to change the battery every 2-4 months. I went this route in the beginning, but got sick of having flat battery / having to change the batteries.

There are many other ways I’m sure.

1 Like

As I reread my original post, I realize that I wasn’t very clear indeed. My apologies :slight_smile:

There’s one pipe, irrigating my hedge, which I would like to be able to open and close when I want to, or maybe on a yet to be determined automated schedule. The valve will be in my basement, so not in the rain or extreme temperatures.

Since it’s only one valve, I would like to go with a simple solution, without circuit boards and such.

But if I understand it correctly, the valve doesn’t need to be explicitly compatible with openHAB; if it works with Google Home or something similar, that works as well. Correct me if I’m misreading that :slight_smile:

I’ll measure the pipe diameter and take a look on Amazon or similar sites and update you :wink:

Thanks for the quick (and elaborate) responses!

Simple solution, if you have Wi-Fi nearby, is to use a smart switch to power the valve (or its transformer), such as the TP-Link Tapo P100 with the Tapo binding.

After the swich item is created you can edit it (to create a expire rule, for example 20 minutes), and create a rule to switch the item ON every day @ 04:00

This rule can have conditions, for example switch ON only if soil humidity<35%

You are misreading that. While it is possible to expose openHAB to Google Home so Google Home can get the info from your devices and control them, it doesn’t work the other way. You cannot control stuff that is only connected to Google Home.