Yep, as part of the history sensor.
Hi, today I updated to 2021.3.4
After a long time, I had these errors in quick sequence:
Logger: custom_components.bhyve.pybhyve.websocket
Source: custom_components/bhyve/pybhyve/websocket.py:117
Integration: Orbit BHyve Integration (documentation)
First occurred: 18:22:10 (1 occurrences)
Last logged: 18:22:10
websocket connection closed
Logger: custom_components.bhyve.pybhyve.websocket
Source: custom_components/bhyve/pybhyve/websocket.py:131
Integration: Orbit BHyve Integration ([documentation](https://github.com/sebr/bhyve-home-assistant/blob/master/README.md))
First occurred: 18:22:10 (1 occurrences)
Last logged: 18:22:10
Websocket exception:
and
Logger: custom_components.bhyve.pybhyve.websocket
Source: custom_components/bhyve/pybhyve/websocket.py:137
Integration: Orbit BHyve Integration ([documentation](https://github.com/sebr/bhyve-home-assistant/blob/master/README.md))
First occurred: 18:22:15 (1 occurrences)
Last logged: 18:22:15
Client connection error; state: starting
Integration is now broken and a restart requested.
Is there a way to avoid the restart?
Some integrations allowing a reload without the need of a HA restart, MET.NO for example.
Others still need a restart to be honest
IIRC HA doesnt give you the option to reload it when it doesnt actually setup. Would be nice if they did.
A NewB Question:
Home Assistant 2021.3.4
I have installed Orbit BHyve Integration, written by Seb Ruiz, version: 2.0.6
Hardware:
Orbit 57946 B-hyve Smart Indoor/Outdoor 6-Station Controller
Orbit 21005 B-hyve Bluetooth Hose Faucet Timer
Orbit 21006 B-hyve Wi-Fi Hub
Integration:
Have performed the Integration via HACS, installed fine.
Have added a simple Dashboard to manually control and check functionality.
Success:
Can control the Faucet Timer and works as expected, turns on and off within the dashboard.
Can control the programs [ Active/Inactive ] on the 6-station controller and works as expected within the dashboard.
Failure:
Failure to control any of the stations on the 6-station controller. They turn on for about 2 seconds and then turn off without touching the control on the dashboard, the valves do not open.
Does anyone have an idea of what I have done incorrectly? Faucet Control works perfect, the 6-station controller fails even thro I can control other functions [ ie: change the state of the active programs ]
I do not any messages within the Error Log, and only “Off” events within History.
I can control any of the stations via the B-hyve app on my phone.
Thank for any help…
Is it possible to somehow change the switch to be a sprinkler in apple home kit? I found this image
and code:
homekit:
entity_config:
switch.sprinkler:
type: sprinkler
Any ideas or help would be great!
I’m confused, you’re listing the answer, what is the help required? In your homekit configuration you list the switch and set its type to sprinkler
, exactly like you’re showing.
I tried and it didn’t change anything for me. it did create a second instance of HomeKit, but nothing was different there either. Also, how would I format this to change four zones? switch.zone through switch.zone_4?
In the doc on that option it says that the type is cached on first load and it must be reset to change the type later. Did you do that?
Nope! Ill try that, thanks!
I am trying to get the python script running for next watering times for the 3 zones I have but the only entity that seems to be updating is the sensor.sprinklers_rain_delay_finishing. Below is my automation script and all of my schedules right now are manually programmed via the B-hyve app.
-
alias: BHyve Sensor Update - Front Drip
id: bhyve_update_front_drip
trigger:- platform: state
entity_id: switch.front_drip_zone, switch.sprinklers_rain_delay - platform: homeassistant
event: start
action: - service: python_script.bhyve_next_watering
data:
entity_id: switch.front_drip_zone
- platform: state
-
alias: BHyve Sensor Update - Back Drip
id: bhyve_update_back_drip
trigger:- platform: state
entity_id: switch.back_drip_zone, switch.sprinklers_rain_delay - platform: homeassistant
event: start
action: - service: python_script.bhyve_next_watering
data:
entity_id: switch.back_drip_zone
- platform: state
-
alias: BHyve Sensor Update - Back Lawn
id: bhyve_update_back_lawn
trigger:- platform: state
entity_id: switch.back_lawn_zone, switch.sprinklers_rain_delay - platform: homeassistant
event: start
action: - service: python_script.bhyve_next_watering
data:
entity_id: switch.back_lawn_zone
- platform: state
How can I debug the response from the api? I have already turned on python script debug in configuration.yaml
@SteveA the bhyve_next_watering
script only supports smart watering programs for now, so you’re out of luck unless you’d like to like to contribute to the script and implement the logic.
Thanks sebr. I may flip on smart watering to test. I will continue to learn and may be able to help in future until then thank you for this integration. I was able to purchase an orbit bhyve because of it.
Yea i also would just like to say thanks to Sebr
I was standing in home depot seen this orbit, googled ‘orbit bhyve homeassistant’
Found the github, made purchase. Been working great for a year.
SteveA you dont need to worry about that script.
There are others that have posted complete watering / garden scripts/automatons
I could also post what I use, but it will take me some time to organize it into a post-able format.
let me know if you need it.
Hi, I would like to see an example of what can be done with automation/scripting.
I have just started tinkering with this and have six b-hyve hose timers imported into HA that water zones of my yard. I also have the bhyve_next_watering
script set up and I see output from it in the debug logging.
I am just not sure what is possible to do as a next step. I was hoping to be able to define one or more zone watering sequences that I could trigger either manually/scheduled or both. And hopefully it would be easier/better than having to do everything in the Orbit app.
It seems like there is good info here and I will get something together soon enough.
@fiftys any new information is always welcome. I am 2 weeks in on HASS and so far it has been a great discovery. The community is tops and I am addicted.
Im working on it.
Hi, I have been messing around with this integration for about a week and have a couple of questions to see if my use case is something I can figure out with the help of H-A.
My setup:
- Six hose timers and and the WiFi hub. 3 front yard and 3 back yard.
- H-A is running in a container on an old Mac mini.
- The sensors and switches are visible and can be operated from within H-A.
- All zone controllers are now operating on smart program/smart watering (as set from the B-Hyve app).
- bhyve_next_watering script is running with a automation script triggering for each zone on state change events similar to the example that was posted by Angelo last October:
https://community.home-assistant.io/t/integration-with-orbit-b-hyve-irrigation-system/39688/215
Once I made each program/zone smart watering only, the next watering script comes up with ‘None’ as a next watering time. So not sure if I should be using a manual program triggers in the bhyve app in order for that to work.
So my two main questions:
1: Has anyone done something based on a manual action in H-A that would have each zone trigger one at a time, in succession, for a set period of time? I would like to be able to trigger an activity that would fire each zone one at a time for 20 min each.
2: Should I be using only Smart Programs/Zones in ther B-hyve settings? I am concerned that the next_watering calculations seem to be several days into the future based on the time stamps that are being produced.
Sorry about the rookie-level questions. I have done a fair amount of scanning of this thread to pick up what I can. Would really like to have a combination of smart watering with the ability to manually trigger a sequential watering of all zones at any time.
This is really cool stuff. Thanks for providing this integration and the community’s support.
Patrick
Alright, sorry it took so long. My setup is pretty much a confusing mess.
This post will probably be no different. Im 100% certain ill miss some stuff, and to be honest this might not be very new user friendly. Sorry about that. You dont have to use this card like mine. If you do you will need some extra cards installed, multiple-entity-row, button-card. cardmod. Or you can just pick and pull the enitites into a reguar entities card.
entities:
- entity: switch.sprinklers_zone
name: Sprinkler Valve
secondary_info: last-changed
- entity: switch.backyard_light
name: Backyard Light
secondary_info: last-changed
- entity: binary_sensor.zone_1_day_active
icon: 'mdi:sprinkler-variant'
- type: divider
- entities:
- input_number.zone_1_run_time
entity: sensor.zone_1_time_remaining
icon: 'mdi:clock'
name: Duration
secondary_info: last-changed
state_color: true
state_header: Remaining
type: 'custom:multiple-entity-row'
- entities:
- entity: input_datetime.zone_1_am_on_time
name: On Time
- entity: automation.irrigation_zone_1_am
name: Active
entity: automation.irrigation_zone_1_am
name: AM
state_color: true
toggle: true
type: 'custom:multiple-entity-row'
- entities:
- entity: input_datetime.zone_1_pm_on_time
name: On Time
- entity: automation.irrigation_zone_1_pm
name: Active
entity: automation.irrigation_zone_1_pm
name: PM
state_color: true
toggle: true
type: 'custom:multiple-entity-row'
- entities:
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_mon
icon: 'mdi:roman-numeral-1'
name: Mon
tap_action:
action: toggle
type: 'custom:button-card'
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_tue
icon: 'mdi:roman-numeral-2'
name: Tue
state:
- spin: false
value: 'on'
width: 35px
tap_action:
action: toggle
type: 'custom:button-card'
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_wed
icon: 'mdi:roman-numeral-3'
name: Wed
tap_action:
action: toggle
type: 'custom:button-card'
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_thu
icon: 'mdi:roman-numeral-4'
name: Thu
tap_action:
action: toggle
type: 'custom:button-card'
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_fri
icon: 'mdi:roman-numeral-5'
name: Fri
tap_action:
action: toggle
type: 'custom:button-card'
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_sat
icon: 'mdi:roman-numeral-6'
name: Sat
tap_action:
action: toggle
type: 'custom:button-card'
- color: var(--primary-color)
color_type: icon
entity: input_boolean.zone_1_sun
icon: 'mdi:roman-numeral-7'
name: Sun
tap_action:
action: toggle
type: 'custom:button-card'
entity: binary_sensor.zone_1_day_active
icon: 'mdi:calendar-week'
name: Days
state_header: Active
type: 'custom:multiple-entity-row'
show_header_toggle: false
style: |
ha-card {
border: solid 2px var(--primary-color);
border-radius: 70px;
box-shadow: none;
}
title: South Lawn
type: entities
Here is what you will need.
make this binary_sensor with these input_boolean helpers.
- platform: template
sensors:
zone_1_day_active:
friendly_name: Irrigation Day Active
value_template: >-
{{ ( is_state('input_boolean.zone_1_mon', 'on') and now().weekday() == 0 )
or ( is_state('input_boolean.zone_1_tue', 'on') and now().weekday() == 1 )
or ( is_state('input_boolean.zone_1_wed', 'on') and now().weekday() == 2 )
or ( is_state('input_boolean.zone_1_thu', 'on') and now().weekday() == 3 )
or ( is_state('input_boolean.zone_1_fri', 'on') and now().weekday() == 4 )
or ( is_state('input_boolean.zone_1_sat', 'on') and now().weekday() == 5 )
or ( is_state('input_boolean.zone_1_sun', 'on') and now().weekday() == 6 ) }}
Input_datetime helpers
zone_1_am_on_time:
name: AM On Time
has_date: false
has_time: true
zone_1_pm_on_time:
name: PM On Time
has_date: false
has_time: true
input_number helpers
zone_1_run_time:
name: Run Time
min: 1
max: 20
step: 1
unit_of_measurement: min
icon: mdi:clock
sensors:
- platform: template
sensors:
zone_1_time_remaining:
friendly_name: "Time Remaining"
value_template: >
{% set x = states('sensor.time') %}
{% if is_state('switch.sprinklers_zone', 'on') %}
{{ [ (states('input_number.zone_1_run_time') | float - (as_timestamp(now()) - as_timestamp(states.switch.sprinklers_zone.last_changed)) / 60) | round(0) ,0 ] | max }}
{% else %}
0
{% endif %}
unit_of_measurement: "min"
automations:
- id: irrigation_zone_1_am
alias: Irrigation Zone 1 AM
trigger:
- platform: template
value_template: '{{ states("sensor.time") == states("input_datetime.zone_1_am_on_time").rsplit(":",1)[0]
}}'
condition:
- condition: state
entity_id: binary_sensor.zone_1_day_active
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.sprinklers_zone
mode: single
- id: irrigation_zone_1_pm
alias: Irrigation Zone 1 PM
trigger:
- platform: template
value_template: '{{ states("sensor.time") == states("input_datetime.zone_1_pm_on_time").rsplit(":",1)[0]
}}'
condition:
- condition: state
entity_id: binary_sensor.zone_1_day_active
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.sprinklers_zone
mode: single
- id: irrigation_zone_1_off
alias: Irrigation Zone 1 Off
trigger:
- platform: numeric_state
entity_id: sensor.zone_1_time_remaining
below: '1'
- platform: state
entity_id: switch.sprinklers_zone
to: 'on'
for: 0:15:00
condition:
- condition: state
entity_id: switch.sprinklers_zone
state: 'on'
action:
- service: switch.turn_off
entity_id: switch.sprinklers_zone
initial_state: true
mode: single
Might have missed soemthing. I have two setups but mainly use this.
Ill gather the second more elaborate setup soon. Sorry this took so long. Life, busy, etc.
also I didnt write these (except for the card layout). I found them on this forum and github. so credit goes to those people.
another thing, I have all the auto stuff and smart stuff turned off in the b-hyve app. it says ‘these zones are never set to water’: 1,2,3’ and ‘you have no programs scheduled’ everything is running off of the homeassistant automations. I did have to set the manual run time in the app, to a few mins higher(20min) than any of my automations will ever run (15min)
Okay I just noticed that I screwed up the coding for the card. Fixed it in the post.
I had this forum open for nearly a week randomly adding to it… messed it up as i knew i would.
Should be fixed though for a direct copy/paste as long as you have those custom cards installed.