Rain Bird IQ4 – New Custom Integration for Cloud-Connected Controllers

Hey all,

I wanted to share a custom integration I've been building over the past few weeks for Rain Bird IQ4 cloud-connected irrigation controllers.

The backstory

Like some of you, I fell into the classic trap: I updated the Rain Bird app to 2.0, which prompted a firmware upgrade on my ESP-TM2, and suddenly the official Rain Bird integration started to experience constant desconnections. After this I found out in the documentation of the integration that the integration was not compatible with the new firmaware, that a roll back was not possible and that next time I should read the documentation before performing updates...

After spending some time in this GitHub issue and reading a great comment from Niek that outlined how the IQ4 cloud API works, I decided to try to build a new integration that talks directly to the Rain Bird IQ4 cloud instead of the local network of the controller.

How it works

The integration authenticates with the Rain Bird IQ4 cloud (the same backend as the IQ4 app) and polls it for data. It uses three separate polling coordinators at different (configurable) intervals so it doesn't hammer the API unnecessarily:

  • Every 30 seconds — zone status, connection state, alarms
  • Every 5 minutes — rain delay, forecast settings, controller mode
  • Every hour — programs, schedules, seasonal adjust

What you get

Sensors:

  • Zone status (idle / running / paused) with last run times
  • Program status (scheduled / not scheduled / disabled) with schedule details, weather adjust method and seasonal adjust %
  • Rain delay (days remaining)
  • Controller mode and alarm counts

Binary sensors:

  • Cloud connection status
  • Forecast rain delay enabled/disabled (with threshold attributes)

Calendar showing upcoming irrigation events per program

7 actions for full control:

  • Start/stop zones manually
  • Set rain delay
  • Enable/disable forecast-based rain delay
  • Set weather adjust to automatic or manual (with seasonal adjust %)

Refresh button to force an immediate update

Stability notes

The integration has been running on my ESP-TM2 for the last couple of days without issues. It handles transient API errors gracefully; it tolerates up to 3 consecutive failures before marking entities as unavailable, so brief Rain Bird cloud hiccups don't cause false unavailable states.

One technical detail worth knowing: the Rain Bird cloud is protected by AWS WAF, which blocks standard HTTP clients during the login process. The integration works around this using curl_cffi to impersonate a browser. Tokens are cached and auto-refreshed every ~2 hours.

How to install

Add as a custom repository in HACS:

https://github.com/davidsuarez82/rainbird_iq4

Or copy the custom_components/rainbird_iq4 folder manually.

Setup is simple; just enter your Rain Bird IQ4 username and password and the integration discovers your controller automatically.

Tested hardware

  • Rain Bird ESP-TM2 (firmware 2.29.0)
  • Rainbird LNK2 WiFi module (firmware 4.136)

Other IQ4-compatible controllers may work but haven't been tested. Happy to hear if it works on other models!

A note on the approach

This uses the unofficial IQ4 cloud API, so it could theoretically break if Rain Bird changes their backend. That said, it's been stable so far. The integration was developed with help from Claude AI for code generation and debugging, which made the whole process much faster.

GitHub: GitHub - davidsuarez82/rainbird_iq4: Integration with Rain Bird IQ4 Cloud · GitHub

Would love to hear if it works for others, especially those with controllers other than the ESP-TM2!

1 Like

I would think that if the LNK2-WIFI module works then the controller behind it shouldn't matter since all Rainbird controller share general settings anyways. I'll likely have the opportunity next week to test this out and let you know.

I had hoped that since Rainbird bought Rachio last year that they would adopt Rachio's approach to remote programming and an open API, I guess time will tell.

Hi,

Thanks for your message..

I also assume it will work with other controllers since the connection is with the API, but I thought it was good to mention that it's only been tested with mine to avoid false expectations.

Regarding Rachio, I sincerely hope it's as you say and not the opposite.

Amazing work!!

I was using the old firmware as there was no HA integration for the new IQ4 firmware but experienced a lot of connection issues and it was nearly imposible to manage the controller. So this weekend I took the step to migrate my ESP-ME3 to version 2 ie IQ4 as due to the heatwave I really needed to change some setting.
First of all it is a world of difference as the Version 2 of the mobile app just works and there is a website too :slight_smile: .

So then I found your custom integration and tried it out and it also just works after a bit of trying out. Requirement is though that you need to complete the setup on the IQ4 website as well otherwise there is some weird data. But after that its is way better then the official HA Rainbird integration.

