sebr / bhyve-home-assistant

Orbit BHyve custom component for Home Assistant
MIT License
262 stars 43 forks source link

Integration stops working after sometime #65

Closed ultimatewooze closed 3 years ago

ultimatewooze commented 3 years ago

Describe the bug The integration stops working after some time and neither status or controlling zones work. After restart of HA everything works again for a day or two before failing

Expected behaviour That integration continues to work without having to restart HA

BHyve devices B-hyve Smart Indoor/Outdoor Irrigation Controller 6 zones

Logs

2021-05-19 02:04:15 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.CLOSE: 8>, data=0, extra='') 2021-05-19 02:04:15 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket received CLOSE message, ignoring 2021-05-18 22:19:39 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.TEXT: 1>, data='{"event":"change_mode","mode":"auto","device_id":"608edd7a4f0c9e0599a84421","timestamp":"2021-05-18T20:19:38.000Z"}', extra='') 2021-05-18 22:19:39 DEBUG (MainThread) [custom_components.bhyve.pybhyve.websocket] msg received WSMessage(type=<WSMsgType.TEXT: 1>, data='{"timestamp":"2021-05-18T20:19:38.000Z","event":"device_idle","stream-id":"b8ba260d-ee8f-4bec-b756-f36c8c3188d9","client-topics":["device-clients-2"],"gateway-topic":"devices-2","device_id":"608edd7a4f0c9e0599a84421"}', extra='') 2021-05-13 14:52:05 DEBUG (MainThread) [custom_components.bhyve] Devices: [{"last_connected_at": "2021-05-08T09:56:17.028Z", "address": "REDACTED", "water_sense_mode": "auto", "scheduled_modes": {}, "timezone": {"dst_offset": 3600, "raw_offset": 3600, "timezone_id": "Europe/Stockholm", "timezone_name": "Central European Summer Time"}, "full_location": "REDACTED", "weather_forecast_location_id": "5ee9e35b4f0cebdfcda79e66", "firmware_version": "0045", "name": "Smart Outdoor Timer", "type": "sprinkler_timer", "restricted_frequency": null, "weather_delay_thresholds": {"precip_prob": 30, "precip_in": 0.125, "wind_speed_mph": 20, "freeze_temp_f": 37}, "updated_at": "2021-05-13T12:37:34.059Z", "reference": "446755060c74", "mac_address": "446755060c74", "weather_station_id": "5f01c6d84f0c1a1979b91ddb", "mesh_id": "608edd7b4f0c9e0599a84423", "status": {"run_mode": "auto", "next_start_programs": ["b"], "rain_sensors": [], "rain_delay_overridden_at": "2021-05-11T17:10:51.189Z", "watering_status": null, "rain_delay": 0, "flow_sensor": null, "next_start_time": "2021-05-13T15:00:00+02:00", "rain_delay_started_at": "2021-05-11T17:10:49.000Z"}, "wifi_version": 0, "id": "608edd7a4f0c9e0599a84421", "num_stations": 6, "zones": [{"station": 1, "slope_grade": 0, "sun_shade": "mostly_sunny", "name": "Front lawn", "landscape_type": "cool_season_turf", "num_sprinklers": 2, "soil_type": "loam", "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": true, "sprinkler_type": "spray", "flow_data": {}}, {"station": 2, "slope_grade": 0, "sun_shade": "mostly_shady", "name": "Back lawn", "landscape_type": "cool_season_turf", "num_sprinklers": 2, "soil_type": "loam", "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": true, "sprinkler_type": "rotor", "flow_data": {}}, {"station": 4, "slope_grade": 0, "sun_shade": "mostly_shady", "name": "Side Lawn", "landscape_type": "cool_season_turf", "num_sprinklers": 5, "soil_type": "loam", "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false, "sprinkler_type": "spray", "flow_data": {}}], "user_id": "5ee9e2de4f0c334799b7503b", "google_home_status": null, "device_gateway_topic": "devices-2", "hardware_version": "WT25G2-0001", "is_connected": true, "location": "REDACTED", "created_at": "2021-05-02T17:12:26.959Z", "suggested_start_time": null, "et_id": "5644ff21ad27a7777ff8c606"}] 2021-05-13 14:52:05 DEBUG (MainThread) [custom_components.bhyve] Programs: [{"update_via": "wifi", "name": "Stodsadd_1", "frequency": {"type": "days", "days": [0, 1, 2, 3, 4, 5, 6]}, "is_basic_program": false, "updated_at": "2021-05-13T11:27:50.405Z", "updated_via": "wifi", "start_times": ["07:00", "09:00", "11:00", "13:00"], "id": "6096ab954f0c9e0599a99a26", "budget": 100, "is_smart_program": false, "device_id": "608edd7a4f0c9e0599a84421", "program": "a", "run_times": [{"run_time": 2.0, "station": 1}, {"run_time": 1.0, "station": 4}], "enabled": true, "created_at": "2021-05-08T15:17:41.556Z"}, {"lock_at": null, "name": "Smart Watering", "frequency": {"type": "days", "days": []}, "process_at": "2021-05-14T11:27:44.005Z", "watering_plan": [{"zone_forecasts": [{"station": 1, "initial_water_level": 1.4523219029624097, "date": "2021-05-12T22:00:00.000Z", "eto": 0.07265321459139495, "mbo_raw": 0.2823219029624098, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "system_restricted", "rainfall": 0.03, "etc": 0.04577152519257882, "final_water_level": 1.430550377769831, "delta": -0.021771525192578745, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.26055037776983103, "effective_rainfall": 0.024, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.3108641990499137, "date": "2021-05-12T22:00:00.000Z", "eto": 0.07265321459139495, "mbo_raw": 0.14086419904991376, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "system_restricted", "rainfall": 0.03, "etc": 0.04068580017118117, "final_water_level": 1.2941783988787325, "delta": -0.016685800171181153, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.12417839887873261, "effective_rainfall": 0.024, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-12T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.430550377769831, "date": "2021-05-13T22:00:00.000Z", "eto": 0.07207926566652488, "mbo_raw": 0.26055037776983103, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.045409937369910676, "final_water_level": 1.3851404403999203, "delta": -0.06718146256248936, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.21514044039992042, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.2941783988787325, "date": "2021-05-13T22:00:00.000Z", "eto": 0.07207926566652488, "mbo_raw": 0.12417839887873261, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.04036438877325393, "final_water_level": 1.2538140101054787, "delta": -0.05705018894443503, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.08381401010547873, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-13T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.3851404403999203, "date": "2021-05-14T22:00:00.000Z", "eto": 0.08751308788622651, "mbo_raw": 0.21514044039992042, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.05, "etc": 0.0551332453683227, "final_water_level": 1.3700071950315977, "delta": -0.08231470793081197, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.2000071950315978, "effective_rainfall": 0.04000000000000001, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.2538140101054787, "date": "2021-05-14T22:00:00.000Z", "eto": 0.08751308788622651, "mbo_raw": 0.08381401010547873, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.05, "etc": 0.049007329216286845, "final_water_level": 1.2448066808891918, "delta": -0.06605751816072192, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.07480668088919185, "effective_rainfall": 0.04000000000000001, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-14T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.3700071950315977, "date": "2021-05-15T22:00:00.000Z", "eto": 0.06786620038908239, "mbo_raw": 0.2000071950315978, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.14, "etc": 0.042755706245121906, "final_water_level": 1.439251488786476, "delta": -0.013070414175933687, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.2692514887864761, "effective_rainfall": 0.11200000000000002, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.2448066808891918, "date": "2021-05-15T22:00:00.000Z", "eto": 0.06786620038908239, "mbo_raw": 0.07480668088919185, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.14, "etc": 0.038005072217886134, "final_water_level": 1.3188016086713057, "delta": 0.007937409621392, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.14880160867130576, "effective_rainfall": 0.11200000000000002, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-15T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.439251488786476, "date": "2021-05-16T22:00:00.000Z", "eto": 0.08669617108862314, "mbo_raw": 0.2692514887864761, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.07, "etc": 0.054618587785832576, "final_water_level": 1.4406329010006436, "delta": -0.011689001961766143, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.27063290100064363, "effective_rainfall": 0.05600000000000001, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.3188016086713057, "date": "2021-05-16T22:00:00.000Z", "eto": 0.08669617108862314, "mbo_raw": 0.14880160867130576, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.07, "etc": 0.04854985580962895, "final_water_level": 1.3262517528616768, "delta": 0.015387553811763155, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.15625175286167692, "effective_rainfall": 0.05600000000000001, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-16T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.4406329010006436, "date": "2021-05-17T22:00:00.000Z", "eto": 0.09689108300704877, "mbo_raw": 0.27063290100064363, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.15000000000000002, "etc": 0.06104138229444073, "final_water_level": 1.499591518706203, "delta": 0.04726961574379329, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.32959151870620307, "effective_rainfall": 0.12000000000000002, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.3262517528616768, "date": "2021-05-17T22:00:00.000Z", "eto": 0.09689108300704877, "mbo_raw": 0.15625175286167692, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.15000000000000002, "etc": 0.054259006483947304, "final_water_level": 1.3919927463777297, "delta": 0.08112854732781605, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.2219927463777298, "effective_rainfall": 0.12000000000000002, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-17T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.499591518706203, "date": "2021-05-18T22:00:00.000Z", "eto": 0.08459614434041948, "mbo_raw": 0.32959151870620307, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.05329557093446428, "final_water_level": 1.4462959477717388, "delta": -0.006025955190670951, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.2762959477717388, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.3919927463777297, "date": "2021-05-18T22:00:00.000Z", "eto": 0.08459614434041948, "mbo_raw": 0.2219927463777298, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.04737384083063491, "final_water_level": 1.3446189055470947, "delta": 0.03375470649718104, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.1746189055470948, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-18T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.4462959477717388, "date": "2021-05-19T22:00:00.000Z", "eto": 0.07370786853668904, "mbo_raw": 0.2762959477717388, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.13999999999999999, "etc": 0.04643595717811409, "final_water_level": 1.5118599905936247, "delta": 0.05953808763121504, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.3418599905936248, "effective_rainfall": 0.11199999999999999, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.3446189055470947, "date": "2021-05-19T22:00:00.000Z", "eto": 0.07370786853668904, "mbo_raw": 0.1746189055470948, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.13999999999999999, "etc": 0.04127640638054585, "final_water_level": 1.4153424991665489, "delta": 0.10447830011663517, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.24534249916654893, "effective_rainfall": 0.11199999999999999, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-19T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.5118599905936247, "date": "2021-05-20T22:00:00.000Z", "eto": 0.0692193458928005, "mbo_raw": 0.3418599905936248, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.18999999999999997, "etc": 0.04360818791246432, "final_water_level": 1.6202518026811603, "delta": 0.1679298997187506, "total_scheduling_losses": 0.000251802681160207, "daily_surplus": 0.000251802681160207, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.4502518026811604, "effective_rainfall": 0.152, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.4153424991665489, "date": "2021-05-20T22:00:00.000Z", "eto": 0.0692193458928005, "mbo_raw": 0.24534249916654893, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.18999999999999997, "etc": 0.038762833699968274, "final_water_level": 1.5285796654665804, "delta": 0.21771546641666673, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.3585796654665805, "effective_rainfall": 0.152, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-20T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.6202518026811603, "date": "2021-05-21T22:00:00.000Z", "eto": 0.10225609312295708, "mbo_raw": 0.4502518026811604, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.06442133866746297, "final_water_level": 1.5558304640136973, "delta": 0.10350856105128758, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.38583046401369736, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.5285796654665804, "date": "2021-05-21T22:00:00.000Z", "eto": 0.10225609312295708, "mbo_raw": 0.3585796654665805, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.05726341214885596, "final_water_level": 1.4713162533177244, "delta": 0.16045205426781073, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.3013162533177245, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-21T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.5558304640136973, "date": "2021-05-22T22:00:00.000Z", "eto": 0.0703529450897993, "mbo_raw": 0.38583046401369736, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.15, "etc": 0.04432235540657355, "final_water_level": 1.631508108607124, "delta": 0.1791862056447142, "total_scheduling_losses": 0.011508108607123813, "daily_surplus": 0.011508108607123813, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.461508108607124, "effective_rainfall": 0.12, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.4713162533177244, "date": "2021-05-22T22:00:00.000Z", "eto": 0.0703529450897993, "mbo_raw": 0.3013162533177245, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.15, "etc": 0.0393976492502876, "final_water_level": 1.5519186040674366, "delta": 0.24105440501752295, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.3819186040674367, "effective_rainfall": 0.12, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-22T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.631508108607124, "date": "2021-05-23T22:00:00.000Z", "eto": 0.06398385421726129, "mbo_raw": 0.461508108607124, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.09, "etc": 0.04030982815687461, "final_water_level": 1.6631982804502494, "delta": 0.21087637748783972, "total_scheduling_losses": 0.043198280450249316, "daily_surplus": 0.043198280450249316, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.4931982804502495, "effective_rainfall": 0.072, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.5519186040674366, "date": "2021-05-23T22:00:00.000Z", "eto": 0.06398385421726129, "mbo_raw": 0.3819186040674367, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.09, "etc": 0.03583095836166632, "final_water_level": 1.5880876457057704, "delta": 0.27722344665585674, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.4180876457057705, "effective_rainfall": 0.072, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-23T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.6631982804502494, "date": "2021-05-24T22:00:00.000Z", "eto": 0.11498506754194543, "mbo_raw": 0.4931982804502495, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.07244059255142563, "final_water_level": 1.5907576878988239, "delta": 0.13843578493641417, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.42075768789882395, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.5880876457057704, "date": "2021-05-24T22:00:00.000Z", "eto": 0.11498506754194543, "mbo_raw": 0.4180876457057705, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.06439163782348943, "final_water_level": 1.523696007882281, "delta": 0.2128318088323673, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.35369600788228106, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-24T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.5907576878988239, "date": "2021-05-25T22:00:00.000Z", "eto": 0.08403518622051741, "mbo_raw": 0.42075768789882395, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.05294216731892597, "final_water_level": 1.537815520579898, "delta": 0.0854936176174883, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.3678155205798981, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.523696007882281, "date": "2021-05-25T22:00:00.000Z", "eto": 0.08403518622051741, "mbo_raw": 0.35369600788228106, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.047059704283489746, "final_water_level": 1.4766363035987913, "delta": 0.16577210454887759, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.30663630359879135, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-25T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.537815520579898, "date": "2021-05-26T22:00:00.000Z", "eto": 0.08771592059099972, "mbo_raw": 0.3678155205798981, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.11999999999999998, "etc": 0.055261029972329824, "final_water_level": 1.5785544906075684, "delta": 0.12623258764515866, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.40855449060756843, "effective_rainfall": 0.09599999999999999, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.4766363035987913, "date": "2021-05-26T22:00:00.000Z", "eto": 0.08771592059099972, "mbo_raw": 0.30663630359879135, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0.11999999999999998, "etc": 0.04912091553095984, "final_water_level": 1.5235153880678316, "delta": 0.2126511890179179, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.35351538806783167, "effective_rainfall": 0.09599999999999999, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-26T22:00:00.000Z"}, {"zone_forecasts": [{"station": 1, "initial_water_level": 1.5785544906075684, "date": "2021-05-27T22:00:00.000Z", "eto": 0.11252325640626137, "mbo_raw": 0.40855449060756843, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.07088965153594466, "final_water_level": 1.5076648390716236, "delta": 0.055342936109213925, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.3376648390716237, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}, {"station": 2, "initial_water_level": 1.5235153880678316, "date": "2021-05-27T22:00:00.000Z", "eto": 0.11252325640626137, "mbo_raw": 0.35351538806783167, "net_irrigation": 0.0, "total_soak_runoff": 0, "total_direct_runoff": 0, "gross_irrigation": 0.0, "water_rule": "as-needed", "rainfall": 0, "etc": 0.06301302358750636, "final_water_level": 1.4605023644803252, "delta": 0.14963816543041153, "total_scheduling_losses": 0, "daily_surplus": 0, "device_id": "608edd7a4f0c9e0599a84421", "soak_runoff": [], "mbf_raw": 0.2905023644803253, "effective_rainfall": 0.0, "effective_irrigation": 0.0, "direct_runoff": []}], "run_times": [], "start_times": [], "date": "2021-05-27T22:00:00.000Z"}], "long_term_program": {"frequency": {"type": "interval", "intervals": [122, 53, 27, 13, 8, 7, 7, 8, 13, 25, 47, 92]}, "run_times": [{"station": 1, "run_time": 11}, {"station": 2, "run_time": 22}, {"station": 4, "run_time": 8}], "start_times": ["06:00", "07:11"], "budgets": [0, 0, 0, 0, 0, 100, 100, 100, 0, 0, 0, 0]}, "updated_at": "2021-05-13T11:27:50.408Z", "updated_via": "wifi", "start_times": [], "id": "6096ab9c4f0ce6f36e942881", "budget": 100, "is_smart_program": true, "device_id": "608edd7a4f0c9e0599a84421", "program": "e", "run_times": [], "enabled": false, "created_at": "2021-05-08T15:17:48.930Z"}, {"update_via": "wifi", "name": "Stodsadd_2", "frequency": {"type": "days", "days": [0, 1, 2, 3, 4, 5, 6]}, "is_basic_program": false, "updated_at": "2021-05-13T11:27:50.411Z", "updated_via": "wifi", "start_times": ["15:00", "17:00", "19:00", "21:00"], "id": "6098032a4f0c161d5a135427", "budget": 100, "is_smart_program": false, "device_id": "608edd7a4f0c9e0599a84421", "program": "b", "run_times": [{"run_time": 2.0, "station": 1}, {"run_time": 1.0, "station": 4}], "enabled": true, "created_at": "2021-05-09T15:43:38.500Z"}]

I also see these warnings: Logger: homeassistant.helpers.entity Source: helpers/entity.py:527 First occurred: 13 May 2021, 14:59:13 (290 occurrences) Last logged: 18:20:13

Update of sensor.front_lawn_zone_history_2 is taking over 10 seconds Update of sensor.back_lawn_zone_history_2 is taking over 10 seconds Update of sensor.side_lawn_zone_history_2 is taking over 10 seconds Update of media_player.samsung_q90r is taking over 10 seconds Update of vacuum.xiaomi_vacuum_cleaner is taking over 10 seconds

This error originated from a custom integration.

Logger: homeassistant.helpers.entity Source: custom_components/bhyve/pybhyve/client.py:78 Integration: Orbit BHyve Integration (documentation) First occurred: 13 May 2021, 15:02:07 (16 occurrences) Last logged: 14:13:30

Update for sensor.back_lawn_zone_history_2 fails Update for sensor.smart_outdoor_timer_battery_level_2 fails Update for sensor.front_lawn_zone_history_2 fails Update for sensor.side_lawn_zone_history_2 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/608edd7a4f0c9e0599a84421?t=1620910927.1512709&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 316, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 524, 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/608edd7a4f0c9e0599a84421: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421?t=1620910927.1512709&page=1&per-page=10')

This error originated from a custom integration.

Logger: custom_components.bhyve Source: custom_components/bhyve/init.py:262 Integration: Orbit BHyve Integration (documentation) First occurred: 15 May 2021, 19:14:46 (3 occurrences) Last logged: 14:13:30

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=1621098885.7042491') 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=1621211150.5801196') 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=1621426409.9032395')

This error originated from a custom integration.

Logger: custom_components.bhyve Source: custom_components/bhyve/init.py:271 Integration: Orbit BHyve Integration (documentation) First occurred: 13 May 2021, 15:02:07 (13 occurrences) Last logged: 6:05:29

Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421?t=1621219400.9635527&page=1&per-page=10') Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421?t=1621224801.193715&page=1&per-page=10')

Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421?t=1621242051.9206264&page=1&per-page=10') Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421?t=1621397128.658758&page=1&per-page=10') Failed to connect to BHyve servers. Error requesting data from https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421: 500, message='Internal Server Error', url=URL('https://api.orbitbhyve.com/v1/watering_events/608edd7a4f0c9e0599a84421?t=1621397128.6540616&page=1&per-page=10')

This error originated from a custom integration.

Logger: custom_components.bhyve.pybhyve.websocket Source: custom_components/bhyve/pybhyve/websocket.py:137 Integration: Orbit BHyve Integration (documentation) First occurred: 2:06:30 (1 occurrences) Last logged: 2:06:30

Client connection error; state: starting

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:657 Integration: Sensor (documentation, issues) First occurred: 2:05:58 (1 occurrences) Last logged: 2:05:58

Updating bhyve sensor took longer than the scheduled update interval 0:00:30

sebr commented 3 years ago

Dupe of #57