Skip to main content

Rain Bird (LNK WiFi)

Driver: rainbird

Local control of Rain Bird irrigation controllers through the LNK WiFi module. GEM talks directly to the LNK module on the controller's LAN IP using the shared device password — all traffic is AES-encrypted and stays on the local network, with no Rain Bird cloud account in the middle. Supported controllers include the ESP-ME3, ESP-ME, ESP-TM2, ESP-RZXe, and other LNK-compatible models.

Use it to start and stop individual stations (valves), set per-run durations, kick off a controller program, read the controller's rain sensor for automation, and enable or disable stations in the controller's own programs.

One device, many stations

One Rain Bird controller is one device in GEM. Each physical station — the valve wired to terminal 1, 2, 3, … — becomes its own zone, addressed by its station number. Unlike some other irrigation integrations, this driver does not auto-create those zones; you add one zone per station yourself (see Setup).

Prerequisites

  • A Rain Bird controller with the LNK WiFi module installed and online on the same LAN the GEM controller can reach.
  • The LNK device password — set in the Rain Bird mobile app under Advanced Settings → Password. This is the password GEM uses to connect, not your Rain Bird account login.
  • Give the LNK module a static IP or a DHCP reservation. The integration addresses the controller by IP, so a moving lease takes it offline.

Setup

  1. Open Devices and add a new device. Pick the Rain Bird (LNK WiFi) driver.
  2. In Controller IP enter the LNK module's LAN IP (e.g. 192.168.1.50), and in LNK Password enter the device password from the Rain Bird app. The password is stored encrypted.
  3. Enable the device. On connect the driver negotiates the controller model and firmware and enumerates the available station numbers; the log shows the detected model, version, and station count.
  4. Run the get_info command on the device's Commands page to list the controller's available station numbers (it returns model, version, serial, and the zones array of valid station numbers).
  5. For each physical station, open Zones and add a zone:
    • Select this Rain Bird device.
    • The Subsystem is pre-selected to irrigation (an irrigation subsystem ships with GEM by default). Leave it there, or re-home as needed.
    • Set the zone address to the 1-based station number that matches the physical valve wiring (1, 2, 3, …) — the address field hint reminds you this is the Rain Bird station number.
  6. Assign the new zones to a UI as you would any other zone. The driver then polls the controller and keeps each zone's on/off state and time remaining current.
Address is the station number, not a discovered id

A zone's address must be the integer station number wired at the controller. A zone whose address isn't one of the numbers returned by get_info is treated as not connected and never updates. Run get_info to confirm the valid numbers for your controller model.

Running stations vs. program enable/disable

There are two different ways the driver touches a station, and they are not the same thing:

  • Manual run / stopon (or run) starts the station watering for a duration; off (or stop) stops it. This is direct, immediate control of the valve.
  • Program enable / disableenable and disable change whether the station participates in the controller's programs. They do not turn the valve on or off right now. Use them to take a station out of (or back into) automatic programmed watering without rewiring or reprogramming the controller.

For ad-hoc manual watering, always use on/run and off/stop. Reserve enable/disable for changing programmed participation.

Run duration

When you send on/run without a seconds argument, the driver uses a default duration:

  1. the zone's own Default Run Duration (default_run_seconds) if set, else
  2. the device's Default Run Duration (default_run_seconds, default 300 seconds).

Pass an explicit seconds argument to override both for a single run — e.g. a macro step that runs station 3 for 600 seconds.

State and the rain sensor

While the device is enabled, the driver polls the controller (every Refresh Rate seconds) and writes back to each zone:

  • stateon while the station is watering, off otherwise.
  • time_remaining — seconds left in the current run; 0 when idle.

At the device (controller) level it tracks one sensor reading for use as an automation trigger source:

  • rain_sensortrue when the controller's rain sensor is holding watering.

Point a trigger at the device's rain_sensor attribute to, for example, suppress a scheduled run or send a notification when rain is detected.

Single-session LNK module

The LNK WiFi module accepts only one client session at a time. If the Rain Bird mobile app is connected at the same time as GEM, either side may see stale state. Keep the Refresh Rate at its default (15 s) or higher, and avoid hammering the controller from multiple apps at once. The driver also serializes station activations internally, so starting several stations at once queues them rather than interleaving.