The only issue I have found is that it shows the wrong controler under device info:

But who cares :wink:

Thanks Chapter!!!

PS: also the card works fine and can start the various sprinklers and programs via HA !!

Great, thanks for sharing! I'm glad to hear it works well on your ESP-ME3.

The tip about completing the setup on the IQ4 website first is very helpful; there's another user on GitHub with similar issues using the same controller type, and this might be just what they're missing, so I'll pass it on to them!

Thanks also for pointing out the incorrect controller model; since it was initially for my personal use, it's currently hardcoded as ESP-TM2 :sweat_smile:. I'll fix it in the next release.

Edit: I have released version 1.0.2 with the change in the controller name

Cheers it is now correctly showing ESP-ME3 :slight_smile:

think I found another issue on the card


Program A is not running Daily but every other day... Program B show right...

Thanks

Great and thanks for the feedback!

Could you share the raw attributes of the Program A sensor in HA? You can find them it in Developer Tools → States

I’m not sure if it’s a problem with the integration or the card

Looks like the sensors are missing some info on the detailed schedule data

Here is how it looks on the IQ4 site

Thanks for the details

The issue is that your program uses Cyclic water days, which the integration doesn’t currently support; it reads all days as active but doesn’t account for the cyclic interval.

I’ll investigate how to handle this correctly and will update when I have a fix.

Hi,

v1.0.3 is now available with support for Cyclic, Odd and Even program schedule types. Programs using these schedule modes now show correctly as "scheduled" with the appropriate attributes (schedule_type, skip_days, next_run, excluded_days).

Update via HACS or pull the latest from GitHub.

Note: the bundled Lovelace card is not yet updated to display these extra schedule details for Cyclic/Odd/Even programs.

2 Likes

Thanks again for the quick solution! I can see the data now in the sensor attributes.

On the card can you blend out programs that are not active (no schedule in my case I see 4 and only use two programs) and also blend out the stations that are set to inactive ie not wired? maybe another option on the card?

Did you need to sign up for the IQ subscription to use this?

No, I just created a normal account in the website

Hi Ron,
I also have ESP-ME3 with same Firmware and Version 2 of the mobile App.
However, I can't control it from HA.
You said your worked after a bit of trying out ... would you mind explaining? Also, what do you mean by completing the setup on the IQ4 website? I added my controller but it shows as demo.
Hopefully I can make mine work as well with your help.
Thanks a lot in advance.

Hi Chris sure happy to help!

My first problem was more or less what you had as I had a Demo controller in there as well as the first controller as I did play arround a bit before I did the upgrade. After removing the demo controller HA started to show more info.

Not sure why it was added as Demo for you but I guess it did as it didn't find it in the IQ4 user data as the website doesn't look directly on your local network. Maybe stuppid question but are you using the same account in the mobile app and the website?

as far as I know the IQ4 web site should find the controller after you completed the setup via the mobile app.

After it showed up I still needed to go through all the pages on the IQ4 website and save some info before it started working.

Guess first thing you need to do is remove the demo controller as it just a demo with limited options. After you get your ESP-ME3 in and be able to use/configure it via the IQ4 website HA should start working.

Let us know how you go as might be good for other users as well as it is not so straight forward :slight_smile:

same here just a standard account

When I log into IQ4, I can see my controller, but it is 'greyed' out and nothing is selectable. Says I need to subscribe to get access. I got on chat and they said yes, I have to subscribe.

have they said what you need to subscribe to?

Also when I click on manage subscriptions I get this:

v1.0.4 is now available with the following improvements:

  • Multi-controller support: accounts with multiple controllers can now add each one as a separate integration entry
  • next_run attribute for all program types (Weekly, Odd, Even, Cyclic)
  • is_active attribute on station sensors: indicates if the station is assigned to any program
  • Card improvements:
    • Cyclic/Odd/Even schedule details
    • Next run date
    • Click-to-more-info on pills/stations/programs
    • Hide inactive programs/stations options
    • Controller prefix correctly removed from zone and program names

Update via HACS or pull the latest from GitHub.

This is what I see in iq4.rainbird.com

Just to confirm:

  • You have the Rainbird 2.0 mobile app, right?
  • You added the controller through the app and you can control it from there?
  • Perhaps you could remove the controller from the mobile app and add it again; if I remember correctly, you had to put the Wi-Fi dongle into pairing mode by holding down the button until the LED blinks blue/red?