Giter VIP home page Giter VIP logo

bhyve-home-assistant's Introduction

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 a "default" amount of time.

This default is often indicated by the manual_preset_runtime attribute, and this can be set using the set_manual_preset_runtime service or configured in the B-hyve app.

Note

Some BHyve devices do not have the ability to set the default watering time, and it is recommended that you use the bhyve.start_watering service to start the watering zone with the desired number of minutes.

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 the devices or 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

Caution

These scripts are expermintal and not supported. YMMV and any support issues will be closed as won't fix.

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

bhyve-home-assistant's People

Contributors

allistermaguire avatar cjsturgess avatar disforw avatar jakeshirley avatar jdreamerz avatar jeremy-green avatar jv4779 avatar lokilicious avatar lukemeyer avatar mash2k3 avatar mdegat01 avatar mukundv avatar sebr avatar sgryphon avatar wtadler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bhyve-home-assistant's Issues

Select and Run Multiple Zones in Sequence

Hi Sebr, love your work but if i had the following feature it would be just perfect for my requirement.
I have 3 x 12 zone Bhyve irrigation controllers and would love the ability to just run specific zones in sequence.
i.e select zones 1-5 and 8-12 but not zones 6 and 7 via the lovelace card and have the controller water each of these zones in turn.
Currently when i try this i can see on the app as i select each individual zone it starts but then immediately stops when i select the next zone. I've also tried selecting all of the zones at once and deselecting the zone i don't want to water but nothing happens when i do this. Unfortunately i can't create one of the fixed programs as the zones i need to both water and not water will change depending on the location of people on the grounds.
Hope you can help, Regards Alan

bhyve_next_watering.py: Difference in sensor naming between documentation and implementation

It's me again! LOL

I just wanted to raise an issue with regards to a difference between the bhyve_next_watering.py script documentation and what I'm seeing in actual implementation.

The documentation states that the the next watering sensor will be named: sensor.next_watering_{device_name}

My sensor is named: sensor.<zone name>_next_watering where <zone name> is the name I gave the zone in the Bhyve app.

Checked the code and it's indeed using <zone_name> to build the sensor entity.

Also the rain delay sensor is actually created as sensor.<device_name>_rain_delay_finishing rather than sensor.rain_delay_finishing_<device_name>

Helpful script! Thanks!

Python Script returning "None" for both sensors

My B-Hyve is currently on a rain delay and I have a program set to run. I ran the python script and it returned "none" for both the rain delay and next watering sensors. There are no errors reported in the log.

I used entity_id: switch.bhyve_front_central_zone. I did rename the switch entities from the default format, not sure if that could be the reason.

The script did create the following sensors:
sensor.front_central_next_watering
sensor.home_rain_delay_finishing

Screenshot of the attributes for switch.bhyve_front_central_zone

image

Let me now if there is additional data that I can provide.

Unable to add custom repo for B-Hyve Add-on

Hello,

As recommended by the install guide I am trying to add the custom repo : https://github.com/sebr/bhyve-home-assistant to my HA config and it never loads. The error :
20-01-05 01:28:26 INFO (MainThread) [hassio.store.git] Clone add-on https://github.com/sebr/bhyve-home-assistant repository
20-01-05 01:28:29 ERROR (MainThread) [hassio.utils.json] Can't read json from /data/addons/git/6e2ba233/repository.json: [Errno 2] No such file or directory: '/data/addons/git/6e2ba233/repository.json'
20-01-05 01:28:29 WARNING (MainThread) [hassio.store.data] Can't read repository information from /data/addons/git/6e2ba233/repository.json

Is seen in my event logs,

Any idea what I could do different ?

Since the update 112

I got this error since the 112

Configuration invalide
Platform error binary_sensor.bhyve - No module named 'custom_components.bhyve.binary_sensor'

I try to uninstall and reinstall and I remove all reference to Bhyve in HA, I always got this error.

Install help please

HI,

I have installed HACS and added this repo in there.
Now I am stuck.
Where do the below go to? What files and location? (sorry kind of new to this).

bhyve:
username: !secret bhyve_username
password: !secret bhyve_password

sensor:

  • platform: bhyve

binary_sensor:

  • platform: bhyve

switch:

  • platform: bhyve

KeyError: 'sprinkler_type' after upgrade to 0.1.0

upgraded from 0.0.1 to 0.1.0, now getting this error in the logs:

2020-01-15 06:40:34 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform bhyve
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/bhyve/switch.py", line 31, in async_setup_platform
BHyveSwitch(bhyve, device, zone, name, sensor_type["icon"],)
File "/config/custom_components/bhyve/switch.py", line 46, in init
super().init(bhyve, device, name, icon, DEVICE_CLASS_SWITCH)
File "/config/custom_components/bhyve/init.py", line 151, in init
self._setup(device)
File "/config/custom_components/bhyve/switch.py", line 74, in _setup
"sprinkler_type": zone["sprinkler_type"],
KeyError: 'sprinkler_type'

Help required

I am new to home assistant and yaml, and the first items i wanted to automate was my irrigation system.

i have no idea what i am doing as this is the first intergration i have installed using HACS.
Orbit B-hyve is listed in HACS installed intergrations, however i dont see it listed in HA intergration list.

I have copied your config file to configuration.yaml and also added my user and password to secrets.yaml

but i dont know what to do from here, any help or example setups would be fantastic

Regards
Dave
Home Assistant NOOB

Battery Level Unknown

Home Assistant 0.111.4
HACS 1.1.0
byhve-home-assistant 0.1.13
B-hyve Wireless Hub Firmware 0022
B-hyve Smart Hose Timer Firmware 0041

Entities created in HA and returning values:

  • switch.back_yard_zone : off
  • sensor.back_yard_zone_state : auto
  • binary_sensor.rain_delay_smart_hose_timer_1 : off
  • sensor.battery_level_smart_hose_timer_1 : unknown

Battery level sensor always shows Unknown (currently 100% in Byhve Android App).

Websocket closed error

I get the following errors when I try to activate any switch.

Logger: custom_components.bhyve.pybhyve.websocket
Source: custom_components/bhyve/pybhyve/websocket.py:163
Integration: Orbit BHyve Integration (documentation)
First occurred: 3:54:54 PM (10 occurrences)
Last logged: 8:00:34 PM

Tried to send message whilst websocket closed

Maybe missed a setting somewhere?

switch creation error after update to 0.1.9

Good morning,

over the weekend I updated the component to the latest version (0.1.9), in the new version there is an error creating a switch.

2020-02-24 07:36:59 DEBUG (MainThread) [custom_components.bhyve.switch] Watering program {'name': 'Todo', 'program_start_date': None, 'frequency': {'type': 'days', 'days': [1, 3, 5]}, 'program_end_date': None, 'updated_at': '2020-01-16T15:33:09.426Z', 'updated_via': None, 'start_times': ['03:30'], 'id': '5c1956264f0c88ec9ed50383', 'budget': 100, 'is_smart_program': False, 'device_id': '5a90c9804f0c72b5d61f5d3b', 'program': 'b', 'run_times': [{'run_time': 30, 'station': 1}, {'run_time': 30, 'station': 2}, {'run_time': 30, 'station': 3}, {'run_time': 30, 'station': 4}, {'run_time': 30, 'station': 5}, {'run_time': 30, 'station': 6}, {'run_time': 30, 'station': 7}, {'run_time': 30, 'station': 8}], 'enabled': True, 'created_at': '2018-12-18T20:18:46.088Z'}
2020-02-24 07:36:59 ERROR (MainThread) [homeassistant.components.switch] Error while setting up bhyve platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/bhyve/switch.py", line 44, in async_setup_platform
hass, bhyve, device, zone, name, programs, "water-pump"
File "/config/custom_components/bhyve/switch.py", line 64, in init
super().init(hass, bhyve, device, name, icon, DEVICE_CLASS_SWITCH)
File "/config/custom_components/bhyve/init.py", line 157, in init
self._setup(device)
File "/config/custom_components/bhyve/switch.py", line 111, in _setup
self._set_watering_program(program)
File "/config/custom_components/bhyve/switch.py", line 127, in _set_watering_program
program_name = program.get("name", "Unknown")
NameError: name 'program' is not defined

seems to be something with the "programs" in the bhyve.

Any suggestion?

Thank you

Behavior of 6-Station Controller

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 3 programs [ Active/Inactive ] on the 6-station controller and works as expected within the dashboard.

Describe the bug, if it's not my setup
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.
This may very well be something I have not set correctly, or something I have set incorrectly.

Expected behaviour
Would expect the same Behavior as the Faucet Timer

BHyve devices
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

Logs

2021-03-23 16:10:42 DEBUG (MainThread) [custom_components.bhyve] Devices: [{"last_connected_at": "2021-03-22T07:05:29.623Z", "address": "REDACTED", "timezone": {"dst_offset": 3600, "raw_offset": -28800, "timezone_id": "America/Los_Angeles", "timezone_name": "Pacific Daylight Time"}, "zip_code": "95608", "full_location": "REDACTED", "firmware_version": "0030", "name": "Hub", "type": "bridge", "battery": null, "image_url": "https://s3-us-west-2.amazonaws.com/orbit-irrigation/device-assets/59a0b7594f0ce371519d4dc9/1519fc86-4b5b-4812-8f77-afd30bc1e73b", "updated_at": "2021-03-22T07:05:29.623Z", "reference": "4467552002d9", "mac_address": "4467552002d9", "mesh_id": "5ad4c6174f0c72d7d6255be2", "status": {"watering_status": null, "next_start_time": "1970-01-01T00:00:00-07:00", "next_start_programs": []}, "wifi_version": 0, "id": "5ad4c6174f0c72d7d6255be0", "num_stations": 0, "device_gateway_host": "device2.orbitbhyve.com", "user_id": "59a0b7594f0ce371519d4dc9", "device_gateway_topic": "devices-5", "hardware_version": "BH1-0001", "is_connected": true, "location": "REDACTED", "created_at": "2018-04-16T15:49:43.770Z"}, {"last_connected_at": "2021-03-22T16:55:14.734Z", "address": "REDACTED", "water_sense_mode": "off", "scheduled_modes": {}, "timezone": {"dst_offset": 3600, "raw_offset": -28800, "timezone_id": "America/Los_Angeles", "timezone_name": "Pacific Daylight Time"}, "full_location": "REDACTED", "weather_forecast_location_id": "5a3026684f0cd78da02ba7d4", "firmware_version": "0032", "name": "Main", "type": "sprinkler_timer", "manual_preset_runtime_sec": 0, "image_url": "https://s3-us-west-2.amazonaws.com/orbit-irrigation/device-assets/59a0b7594f0ce371519d4dc9/95140a84-7ca9-4d76-9192-94061f9c111a", "restricted_frequency": null, "weather_delay_thresholds": {"precip_prob": 71, "precip_in": 0.125, "wind_speed_mph": 20, "freeze_temp_f": 34}, "updated_at": "2021-03-23T21:24:05.276Z", "reference": "446755005fb4", "mac_address": "446755005fb4", "weather_station_id": "5a30263c4f0caaed3d54dd88", "status": {"run_mode": "auto", "next_start_programs": ["c"], "rain_delay_overridden_at": "2020-09-09T16:59:20.934Z", "watering_status": null, "rain_delay": 0, "flow_sensor": null, "next_start_time": "2021-03-23T20:00:00-07:00", "rain_delay_started_at": "2021-03-19T23:38:23-07:00"}, "wifi_version": "1.4.0", "id": "5adcd2e24f0c72d7d625f691", "num_stations": 6, "notes": "", "zones": [{"station": 1, "sun_shade": "partial_shade", "name": "Grass Back Yard", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}, {"station": 2, "sun_shade": "partial_shade", "name": "Grape Vines, Redwood", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}, {"station": 3, "sun_shade": "partial_shade", "name": "Citrus Tree", "image_url": "https://s3-us-west-2.amazonaws.com/orbit-irrigation/zone-assets/59a0b7594f0ce371519d4dc9/73c2aa49-1ecc-45a0-b632-6d0ea6457b16", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}, {"station": 4, "sun_shade": "partial_shade", "name": "Front Trees", "image_url": "https://s3-us-west-2.amazonaws.com/orbit-irrigation/zone-assets/59a0b7594f0ce371519d4dc9/ef5c66a2-d1a3-4baf-bb01-7ddbdef7bc17", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}, {"station": 5, "sun_shade": "partial_shade", "name": "Front Grass", "image_url": "https://s3-us-west-2.amazonaws.com/orbit-irrigation/zone-assets/59a0b7594f0ce371519d4dc9/ef96f289-fba8-4aac-b2d1-c7f291f6bd9c", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}, {"station": 6, "sun_shade": "partial_shade", "name": "Front Hedge", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}], "device_gateway_host": null, "user_id": "59a0b7594f0ce371519d4dc9", "google_home_status": null, "device_gateway_topic": "devices-5", "hardware_version": "wt25-0001", "is_connected": true, "location": "REDACTED", "created_at": "2018-04-22T18:22:26.302Z", "suggested_start_time": null, "et_id": "5644ff06ad27a7777ff6a622"}, {"last_connected_at": "2021-03-22T07:05:29.625Z", "address": "REDACTED", "water_sense_mode": "auto", "timezone": {"dst_offset": 3600, "raw_offset": -28800, "timezone_id": "America/Los_Angeles", "timezone_name": "Pacific Daylight Time"}, "full_location": "REDACTED", "weather_forecast_location_id": "5a3026684f0cd78da02ba7d4", "firmware_version": "0041", "name": "Smart Hose Timer", "type": "sprinkler_timer", "manual_preset_runtime_sec": 600, "battery": {"percent": 100, "charging": false}, "image_url": "https://s3-us-west-2.amazonaws.com/orbit-irrigation/device-assets/59a0b7594f0ce371519d4dc9/65d63605-20f8-4b16-8820-54d21441cc33", "restricted_frequency": null, "weather_delay_thresholds": {"precip_prob": 30, "precip_in": 0.125, "wind_speed_mph": 20, "freeze_temp_f": 37}, "updated_at": "2021-03-23T21:46:05.549Z", "reference": "4467552002d9-17862", "mac_address": "4467551179ab", "weather_station_id": "5a30263c4f0caaed3d54dd88", "mesh_id": "5ad4c6174f0c72d7d6255be2", "status": {"run_mode": "auto", "next_start_programs": ["a"], "rain_sensors": [], "watering_status": null, "rain_delay": 0, "flow_sensor": null, "next_start_time": "2021-03-25T14:38:00-07:00", "rain_delay_started_at": "2021-03-23T21:46:05.000Z"}, "id": "6057bb744f0c9e0599a0aed2", "num_stations": 1, "zones": [{"station": 1, "name": "Garden", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}], "user_id": "59a0b7594f0ce371519d4dc9", "google_home_status": null, "device_gateway_topic": "devices-5", "hardware_version": "HT25-0000", "is_connected": true, "location": "REDACTED", "created_at": "2021-03-21T21:32:36.040Z", "suggested_start_time": null, "et_id": "5644ff06ad27a7777ff6a622"}]
2021-03-23 16:10:42 DEBUG (MainThread) [custom_components.bhyve] Programs: [{"name": "Citrus Trees", "program_start_date": null, "frequency": {"type": "days", "days": [0, 2, 3, 5], "interval": 1}, "program_end_date": null, "is_basic_program": false, "updated_at": "2021-03-23T19:56:01.984Z", "updated_via": "wifi", "start_times": ["09:00"], "id": "5c19530d4f0c88ec9ed4bb57", "budget": 100, "is_smart_program": false, "device_id": "5adcd2e24f0c72d7d625f691", "program": "a", "run_times": [{"run_time": 74, "station": 3}, {"run_time": 3, "station": 6}], "enabled": true, "created_at": "2018-12-18T20:05:33.214Z"}, {"name": "Grass", "program_start_date": null, "frequency": {"type": "odd"}, "program_end_date": null, "updated_at": "2021-03-23T19:56:01.987Z", "updated_via": null, "start_times": ["08:00"], "id": "5c19632d4f0c88ec9ed72cf5", "budget": 100, "is_smart_program": false, "device_id": "5adcd2e24f0c72d7d625f691", "program": null, "run_times": [{"run_time": 8, "station": 1}], "enabled": false, "created_at": "2018-12-18T21:14:21.746Z"}, {"post_delay": 0, "name": "Vines", "program_start_date": null, "frequency": {"type": "days", "days": [0, 1, 2, 3, 4, 5, 6]}, "program_end_date": null, "group_id": "5ec9d1244f0c01c8ad0195f4", "updated_at": "2021-03-23T19:56:01.989Z", "pre_delay": 0, "updated_via": "wifi", "start_times": ["10:00", "20:00"], "id": "5c1964804f0c88ec9ed7661c", "budget": 100, "group_run_times": [{"device_id": "5adcd2e24f0c72d7d625f691", "run_times": [{"run_time": 40, "station": 2}]}], "is_smart_program": false, "device_id": "5adcd2e24f0c72d7d625f691", "program": null, "run_times": [{"run_time": 40, "station": 2}], "enabled": false, "created_at": "2018-12-18T21:20:00.016Z"}, {"name": "Vines 2", "frequency": {"type": "days", "days": [0, 1, 2, 3, 4, 5, 6]}, "updated_at": "2021-03-23T19:56:01.991Z", "updated_via": "wifi", "start_times": ["21:00"], "id": "5ef17e7c4f0c226b41a69232", "budget": 100, "is_smart_program": false, "device_id": "5adcd2e24f0c72d7d625f691", "program": null, "run_times": [{"run_time": 40, "station": 2}], "enabled": false, "created_at": "2020-06-23T04:01:00.433Z"}, {"name": "Front Trees", "frequency": {"type": "days", "days": [0, 2, 4]}, "updated_at": "2021-03-23T19:56:01.993Z", "updated_via": "wifi", "start_times": ["20:00"], "id": "5f0477c14f0c226b41a9993e", "budget": 100, "is_smart_program": false, "device_id": "5adcd2e24f0c72d7d625f691", "program": "c", "run_times": [{"run_time": 14, "station": 4}], "enabled": true, "created_at": "2020-07-07T13:25:21.961Z"}, {"name": "Temp frog", "frequency": {"type": "even"}, "is_basic_program": false, "updated_at": "2021-03-23T19:56:01.994Z", "updated_via": "wifi", "start_times": ["14:00"], "id": "603d67304f0c8f4b44d60cf0", "budget": 100, "is_smart_program": false, "device_id": "5adcd2e24f0c72d7d625f691", "program": "b", "run_times": [{"run_time": 3, "station": 6}], "enabled": true, "created_at": "2021-03-01T22:14:08.573Z"}, {"update_via": "wifi", "name": "Garden", "frequency": {"type": "odd"}, "is_basic_program": false, "updated_at": "2021-03-23T20:56:19.499Z", "updated_via": "wifi", "start_times": ["14:38"], "id": "6057bcd24f0c161d5a0a1e75", "budget": 100, "device_id": "6057bb744f0c9e0599a0aed2", "program": "a", "run_times": [{"run_time": 10, "station": 1}], "enabled": true, "created_at": "2021-03-21T21:38:26.360Z"}]

Feature request: switch to turn individual sensors on/off

It would be great if it would be possible to turn individual sensors on and off for a configurable amount of time.
I have 9 BHyve Hose Faucet Timers (sensors) which are all part of the same zone, I have no automated watering program and manually turn the devices on when needed for the set amount of minutes.

HACS bhyve Configuration error

Bhyve through HACS noting following configuration error:
Platform error binary_sensor.bhyve - No module named 'custom_components.bhyve.binary_sensor'

I suspect this is due to a change in binary battery sensor, not sure how to fix.

Thanks.

No state data

I'm running Hassio 0.114.4. I've installed your integration via HACS and added the configuration params per the instructions. After restarting HA, it creates the entity sensors, switches, etc., but the states are all "unavailable".

It seemed to pick up the name of my timer, which is "shed_misting". I have one zone called "Zone 1". I see a switch.zone entity which I'm guessing is that zone, but it also has the state of "unavailable". Attempting to turn on that switch via the service call does nothing. I've tried restarting HA a couple times. There's nothing in the log file related to the bhyve component at all.

This is a brand new bhyve with the wi-fi hub. It's working from the app.

bhyve:
  username: !secret bhyve_username
  password: !secret bhyve_password

switch:
  - platform: bhyve

sensor:
  - platform: bhyve

Is there something I'm missing?
Timer firmware version: 41
Hub firmware version: 0030

Deprecation warnings from component on 0.110.0

I ran check config before upgrading to 0.110 and received these warnings from its output:

WARNING:homeassistant.components.switch:SwitchDevice is deprecated, modify BHyveZoneSwitch to extend SwitchEntity
WARNING:homeassistant.components.binary_sensor:BinarySensorDevice is deprecated, modify BHyveRainDelayBinarySensor to extend BinarySensorEntity

Since these are only warnings I assume the integration still works for now (haven't actually upgraded yet, working out other issues first). But wanted to get an issue down to let you know.

Ludeeus has been linking to this blog post to explain what's going on when people comment that they see this warning in their logs on 0.110. Seems like just a name change for some base classes.

[EDIT] Removed one log as I realized the 3rd one was coming from a different component. Going to make an issue there next.

What models does this work with please?

Hi, this looks really exciting. Your write up doesn't say if it works with the B-HYVE HOSE FAUCET TIMER.
Hopefully yes and I can try it out.

Cheers David

lost zone states for all except zone one with update to version 1.0.0

First great work

updated to version 1.0.0 and saw all the new features which are great, but I lost the zone state sensor for all zones with the exception of zone 1. I uninstalled, removed all bhyve entities, reinstalled with same results. My debug file suggests zones 2,3 and 4 states are recognized and are activated (below) but still no zone states show in entities list or in lovelace. Strange that zone 1 (backyard) does show. Any thoughts?

Log-->

2020-06-24 13:59:43 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 1.9 seconds.
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.sensor] Creating battery sensor: Smart Outdoor Timer battery level
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.sensor] Creating state sensor: Back Yard zone state
2020-06-24 13:59:43 DEBUG (MainThread) [custom_components.bhyve.sensor] State sensor Back Yard zone state setup: State: auto | Available: True
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.sensor] Creating state sensor: Plants zone state
2020-06-24 13:59:43 DEBUG (MainThread) [custom_components.bhyve.sensor] State sensor Plants zone state setup: State: auto | Available: True
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.sensor] Creating state sensor: Front Right zone state
2020-06-24 13:59:43 DEBUG (MainThread) [custom_components.bhyve.sensor] State sensor Front Right zone state setup: State: auto | Available: True
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.sensor] Creating state sensor: Front Left zone state
2020-06-24 13:59:43 DEBUG (MainThread) [custom_components.bhyve.sensor] State sensor Front Left zone state setup: State: auto | Available: True
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Back Yard zone
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Back Yard zone watering_status: None
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Back Yard Zone: Watering program Half (b) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Back Yard Zone: Watering program Full (a) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Back Yard Zone: Watering program Quarter (c) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Back Yard Zone: Watering program One (d) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Back Yard Zone: Watering program Smart Watering (e) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Smart Outdoor Timer rain delay
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Plants zone
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Plants zone watering_status: None
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Plants Zone: Watering program Half (b) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Plants Zone: Watering program Full (a) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Plants Zone: Watering program Quarter (c) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Plants Zone: Watering program One (d) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Plants Zone: Watering program Smart Watering (e) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Smart Outdoor Timer rain delay
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Front Right zone
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Right zone watering_status: None
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Right Zone: Watering program Half (b) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Right Zone: Watering program Full (a) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Right Zone: Watering program Quarter (c) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Right Zone: Watering program One (d) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Smart Outdoor Timer rain delay
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Front Left zone
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Left zone watering_status: None
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Left Zone: Watering program Half (b) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Left Zone: Watering program Full (a) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Left Zone: Watering program Quarter (c) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Front Left Zone: Watering program One (d) is not enabled, skipping
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Smart Outdoor Timer rain delay
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Default
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Half
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Full
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Quarter
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program One
2020-06-24 13:59:43 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Smart Watering
2020-06-24 13:59:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=bhyve, service=enable_rain_delay>
2020-06-24 13:59:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=bhyve, service=disable_rain_delay>
2020-06-24 13:59:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=bhyve, service=start_watering>
2020-06-24 13:59:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=bhyve, service=stop_watering>
2020-06-24 13:59:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=bhyve, service=set_manual_preset_runtime>

Sensor Rain delay errors on startup

The following appears in my home-assistant log upon every restart for the rain_delay_*_remaining and rain_delay_*_finishing for each device:

2020-05-25 14:03:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.rain_delay_deck_finishing fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 470, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/template/sensor.py", line 224, in async_update
    self._state = self._template.async_render()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/template.py", line 228, in async_render
    return compiled.render(kwargs).strip()
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/srv/homeassistant/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

Python script does not handle '-' in device_name consistently with rest of code

Describe the bug

HA error log
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: sensor.b-hyve_reticulation_controller_rain_delay_finishing. Format should be .<object_id>

Python script does not use an underscore to replace hyphens

other entities created are:
switch.b_hyve_reticulation_controller_rain_delay
sensor.b_hyve_reticulation_controller_state - friendly_name: B-hyve Reticulation Controller state

I stopped the error, but not 100% sure I fixed the problem by updating 2 lines in the Python file:

next_watering_entity = f"sensor.{zone_name}_next_watering".replace("-","_").replace(" ", "_").lower()

rain_delay_finishing_entity = f"sensor.{device_name}_rain_delay_finishing".replace("-","_").replace(" ", "_").lower()

Expected behaviour

No error in log

BHyve devices

1 x 12 zone controller

Logs

DEBUG (MainThread) [custom_components.bhyve] Devices:
DEBUG (MainThread) [custom_components.bhyve] Programs:

Need Setup help Please

I had this working and then I crashed my system and I am trying to rebuild it. Now for the life of me I cannot figure out how I got it to work the last time. I do not have something set correctly in my yaml files, but not sure what. It is not seeing the B-hyve controller, which has a fixed IP address set by my router. How do I get HA to recognize the controller?

Thanks,
Mike

All Entities States are unknown

Hi,
Apologies I don't have logs to provide as my .bhyve directory doesn't seem to have anything in it..
I think I've enabled Debugging per your guide.

Problem:
Since version 1.00 I've not been able to connect to my bhyve account.
Each of my Entities have unknown states.
I did see a websocket error in the log, hence I enabled debudding, but can't seem to see the dump files.
I've restarted HASSIO a number times to try to generate files (by trying to connect to my account).

I'm not what more I can provide.
My BHyve environment is simply a Wifi-Hub & Smart Hose Timer.
The BHyve app seems to work okay, although it doesn't always water per the smart-scheduling, but suspect it's their app..

I've not created an automation to update, do I need to?
Apologies, by skillset is low in this space.

< Update >
I've just seen in another issue you suggest removing the previous config. I'll do that to test.

Ps. THANKS SO MUCH, this is a great integration.

Cheers,

Manual Switch

The manual turn the switch on call includes the manual_preset_runtime in seconds but bhyve is expecting minutes, so if Bhyve is setup with a manual run of 30 minutes it returns a manual_preset_runtime of 1800s to home assistant but the manual switch call then returns 1800 to bhyve which it interprets as 30hrs and then it appears it will only accept 12hours so uses this. When I divided the preset_manual_runtime by 60 the switch run time returned to the correct 30minutes.
/
config/custom_components/bhyve/switch.pyCurrent code
current code
station_payload = [
{"station": self._zone_id, "run_time": self._manual_preset_runtime}

revised code
station_payload = [
{"station": self._zone_id, "run_time": self._manual_preset_runtime/60}

Startup errors with v2: Entity id already exists & unsupported operand on round(gallons * 3.785, 2)

Home Assistant 0.111.4

Updated to newest version 2.0 of bhybe integration and now get the following errors at startup:

Error 1

Logger: homeassistant.components.sensor
Source: custom_components/bhyve/sensor.py:163
Integration: Sensor (documentation, issues)
First occurred: 10:03:03 PM (6 occurrences)
Last logged: 10:03:03 PM

bhyve: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 319, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
    await self.async_update()
  File "/config/custom_components/bhyve/sensor.py", line 163, in async_update
    litres = round(gallons * 3.785, 2)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

Error 2

Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:433
Integration: Switch (documentation, issues)
First occurred: 10:03:02 PM (5 occurrences)
Last logged: 10:03:02 PM

Entity id already exists - ignoring: switch.yukon_rain_delay. Platform bhyve does not generate unique IDs
Home Assistant has started!

error adding devices in 0.1.9

I've had two hub/timer combinations working since the very first release. Recently I bought two more and added them in the app.

After the next restart, I'm getting these errors:

2020-03-11 21:15:26 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up bhyve platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/bhyve/binary_sensor.py", line 35, in async_setup_platform
hass, bhyve, device, name, sensor_type["icon"]
File "/config/custom_components/bhyve/init.py", line 157, in init
self._setup(device)
File "/config/custom_components/bhyve/binary_sensor.py", line 51, in _setup
rain_delay = device_status["rain_delay"]
KeyError: 'rain_delay'

Also, "rain_delay" for the existing devices now shows "unknown". This may have been the case before I added the new devices, so I can't quite say which version might have introduced this.

Integration occasionally drops connectivity

Running 2.0.1 after trying the alpha version. Occasionally (1 per week) getting a websocket error which disconnects from the bhyve service. After this error, the component runs services but they do not function. No error is produced.
by the component so apparently the component believes the websocket is still functioning correctly. The debug log and dump show no errors. A reboot re-establishes the websocket and all is fine until next websocket error happens. After websocket error, the bhyve websocket portion of the log from the reboot is:

2020-07-03 06:32:19 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket
2020-07-03 06:32:19 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected
2020-07-03 06:33:39 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.547296289232] Client unable to keep up with pending messages. Stayed over 512 for 5 seconds
2020-07-03 06:33:45 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.547296289232] Client unable to keep up with pending messages. Stayed over 512 for 5 seconds

I am not certain if the pending messages comes from the bhyve websocket or not,

Unable to see Bhyve under configuration/intigration of HASSIO

I have installed HACS and am able to install Orbit Bhyve through HACS but no matter what I do I am not able to find it under configuratio/ intigration of Home Assistant. I have tried deleting the cache several time but I still cant install it. Please help.

