sebr / bhyve-home-assistant

Orbit BHyve custom component for Home Assistant
MIT License
252 stars 42 forks source link

Loses connection over time #152

Closed NotSteveAtGithub closed 2 years ago

NotSteveAtGithub commented 2 years ago

Describe the bug Any time I start HA, I'm able to start and stop watering from the UI and from automations. However, over a day (or a few), it eventually stops working. The log shows this message when a command fails:

2022-08-18 17:31:13.598 WARNING (MainThread) [custom_components.bhyve.pybhyve.websocket] Tried to send message whilst websocket closed; state: starting

Expected behaviour Would expect continued operation.

BHyve devices I have 5 "Orbit 21005 B-hyve Bluetooth Hose Faucet Timers" and 4 wi-fi hubs.

Device Diagnostics

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.8.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "America/Chicago",
    "os_name": "Linux",
    "os_version": "5.15.55",
    "supervisor": "2022.08.3",
    "host_os": "Home Assistant OS 8.4",
    "docker_version": "20.10.14",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "aarlo": {
      "version": "0.7.2b8",
      "requirements": [
        "unidecode",
        "cloudscraper>=1.2.58",
        "paho-mqtt"
      ]
    },
    "healthchecksio": {
      "version": "22.2.0",
      "requirements": [
        "integrationhelper"
      ]
    },
    "sonoff": {
      "version": "3.1.0",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "bhyve": {
      "version": "3.0.0",
      "requirements": []
    },
    "hacs": {
      "version": "1.26.2",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "attributes": {
      "version": "1.2.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "bhyve",
    "version": "3.0.0",
    "name": "Orbit B-hyve",
    "config_flow": true,
    "documentation": "https://github.com/sebr/bhyve-home-assistant/blob/master/README.md",
    "dependencies": [],
    "codeowners": [
      "@sebr"
    ],
    "iot_class": "cloud_push",
    "requirements": [],
    "is_built_in": false
  },
  "data": {
    "devices": [
      {
        "last_connected_at": "2022-08-15T23:03:27.958Z",
        "address": "**REDACTED**",
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "firmware_version": "0030",
        "name": "NW Hub",
        "type": "bridge",
        "updated_at": "2022-08-15T23:03:27.959Z",
        "reference": "446755210739",
        "mac_address": "446755210739",
        "mesh_id": "5d5cae814f0c47ece9ea4a75",
        "status": {
          "watering_status": null,
          "next_start_time": "1970-01-01T00:00:00-05:00",
          "next_start_programs": []
        },
        "wifi_version": 0,
        "id": "5d5cae814f0c47ece9ea4a73",
        "num_stations": 0,
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "device_gateway_topic": "devices-1",
        "hardware_version": "BH1-0001",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2019-08-21T02:37:53.694Z"
      },
      {
        "last_connected_at": "2022-08-15T23:03:27.961Z",
        "address": "**REDACTED**",
        "water_sense_mode": "off",
        "scheduled_modes": {
          "auto": {
            "at": "",
            "annually": false
          },
          "off": {
            "at": "",
            "annually": false
          }
        },
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "weather_forecast_location_id": "**REDACTED**",
        "firmware_version": "0041",
        "name": "NW Hose Timer",
        "flume_device_id": "",
        "type": "sprinkler_timer",
        "manual_preset_runtime_sec": 2700,
        "battery": {
          "percent": 95,
          "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": "2022-08-18T16:44:10.219Z",
        "reference": "446755210739-32877",
        "mac_address": "4467551285de",
        "weather_station_id": "**REDACTED**",
        "mesh_id": "5d5cae814f0c47ece9ea4a75",
        "status": {
          "run_mode": "auto",
          "next_start_programs": [
            "a"
          ],
          "rain_sensors": [],
          "watering_status": null,
          "rain_delay_suggested_at": "2022-08-17T19:37:56.084Z",
          "rain_delay": 0,
          "flow_sensor": null,
          "next_start_time": "2030-01-01T18:00:00-05:00",
          "rain_delay_started_at": "2022-08-16T07:30:45.000Z"
        },
        "id": "5d5caef44f0c47ece9ea4a91",
        "num_stations": 1,
        "notes": "",
        "zones": [
          {
            "station": 1,
            "slope_grade": 0,
            "sun_shade": "mostly_shady",
            "name": "NW Zone",
            "num_sprinklers": 0,
            "catch_cup_volumes": [],
            "catch_cup_run_time": 0,
            "smart_watering_enabled": false
          }
        ],
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "google_home_status": null,
        "device_gateway_topic": "devices-1",
        "hardware_version": "HT25-0000",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2019-08-21T02:39:48.624Z",
        "suggested_start_time": null,
        "et_id": "5644ff08ad27a7777ff6caea"
      },
      {
        "last_connected_at": "2022-08-12T03:43:58.750Z",
        "address": "**REDACTED**",
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "firmware_version": "0030",
        "name": "SW Hub",
        "type": "bridge",
        "updated_at": "2022-08-12T03:43:58.750Z",
        "reference": "44675520ab4f",
        "mac_address": "44675520ab4f",
        "mesh_id": "5d5cb2ca4f0c47ece9ea4b66",
        "status": {
          "next_start_programs": [],
          "next_start_time": "1970-01-01T00:00:00-05:00",
          "watering_status": null
        },
        "wifi_version": 0,
        "id": "5d5cb2ca4f0c47ece9ea4b64",
        "num_stations": 0,
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "device_gateway_topic": "devices-1",
        "hardware_version": "BH1-0001",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2019-08-21T02:56:10.366Z"
      },
      {
        "last_connected_at": "2022-08-12T03:43:50.215Z",
        "address": "**REDACTED**",
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "firmware_version": "0030",
        "name": "NE Hub",
        "type": "bridge",
        "updated_at": "2022-08-12T03:43:50.215Z",
        "reference": "4467552039ff",
        "mac_address": "4467552039ff",
        "mesh_id": "5e696baf4f0c7eccad2e403f",
        "status": {
          "watering_status": null,
          "next_start_time": "1970-01-01T00:00:00-05:00",
          "next_start_programs": []
        },
        "wifi_version": 0,
        "id": "5e696baf4f0c7eccad2e403d",
        "num_stations": 0,
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "device_gateway_topic": "devices-11",
        "hardware_version": "BH1-0001",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2020-03-11T22:52:31.060Z"
      },
      {
        "last_connected_at": "2022-08-12T03:43:50.217Z",
        "address": "**REDACTED**",
        "water_sense_mode": "off",
        "scheduled_modes": {
          "auto": {
            "at": "",
            "annually": false
          },
          "off": {
            "at": "",
            "annually": false
          }
        },
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "weather_forecast_location_id": "**REDACTED**",
        "firmware_version": "0041",
        "name": "NE Hose Timer",
        "flume_device_id": "",
        "type": "sprinkler_timer",
        "manual_preset_runtime_sec": 2700,
        "battery": {
          "percent": 61,
          "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": "2022-08-18T22:01:51.065Z",
        "reference": "4467552039ff-12689",
        "mac_address": "446755110829",
        "weather_station_id": "**REDACTED**",
        "mesh_id": "5e696baf4f0c7eccad2e403f",
        "status": {
          "run_mode": "auto",
          "next_start_programs": [
            "a"
          ],
          "rain_sensors": [],
          "watering_status": null,
          "rain_delay_suggested_at": "2022-08-17T20:52:34.470Z",
          "rain_delay": 0,
          "flow_sensor": null,
          "next_start_time": "2030-01-01T18:00:00-05:00",
          "rain_delay_started_at": "2022-08-16T08:30:42.000Z"
        },
        "id": "5e696fe14f0cb5aa04819154",
        "num_stations": 1,
        "notes": "",
        "zones": [
          {
            "station": 1,
            "slope_grade": 0,
            "sun_shade": "mostly_shady",
            "name": "NE Zone",
            "num_sprinklers": 0,
            "catch_cup_volumes": [],
            "catch_cup_run_time": 0,
            "smart_watering_enabled": false
          }
        ],
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "google_home_status": null,
        "device_gateway_topic": "devices-11",
        "hardware_version": "HT25-0000",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2020-03-11T23:10:25.143Z",
        "suggested_start_time": null,
        "et_id": "5644ff08ad27a7777ff6caea"
      },
      {
        "last_connected_at": "2022-08-12T03:43:49.613Z",
        "address": "**REDACTED**",
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "firmware_version": "0030",
        "name": "SE Hub",
        "type": "bridge",
        "updated_at": "2022-08-12T03:43:49.613Z",
        "reference": "446755208daf",
        "mac_address": "446755208daf",
        "mesh_id": "5e6971814f0cb5aa04819172",
        "status": {
          "next_start_programs": [],
          "next_start_time": "1970-01-01T00:00:00-05:00",
          "watering_status": null
        },
        "wifi_version": 0,
        "id": "5e6971814f0c7eccad2e409d",
        "num_stations": 0,
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "device_gateway_topic": "devices-6",
        "hardware_version": "BH1-0001",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2020-03-11T23:17:21.388Z"
      },
      {
        "last_connected_at": "2022-08-12T19:31:42.143Z",
        "address": "**REDACTED**",
        "water_sense_mode": "off",
        "scheduled_modes": {
          "auto": {
            "at": "",
            "annually": false
          },
          "off": {
            "at": "",
            "annually": false
          }
        },
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "weather_forecast_location_id": "**REDACTED**",
        "firmware_version": "0041",
        "name": "SE Hose Timer",
        "flume_device_id": "",
        "type": "sprinkler_timer",
        "manual_preset_runtime_sec": 2700,
        "battery": {
          "percent": 89,
          "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": "2022-08-18T19:38:27.859Z",
        "reference": "446755208daf-58644",
        "mac_address": "44675511d585",
        "weather_station_id": "**REDACTED**",
        "mesh_id": "5e6971814f0cb5aa04819172",
        "status": {
          "run_mode": "auto",
          "next_start_programs": [
            "a"
          ],
          "rain_sensors": [],
          "rain_delay_overridden_at": "2020-07-03T15:41:18.534Z",
          "watering_status": null,
          "rain_delay_suggested_at": "2022-08-17T20:29:06.950Z",
          "rain_delay": 0,
          "flow_sensor": null,
          "next_start_time": "2030-01-01T18:00:00-05:00",
          "rain_delay_started_at": "2022-08-16T07:00:43.000Z"
        },
        "id": "5e71507f4f0c7eccad2e81a0",
        "num_stations": 1,
        "notes": "",
        "zones": [
          {
            "station": 1,
            "slope_grade": 0,
            "sun_shade": "mostly_shady",
            "name": "SE Zone",
            "num_sprinklers": 0,
            "catch_cup_volumes": [],
            "catch_cup_run_time": 0,
            "smart_watering_enabled": false
          }
        ],
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "google_home_status": null,
        "device_gateway_topic": "devices-6",
        "hardware_version": "HT25-0000",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2020-03-17T22:34:39.588Z",
        "suggested_start_time": null,
        "et_id": "5644ff08ad27a7777ff6caea"
      },
      {
        "last_connected_at": "2022-08-12T03:43:49.618Z",
        "address": "**REDACTED**",
        "water_sense_mode": "off",
        "scheduled_modes": {
          "auto": {
            "at": "",
            "annually": false
          },
          "off": {
            "at": "",
            "annually": false
          }
        },
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "weather_forecast_location_id": "**REDACTED**",
        "firmware_version": "41",
        "name": "South Hose Timer",
        "flume_device_id": "",
        "type": "sprinkler_timer",
        "manual_preset_runtime_sec": 2700,
        "battery": {
          "percent": 70,
          "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": "2022-08-18T21:56:04.954Z",
        "reference": "446755208daf-62229",
        "mac_address": "446755120290",
        "weather_station_id": "**REDACTED**",
        "mesh_id": "5e6971814f0cb5aa04819172",
        "status": {
          "run_mode": "auto",
          "next_start_programs": [
            "a"
          ],
          "rain_sensors": [],
          "rain_delay_overridden_at": "2021-07-11T16:16:22.999Z",
          "watering_status": null,
          "rain_delay_suggested_at": "2022-08-17T21:21:16.475Z",
          "rain_delay": 0,
          "last_battery_alarm_at": "2022-06-09T22:25:49.157Z",
          "flow_sensor": null,
          "next_start_time": "2030-01-01T18:00:00-05:00",
          "rain_delay_started_at": "2022-08-18T11:39:51.000Z"
        },
        "id": "5e83bd5b4f0cb5aa0482a4d9",
        "num_stations": 1,
        "notes": "",
        "zones": [
          {
            "station": 1,
            "slope_grade": 0,
            "sun_shade": "mostly_shady",
            "name": "South No Program",
            "num_sprinklers": 0,
            "catch_cup_volumes": [],
            "catch_cup_run_time": 0,
            "smart_watering_enabled": false,
            "flow_data": {
              "cycle_run_time_sec": 12,
              "flow_rate_gpm": 4.1015749999999995,
              "cycle_volume_gal": 0.820315
            }
          }
        ],
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "google_home_status": null,
        "device_gateway_topic": "devices-6",
        "hardware_version": "HT25-0000",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2020-03-31T21:59:55.311Z",
        "suggested_start_time": null,
        "et_id": "5644ff08ad27a7777ff6caea"
      },
      {
        "last_connected_at": "2022-08-12T03:43:58.753Z",
        "address": "**REDACTED**",
        "water_sense_mode": "auto",
        "scheduled_modes": {
          "auto": {
            "at": "",
            "annually": false
          },
          "off": {
            "at": "",
            "annually": false
          }
        },
        "timezone": {
          "dst_offset": 3600,
          "raw_offset": -21600,
          "timezone_id": "America/Chicago",
          "timezone_name": "Central Daylight Time"
        },
        "full_location": "**REDACTED**",
        "weather_forecast_location_id": "**REDACTED**",
        "firmware_version": "0041",
        "name": "SW2 Hose Timer ",
        "flume_device_id": "",
        "type": "sprinkler_timer",
        "manual_preset_runtime_sec": 2700,
        "battery": {
          "percent": 89,
          "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": "2022-08-18T14:54:26.244Z",
        "reference": "44675520ab4f-6731",
        "mac_address": "446755185404",
        "weather_station_id": "**REDACTED**",
        "mesh_id": "5d5cb2ca4f0c47ece9ea4b66",
        "status": {
          "run_mode": "auto",
          "next_start_programs": [
            "a"
          ],
          "rain_sensors": [],
          "watering_status": null,
          "rain_delay": 0,
          "flow_sensor": null,
          "next_start_time": "2026-01-01T12:00:00-05:00",
          "rain_delay_started_at": "2022-08-18T14:54:25.000Z"
        },
        "id": "62cb309c4f0c6ea5427aa165",
        "num_stations": 1,
        "notes": "",
        "zones": [
          {
            "station": 1,
            "slope_grade": 0,
            "sun_shade": "mostly_shady",
            "name": "SW2 ZONE",
            "num_sprinklers": 0,
            "catch_cup_volumes": [],
            "catch_cup_run_time": 0,
            "smart_watering_enabled": false,
            "flow_data": {
              "cycle_run_time_sec": 7,
              "flow_rate_gpm": 5.425242857142857,
              "cycle_volume_gal": 0.632945
            }
          }
        ],
        "user_id": "5d5cadcf4f0c47ece9ea4a58",
        "google_home_status": null,
        "device_gateway_topic": "devices-1",
        "hardware_version": "HT25-0000",
        "is_connected": true,
        "location": "**REDACTED**",
        "created_at": "2022-07-10T20:03:40.050Z",
        "suggested_start_time": null,
        "et_id": "5644ff07ad27a7777ff6ca07"
      }
    ],
    "programs": [
      {
        "pending_timer_ack": true,
        "name": "NW No Program",
        "program_start_date": "2030-01-01T06:00:00.000Z",
        "frequency": {
          "type": "interval",
          "interval": 7,
          "interval_start_time": "2030-01-01T06:00:00.000Z"
        },
        "program_end_date": null,
        "is_basic_program": false,
        "updated_at": "2022-05-22T21:18:56.388Z",
        "updated_via": "wifi",
        "start_times": [
          "18:00"
        ],
        "id": "5d5cb2144f0c47ece9ea4b4b",
        "budget": 100,
        "device_id": "5d5caef44f0c47ece9ea4a91",
        "program": "a",
        "run_times": [
          {
            "run_time": 45,
            "station": 1
          }
        ],
        "enabled": true,
        "created_at": "2019-08-21T02:53:08.503Z"
      },
      {
        "name": "Unused",
        "frequency": {
          "type": "odd"
        },
        "updated_at": "2019-08-21T10:32:24.640Z",
        "start_times": [
          "03:15",
          "03:45",
          "04:15"
        ],
        "id": "5d5cb4924f0c47ece9ea4ba4",
        "budget": 100,
        "device_id": "5d5caef44f0c47ece9ea4a91",
        "program": "b",
        "run_times": [
          {
            "run_time": 15,
            "station": 1
          }
        ],
        "enabled": false,
        "created_at": "2019-08-21T03:03:46.915Z"
      },
      {
        "pending_timer_ack": true,
        "post_delay": 0,
        "name": "NE No Program ",
        "program_start_date": "2030-01-01T06:00:00.000Z",
        "frequency": {
          "type": "interval",
          "interval": 1,
          "interval_start_time": "2030-01-01T06:00:00.000Z"
        },
        "program_end_date": null,
        "is_basic_program": false,
        "group_id": "61bf54754f0cf51668f0871d",
        "updated_at": "2022-06-12T23:18:03.864Z",
        "pre_delay": 0,
        "updated_via": "wifi",
        "start_times": [
          "18:00"
        ],
        "id": "5e6aca784f0cb5aa04819af3",
        "budget": 100,
        "group_run_times": [
          {
            "device_id": "5e696fe14f0cb5aa04819154",
            "run_times": [
              {
                "run_time": 55,
                "station": 1
              }
            ]
          }
        ],
        "device_id": "5e696fe14f0cb5aa04819154",
        "program": "a",
        "run_times": [
          {
            "run_time": 55,
            "station": 1
          }
        ],
        "enabled": true,
        "created_at": "2020-03-12T23:49:12.355Z"
      },
      {
        "pending_timer_ack": true,
        "name": "SE No Program",
        "program_start_date": null,
        "frequency": {
          "type": "interval",
          "interval": 7,
          "interval_start_time": "2030-01-01T06:00:00.000Z"
        },
        "program_end_date": null,
        "is_basic_program": false,
        "updated_at": "2021-03-12T00:34:08.812Z",
        "updated_via": "wifi",
        "start_times": [
          "18:00"
        ],
        "id": "5e7151784f0cb5aa0481d0fe",
        "budget": 100,
        "device_id": "5e71507f4f0c7eccad2e81a0",
        "program": "a",
        "run_times": [
          {
            "run_time": 45,
            "station": 1
          }
        ],
        "enabled": true,
        "created_at": "2020-03-17T22:38:48.623Z"
      },
      {
        "pending_timer_ack": true,
        "name": "South No Program",
        "program_start_date": null,
        "frequency": {
          "type": "interval",
          "interval": 1,
          "interval_start_time": "2030-01-01T06:00:00.000Z"
        },
        "program_end_date": null,
        "is_basic_program": false,
        "updated_at": "2021-03-12T00:32:42.922Z",
        "updated_via": "wifi",
        "start_times": [
          "18:00"
        ],
        "id": "5e83c0414f0cb5aa0482a52b",
        "budget": 100,
        "device_id": "5e83bd5b4f0cb5aa0482a4d9",
        "program": "a",
        "run_times": [
          {
            "run_time": 45,
            "station": 1
          }
        ],
        "enabled": true,
        "created_at": "2020-03-31T22:12:17.690Z"
      },
      {
        "pending_timer_ack": true,
        "name": "SW2 No Program",
        "program_start_date": "2026-01-01T06:00:00.000Z",
        "frequency": {
          "type": "interval",
          "interval": 1,
          "interval_start_time": "2026-01-01T06:00:00.000Z"
        },
        "program_end_date": null,
        "is_basic_program": true,
        "group_id": "62cb32ce4f0c6ea5427aa250",
        "updated_at": "2022-07-10T20:13:02.355Z",
        "updated_via": "wifi",
        "start_times": [
          "12:00"
        ],
        "id": "62cb32354f0c527e4dc1b70d",
        "budget": 100,
        "group_run_times": [],
        "device_id": "62cb309c4f0c6ea5427aa165",
        "program": "a",
        "run_times": [
          {
            "run_time": 45,
            "station": 1
          }
        ],
        "enabled": false,
        "created_at": "2022-07-10T20:10:29.075Z"
      }
    ]
  }
}
peterf9 commented 2 years ago

I'm having the same issues. This is my log:

Este erro originou-se de uma integração personalizada.

Logger: homeassistant.helpers.entity Source: custom_components/bhyve/pybhyve/client.py:73 Integration: Orbit B-hyve (documentation) First occurred: 16:21:25 (108 occurrences) Last logged: 16:34:26

Update for sensor.zone_history fails Update for sensor.zone_history_2 fails Update for sensor.zone_history_3 fails Update for sensor.zone_history_4 fails Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection hosts = await asyncio.shield(host_resolved) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection hosts = await asyncio.shield(host_resolved) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection hosts = await asyncio.shield(host_resolved) [Previous line repeated 1 more time] File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 867, in _resolve_host await event.wait() File "/usr/local/lib/python3.10/site-packages/aiohttp/locks.py", line 34, in wait raise self._exc File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 867, in _resolve_host await event.wait() File "/usr/local/lib/python3.10/site-packages/aiohttp/locks.py", line 34, in wait raise self._exc File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 867, in _resolve_host await event.wait() File "/usr/local/lib/python3.10/site-packages/aiohttp/locks.py", line 34, in wait raise self._exc File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 880, in _resolve_host addrs = await self._resolver.resolve(host, port, family=self._family) File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve infos = await self._loop.getaddrinfo( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 860, in getaddrinfo return await self.run_in_executor( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name does not resolve

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 514, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 709, in async_device_update raise exc File "/config/custom_components/bhyve/sensor.py", line 195, in async_update history = await self._fetch_device_history(force_update=force_update) or [] File "/config/custom_components/bhyve/init.py", line 288, 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 212, in get_device_history await self._refresh_device_history(device_id, force_update=force_update) File "/config/custom_components/bhyve/pybhyve/client.py", line 114, in _refresh_device_history device_history = await self._request( File "/config/custom_components/bhyve/pybhyve/client.py", line 73, in _request async with self._session.request( File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in aenter self._resp = await self._coro File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection raise ClientConnectorError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.orbitbhyve.com:443 ssl:default [Name does not resolve]

Lokilicious commented 2 years ago

@sebr should be resolved by https://github.com/sebr/bhyve-home-assistant/pull/155