Dart · Library · Apache-2.0

matter_dcl

A Dart package that looks up Matter vendor and product IDs in the CSA's Distributed Compliance Ledger and turns a pair like 4107/8580 into a name: WiZ P45.E27.

View on GitHub View on pub.dev

Every Matter device carries two numbers, a vendor ID and a product ID. You’ll find them in its DNS-SD TXT record (VP=4107+8580) or its Basic Information cluster, and on their own they mean nothing to a person. matter_dcl looks them up in the Distributed Compliance Ledger, the public registry the Connectivity Standards Alliance keeps of every Matter vendor ID and certified product. One lookup works for every brand.

It’s pure Dart, so it runs in Flutter apps, on servers and on the command line.

Install

dart pub add matter_dcl

In a Flutter app, flutter pub add matter_dcl.

Example

import 'package:matter_dcl/matter_dcl.dart';

final dcl = MatterDcl();

final vendor = await dcl.vendor(0x100B);         // MatterVendor(0x100B, Signify)
final product = await dcl.product(0x100B, 8580); // MatterProduct(4107/8580, WiZ P45.E27)
final name = await dcl.deviceName(0x100B, 8580); // "Signify WiZ P45.E27"

dcl.close();

The package’s own example adds one more lookup, and it shows the trap:

The matter_dcl example program and its output: vendor 0x1423 prints as Feit, product 4107/8580 as WiZ P45.E27, and the device name as Signify WiZ P45.E27

Vendor 0x1423 comes back as Feit, because LIFX lights use Feit Electric’s vendor ID. WiZ lights are registered under Signify. The registered company is often not the brand on the box, so show the product name where you can.

How it behaves

Lookups never throw. An unregistered ID, a timeout and a network error all return null, which keeps a lookup from taking down a pairing screen. Results are cached, including “not registered”, and a failed lookup is tried again on the next call. Two lookups of the same ID at the same moment share one request.

MatterVendor carries the vendor name, the company’s preferred and legal names and its landing page. MatterProduct carries the product name and label, part number, device type, and support, product and manual links. The ledger’s REST API wants decimal IDs (0x100B is 4107 in the URL); the package converts for you.

Options: MatterDcl(baseUri: MatterDcl.testnet) for the test ledger, timeout: (3 seconds by default), and httpClient: to pass your own package:http client, handy with MockClient in tests.

Limits

It needs the network. The ledger’s endpoint is public and unauthenticated, so be kind to it: keep the cache, and don’t look IDs up in a loop. The names and links are only what each maker registered.

Licence

Apache 2.0.

Read the announcement: matter_dcl: a Matter device lookup for Dart.

Hear when FirePod goes on saleGet the early-bird price

FirePod isn't on sale yet. Leave your email and we'll write when it is.

FirePod isn't on sale yet. Sign up and the early-bird price comes to your inbox when it is.