You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a aggregrator endpoint device (Bridge Node) with matter.js and the device connects but device type is not recognised and functions are not showing properly
But I made an onOff light and it works perfectly
Aggregrator Code ------
const server = await ServerNode.create({
// Required: Give the Node a unique ID which is used to store the state of this node
id: uniqueId,
// Provide Network relevant configuration like the port
// Optional when operating only one device on a host, Default port is 5540
network: {
port: port,
},
// Provide Commissioning relevant settings
// Optional for development/testing purposes
commissioning: {
passcode: passcode,
discriminator: discriminator,
},
// Provide Node announcement settings
// Optional: If Ommitted some development defaults are used
productDescription: {
name: productName,
deviceType: AggregatorEndpoint.deviceType,
},
// Provide defaults for the BasicInformation cluster on the Root endpoint
// Optional: If Omitted some development defaults are used
basicInformation: {
vendorName,
vendorId: VendorId(vendorId),
nodeLabel: productName,
productName,
productLabel: productName,
productId,
serialNumber: `matterjs-${uniqueId}`,
uniqueId,
},
});
const aggregator = new Endpoint(AggregatorEndpoint, { id: "aggregator" });
await server.add(aggregator);
const name = `OnOff Socket 1`;
const endpoint = new Endpoint(
OnOffPlugInUnitDevice.with(BridgedDeviceBasicInformationServer),
{
id: `onoff-socket-1`,
bridgedDeviceBasicInformation: {
nodeLabel: name,
productName: name,
productLabel: name,
serialNumber: `node-matter-5678-3`,
reachable: true,
},
}
);
await aggregator.add(endpoint);
endpoint.events.identify.startIdentifying.on(() => {
console.log(
`Run identify logic for ${name}, ideally blink a light every 0.5s ...`
);
});
endpoint.events.identify.stopIdentifying.on(() => {
console.log(`Stop identify logic for ${name} ...`);
});
endpoint.events.onOff.onOff$Changed.on((value) => {
executeCommand(value ? `on${i}` : `off${i}`);
console.log(`${name} is now ${value ? "ON" : "OFF"}`);
});
await server.start();
Is there any problem with the device type I am mentioning or this app havent implemented bridge yet?
The text was updated successfully, but these errors were encountered:
I made a aggregrator endpoint device (Bridge Node) with matter.js and the device connects but device type is not recognised and functions are not showing properly
But I made an onOff light and it works perfectly
Aggregrator Code ------
Is there any problem with the device type I am mentioning or this app havent implemented bridge yet?
The text was updated successfully, but these errors were encountered: