Skip to content

Latest commit

 

History

History
240 lines (161 loc) · 14.9 KB

README.md

File metadata and controls

240 lines (161 loc) · 14.9 KB

bhyve-home-assistant

Orbit B-hyve component for Home Assistant.

If this integration has been useful to you, please consider chipping in and buying me a coffee!

Buy Me A Coffee

Supported Devices

This integration works with:

Faucet / Tap / Sprinkler controllers

The following controllers have been verified as compatible with this integration, either by the author or members of the community. By virtue that this is an unofficial project which is not supported by the company, there is no guarantee of continued compatibility for current or future devices.

Note: The Wifi hub is required to provide the faucet controllers with internet connectivity.

Flood sensors

Note: The Wifi hub is required to provide the flood sensors with internet connectivity.

Supported Entities

  • sensor for measuring battery levels and watering history of sprinkler_timer devices as well as the device on/off state (not to be confused with zone on/off switches).
  • temperature sensor for measuring the temperature at the device.
  • switch for turning a zone on/off, enabling/disabling rain delays and toggling pre-configured programs.
  • binary_sensor for flood_sensor devices which provide liquid detection and temperature alerts when out of threshold.

Installation

Recommended installation is via the Home Assistant Community Store (HACS). hacs_badge

1. Install via HACS

If you do not wish to use HACS, then please download the latest version from the releases page and proceed to Step 2.

  1. Navigate to the HACS add-on
  2. Search for the Orbit B-hyve integration and install it
  3. Restart Home Assistant

Install B-hyve from HACS

2. Configure via Home Assistant

  1. Navigate to Home Assistant Settings > Devices & Services
  2. Click + Add Integration
  3. Search for Orbit B-hyve
  4. Complete the guided configuration

Configure B-hyve from Home Assistant

Help

Some common errors in set up include:

  • Assuming that installing the integration via HACS is all that is required - it still needs to be configured!
  • Not restarting Home Assistant after installing the integraion via HACS

Sensor Entities

Device Battery Sensor

A battery sensor entity is created for any device which has a battery level to report.

Device State sensor

A device state sensor entity is created for each device. This reports the state of the device, for example auto or off. A device may be switched to off either manually through the B-hyve app, or may be automatically set when battery levels are too low to operate the device correctly.

Zone Watering History sensor

A zone history sensor entity is created for each zone. This reports the history of zone watering.

The following attributes are set on zone history sensor entities:

Attribute Type Notes
budget number The watering budget used.
program string The program letter which triggered the watering event.
program_name string The name of the program which triggered the watering event.
run_time number The number of minutes the watering was active.
status string The watering status.
consumption_gallons number The amount of water consumed, in gallons.
consumption_litres number The amount of water consumed, in litres.
start_time string The start time of the watering.

Binary Sensor Entities

The BHyve flood sensor provides the following binary_sensor entities:

Water/Flood

A binary_sensor that turns on if water is detected.

Temperature Alert

A binary_sensor that turns on if the detected temperature is over or under the set threshold. The threshold values should be set using the BHyve app.

Switch Entities

Zone Switch

A zone switch entity is created for each zone of a sprinkler_timer device. This switch enables starting/stopping irrigation of a zone. Turning on the switch will enable watering of the zone for the amount of time indicated by the manual_preset_runtime attribute. This amount of time can be set using the set_manual_preset_runtime service or configured in the B-hyve app.

The following attributes are set on zone switch entities:

Attribute Type Notes
zone_name string The name of the zone
device_id string The id of the device which this zone belongs to
device_name string The name of the device which this zone belongs to
manual_preset_runtime number The number of seconds to run zone watering when switch is turned on.
smart_watering_enabled boolean True if the zone has a smart water schedule enabled.
sprinkler_type string The configured type of sprinker.
image_url string The url to zone image.
started_watering_station_at string The timestamp the zone started watering.
program_x object Provides details on any configured watering programs for the given switch.
program_e[watering_program] list[string] List of timestamps for future/scheduled watering times.

Only applicable if a Smart Watering program is enabled. Any rain delays or other custom programs must be considered separately.

program_x attribute

