RainMachine

The RainMachine integration 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!

配置

此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。

Configuration Options

The integration has two configuration options:

  1. "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).
  2. "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_watering
    • rainmachine.push_flow_meter_data
    • rainmachine.push_weather_data
    • rainmachine.restrict_watering
    • rainmachine.stop_all
    • rainmachine.unpause_watering
    • rainmachine.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_program
    • rainmachine.start_zone
    • rainmachine.stop_program
    • rainmachine.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 attributeOptionalDescription
secondsnoThe 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 attributeOptionalDescription
valuenoThe flow meter value to send. May be any positive number.
unit_of_measurementyesThe 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 attributeOptionalDescription
timestampnoUNIX Timestamp for the Weather Data. If omitted, the RainMachine device's local time at the time of the call is used.
mintempnoMinimum Temperature (°C)
maxtempnoMaximum Temperature (°C)
temperaturenoCurrent Temperature (°C)
windnoWind Speed (m/s)
solarradnoSolar Radiation (MJ/m²/h)
etnoEvapotranspiration (mm)
qpfnoQuantitative Precipitation Forecast (mm), or QPF
rainnoMeasured Rainfail (mm)
minrhnoMin Relative Humidity (%RH)
maxrhnoMax Relative Humidity (%RH)
conditionnoCurrent weather condition code (WNUM). See here for options.
pressurenoBarometric Pressure (kPa)
dewpointnoDew Point (°C)

Action: Restrict watering

The rainmachine.restrict_watering action restricts any and all watering activities from starting for a time period.

Data attributeOptionalDescription
durationnoThe 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 attributeOptionalDescription
zone_run_timeyesThe 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.