Integration with Orbit B-Hyve Irrigation System

Ok so I got the integration installed and talking to B Hyve however both the state and history are showing unavailable. If anybody has any Idaeas that would be helpful.

image

How do you set the manual run time in the app and get it to stay in the integration? I haven’t been able to figure this out but seems like it would be easy so I must be missing something. Each time I set a manual timer in the app, it defaults to 10 minutes but HA still has run time of 300 seconds.

1 Like

Hello,

Anyone else seeing this in their logs?

Logger: homeassistant.setup
Source: setup.py:298
First occurred: 06:41:08 (2 occurrences)
Last logged: 06:41:34

Unable to prepare setup for platform bhyve.switch: Unable to set up component.
Unable to prepare setup for platform bhyve.sensor: Unable to set up component.
This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/bhyve/pybhyve/client.py:159
Integration: bhyve (documentation)
First occurred: 06:41:08 (1 occurrences)
Last logged: 06:41:08

Error during setup of component bhyve
Traceback (most recent call last):
  File "/config/custom_components/bhyve/pybhyve/client.py", line 153, in login
    resp.raise_for_status()
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://api.orbitbhyve.com/v1/session')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/config/custom_components/bhyve/__init__.py", line 183, in async_setup
    await bhyve.login()
  File "/config/custom_components/bhyve/pybhyve/client.py", line 159, in login
    raise RequestError(f"Error requesting data from {url}: {err}")
custom_components.bhyve.pybhyve.errors.RequestError: Error requesting data from https://api.orbitbhyve.com/v1/session: 401, message='Unauthorized', url=URL('https://api.orbitbhyve.com/v1/session')

Any ideas about how to resolve this issue?

Thanks.

Looks like either your credentials are incorrect (did they change?) or the Orbit API is having some trouble.

Thanks, haven’t changed anything as far as I know. Just noticed I had to log-in via the app again though.

Yes it was the password. Think I might have made a typo in the password.yaml file while I was changing something else.

Thanks for response.

@sebr I would like to thank you for this integration. everything worked at first try without any problems. I’ll make sure to let bhyve know that if I buy more bhyve hardware it will only be because this integration exists

3 Likes

Thank you so much @ekt

Does anyone have a simple automation to manually turn on the zones one after another.
For example turn on zone 1 for 10 minutes, followed by zone 2 for 10 minutes, etc. The following automation only turns on zone 1 and then stops

alias: 'Orbit BHyve Integration: start_watering'
description: ''
trigger:
  - platform: time
    at: '04:00:00'
condition: []
action:
  - service: bhyve.start_watering
    data:
      entity_id: switch.zone_1_zone
      minutes: 10
  - service: bhyve.start_watering
    data:
      entity_id: switch.zone_2_zone
      minutes: 10
mode: single

I believe you need to add

- delay: "00:11"

between zone starts

I tried that. What happens is zone 1 now runs for 11 seconds, followed by zone 2 for 10 minutes

action:
  - service: bhyve.start_watering
    data:
      entity_id: switch.zone_1_zone
      minutes: 10
  - delay: '00:00:11'
  - service: bhyve.start_watering
    data:
      entity_id: switch.zone_2_zone
      minutes: 10
  - delay: '00:00:11'

it’s 00:11:00 or 00:11 … not 00:00:11 You delayed 11 seconds :slight_smile:

Why 11 minutes. I want to water for ten minutes, then wait for 11 seconds until the next zone runs…

@stamandr - the bhyve.start_watering service call is asynchronous. This means that the service doesn’t wait for the watering to finish (it just asks the irrigation controller to start watering for 10 minutes and moves on).

If you are using a multi-zone controller, I believe they may only allow one zone at a time to be watering. As such, you will need to wait for the watering to finish before starting zone_2_zone. You can do this by setting a delay of 00:10:30 (I would add 30 seconds as there seems to be a few seconds delay when starting/finishing watering) or by waiting until zone_1_zone turns off.

1 Like

Thanks sebr… This is exactly what I was looking for. Although, now I have a new problem after updating to Ver 3. I get the errors below in my logs…

The bhyve platform for the switch integration does not support platform setup. Please remove it from your config
The bhyve platform for the binary_sensor integration does not support platform setup. Please remove it from your config.
The bhyve platform for the sensor integration does not support platform setup. Please remove it from your config.

Hey, just got some B-Hyve XD’s and the WiFi hub based on the ability to integrate into HA with this integration. (That, and the online rain delay which is already helpful today).

Had some trouble getting it to work as I only saw three entities for each device (rain delay, program and state). After reading through here, I finally found the two additional Zone entities.

So my request is, would it be possible to give these entities standard names? Maybe a prefix bhyve, and then the device name? That way the zone entities would show up when looking for “bhyve”.
Since there’s no actual integration in the UI, I had to guess at the available entities.
(And the zone switch and history entity are detached from the device name. Is that an issue in the orbit API, or in the integration? So for my two devices, I have: switch.zone_1_zone, switch.zone_1_zone_2, sensor.zone_1_zone_history, sensor.zone_1_zone_history_2

For some reason, I am unable to automatically add the battery sensors to Lovelace. I have to edit an existing card and then add them in. (Adding a new card, by entity, and then selecting the battery sensor and clicking ok will just give me an empty card:
image
(No big deal, as I was able to add them in later. Just a little weird. Never seen an entity that is available, but cannot be added through GUI)

So my request is, would it be possible to give these entities standard names? Maybe a prefix bhyve, and then the device name? That way the zone entities would show up when looking for “bhyve”.
Since there’s no actual integration in the UI, I had to guess at the available entities.

UI integration/configuration is coming soon - which will make it easier for new users to discover and interact with the devices :slight_smile:

3 Likes

Thanks so much @sebr for this great integration. I got a b-hyve XD 2-zone timer and the wifi hub and it was all super easy to get integrated with HA. I created very simple node red flows to turn the zones on and off using the bhyve.start_watering and bhyve.stop_watering services and that’s all I really need to be able to set up the automated watering schedules I’ll need (from within node red).

All the above took like 10 minutes and worked right out of the box - amazing.

…But, it would be nice to be able to set up some simple UI/UX from the dashboard. What I’d like to accomplish is for a given zone switch, be able to see its current state (on/off), its time remaining (if state is on), and then also be able to turn the zone on for a number of minutes chosen from a dropdown input select (which would then feed the bhyve.start_watering service call).

I think some of the pieces and parts for this are embedded in @fiftys post above, but there’s a lot more going on there than I need, so wondering if anyone using this integration has already gone down the path I’m describing and could share some front-end code.

EDIT: Also it would be very cool to integrate with this dashboard component for timers:

2 Likes

So I have the easy half of what I’m trying to do implemented now. I just defined a standard HA timer (as a helper) and then integrated it with my zone switch in node red like so:

(when the zone switch turns on, it starts the timer. When it turns off, it “finishes” the timer).

Then I visualized that standard timer on the dashboard using the timer-bar-card custom component I mentioned above.

All that’s left now is to be able to manually trigger that zone to start watering using a duration chosen from a drop-down.

2 Likes

Can anyone confirm if the 12-Zone/ Station ( Orbit 57950 B-hyve Smart 12-Zone) works with the integration ?

In case anyone is following along or for future humans trying to accomplish something like this, here’s where I’ve ended up so far. This is functional for my purposes, though it’s not the exact UI I would have chosen (see below for details).

You use the slider to choose from a pre-set list of runtimes in minutes and then click the little toggle button on the right and it starts the timer for the selected number of minutes and gives you a progress bar. Behind the scenes this is all wired up through node red.

Here’s the node red flow in picture form:

Here’s the YAML for the card:

type: vertical-stack
cards:
  - type: entities
    title: Garden
    show_header_toggle: false
    state_color: true
    entities:
      - entity: input_select.garden_timer_values
        type: custom:slider-entity-row
        icon: mdi:water-pump
        name: Runtime (min)
        extend_paper_buttons_row:
          position: right
          buttons:
            - entity: input_boolean.garden_timer
              name: ' '
              icon: mdi:toggle-switch
      - entity: timer.garden_irrigation
        layout: hide_name
        icon: mdi:water-outline
        active_icon: mdi:water
        type: custom:timer-bar-card
      - entity: sensor.zone_history
        type: custom:multiple-entity-row
        name: Last
        icon: mdi:calendar
        show_state: false
        entities:
          - attribute: start_time
            format: datetime
          - attribute: run_time
            name: Minutes

This is making use of several custom front-end extensions (through HACS).
Paper Buttons Row
Slider Entity Row
Multiple Entity Row
Timer Bar Card

I would have preferred to use a dropdown (input_select) instead of the slider for choosing the runtime minutes. I think that would be a better UI, but I could not get an input_select element to render properly under any circumstances other than it being the lone element in a row of a standard entities card. No matter what I tried to get it to play nice next to other elements, one of two things happened; either it didn’t display as a dropdown at all - just showing the currently selected choice and requiring you to click on it to pop up a detail modal window that then let you choose from the dropdown choices, or it rendered a dropdown where the dropdown was cut off on the top and the bottom by the boundaries of the row that the input_select was part of (so it was unusable). There definitely seem to be problems with how the input_select element is currently rendered.

1 Like