Skip to content

Conversation

@Apollon77
Copy link
Collaborator

These are the initial and basic updates needed

Copilot AI review requested due to automatic review settings January 2, 2026 18:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the adapter to Matter 1.4.2 and matter.js 0.16.0 (nightly), implementing significant API changes and refactorings required by the new Matter.js version. The changes include removing custom thermostat behavior (now using standard Matter.js implementation), updating async patterns from PromiseQueue to Semaphore, improving storage mechanisms, fixing BLE initialization, and expanding color temperature ranges. The update also includes substantial vendor ID database updates and dependency version bumps.

Key Changes:

  • Replaced custom IoThermostatServer behavior with standard Matter.js ThermostatServer
  • Updated from PromiseQueue to Semaphore for concurrency control
  • Changed storage interface from MaybeAsyncStorage to Storage with new blob handling
  • Fixed BLE initialization using environment variables instead of singleton pattern
  • Expanded color temperature ranges from 2000-6536K to 1000-20000K
  • Replaced timer numeric values with typed Millis() and Seconds() constructors
  • Changed Matter node state properties from .state to .connectionState
  • Updated Bytes type handling for MAC/IP address conversions
  • Added support for "mired" unit in color temperature conversion

Reviewed changes

Copilot reviewed 31 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ThermostatToMatter.ts Replaced custom thermostat behavior with standard Matter.js, fixed state access patterns, updated temperature attribute from localTemperature to externalMeasuredIndoorTemperature, removed TypeScript workarounds
LockToMatter.ts Added operating mode configuration, removed ts-expect-error workarounds by using cluster name strings
HueAndRgbToMatter.ts Updated timer to use Millis type, expanded color temperature range to 1000-20000K
CtToMatter.ts, CieToMatter.ts Updated color temperature default ranges to match new Matter spec
ButtonToMatter.ts, ButtonSensorToMatter.ts Converted numeric timer delays to typed Millis() calls
BlindsToMatter.ts Fixed state updates using cluster name strings, improved type safety with block scoping
GenericDeviceToIoBroker.ts Updated type from DeviceBasicInformation to Record<string, unknown>, removed dataVersionFilters from attribute queries
ExtendedColorLightToIoBroker.ts, ColorTemperatureLightToIoBroker.ts Updated color temperature default calculations for new range
ThermostatServer.ts Removed entire custom behavior file (now using standard Matter.js implementation)
IdentifyServer.ts Updated timer calls to use Seconds() type constructor
IoBrokerObjectStorage.ts Changed from MaybeAsyncStorage to Storage interface, added blob handling methods, updated storage location checker from prefix to callback
GeneralMatterNode.ts Updated state property to connectionState, fixed import paths, changed handler to synchronous with async error handling
DeviceNode.ts Added error handling wrapper for validChanged event callback
ControllerNode.ts Replaced BLE singleton pattern with environment variable configuration, fixed async event handlers
BaseServerNode.ts Changed advertise API call to restartAdvertisement, updated event handlers to synchronous
main.ts Replaced PromiseQueue with Semaphore, added namespace-specific storage strategies, added Types.percentage support, updated comment grammar
utils.ts Updated byte array handling to use Bytes type wrapper with Bytes.of()
DeviceFactory.ts Added Percentage device type support
Ct.ts Added "mired" unit conversion (singular form)
Percentage.ts New device class extending Slider
vendorIDs.ts (both files) Massive updates to vendor database with hundreds of new/updated entries
package.json files Updated multiple dependencies to latest versions
README.md Added changelog entries for this version
Files not reviewed (1)
  • src-admin/package-lock.json: Language not supported

@Apollon77 Apollon77 merged commit 6ae756e into main Jan 2, 2026
16 checks passed
@Apollon77 Apollon77 deleted the upd016 branch January 2, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants