Skip to content

0.5.0 (2023-08-22)

Compare
Choose a tag to compare
@Apollon77 Apollon77 released this 22 Aug 21:18
· 850 commits to main since this release
8b27901

0.5.0 (2023-08-22)

  • Matter-Core functionality:
    • Breaking: Added support to allow to clearly model some more attribute types with internally different behaviour:
      • Added types for WritableFabricScopedAttribute and OptionalWritableFabricScopedAttribute
      • Added types for FixedAttribute and OptionalFixedAttribute
      • Added FixedAttributeServer which only allows to "get" the value but not to set it
      • Added FabricScopedAttributeServer which gets and sets the value based on the provided fabric
      • Updated ClusterServerObj and ClusterClientObj typings to respect these Attribute types
      • Updated all Cluster definitions that use such attribute types
    • Breaking: Add Interface for Events which requires to define the supported events when creating a ClusterServer
    • Breaking: Include Event support in InteractionClient which changes several Read/Subscribe method signatures or adds new methods
    • Breaking: GeneralCommissioningServerHandler is now a function that takes configuration for setRegulatoryConfig handling
    • Breaking: Types of specific clusters are no longer exported flat on main level. Cluster exports are now namespaces that include their types.
    • Breaking: All collection files meant to be used for exports only are renamed to export.ts and should not be used for internal imports
    • Breaking: Attribute listener methods renamed: addListener -> addValueSetListener, addMatterListener -> addValueChangeListener (also remove methods) to make it more clear what they do
    • Breaking: Change from object style to Branded types for special Datatype objects (e.g. "new VendorId(0xFFF1)" -> "VendorId(0xFFF1)")
    • Breaking: ClusterClient and ClusterServer classes were moved from "interaction" export to "cluster" export
    • Breaking: Refactor the (low level) ClusterClient API to be more convenient to use with many optional fields for read/write/subscribe
    • Breaking: Cluster*Obj and the internal representation for more correct typings
    • Breaking: The InteractionClient is no longer exchangeable in ClusterClient cases (because makes no sense and was never working)
    • Feature: Enhance CommissioningServer options to also specify GeneralCommissioningServer details and settings
    • Feature: Adjust RegulatoryConfig Handling in Device and Controller to match with specifications
    • Feature: Endpoint Structures use custom-unique-id (from EndpointOptions)/uniqueStorageKey (from BasicInformationCluster)/serialNumber (from BasicInformationCluster)/ Index (in this order) to store and restore the endpoint ID in structures
    • Feature: (@mahimamandhanaa) Add BTP (Bluetooth Transport Protocol) codec class for encoding and decoding of BTP messages
    • Feature: Enhanced BitMap typing and Schemas to allow "Partially" provided Bitmaps by suppressing the "unset" bits
    • Feature: Allow to define discoveryCapabilities structure when getting pairing code in CommissioningServer
    • Feature: Added Bluetooth package (matter-node-ble.js) to allow to use Bluetooth as transport layer for initial commissioning. Implemented device side for now
    • Feature: Global Attributes are also accessible in ClusterClient instances (e.g. to get the list of features of the cluster)
    • Feature: Refactor Controller Commissioning process and add network commissioning support
    • Feature: Correctly Handle FabricIndex fields for Read and Write requests
    • Feature: Handle subscription errors and destroy session if failing more than 3 times
    • Feature: Add full event support (Device and Controller) including triggering some default events automatically (startup, shutdown, reachabilityChanged, bootReason)
    • Feature: Added support for dataVersionFiltering and eventFilters for read and subscribe requests for Device and Controllers
    • Feature: Added more parameters to several InteractionClient methods to allow to configure more parameters of the requests
    • Feature: Allows subscripts to be updated dynamically when the endpoint structure for bridges changes by adding or removing a device
    • Feature: When used as Controller also "unknown" CLusters, Attributes, Events and DeviceTypes are generically parsed and supported and can be detected as unknown in code
    • Feature: When used as controller the read data about supported attributes, events are considered when create Attribute/EventClient objects and can be differentiated by PresentAttributeClient/UnknownPresentAttributeClient class types
    • Enhance: Device port in MDNSBroadcaster is now dynamically set and add UDC (User directed Commissioning) Announcements
    • Enhance: Enhanced MessageCodec and check some more fields
    • Enhance: Added possibility to define conditional cluster attribute/Command/event definitions and introduce runtime checking for these. Part of Cluster Structure rework still WIP
    • Enhance: (@vves) Add Window Covering Cluster definition
    • Enhance: Split up and corrected PowerSource and PressureMeasurement Cluster based on Matter 1.1 Specs
    • Enhance: Detailed cluster data model and related logic
    • Enhance: Generates all cluster definitions from Matter 1.1 specification and CHIP v1.1-branch automatically. This brings basic definition support for all clusters!
    • Enhance: Makes sure Fabric-Scoped requests are handled correctly for read and subscriptions
    • Enhance: All Errors thrown by the library are now derived from the MatterError class and split up into several subclasses
    • Fix: Added missing PulseWidthModulationLevelControlCluster to AllCLusters
    • Fix Typing of Commands in ClusterClient if no commands were present
    • Fix: Fixes equality checks in Attribute servers to check deeper than just === (and introduce new util method isDeepEqual)
    • Fix: Makes sure an error received from sending subscription seed data reports is not bubbling up and activate subscription after successful seeding
    • Fix: Allows Node.js Buffer objects to be persisted to storage as a Uint8Arrays that they subclass
    • Fix: Fixes a Subscription timer duplication issue and collect attribute changes within a 50ms window to reduce the number of subscription messages
    • Fix: Returns correct Error-Status for Read-/Write-/Subscribe- and Invoke-Requests
    • Fix: Fixes TLV Encoding for strings with UTF8 relevant characters
    • Fix: Adjusted DataVersion handling to track version on ClusterInstance level as required by Specs. Stored values that might got invalid by this change are deleted and recreated on next change.
    • Refactor: Refactor Endpoint structuring and determination to allow dynamic and updating structures
  • matter.js API:
    • Breaking:
      • Adjusted some constructors of the new API and remove the option to pass an array of clusters to be added initially because this was no longer compatible to the strong typing in some places. Use addClusterServer and addClusterClient methods
      • Endpoint ID parameter got replaced by an EndpointOptions structure that also allows to define a custom unique ID for endpoint structuring
      • Composed devices objects should only be used on an Aggregator
    • Deprecation: The classes MatterDevice and MatterController are deprecated to be used externally to the library and will be removed in later versions.
    • Feature: Enhance Storage system to allow to create subcontext stores to allow better separation of data
    • Feature: Allow to also remove devices from Aggregators
    • Feature: Optionally allow to define discovery capabilities when generating Pairing code
    • Feature: Add methods to CommissioningServer/Controller class to get information on active sessions and commissioned fabrics
    • Feature: Enhance CommissioningController to allow subscribing to all attributes and events directly on startup
  • Reference implementation/Examples:
    • Breaking: The storage key structure got changed to allow multi node operations within one process. This requires to change the storage key structure and to migrate or reset the storage.
      • Migration: prepend any storage key except Device.* and Controller.* with "0." in the filename
    • Deprecation: The CLI Examples LegacyDeviceNode and LegacyControllerNode is removed in this version! Use the new variants please.
    • Change: The default storage names now start with a "." at the beginning to allow to hide them in some file explorers and git.
    • Change: Example script are moved to package matter-node.js-examples
    • Feature: The Device example script got a new parameter -ble to also initialize the Bluetooth transport layer
    • Feature: The Controller example script got a new parameter -ble to also initialize the Bluetooth transport layer
    • Feature: The Controller example script got a new parameters -ble-* to provide Wi-Fi/Thread network credentials to use for device commissioning
    • Feature: Add stopping of the example scripts to allow clean shutdown and sending shutdown Event
    • Feature: Add CLI parameter to define the loglevel and log format; default log format changed to ANSI when executed in a shell/tty
    • Feature: Log the endpoint structure of the device/commissioned device on start
  • Misc:
    • Added Specification links for Matter Specifications 1.1
    • Optimize typing exports for node10 TS settings
    • Add optional parameter to define a uniqueID used in serial number of examples
    • Add WIP package matter-node-shell.js with the goal to offer a node.js based shell-based controller implementation
    • Add new util class EndpointStructureLogger which logs all endpoint details