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

Error setting up entry B2368-F20 for huawei_lte #53280

Closed
vascojdb opened this issue Jul 21, 2021 · 3 comments · Fixed by #54253
Closed

Error setting up entry B2368-F20 for huawei_lte #53280

vascojdb opened this issue Jul 21, 2021 · 3 comments · Fixed by #54253

Comments

@vascojdb
Copy link

The problem

Since around 7th July, the huawei_lte component stopped working and I no longer can retrieve information from my LTE router Huawei B2368-F20. I simply get the following error:

Logger: homeassistant.config_entries
Source: components/huawei_lte/__init__.py:187
First occurred: 4:26:56 PM (1 occurrences)
Last logged: 4:26:56 PM

Error setting up entry B2368-F20 for huawei_lte
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 389, in async_setup_entry
    await hass.async_add_executor_job(router.update)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 265, in update
    self._get_data(KEY_LAN_HOST_INFO, self.client.lan.host_info)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 187, in _get_data
    self.data[key] = func()
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/api/Lan.py", line 10, in host_info
    hosts = self._connection.get('lan/HostInfo')
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/Connection.py", line 27, in wrapped
    return fn(*args, **kw)
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/Connection.py", line 224, in get
    return cast(dict, self._check_response_status(self._process_response_xml(response)))
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/Connection.py", line 96, in _check_response_status
    raise error_code_to_exception.get(error_code, ResponseErrorException)(
huawei_lte_api.exceptions.ResponseErrorException: 100006: Unknown

What is version of Home Assistant Core has the issue?

core-2021.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

huawei_lte

Link to integration documentation on our website

https://www.home-assistant.io/integrations/huawei_lte/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/huawei_lte/__init__.py:187
First occurred: 4:26:56 PM (1 occurrences)
Last logged: 4:26:56 PM

Error setting up entry B2368-F20 for huawei_lte
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 389, in async_setup_entry
    await hass.async_add_executor_job(router.update)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 265, in update
    self._get_data(KEY_LAN_HOST_INFO, self.client.lan.host_info)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 187, in _get_data
    self.data[key] = func()
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/api/Lan.py", line 10, in host_info
    hosts = self._connection.get('lan/HostInfo')
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/Connection.py", line 27, in wrapped
    return fn(*args, **kw)
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/Connection.py", line 224, in get
    return cast(dict, self._check_response_status(self._process_response_xml(response)))
  File "/usr/local/lib/python3.9/site-packages/huawei_lte_api/Connection.py", line 96, in _check_response_status
    raise error_code_to_exception.get(error_code, ResponseErrorException)(
huawei_lte_api.exceptions.ResponseErrorException: 100006: Unknown

Additional information

No response

@probot-home-assistant
Copy link

huawei_lte documentation
huawei_lte source
(message by IssueLinks)

@scop
Copy link
Member

scop commented Aug 8, 2021

Sorry about the delay.

Out of interest, does that device have an Ethernet hub in it? The error occurs when we're trying to access LAN info, which provides better info on connected devices than the WiFi hosts list with units that support it. Ones that don't are expected to report error code 100002 which we do handle gracefully.

Anyway, we have a special case for error code -1 which we treat as reporting unsupported functionality too, let's make it treat 100006 similarly (the internet says 100006 could mean "parameter error", 🤷).

scop added a commit to scop/home-assistant-core that referenced this issue Aug 8, 2021
Internet says 100006 could mean "parameter error", B2368-F20 is
reported to respond with that to lan/HostInfo requests.

While at it, handle the special case error codes and the "real" not
supported exception in the same block.

Closes home-assistant#53280
scop added a commit to scop/home-assistant-core that referenced this issue Aug 8, 2021
Internet says 100006 could mean "parameter error", B2368-F20 is
reported to respond with that to lan/HostInfo requests.

While at it, handle the special case error codes and the "real" not
supported exception in the same block.

Closes home-assistant#53280
@scop
Copy link
Member

scop commented Aug 8, 2021

Likely fix in #54253

scop added a commit that referenced this issue Aug 18, 2021
Internet says 100006 could mean "parameter error", B2368-F20 is
reported to respond with that to lan/HostInfo requests.

While at it, handle the special case error codes and the "real" not
supported exception in the same block.

Closes #53280
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants