Releases: zigpy/zigpy-znp
Releases · zigpy/zigpy-znp
v0.5.4
v0.5.3
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.SetTxPowerresponses (#82) - Permit deserialization failures with the undocumented
ZDO.ParentAnnceRspcommand (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_joinedsignal has been increased from 2 seconds to 5 seconds. - Write both
PRECFGKEYS_ENABLEandEXTENDED_PAN_IDOSAL 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
UARTobject toZNP, log the entire frame. - If an unknown frame is passed to
ZNP, log it but do not throw an exception. - The
-ccommand line flag has been removed fromzigpy_znp.tools.nvram_resetand is now the default.
Internal Changes
- Add a
force_formkeyword argument toControllerApplication.startup. - All CC2531-specific types have been removed with the addition of the
CStructclass, which computes struct padding and alignment during serialization/deserialization. This is autodetected at startup. - The
ZNPclass can now be used more independently ofControllerApplication, especially without a formed network.ControllerApplication._resethas been moved toZNP.reset.- Complete network information is extracted from NVRAM at startup and populates the
ZNPinstance'snetwork_infoattribute.
- 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/deserializeinstead of the object'sserialize/deserializemethods, which takes into account structure alignment and padding. item_typeis 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
INFOlog level. For security, the network key will be logged under theDEBUGlevel. - During request retrying, always attempt source routing, even if a device's
relaysare not present.
Bugfixes
permit_ncpis now a no-op and all calls toControllerApplication.permitwill 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.5on 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_joinwill 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_removedoes not throw exceptions (zigpy/zigpy#563).- Fix communication with devices using nonstandard profiles by always defaulting to endpoint 1 (#43)
- Fix
ZDOCmd.Mgmt_Rtg_reqZDO converter incorrectly sendingZDO.MgmtLqiReqinstead ofZDO.MgmtRtgReq.
Internal Changes
NwkNvIdsandOsalNvIdswere improperly named.NwkNvIdsare nowOsalNvIdsandOsalNvIdsare nowExNvIds. The new-style and legacy NVRAM operations are now exposed viaZNP.nvram.readandZNP.nvram.legacy_read, respectively. TheZNP.nvramobject 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 commandwarnings. - 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_scanon 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_scanby passing the--allow-duplicates(-a) flag.
v0.2.1
Bugfixes
- Fix
testsbeing erroneously installed as a Python package along withzigpy_znp. - Support Python 3.8.6 by fixing
enumincompatibilities (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_resetfromWARNINGtoDEBUG(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-cdeletes 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_reqandMgmt_Rtg_reqZDO commands, fixing issues with https://github.com/zha-ng/zha-map (@Samantha-uk) - Populate the coordinator's
zigpy.device.Deviceobject's node descriptor. - Fix sporadic resource cleanup race condition multiple request/response/callbacks where the first one fails.
ZNP.nvram_read/write/deletewill 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.0to0.24.1.