Attributes

Set these in the Attribute editor for the device or zone; the labeled device/zone fields also appear in the device and zone forms.

Device

AttributeTypeRequiredDefaultDescription
ipstringyesLAN IP of the LNK WiFi module. Shown as Controller IP.
passwordstringyesLNK device password from the Rain Bird app. Shown as LNK Password; stored encrypted.
refresh_rateintno15Refresh Rate (seconds) — how often the driver polls the controller for status. Minimum 5; keep at 15 or higher (single-session module).
sync_timeboolnofalseSync Time — when on, sync the controller clock to GEM's clock at startup and hourly.
default_run_secondsintno300Default Run Duration (seconds) — run length used when on/run is sent without a seconds argument.
show_request_responseboolnofalseLog Request/Response — verbose protocol logging; enable only for troubleshooting.
rain_sensorboolDriver-written. true when the controller's rain sensor is holding watering. Usable as an automation trigger source.

Zone

zone.address is the 1-based station number matching the physical valve wiring. Driver-written state attributes:

AttributeTypeDescription
statestringon while the station is watering, off otherwise.
time_remainingintSeconds left in the current run; 0 when idle.

You can also set one configurable attribute per zone (in the zone's Attributes editor or zone form):

AttributeTypeDefaultDescription
default_run_secondsintfalls back to the device's default_run_seconds (300)Default Run Duration (seconds) — run length used when on/run is sent to this station without an explicit seconds argument. Overrides the device default for this zone only.

Commands

These are the commands the driver declares and keeps current, so they appear automatically on the device's Commands page and can be tested there. The address argument resolves to the zone's station number.

CommandArgsWhat it does
on / runaddress, optional secondsStart the station watering for seconds (or the default run duration).
off / stopaddressStop the station.
stopallStop all irrigation on the controller.
enableaddressInclude the station in the controller's programs (program participation, not an immediate on).
disableaddressExclude the station from the controller's programs.
start_programprogramStart a controller program by its identifier.
get_infoReturn the controller model, version, serial, the valid station zones array, and whether the rain set point has been reached.
refreshForce an immediate status poll of the controller.
Driver-managed commands

The rows above are rewritten by the driver every time the system starts. Add your own commands if you need them, but don't hand-edit the templates or args of these — your changes are overwritten on the next restart.

Known limitations

  • Single-session module. The LNK module serves one client at a time; running the Rain Bird app alongside GEM can produce stale readings on either side. Keep the refresh rate at 15 s or higher.
  • Serialized activations. Station activations are queued one at a time, so starting several stations in quick succession does not interleave — they run in order.
  • Older controllers. Some older models don't report live station state directly; the driver falls back to inferring state from the controller's program state automatically. Reported timing on those models is approximate.
  • Controller turned off. If irrigation is switched off at the controller's front panel, stations never show active even though the connection is healthy — the controller simply won't run them.

Troubleshooting

SymptomCheck
Device never connects; log shows rainbird missing ip or rainbird missing passwordThe Controller IP (ip) and/or LNK Password (password) attribute is blank. Set both.
Connect fails with an auth errorThe LNK Password doesn't match the module. Confirm it in the Rain Bird app under Advanced Settings → Password and re-enter it.
Zones never show activeIrrigation may be off at the controller's front panel — the controller won't run stations. Turn irrigation on, then send a manual run.
A zone never updates / shows disconnectedIts address isn't a valid station number for this controller. Run get_info to list the valid numbers and set the zone address to one of them.
Manual run works but stations don't water on scheduleThe station may be disabled from programs. Send enable for that station, and check the program setup on the controller.
State looks stale or laggyLower contention on the single-session module — close the Rain Bird app while GEM is connected — and confirm the Refresh Rate is at a sensible value (15 s default).
  • Devices — add the Rain Bird controller and set its IP and LNK password.
  • Zones — add one irrigation zone per station, addressed by station number.
  • Subsystems — the irrigation subsystem these zones live on.
  • Commands — where run / stop / start_program / get_info appear and can be tested.
  • Triggers — use the device's rain_sensor attribute as an automation trigger source.
  • Hunter Hydrawise — the other irrigation-controller integration in GEM.