Any watering programs which are configured for a zone switch are made available as an attribute. The X denotes the letter of the program slot. Values A, B and C are well known custom slots. Program E is reserved for the Smart Watering plan. Slot D does not have a known use at this stage.

Please see program switches below for more details.

Rain Delay Switch

A rain delay switch entity is created for each discovered sprinkler_timer device. This entity will be on whenever B-hyve reports that a device's watering schedule will be delayed due to weather conditions.

Enabling the switch will set a 24 hour rain delay on the device — for a custom rain delay, please use the enable_rain_delay service.

The following attributes are set on switch.*_rain_delay entities, if the sensor is on:

Attribute Type Notes
cause string Why a delay was put in place. Values seen: auto. May be empty.
delay number The number of hours the delay is in place. NB: This is hours from started_at attribute.
weather_type string The reported cause of the weather delay. Values seen: wind, rain. May be empty.
started_at string The timestamp the delay was put in place.

Program Switch

A program switch entity is created for each program attached to each zone. These switches can be switched on or off. They can be configured using the official B-hyve app.

Attribute Type Notes
device_id string The id of the device which this zone belongs to.
is_smart_program boolean True if this is a Smart Watering program.
start_times string Configured start time for the program.
frequency object Watering schedule configuration.
frequency.type string Type of configuration. days is the only known value.
frequency.days list[int] Configured days for watering. 0 is Sunday, 1 is Monday etc...
run_times list[object] Configured watering run times.
run_times[].run_time int Minutes of watering.
run_times[].station int Zone id to water.

Not available on Smart Watering programs

Services

This integration provides the following services:

Service Parameters Description
bhyve.start_watering entity_id - zone(s) entity to start watering. This should be a reference to a zone switch entity
minutes - number of minutes to water for
Start watering a zone for a specific number of minutes
bhyve.stop_watering entity_id - zone(s) entity to stop watering. This should be a reference to a zone switch entity Stop watering a zone
bhyve.enable_rain_delay entity_id - device to enable a rain delay. This can reference either a zone or rain delay switch
hours - number of hours to enable a rain delay
Enable a rain delay for a device for a specified number of hours
bhyve.disable_rain_delay entity_id - device to enable a rain delay. This can reference either a zone or rain delay switch Cancel a rain delay on a given device
bhyve.set_manual_preset_runtime entity_id - zone(s) entity to set the preset runtime. This should be a reference to a zone switch entity
minutes - number of minutes to water for
Set the default time a switch is activated for when enabled. Support for this service appears to be patchy, and it has been difficult to identify under which conditions it works
bhyve.set_smart_watering_soil_moisture entity_id - zone(s) entity to set the moisture level for. This should be a reference to a zone switch entity
percentage - soil moisture level between 0 - 100
Set Smart Watering soil moisture level for a zone
bhyve.start_program entity_id - program entity to start. This should be a reference to a program switch entity Starts a pre-configured watering program. Watering programs cannot be created nor configured via this integration, and require the B-Hyve app to create or modify

Python Script

Bundled in this repository is a python_script which calculates a device's next watering time and when a rain delay is scheduled to finish.

Note: HACS does not install the script automatically and they must be added manually to your HA instance.

Scripts

Calculates:

  1. When the next scheduled watering is for a zone by considering all enabled watering programs
  2. When a device's active rain delay will finish, or None if there is no active delay

This script creates or updates entities named sensor.{zone_name}_next_watering and sensor.{device_name}_rain_delay_finishing.

Usage:

service: python_script.bhyve_next_watering
data:
  entity_id: switch.backyard_zone
Argument Type Required Notes
entity_id string True The entity id for a zone switch.

Automation

Hook these scripts up to automations to update as required:

automation:
  - alias: B-hyve next watering & rain delay finishing updater
    trigger:
      - platform: state
        entity_id: switch.backyard_zone, switch.rain_delay_lawn
      - platform: homeassistant
        event: start
    action:
      - service: python_script.bhyve_next_watering
        data:
          entity_id: switch.backyard_zone

Debugging

To debug this integration and provide device integration for future improvements, please enable debugging in Home Assistant's configuration.yaml

logger:
  logs:
    custom_components.bhyve: debug
    pybhyve: debug