-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rainbird.coordinator: Unexpected error fetching Schedule data: invalid literal for int() with base 10 #29766
Comments
Hey there @konikvranik, @allenporter, mind taking a look at this feedback as it has been labeled with an integration ( Code owner commandsCode owners of
|
@lennon101 would you be up for enabling debugging for the integration, then reloading, and capturing the raw data? it will help understanding the encoded response sent by the device to apply a patch in the library. Thank you! |
Also, if you could mention what device you have or any other interesting settings about the irrigation schedule if any |
Hi there 👋 It seems like you want to report an issue with an Home Assistant integration, however, you have submitted documentation feedback instead. Please raise an issue in the Home Assistant core issue tracker instead: https://github.com/home-assistant/core/issues Thanks! 👍 ./Klaas |
Sorry for the late reply to this. I don't know how I missed it. yup sure thing! I'll get this done and reply back with the info
|
@allenporter as requested, here's the ha logs with the RainBird integration debugging enabled: |
@klaasnicolaas no I'm definitly reporting a bug with a HA integration (RainBrid) not documentation feedback. Please reopen this issue? |
As indicated, you are in the wrong repository for integration issues. The issue tracker in this repository is used for documentation issues 😉 ./Klaas |
@lennon101 see https://www.home-assistant.io/help/reporting_issues/ for filing a "home assistant core" issue report |
Add defensive checks against unexpected schedule responses. I do not yet know the valid version of responses for this command, so for now it seems best to just check for out of bounds messages and assume that the schedules are not supported. This can be revisited as we capture traces for these devices. For home-assistant/home-assistant.io#29766
@klaasnicolaas my mistake! so sorry, don't know how I mucked that up. I will move this into the correct place as you say. @allenporter I'll copy this issue into the correct issue tracker and continue any more updates from there haha |
Feedback
I've provided the ha log output below for more context. Please let me know if you need anything else. Thanks!
URL
https://www.home-assistant.io/integrations/rainbird/
Version
2023.11.1
Additional information
`
2023-11-09 12:05:39.066 ERROR (MainThread) [homeassistant.components.rainbird.coordinator] Unexpected error fetching 192.168.1.55 Schedule data: invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/rainbird/coordinator.py", line 150, in _async_update_data
return await self._controller.get_schedule()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/pyrainbird/async_client.py", line 428, in get_schedule
result = await self._process_command(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/pyrainbird/async_client.py", line 489, in _process_command
decoded = rainbird.decode(decrypted_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/pyrainbird/rainbird.py", line 179, in decode
return {TYPE: cmd_template[TYPE], **decoder(data, cmd_template)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/pyrainbird/rainbird.py", line 43, in decode_schedule
"rainDelay": int(rest[4:6]),
^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
2023-11-09 12:05:42.113 ERROR (MainThread) [homeassistant.components.iotawatt.coordinator] Unexpected error fetching 192.168.1.36 data:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 115, in fail_after
yield cancel_scope
File "/lsiopy/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 217, in connect_tcp
async with create_task_group() as tg:
File "/lsiopy/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 674, in aexit
raise cancelled_exc_while_waiting_tasks
File "/lsiopy/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 654, in aexit
await asyncio.wait(self.cancel_scope._tasks)
File "/usr/lib/python3.11/asyncio/tasks.py", line 428, in wait
return await _wait(fs, timeout, return_when, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/tasks.py", line 535, in _wait
await waiter
asyncio.exceptions.CancelledError: Cancelled by cancel scope 7f2595b99790
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/lsiopy/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp
with anyio.fail_after(timeout):
File "/usr/lib/python3.11/contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
File "/lsiopy/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 118, in fail_after
raise TimeoutError
TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions
yield
File "/lsiopy/lib/python3.11/site-packages/httpx/_transports/default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
raise exc
File "/lsiopy/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request
raise exc
File "/lsiopy/lib/python3.11/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpcore/_async/connection.py", line 124, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
return await self._backend.connect_tcp(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 112, in connect_tcp
with map_exceptions(exc_map):
File "/usr/lib/python3.11/contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
File "/lsiopy/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/iotawatt/coordinator.py", line 76, in _async_update_data
await self.api.update(lastUpdate=self._last_run)
File "/lsiopy/lib/python3.11/site-packages/iotawattpy/iotawatt.py", line 79, in update
await self._refreshSensors(timespan, lastUpdate)
File "/lsiopy/lib/python3.11/site-packages/iotawattpy/iotawatt.py", line 165, in _refreshSensors
query = await self._getQueryShowSeries()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/iotawattpy/iotawatt.py", line 329, in _getQueryShowSeries
return await self._connection.get(url, self._username, self._password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/iotawattpy/connection.py", line 18, in get
return await self.__open(url, username=username, password=password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/iotawattpy/connection.py", line 46, in __open
raise e
File "/lsiopy/lib/python3.11/site-packages/iotawattpy/connection.py", line 37, in __open
resp = await getattr(self._websession, method)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/httpx/_transports/default.py", line 365, in handle_async_request
with map_httpcore_exceptions():
File "/usr/lib/python3.11/contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
File "/lsiopy/lib/python3.11/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectTimeout
`
The text was updated successfully, but these errors were encountered: