bhyve-home-assistant: 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')
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (5 by maintainers)
Commits related to this issue
- Log, but don't pass exception up the stack when the BHyve API 500s. #57 — committed to sebr/bhyve-home-assistant by sebr 3 years ago
- Log, but don't pass exception up the stack when the BHyve API 500s. #57 — committed to sebr/bhyve-home-assistant by sebr 3 years ago
Okay great, thanks for the update @briodan. I’ll resolve this issue and re-release as v
2.0.8
for everyone else who isn’t on a beta release. Much appreciate all the debugging and investigations everyone!You’re getting a 401 Unauthorized error so either there’s an issue with bHyve authenticating your account, or (more likely) your login details have changed and haven’t been updated in the relevant config file. That’s different to the issue most of us have been getting (and I think sebr’s fix may have specifically dealt with the “500 internal server error” that we get, not with 401s as well).
Just installed the beta after seeing similar behavior in 2.0.7, will report my findings. Either way the integration is still more stable than b-hyve’s firmware update…
Hi Seb, just to inform you, that we have this still in mind. I updated to the beta on saturday. Since then, I had no log entry (Debug level activated) and the irrigation switch is stable. This is more as expected as you only handle the incoming issues in a different way as I understood. Before, I had at least one message a day that the battery sensor could’nt been updated with the later total integration break. Let’s wait another week and then I hope we can close this issue