diff --git a/.travis.yml b/.travis.yml index 0e871cb..7020c1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,10 @@ language: python matrix: fast_finish: true include: - - python: "3.6" + - python: "3.7" env: TOXENV=lint - - python: "3.6" + - python: "3.7" env: TOXENV=black - - python: "3.6" - env: TOXENV=py36 - python: "3.7" env: TOXENV=py37 - python: "3.8" diff --git a/README.md b/README.md index 302818a..b26afc6 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,13 @@ These are XBee Zigbee based radios that have been tested with the [zigpy-xbee](h - Digi XBee Series 2 (S2) modules. Note: These will need to be manually flashed with the Zigbee Coordinator API firmware via XCTU. - Digi XBee Series 3 (xbee3-24) modules +# Port configuration + +- To configure __usb__ port path for your XBee serial device, just specify the TTY (serial com) port, example : `/dev/ttyACM0` + +Note! Users can change UART baud rate of your Digi XBee using the Digi's XCTU configuration tool. Using XCTU tool +enable the API communication mode -- `ATAP2`, set baudrate to 57600 -- `ATBD6`, save parameters. + # Testing new releases Testing a new release of the zigpy-xbee library before it is released in Home Assistant. diff --git a/setup.py b/setup.py index 9325759..8713cc5 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,6 @@ author_email="rcloran@gmail.com", license="GPL-3.0", packages=find_packages(exclude=["*.tests"]), - install_requires=["pyserial-asyncio", "zigpy>= 0.20.a1"], + install_requires=["pyserial-asyncio", "zigpy>= 0.23.0"], tests_require=["pytest"], ) diff --git a/tox.ini b/tox.ini index 5b62331..22cd660 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py36, py37, py38, lint, black +envlist = py37, py38, lint, black skip_missing_interpreters = True [testenv] @@ -21,8 +21,8 @@ deps = [testenv:lint] basepython = python3 deps = - flake8 - isort + flake8==3.7.9 + isort==4.3.21 commands = flake8 isort --check -rc {toxinidir}/zigpy_xbee {toxinidir}/tests {toxinidir}/setup.py diff --git a/zigpy_xbee/__init__.py b/zigpy_xbee/__init__.py index 8364036..df4012f 100644 --- a/zigpy_xbee/__init__.py +++ b/zigpy_xbee/__init__.py @@ -1,5 +1,5 @@ MAJOR_VERSION = 0 -MINOR_VERSION = 12 -PATCH_VERSION = "1" +MINOR_VERSION = 13 +PATCH_VERSION = "0" __short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) __version__ = "{}.{}".format(__short_version__, PATCH_VERSION) diff --git a/zigpy_xbee/api.py b/zigpy_xbee/api.py index e8a0292..0c66392 100644 --- a/zigpy_xbee/api.py +++ b/zigpy_xbee/api.py @@ -7,7 +7,6 @@ import serial from zigpy.exceptions import APIException, DeliveryError -from zigpy.types import LVList import zigpy_xbee from zigpy_xbee.config import CONF_DEVICE_BAUDRATE, CONF_DEVICE_PATH, SCHEMA_DEVICE @@ -30,6 +29,11 @@ class ModemStatus(t.uint8_t, t.UndefinedEnum): NETWORK_SECURITY_KEY_UPDATED = 0x07 VOLTAGE_SUPPLY_LIMIT_EXCEEDED = 0x0D MODEM_CONFIGURATION_CHANGED_WHILE_JOIN_IN_PROGRESS = 0x11 + PAN_ID_CONFLICT_DETECTED = 0x3E + PAN_ID_UPDATED_DUE_TO_CONFLICT = 0x3F + JOIN_WINDOW_OPENED = 0x43 + JOIN_WINDOW_CLOSED = 0x44 + NETWORK_SECURITY_KEY_ROTATION_INITIATED = 0x45 UNKNOWN_MODEM_STATUS = 0xFF _UNDEFINED = 0xFF @@ -63,7 +67,7 @@ class ModemStatus(t.uint8_t, t.UndefinedEnum): ), "create_source_route": ( 0x21, - (t.FrameId, t.EUI64, t.NWK, t.uint8_t, LVList(t.NWK)), + (t.FrameId, t.EUI64, t.NWK, t.uint8_t, t.Relays), None, ), "register_joining_device": (0x24, (), None), @@ -99,7 +103,7 @@ class ModemStatus(t.uint8_t, t.UndefinedEnum): None, ), "extended_status": (0x98, (), None), - "route_record_indicator": (0xA1, (t.EUI64, t.NWK, t.uint8_t, LVList(t.NWK)), None), + "route_record_indicator": (0xA1, (t.EUI64, t.NWK, t.uint8_t, t.Relays), None), "many_to_one_rri": (0xA3, (t.EUI64, t.NWK, t.uint8_t), None), "node_id_indicator": (0x95, (), None), } diff --git a/zigpy_xbee/types.py b/zigpy_xbee/types.py index 956f01a..210aacb 100644 --- a/zigpy_xbee/types.py +++ b/zigpy_xbee/types.py @@ -161,6 +161,10 @@ def __str__(self): return "0x{:04x}".format(self) +class Relays(zigpy.types.LVList, item_type=NWK, length_type=uint8_t): + """List of Relays.""" + + UNKNOWN_IEEE = EUI64([uint8_t(0xFF) for i in range(0, 8)]) UNKNOWN_NWK = NWK(0xFFFE)