Releases: zigpy/zigpy-znp
Releases · zigpy/zigpy-znp
v0.5.2
Bugfixes
- Detect the CC2538 and include the Z-Stack build in the device model string (a571726, #72).
- Properly handle older Z-Stack
SYS.SetTxPower
responses (#82) - Permit deserialization failures with the undocumented
ZDO.ParentAnnceRsp
command (aaf0c31, home-assistant/core#50005). - Silence "Unhandled command" warnings for
ZDO.ParentAnnceRsp
,ZDO.ConcentratorInd
, andZDO.MgmtNWKUpdateNotify
(#75). - Joins through specific routers will not also open the coordinator for joining on Z-Stack
20210708
(properly fixes #53)
New features
v0.5.1
v0.5.0
New Features
- Huge thank you to @castorw from the Z2M project for working with me to bring concurrent support for the Open Coordinator Backup format to Z2M. This allows for bidirectional migration between any coordinators supported by zigpy-znp. More documentation is available in
TOOLS.md
#Backup and restore. - Multicast and broadcast requests are sent immediately
- Log a warning when using the Z2M default network key.
Changes
- Maximum time to wait for a device announcement after a device join before sending the zigpy
device_joined
signal has been increased from 2 seconds to 5 seconds. - Write both
PRECFGKEYS_ENABLE
andEXTENDED_PAN_ID
OSAL NVRAM items to ensure Z2M works with adapters commissioned with zigpy-znp. - Retry using manual source routing first, before route discovery.
- If an exception is encountered when passing a frame from the
UART
object toZNP
, log the entire frame. - If an unknown frame is passed to
ZNP
, log it but do not throw an exception. - The
-c
command line flag has been removed fromzigpy_znp.tools.nvram_reset
and is now the default.
Internal Changes
- Add a
force_form
keyword argument toControllerApplication.startup
. - All CC2531-specific types have been removed with the addition of the
CStruct
class, which computes struct padding and alignment during serialization/deserialization. This is autodetected at startup. - The
ZNP
class can now be used more independently ofControllerApplication
, especially without a formed network.ControllerApplication._reset
has been moved toZNP.reset
.- Complete network information is extracted from NVRAM at startup and populates the
ZNP
instance'snetwork_info
attribute.
- New helper methods to read and write NVRAM tables.
Breaking changes
- Serialization and deserialization of complex types is strongly encouraged to be done via
znp.nvram.serialize
/deserialize
instead of the object'sserialize
/deserialize
methods, which takes into account structure alignment and padding. item_type
is now a required keyword argument for all NVRAM reads and no trailing data after deserialization is permitted. Old behavior can be preserved by passingitem_type=t.Bytes
.
v0.4.0
New Features
- The default LED mode is now
off
. - Support for
ZDOCmd.Unbind_req
(#54). - Very verbose
TRACE
-level debug logging is now hidden behind the logger object inzigpy_znp.logger
. To enable it again in Home Assistant, add the following to your logging configuration:logger: logs: zigpy_znp.logger: debug
- Periodically pings Z-Stack to detect soft lockups and treat this failure as a disconnect. For sticks that reset upon reconnect, like slaesh's CC2652RB stick, this will make recovery automatic.
- Log network settings on startup under the
INFO
log level. For security, the network key will be logged under theDEBUG
level. - During request retrying, always attempt source routing, even if a device's
relays
are not present.
Bugfixes
permit_ncp
is now a no-op and all calls toControllerApplication.permit
will open joins on the coordinator, even when joins are permitted only through another router (#53). A full solution will require changes to Z-Stack.- Do not attempt manual child aging on older coordinators, as their firmware does not have the required command and MT serialization inconsistencies will cause errors to be logged.
- Prevent the installation of
pyserial_asyncio==0.5
on Windows, which breaks writes (pyserial/pyserial-asyncio#69).
v0.3.0
Security Fixes
- CC2531 coordinators running Z-Stack Home 1.2 firmware erroneously permit joins on startup, even after being reset. Joins are now explicitly disabled every time the coordinator is started (home-assistant/core#43245).
New Features
- Handle errors internal to Z-Stack by retrying requests within zigpy-znp. Missing routes are explicitly re-discovered using a few different methods, including manual source routing as a last resort. Thanks zigbee-herdsman!
- Check for and re-discover missing routes before sending ZDO requests.
- Upon receipt of a Trust Center key exchange notification,
handle_join
will be delayed for at most two seconds, until a device sends a ZDO Parent Announce broadcast.
Bugfixes
- NVRAM backup and restore did not read/write tables except for the first and last items. This is now properly handled but the backup format is now backwards-incompatible.
ControllerApplication.force_remove
does not throw exceptions (zigpy/zigpy#563).- Fix communication with devices using nonstandard profiles by always defaulting to endpoint 1 (#43)
- Fix
ZDOCmd.Mgmt_Rtg_req
ZDO converter incorrectly sendingZDO.MgmtLqiReq
instead ofZDO.MgmtRtgReq
.
Internal Changes
NwkNvIds
andOsalNvIds
were improperly named.NwkNvIds
are nowOsalNvIds
andOsalNvIds
are nowExNvIds
. The new-style and legacy NVRAM operations are now exposed viaZNP.nvram.read
andZNP.nvram.legacy_read
, respectively. TheZNP.nvram
object transparently handles items that require multiple reads/writes to fully populate and bypasses NVRAM read protection for secure items when used with certain builds of Z-Stack Home 1.2.- Shield request/response/callback coroutines from cancellation in order to reduce the number of logged
unhandled command
warnings. - Remove handling of
"auto"
as a device path.
v0.2.2
Bugfixes
- Fix LED control for CC2531s running Z-Stack Home 1.2 (reported by @JeffResc).
Tools
- Support
zigpy_znp.tools.network_scan
on Z-Stack Home 1.2. - Include complete beacon information in
zigpy_znp.tools.network_scan
, including LQI. - Allow duplicate beacons to be printed with
zigpy_znp.tools.network_scan
by passing the--allow-duplicates
(-a
) flag.
v0.2.1
Bugfixes
- Fix
tests
being erroneously installed as a Python package along withzigpy_znp
. - Support Python 3.8.6 by fixing
enum
incompatibilities (https://bugs.python.org/issue41889) and requiring at least zigpy 0.25.0. - Explicitly handle device announcement and source routing messages generated by devices on the network that are not known to zigpy, preventing unnecessary tracebacks from being logged (reported by @Samantha-uk).
- Reduce the logging level of missing NVRAM item messages in
zigpy_znp.tools.nvram_reset
fromWARNING
toDEBUG
(reported by @Samantha-uk).
v0.2.0
New Features
- Support for slae.sh's CC2562R USB coordinator (@MarhyCZ)
- 🎉 Z-Stack Home 1.2 support 🎉
- Preliminary support for permitting joins with Zigbee 3.0 Install Codes via
ControllerApplication.permit_with_key
.
New Tools
python -m zigpy_znp.tools.network_scan
: performs an active network scan on the specified channels and prints out all unique beacons with timestamps.python -m zigpy_znp.tools.nvram_reset
: new-c
deletes every known NVRAM item, effectively resetting your hardware to its newly-flashed state.
Bugfixes
- Fix
ControllerApplication.probe()
failing when other zigpy radio libraries have previously attempted to communicate with a radio's serial port at the wrong baudrate. - Add support for
Mgmt_Lqi_req
andMgmt_Rtg_req
ZDO commands, fixing issues with https://github.com/zha-ng/zha-map (@Samantha-uk) - Populate the coordinator's
zigpy.device.Device
object's node descriptor. - Fix sporadic resource cleanup race condition multiple request/response/callbacks where the first one fails.
ZNP.nvram_read/write/delete
will now perform multiple reads and writes with offsets if an item is too long to read or write in one request.
Breaking Changes
ControllerApplication.form_network()
will not store the channel mask in NVRAM if a specific logical channel is provided as well. If no logical channel is provided, the coordinator will perform a scan for existing networks and pick a channel at random from the provided mask.- Minimum zigpy version has been upgraded from
0.23.0
to0.24.1
.
v0.1.1
v0.1.0
New Features
zigpy_znp.tools.nvram_reset
resets a device.zigpy_znp.tools.nvram_write
takes a-r
argument to reset a device after writing new firmware.zigpy_znp.tools.nvram_write
now allows firmware downgrades back to unsupported versions of Z-Stack.- If a
TRACE
logging level exists (must be equal to5
or namedTRACE
, and be more verbose thanDEBUG
),zigpy-znp
will log very verbose messages with that level. Otherwise,DEBUG
will be used.
Changes
- Increase minimum zigpy version to
0.23.0
. - Drop the
attr
package as a dependency. - Add autodetection for the CC2531 and slae.sh's CC2652R USB stick
- Limit concurrent requests to 2 for CC2531 and 16 for more capable coordinators (can be overridden with the
max_concurrent_requests
setting). Future releases may intelligently limit requests in response to memory errors. - VERBOSE and TRACE logging is available in all command line tools, defaulting to INFO.
Bugfixes
- Fixed bug where a callback responding to one of multiple ZDO requests of the same type would be erroneously accepted by all.
- Networks formed with a channel mask and a fixed channel did not always use the fixed channel. ` is used in the configuration