Huawei LTE modem cannot be integrated

Since a few days (I think after the update from 102.x to 103.x) it is no longer possible to connect my Huawei LTE modem.
This is an HA installation on a Synology. The Huawei LTE modem is a B529s-23a.
And everything has worked fine.
Can anyone help me solve the problem or do you need more information about my system?
I always get the following error message. No matter if I do the Huawei integration via the frontend or the config.yaml.

[homeassistant.components.huawei_lte.config_flow] Unknown error connecting to device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

I have the exact same error too, but with the difference that it didn’t work with HA 102 due to this bug: https://github.com/home-assistant/home-assistant/issues/28922 , but had worked with older versions. Im using the Model B528-8BCE.

Hi. I’m having the same issue with hassio and Home Assistant 0.103.6

Modem Huawei B525-23a

Intergration does not work.

Used to work in previous versions.

Any help would be appreciated :slight_smile:

Same for me. In latest 104 version I have exactly the same error while trying to use notify service

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 735, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 423, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 331, in _raise_timeout
    self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.8.1', port=80): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 397, in _update_router
    router.update()
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 202, in update
    self._get_data(KEY_DEVICE_INFORMATION, self.client.device.information)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/__init__.py", line 172, in _get_data
    self.data[key] = func()
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/api/Device.py", line 7, in information
    return self._connection.get('device/information')
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/Connection.py", line 22, in wrapped
    return fn(*args, **kw)
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/Connection.py", line 166, in get
    timeout=self.timeout,
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.8.1', port=80): Read timed out. (read timeout=10)
2020-01-16 09:59:26 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 267, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

Same for me. Still not working.
For me it is not understandable why a service that has worked can no longer be made to work.

2020-01-17 12:36:07 WARNING (MainThread) [homeassistant.components.huawei_lte.config_flow] Unknown error connecting to device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/config_flow.py", line 184, in async_step_user
    try_connect, username, password
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/huawei_lte/config_flow.py", line 139, in try_connect
    timeout=CONNECTION_TIMEOUT,
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/AuthorizedConnection.py", line 24, in __init__
    if self.user.login(True):
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/api/User.py", line 76, in login
    state_login = self.state_login()
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/api/User.py", line 27, in state_login
    return self._connection.get('user/state-login')
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/Connection.py", line 22, in wrapped
    return fn(*args, **kw)
  File "/usr/local/lib/python3.7/site-packages/huawei_lte_api/Connection.py", line 166, in get
    timeout=self.timeout,
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

It seems that the developer of this integration is not interested in our problem.
There are no questions or hints what the problem might be.
That’s too bad, because in other areas they seem to be very interested in feedback.

Please do not misunderstand.
I think it’s great that people are willing to contribute to this project in their spare time.
But if something is integrated and then doesn’t work and there is no reaction for 23 days, it is very unfortunate.

Wanted to post a workaround, as HA 105.1 still not working with my huawei lte router:

I downloaded the the last repo that has worked for me: https://github.com/home-assistant/home-assistant/tree/c7da781efcb47c29e1724d1716d729037c5b38bc

then copied the folder
home-assistant-c7da781efcb47c29e1724d1716d729037c5b38bc\homeassistant\components\huawei_lte
into my custom_components folder, which overrides the integration.

my configuration.yaml:

huawei_lte:
  - url: !secret url_lte # http://x.x.x.x/ (slash is required at the end)
    username: !secret lte_user
    password: !secret lte_pwd

and my sensor.yaml - because it uses the old implementation

- platform: huawei_lte
  monitored_conditions:
    - device_information.SoftwareVersion
    - device_signal.rssi
    - device_signal.rsrq
    - device_signal.rsrp
    - device_signal.sinr
    - monitoring_traffic_statistics.CurrentUploadRate
    - monitoring_traffic_statistics.CurrentDownloadRate
    - monitoring_traffic_statistics.TotalConnectTime
    - monitoring_traffic_statistics.TotalUpload
    - monitoring_traffic_statistics.TotalDownload

hope this helps anyone.

Thank you for pointing that out.
In fact, it is possible to access the router with it.
Unfortunately I don’t know how to use it to get back to the real purpose of my configuration.
As long as the integration worked, the devices connected to the router were listed in “known_devices.yaml”.
But with this workaround I still don’t see any entries in “known_devices.yaml”.
Did I miss something?

I have found the solution.
I forgot to activate the tracker.

how did you do that? i cant get it work

You have to add the tracker in the configuration.yaml