Skip to content
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

fails since OpenSprinkler firmware 2.2.1(0) update #310

Open
abraxxa opened this issue Sep 16, 2024 · 4 comments
Open

fails since OpenSprinkler firmware 2.2.1(0) update #310

abraxxa opened this issue Sep 16, 2024 · 4 comments

Comments

@abraxxa
Copy link

abraxxa commented Sep 16, 2024

Here is a stacktrace running Homeassistant 2024.9.1:

2024/09/16 13:11:02,stdout,UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 939: invalid continuation byte�[0m
2024/09/16 13:11:02,stdout,                 ^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,    return loads(stripped.decode(encoding))
2024/09/16 13:11:02,stdout,"  File \"/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py\", line 1216, in json"
2024/09/16 13:11:02,stdout,           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,"    return await super().json(*args, loads=loads, **kwargs)"
2024/09/16 13:11:02,stdout,"  File \"/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py\", line 80, in json"
2024/09/16 13:11:02,stdout,              ^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,    content = await resp.json(
2024/09/16 13:11:02,stdout,"  File \"/usr/local/lib/python3.12/site-packages/pyopensprinkler/__init__.py\", line 202, in _request_http"
2024/09/16 13:11:02,stdout,          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,"    ret = await target(*args, **kwargs)"
2024/09/16 13:11:02,stdout,"  File \"/usr/local/lib/python3.12/site-packages/backoff/_async.py\", line 151, in retry"
2024/09/16 13:11:02,stdout,              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,    content = await self._request_http(url)
2024/09/16 13:11:02,stdout,"  File \"/usr/local/lib/python3.12/site-packages/pyopensprinkler/__init__.py\", line 145, in request"
2024/09/16 13:11:02,stdout,              ^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,    content = await self.request("/ja")
2024/09/16 13:11:02,stdout,"  File \"/usr/local/lib/python3.12/site-packages/pyopensprinkler/__init__.py\", line 248, in _refresh_state"
2024/09/16 13:11:02,stdout,    await self._refresh_state()
2024/09/16 13:11:02,stdout,"  File \"/usr/local/lib/python3.12/site-packages/pyopensprinkler/__init__.py\", line 229, in refresh"
2024/09/16 13:11:02,stdout,    await controller.refresh()
2024/09/16 13:11:02,stdout,"  File \"/config/custom_components/opensprinkler/__init__.py\", line 84, in async_update_data"
2024/09/16 13:11:02,stdout,           ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,    return await self.update_method()
2024/09/16 13:11:02,stdout,"  File \"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py\", line 271, in _async_update_data"
2024/09/16 13:11:02,stdout,                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024/09/16 13:11:02,stdout,    self.data = await self._async_update_data()
2024/09/16 13:11:02,stdout,"  File \"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py\", line 354, in _async_refresh"
2024/09/16 13:11:02,stdout,Traceback (most recent call last):
2024/09/16 13:11:02,stdout,�[31m2024-09-16 13:11:02.293 ERROR (MainThread) [custom_components.opensprinkler] Unexpected error fetching OpenSprinkler resource status data
@EdLeckert
Copy link
Collaborator

You have a Unicode character, perhaps in a Program name, that the OpenSprinkler Export/Import can't handle.

See #303 and #308.

@abraxxa
Copy link
Author

abraxxa commented Sep 20, 2024

But why did it work before the update?

@abraxxa
Copy link
Author

abraxxa commented Sep 20, 2024

I‘ve read the two linked issues, will check tomorrow, thanks!

@abraxxa
Copy link
Author

abraxxa commented Sep 21, 2024

The station names with German umlauts where ok but not the name of one program which isn‘t visible on the main page of the opensprinkler webinterface. Fixed it and the integration is working again.

Would still be great if you defend your code against invalid input and add some better error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants