Skip to content

huawei-lte-api 2.0.0

Latest

Choose a tag to compare

@Salamek Salamek released this 13 Aug 22:02
· 2 commits to master since this release

huawei-lte-api 2.0.0

This major release adds support for supplementary Unicode characters, new API endpoints and examples, modernizes the development toolchain, and removes APIs that have been deprecated for several years.

Breaking changes

AuthorizedConnection removed

Replace:

from huawei_lte_api.AuthorizedConnection import AuthorizedConnection

connection = AuthorizedConnection(url, username, password)

with:

from huawei_lte_api.Connection import Connection

connection = Connection(url, username, password)

login_on_demand removed

The deprecated login_on_demand argument had no effect and has been removed from Connection.

Deprecated device methods removed

Replace:

device.control(mode)
device.reboot()

with:

device.set_control(mode)
device.set_control(ControlModeEnum.REBOOT)

Integer SMS sort types removed

Sms.get_sms_list(sort_type=...) now requires SortTypeEnum:

from huawei_lte_api.enums.sms import SortTypeEnum

messages = client.sms.get_sms_list(sort_type=SortTypeEnum.DATE)

Unicode support

Requests containing characters outside the Basic Multilingual Plane, including emoji, are now encoded using CESU-8 for compatibility with Huawei routers.

CESU-8 surrogate pairs in router responses are converted to standard UTF-8 before XML parsing.

New API endpoints

  • Diagnosis.wan_service_name()
  • Monitoring.onekey_diag()
  • Security.acl()
  • User.rule()
  • Voice.volte()
  • WLan.guesttime_setting()

Fixes and improvements

  • Fixed the TimeRule API endpoint.
  • Added request and response debug logging.
  • Improved readable signal-mode handling.
  • Improved the data-dump example and error reporting.
  • Added Huawei 5G CPE6 to the supported-device list.
  • Added documentation for API endpoints.

New examples

  • device_signal.py — display detailed signal information.
  • read_sms.py — read SMS messages from the router.

Development and compatibility

  • Added Python 3.13 and Python 3.14 testing.
  • Migrated package configuration to pyproject.toml.
  • Migrated linting and formatting to Ruff.
  • Expanded strict mypy checking.
  • Added core tests for requests, responses, CSRF handling, authentication, error mapping, and CESU-8.
  • The test suite now contains 50 tests.

New Contributors

Full Changelog: 1.11.0...2.0.0