RainMachine
The RainMachine integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] is the main integration to integrate all platforms related to RainMachine smart Wi-Fi sprinkler controllers
There is currently support for the following device types within Home Assistant:
- Binary sensor
- Button
- Sensor
- Switch
Note that some entities are disabled by default. If you are missing a sensor or binary sensor, check the configured integration!
Configuration
To add the RainMachine device to your Home Assistant instance, use this My button:
RainMachine can be auto-discovered by Home Assistant. If an instance was found, it will be shown as Discovered. You can then set it up right away.
Manual configuration steps
If it wasn’t discovered automatically, don’t worry! You can set up a manual integration entry:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select RainMachine.
-
Follow the instructions on screen to complete the setup.
Configuration Options
The integration has two configuration options:
- “Default Zone Run Time”: sets a default duration when turning on a zone switch (default: 600 seconds). This can be overriden with an action (see below).
- “Use Run Times from App”: if enabled, will use the zone-specific run times from the last time the zone was turned on manually in the RainMachine App – this allows you to set per-zone default times using the RainMachine app instead of the same default time for all zones.
Actions
Actions accept either device IDs or entity IDs, depending on the nature of the action:
- Actions that require a device ID as a target:
rainmachine.pause_wateringrainmachine.push_flow_meter_datarainmachine.push_weather_datarainmachine.restrict_wateringrainmachine.stop_allrainmachine.unpause_wateringrainmachine.unrestrict_watering
- Action that require an entity ID as a target (note that the correct entity ID type must be provided, such as a program for a program-related action)
rainmachine.start_programrainmachine.start_zonerainmachine.stop_programrainmachine.stop_zone
Action: Pause watering
The rainmachine.pause_watering action pauses all watering activities for a number of seconds. After the pause is complete, the previous watering activities will resume. Note that controllers can only be paused for a maximum of 12 hours.
| Data attribute | Optional | Description |
|---|---|---|
seconds |
no | The number of seconds to pause |
Action: Push flow meter data
The rainmachine.push_flow_meter_data action pushes flow meter data from Home Assistant to the RainMachine device.
| Data attribute | Optional | Description |
|---|---|---|
value |
no | The flow meter value to send. May be any positive number. |
unit_of_measurement |
yes | The flow meter units to send. String must be one of “clicks”, “gal”, “litre”, or “m3” (default: “litre”). |
Action: Push weather data
The rainmachine.push_weather_data action pushes weather data from Home Assistant to the RainMachine device.
Local Weather Push service should be enabled from Settings > Weather > Developer tab for RainMachine to consider the values being sent. Units must be sent in metric; no conversions are performed by the integration. Note: RAIN and QPF values shouldn’t be sent as cumulative values but the measured/forecasted values for each hour or day. The RainMachine Mixer will sum all RAIN or QPF values in the current day to have the day total RAIN or QPF.
See details of RainMachine API here:
https://rainmachine.docs.apiary.io/#reference/weather-services/parserdata/post
| Data attribute | Optional | Description |
|---|---|---|
timestamp |
no | UNIX Timestamp for the Weather Data. If omitted, the RainMachine device’s local time at the time of the call is used. |
mintemp |
no | Minimum Temperature (°C) |
maxtemp |
no | Maximum Temperature (°C) |
temperature |
no | Current Temperature (°C) |
wind |
no | Wind Speed (m/s) |
solarrad |
no | Solar Radiation (MJ/m²/h) |
et |
no | Evapotranspiration (mm) |
qpf |
no | Quantitative Precipitation Forecast (mm), or QPF |
rain |
no | Measured Rainfail (mm) |
minrh |
no | Min Relative Humidity (%RH) |
maxrh |
no | Max Relative Humidity (%RH) |
condition |
no | Current weather condition code (WNUM). See here |
pressure |
no | Barometric Pressure (kPa) |
dewpoint |
no | Dew Point (°C) |
Action: Restrict watering
The rainmachine.restrict_watering action restricts any and all watering activities from starting for a time period.
| Data attribute | Optional | Description |
|---|---|---|
duration |
no | The time period to restrict (e.g., “01:00:00”) |
Action: Start program
The rainmachine.start_program action starts a RainMachine program.
Action: Start zone
The rainmachine.start_zone action starts a RainMachine zone for a set number of seconds.
| Data attribute | Optional | Description |
|---|---|---|
zone_run_time |
yes | The number of seconds to run; defaults to 600 seconds |
Action: Stop all
The rainmachine.stop_all action stops all watering activities.
Action: Stop program
The rainmachine.stop_program action stops a RainMachine program.
Action: Stop zone
The rainmachine.stop_zone action stops a RainMachine zone.
Action: Unpause watering
The rainmachine.unpause_watering action unpauses all paused watering activities.
Action: Unrestrict watering
The rainmachine.unrestrict_watering action removes all watering restrictions enforced by rainmachine.restrict_watering.
Controlling Your Device
After Home Assistant loads, new switches will be added for every enabled program and zone. These work as expected:
- Program On/Off: starts/stops a program
- Zone On/Off: starts/stops a zone (using the configuration options described above to determine how long to run for)
Programs and zones are linked. While a program is running, you will see both the program and zone switches turned on; turning either one off will turn the other one off (just like in the web app).
Entity Availability
Many RainMachine entities are enabled by default. Others, like those related to flow sensors, are disabled by default if they only apply to some controllers. You can view all entities for a controller and enable/disable them as appropriate in the Device screen for your RainMachine controller.
Firmware Updates
The integration has an update entity that provides information on the latest available RainMachine firmware version. The firmware update can be triggered and installed onto your RainMachine controller directly from Home Assistant.