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

Support for E5172 LTE Router #217

Open
homerojleal opened this issue Jun 27, 2024 · 3 comments
Open

Support for E5172 LTE Router #217

homerojleal opened this issue Jun 27, 2024 · 3 comments
Labels
question Further information is requested

Comments

@homerojleal
Copy link

Hello there.
This integration seems pretty interesting.
Is it possible to add support to the E5172 LT Router?
Thanks in advance!

@Salamek
Copy link
Owner

Salamek commented Jun 27, 2024

We do not "add support" for routers, this library uses API that is integrated in most Huawei (and re-brands) routers/modems so if your router has this API it should mostly work (some routers are missing some functions etc), if it does not have that API it wont work. Only way to know is try it out, our list of supported devices is list provided by users that did try and it it worked for them...

@Salamek Salamek added the question Further information is requested label Jun 27, 2024
@homerojleal
Copy link
Author

homerojleal commented Jun 27, 2024

First of all @Salamek Thanks for the support. I tried setup the Home Assistant integration that uses this/your library, but its giving the following error loading. I'm trying to get confirmation if its a HA config/bug/issue.

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 12:48:05 (2 occurrences)
Last logged: 12:48:52

Error setting up entry E5172As-22 for huawei_lte
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 362, in async_setup_entry
    await hass.async_add_executor_job(router.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 260, in update
    self._get_data(KEY_DEVICE_SIGNAL, self.client.device.signal)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 197, in _get_data
    self.data[key] = func()
                     ^^^^^^
  File "/usr/local/lib/python3.12/site-packages/huawei_lte_api/api/Device.py", line 40, in signal
    return self._session.get('device/signal')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/huawei_lte_api/Session.py", line 34, in wrapped
    return fn(*args, **kw)
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/huawei_lte_api/Session.py", line 305, in get
    return cast(dict, self._check_response_status(self._process_response_data(response)))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/huawei_lte_api/Session.py", line 152, in _check_response_status
    if not data['error']['message']:
           ~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'message'

@Salamek
Copy link
Owner

Salamek commented Jun 28, 2024

Hmm this is crash in error handling code (fixed in latest release) but that won't solve why it ended in error for you in the first place...

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

No branches or pull requests

2 participants