Screenshot 2020-11-27 213411
Screenshot 2020-11-27 213148
Screenshot 2020-11-27 213219

Set minutes service bhyve.start_watering

Hi, it is possible to set the minutes of bhyve.start_watering service (for example in an automation) from an input_number?

I want to choose the minutes of manual irrigation from lovelace and so start the irrigation (through a script or an automation).

Thanks

using templates in start_watering service call

Describe the bug
I am attempting to call bhyve.start_watering with minutes specified by a template:

- type: button
  tap_action:
    action: call-service
    service: bhyve.start_watering
    service_data:
      entity_id: switch.backyard_zone
      minutes: '{{ states("input_number.watering_time") | int }}'

But it reports "expected int for dictionary value @ data['minutes']"

The "input_number.watering_time" is correctly set.
In Developer Tools, template editor, the same {{...}} reports the correct value.

timer is {{ states("input_number.watering_time") | int }}
shows:
timer is 6

Logs

Logger: homeassistant.components.websocket_api.http.connection
Source: core.py:1399
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 3:54:30 PM (2 occurrences)
Last logged: 3:54:41 PM

[2928512784] expected int for dictionary value @ data['minutes']

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1399, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: required key not provided @ data['minutes']

I tried data_template instead of service_data, then it reports
required key not provided @ data['entity_id']

Unable to retrieve watering program if the smart watering is disabled

Hi,
Thanks for your great work with this integration. I just completed the setup and everything seems to be working fine except the watering program. It works ONLY if the smart watering is "ON". I have enabled the regular program mode in the Bhyve which waters based on the manually set schedule. Is there is any option to retrieve the watering program even if the Smart Watering is "OFF".

Thanks again for your help.

bhyve_next_watering.py does not run

Describe the bug
An error is recorded in the Home Assistant logs when attempting to run bhyve_next_watering.py.

Expected behaviour
creates or updates entities named sensor.{zone_name}_next_watering and sensor {device_name}_rain_delay_finishing.

BHyve devices
1 x B-Hyve zone / BHyve Hose Faucet Timer / WIFI module

Logs

Logger: homeassistant.components.python_script
Source: components/python_script/__init__.py:147
Integration: Python Scripts (documentation, issues)
First occurred: 1:41:38 PM (1 occurrences)
Last logged: 1:41:38 PM

Error loading script bhyve_next_watering.py: Line 28: "_LOGGER" is an invalid variable name because it starts with "_"

not getting switches

I installed this addon, added the following to my config.yaml

bhyve:
  username: [email protected]
  password: whocares

switch:
   - platform: bhyve 

sensor:
   - platform: bhyve

I see the sensors for my three orbit controllers, but I can't find any switch (or zone) entities.

Does not create switch, Error messages in logs 0.1.1

error from callback <bound method Listener.on_message of <Listener(Thread-4, initial daemon)>>: on_message() missing 1 required positional argument: 'message'

and

error from callback <bound method Listener.on_open of <Listener(Thread-4, initial daemon)>>: on_open() missing 1 required positional argument: 'ws'

Receiving warnings with later break once a week

Describe the bug
At least one a week I receive issues as warnings with later disconnect.

Expected behaviour

BHyve devices
1 device

Logs

Logger: custom_components.bhyve
Source: custom_components/bhyve/__init__.py:262
Integration: Orbit BHyve Integration (documentation)
First occurred: 11. April 2021, 15:32:14 (1 occurrences)
Last logged: 11. April 2021, 15:32:14

Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/devices: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/devices?t=1618147934.0864298')
Logger: custom_components.bhyve
Source: custom_components/bhyve/__init__.py:262
Integration: Orbit BHyve Integration (documentation)
First occurred: 11. April 2021, 15:32:14 (1 occurrences)
Last logged: 11. April 2021, 15:32:14

Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/devices: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/devices?t=1618147934.0864298')
Logger: homeassistant.helpers.entity
Source: custom_components/bhyve/pybhyve/client.py:78
First occurred: 11. April 2021, 13:21:13 (3 occurrences)
Last logged: 11. April 2021, 16:56:45

Update for sensor.zone_1_zone_history fails
Update for sensor.wasserhahn_garten_battery_level fails
Traceback (most recent call last):
  File "/config/custom_components/bhyve/pybhyve/client.py", line 75, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/5d41cce54f0c47ece9e6ab27?t=1618140073.1427734&page=1&per-page=10')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 277, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, in async_device_update
    raise exc
  File "/config/custom_components/bhyve/sensor.py", line 184, in async_update
    raise (err)
  File "/config/custom_components/bhyve/sensor.py", line 151, in async_update
    history = await self._fetch_device_history(force_update=force_update) or []
  File "/config/custom_components/bhyve/__init__.py", line 272, in _fetch_device_history
    raise (err)
  File "/config/custom_components/bhyve/__init__.py", line 268, in _fetch_device_history
    return await self._bhyve.get_device_history(self._device_id, force_update)
  File "/config/custom_components/bhyve/pybhyve/client.py", line 182, in get_device_history
    await self._refresh_device_history(device_id, force_update=force_update)
  File "/config/custom_components/bhyve/pybhyve/client.py", line 112, in _refresh_device_history
    device_history = await self._request(
  File "/config/custom_components/bhyve/pybhyve/client.py", line 78, in _request
    raise RequestError(f"Error requesting data from {url}: {err}")
custom_components.bhyve.pybhyve.errors.RequestError: Error requesting data from https://api.orbitbhyve.com/v1/watering_events/5d41cce54f0c47ece9e6ab27: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/5d41cce54f0c47ece9e6ab27?t=1618140073.1427734&page=1&per-page=10')

bhyve_next_watering.py - Error executing script: 'device_name'

When I try to run the bhyve_next_watering.py script, I get the error "Error executing script: 'device_name'"
I am calling the service "python_script.bhyve_next_watering" with "entity_id: switch.back_trees_zone". I only have one zone at the moment.

Not sure if this will help...
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/init.py", line 205, in execute
exec(compiled.code, restricted_globals)
File "bhyve_next_watering.py", line 7, in
File "/usr/local/lib/python3.7/site-packages/RestrictedPython/Eval.py", line 35, in default_guarded_getitem
return ob[index]
KeyError: 'device_name'

permanent breakdown of the interface to the server

HA 107.7
bHyve 0.1.10

Once a day, I have these errors:

Logger: custom_components.bhyve.pybhyve.websocket
Source: custom_components/bhyve/pybhyve/websocket.py:127
First occurred: 3. April 2020, 18:27:01 (1 occurrences)
Last logged: 3. April 2020, 18:27:01

Websocket exception:
Logger: custom_components.bhyve.pybhyve.websocket
Source: custom_components/bhyve/pybhyve/websocket.py:131
First occurred: 3. April 2020, 19:19:54 (1 occurrences)
Last logged: 3. April 2020, 19:19:54

Unexpected error Cannot connect to host api.orbitbhyve.com:443 ssl:None [None]

Only a HArestart can reestablish the interface

switch.bhyve_zone entity has two watering_program attributes

The switch.bhyve_zone entity returns two attributes for watering_program. Once displays an array of the next eight watering schedules.

The second returns a null value.

When trying to create a template sensor that displays the next eight watering schedules the attribute with the null value is displayed instead.

I believe this is a bug regardless of which one is the correct attribute. It would be great to be able to extract the next eight watering schedules out of the array though!

Timeout error

Describe the bug

zones time out very quickly and throw up a fault message but work when manually activating even though voltage is good with brand new solanoids

Expected behaviour

should be an option for a selected amount of retry attempts or an extended timer

BHyve devices

6 zones

Logs

DEBUG (MainThread) [custom_components.bhyve] Devices:
DEBUG (MainThread) [custom_components.bhyve] Programs:

Sprinklers still on, but switch showing off

It isn't every time, but about 75% of the time the history shows that automation turned on the sprinklers and then a few seconds later will show the sprinklers off again. The sprinklers DO NOT shutoff, but home assistant is showing that they are off. Makes it difficult to know if everything is working like it should and that your sprinklers ran the proper length of time by checking the history.

The only thing I can see that might be causing the problem is that for some reason I'm getting two calls to turn on a station.
For example. My north side sprinkler was on when I woke up this morning and timer was showing 5 minutes left, but history shows it was turned off 2 seconds after it came on. In the log it is showing the initial call to turn on at 06:00:05 and then another call at 06:00:07 and even though it looks like they were both a call to turn on station 4 the second call put station 4's switch into an off position, but it didn't shut off the sprinklers. Hmmm.. Maybe because the switch is setup as a toggle or something???

Here is the log. No error's or anything just two calls. When the history shows correct I don't have both these calls.

2020-06-28 06:00:00 INFO (MainThread) [homeassistant.components.automation] Executing Irrigation Northside Yard
2020-06-28 06:00:00 INFO (MainThread) [homeassistant.components.automation] Irrigation Northside Yard: Running script
2020-06-28 06:00:00 INFO (MainThread) [homeassistant.components.automation] Irrigation Northside Yard: Executing step call service
2020-06-28 06:00:00 INFO (MainThread) [custom_components.bhyve.switch] start_watering service called
2020-06-28 06:00:00 INFO (MainThread) [custom_components.bhyve.switch] Starting watering
2020-06-28 06:00:00 INFO (MainThread) [homeassistant.components.automation] Irrigation Northside Yard: Executing step call service
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Provo House Timer rain delay - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Frontyard Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: SouthSide Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Backyard Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: NorthSide Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Drip system zone - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Sprinkler Security zone - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Provo House Timer battery level - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Provo House Timer state - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Frontyard Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: SouthSide Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: NorthSide Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Sprinkler Security zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Drip system zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00
2020-06-28 06:00:05 INFO (MainThread) [custom_components.bhyve] Callback update: Backyard Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'watering_in_progress_notification', 'program': 'manual', 'current_station': 4, 'run_time': 20, 'started_watering_station_at': '2020-06-28T12:00:01.00

2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Provo House Timer rain delay - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Frontyard Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: SouthSide Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Backyard Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: NorthSide Sprinklers zone - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Drip system zone - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Sprinkler Security zone - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Provo House Timer battery level - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Provo House Timer state - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Frontyard Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: SouthSide Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: NorthSide Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Sprinkler Security zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Drip system zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'
2020-06-28 06:00:07 INFO (MainThread) [custom_components.bhyve] Callback update: Backyard Sprinklers zone history - 5d3786064f0c47ece9e4fa1f - {'event': 'change_mode', 'mode': 'manual', 'program': None, 'stations': [{'station': 4, 'run_time': 20.0}], 'device_id': '5d3786064f0c47ece9e4fa1f', 'timestamp'

Thank you.

Feature Request: ability to modify program start times

One of my main frustrations with the orbit bhyve is that if I want to water at dawn there is no way to do this without manually adjusting the program start time as the dawn time changes over the seasons.

It would be amazing if I could do this using home assistant.

If HA reboots during auto program run it turns off sprinklers

If during the automation program and the sprinklers are running and HA gets rebooted it causes the currently running program to stop and turns off the sprinklers.

I've noticed that if an automation trigger in HA goes off it switches the system to manual while HA is in control and stops any running program. I've changed my automation system to not run during the bhyve program run times to avoid this. I'm wondering if maybe during the initial startup of the bhyve component it is switching the system to manual for a couple seconds causing the auto system to shutdown.

"Cannot write to closing transport" after 2021.3.0

Describe the bug
Bhyve Component shows an error after update to 2021.3.0
Entities display correctly but switches don't work

BHyve devices
BHyve Hose Faucet Timer

Traceback (most recent call last):
  File "/config/custom_components/bhyve/pybhyve/websocket.py", line 57, in _ping
    await self._ws.send_str(json.dumps({"event": "ping"}))
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py", line 150, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/http_websocket.py", line 687, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/http_websocket.py", line 598, in _send_frame
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

Battery level unknown

Dear,

First of all I would like to thank you for your awesome work!

Is there a known issue on battery level reporting ?
Currently it’s « unavailable » or « unknown » in HA.
I have a Smart Hose Tap with WiFi Hub

Thank you for you assistance.

Getting Error: Service not implemented: start_watering

When setting up a manual run, I'm getting the following error:
`
Logger: custom_components.bhyve.switch
Source: custom_components/bhyve/switch.py:190
Integration: Orbit BHyve Integration (documentation)
First occurred: 11:04:32 AM (1 occurrences)
Last logged: 11:04:32 AM

Service not implemented: start_watering
`

Expected behaviour
I should be able to manually trigger a watering event, wait 10s, and then stop the watering event.

BHyve devices
Orbit 21004 B-hyve Smart Hose Faucet Timer with Wi-Fi Hub

Logs

Step 2: Check Home Assistant logs

  1. Open home-assistant.log
  2. Identify lines which begin with:
2021-03-24 18:04:20 DEBUG (MainThread) [custom_components.bhyve] Devices: [{"last_connected_at": "2021-03-24T15:16:48.384Z", "address": "REDACTED", "timezone": {"dst_offset": 3600, "raw_offset": -28800, "timezone_id": "America/Los_Angeles", "timezone_name": "Pacific Daylight Time"}, "full_location": "REDACTED", "firmware_version": "0030", "name": "WiFi Hub", "type": "bridge", "updated_at": "2021-03-24T17:46:02.965Z", "reference": "446755234dcf", "mac_address": "446755234dcf", "mesh_id": "605a9fc54f0c9e0599a0ebed", "status": {"next_start_time": "1970-01-01T00:00:00-07:00", "next_start_programs": []}, "wifi_version": 0, "id": "605a9fc54f0c161d5a0a5af3", "num_stations": 0, "user_id": "605a9fa94f0c161d5a0a5af0", "device_gateway_topic": "devices-2", "hardware_version": "BH1-0001", "is_connected": true, "location": "REDACTED", "created_at": "2021-03-24T02:11:17.597Z"}, {"last_connected_at": "2021-03-24T15:16:48.386Z", "address": "REDACTED", "water_sense_mode": "auto", "scheduled_modes": {}, "timezone": {"dst_offset": 3600, "raw_offset": -28800, "timezone_id": "America/Los_Angeles", "timezone_name": "Pacific Daylight Time"}, "full_location": "REDACTED", "weather_forecast_location_id": "5a3026454f0c1bde5df55590", "firmware_version": "41", "name": "SmartHose", "type": "sprinkler_timer", "manual_preset_runtime_sec": 600, "battery": {"percent": 100, "charging": false}, "restricted_frequency": null, "weather_delay_thresholds": {"precip_prob": 30, "precip_in": 0.125, "wind_speed_mph": 20, "freeze_temp_f": 37}, "updated_at": "2021-03-24T18:03:41.255Z", "reference": "446755234dcf-48151", "mac_address": "446755148d59", "weather_station_id": "5a3026454f0c1bde5df55591", "mesh_id": "605a9fc54f0c9e0599a0ebed", "status": {"run_mode": "auto", "next_start_programs": ["a"], "rain_sensors": [], "watering_status": null, "rain_delay": 0, "flow_sensor": null, "next_start_time": "2021-03-28T04:29:00-07:00", "rain_delay_started_at": "2021-03-24T18:03:35.000Z"}, "id": "605aa1e74f0c9e0599a0ec1f", "num_stations": 1, "zones": [{"station": 1, "name": "backyard_zone", "num_sprinklers": 0, "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false}], "user_id": "605a9fa94f0c161d5a0a5af0", "google_home_status": null, "device_gateway_topic": "devices-2", "hardware_version": "HT25-0000", "is_connected": true, "location": "REDACTED", "created_at": "2021-03-24T02:20:23.009Z", "suggested_start_time": null, "et_id": "5644ff07ad27a7777ff6c408"}]
2021-03-24 18:04:20 DEBUG (MainThread) [custom_components.bhyve] Programs: [{"pending_timer_ack": true, "update_via": "wifi", "name": "Back", "frequency": {"type": "days", "days": [0], "interval": 1}, "is_basic_program": false, "updated_at": "2021-03-24T17:47:34.619Z", "updated_via": "wifi", "start_times": ["04:29"], "id": "605aa4144f0c9e0599a0ec52", "budget": 100, "device_id": "605aa1e74f0c9e0599a0ec1f", "program": "a", "run_times": [{"run_time": 0.25, "station": 1}], "enabled": false, "created_at": "2021-03-24T02:29:40.800Z"}]
2021-03-24 18:04:20 INFO (MainThread) [homeassistant.setup] Setup of domain bhyve took 5.5 seconds
2021-03-24 18:04:20 DEBUG (MainThread) [custom_components.bhyve] Programs: [{"pending_timer_ack": true, "update_via": "wifi", "name": "Back", "frequency": {"type": "days", "days": [0], "interval": 1}, "is_basic_program": false, "updated_at": "2021-03-24T17:47:34.619Z", "updated_via": "wifi", "start_times": ["04:29"], "id": "605aa4144f0c9e0599a0ec52", "budget": 100, "device_id": "605aa1e74f0c9e0599a0ec1f", "program": "a", "run_times": [{"run_time": 0.25, "station": 1}], "enabled": false, "created_at": "2021-03-24T02:29:40.800Z"}]
2021-03-24 18:04:20 INFO (MainThread) [homeassistant.setup] Setup of domain bhyve took 5.5 seconds

Screen Shot 2021-03-24 at 11 13 28 AM

Zone Turned Off time is not correct, actually reflects program end time rather than zone end time

Runtime appears correctly, and zone on timestamp is correct. However the zone off timestamp reflects when the program ends, not when the zone actually shuts off.

Turned off
2:50:00 PM - 1 hour ago
Turned on
1:59:59 PM - 2 hours ago
Turned off
6:49:59 AM - 9 hours ago
Turned on
5:59:58 AM - 10 hours ago

device name: XXXXXXXXX B-hyve
device id: XXXXX
zone name: Garden Sprinklers
smart watering enabled: false
manual preset runtime: 600
sprinkler type: rotor
program a:
  enabled: true
  name: New Grass
  is_smart_program: false
  start_times:
    - "06:00"
    - "14:00"
  frequency:
    type: days
    days:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
  run_times:
    - run_time: 10
      station: 1
program b:
  enabled: false
  name: Sprinkler Test
  is_smart_program: false
program c:
  enabled: false
  name: Run Now
  is_smart_program: false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.