Soil moisture & automated irrigation


Anyone got anything automated with HE?

I will swap my hydrawise irrigation controller for a rachio (HE supported) if something can be triggered with soil moisture levels?

I purchased a plantlink sensor but it’s Bluetooth so won’t work with hubitat...I’m stuck.


I base my watering on previous and expected rainfall.
I use a kind of ‘weighting’ to allocate a value to each figure then do a calculation of the numbers to produce a final figure.
If that figure is below a certain number I’m told by HE to water the garden :slight_smile:

Another user uses then same calculation to turn on his water... :slight_smile:

[RELEASE] - Irrigation Switch App - Turns on a switch if you need to water the garden



hey @bf1 did you found something useful yet? I want to help my wife gardening a bit. Last year's salad was a disaster :joy:


I have the Spruce Moisture Sensors but haven't integrated them yet, i've been trying to run a bare bones hub for a few weeks to work out what was causing it to crash. I'll be adding them soon to a secondary (non-essential devices) hub.


Did you try this stuff from Smartthings?
I personaly am too new to HE so I have no idea how the porting of apps and drivers work but... you know.


Hi guys,

Smartthings is a lot easier as it has built in get weather commands which Hubitat does not. I have written my system using a local temperature device and openweathermap for the forcasting. You will need to get an API key from openweathermap, their basic package is free.

Feel free to use whatever you want from my code.



Thanks, but I want to automate the watering of a covered salad beet. If the soil is to dry give water for x seconds.
But I asume your App is great for lawn.


Ambient Weather has released a soil moisture probe that works with their API. It works with their ObserverIP unit or with a small display console that uploads the data to Ambient Weather. The existing Ambient Weather app could be updated to provide that sensor data.


Does this code work for controlling a valve? I have an orbit timer, but it is listed as a valve, and not a switch.


Check out this thread..might be some stuff in there.



You will need to change the code slightly. Replace mentions of switch with valve ie input "sprinkler", "capability.switch" should now read input "sprinkler", "capability.valve". The handlers switchOn line 303 and SwitchOff line 311: you should change and sprinkler.on() and to andsprinkler .close().




Can I change the measurements from Celcious to Farenheight, and mm to inches?



The temperature measurement is just a number from your local temepraturemeasurement device, just change the "C" for an "F" in the app.

For the forcast, the temperatures are read in K and converted to C by the lines
def maxToday = weatherNow.main.temp_max - 273.15
def minToday = weatherNow.main.temp_min -273.15

you will need to change that to def maxToday = (weatherNow.main.temp_max - 273.15) × (9/5) + 32

to convert rain from mm to inches the lines before need changing
def Rain24H = "$forcastRain" / 25.4

def Rain1H = weatherForcast.list[0].rain / 25.4
logDebug "rain 1h ${Rain1H}"
if (weatherForcast.list[0].rain != null){
logDebug "rain 1h ${Rain1H.get("3h")}"
Rain1H = Rain1H.get("3h") / 25.4
rain1H = 0