# Introducing Node-RED-Matter: Create Virtual Devices with Ease for the Matter Protocol!

**URL:** <https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860>\
**Category:** Share Your Nodes\
**Created:** [28 August 2023 13:00 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860 "2023-08-28T13:00:03Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 August 2023 13:33 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/69 "2023-08-30T13:33:51Z")

</div>

I'm not running in virtual machine 🙂  
This is my WIn11 desktop computer

[edit] I do have a virtualbox VM running on the machine but the NR install is running on main machine

I've only see @PdeJ on this thread trying this out with Alexa and their's didn't seem to work either. And they are using plain Pi setup

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [30 August 2023 14:47 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/70 "2023-08-30T14:47:28Z")

</div>

I'm sorry it's not working, I don't have Alexa so can't really test it, but the matter.js project works with it so I don't see why here it shouldn't ☹

* * *

I just published 0.2.6 with initial support for aggregated devices / bridges:

> **[Release v0.2.6 · FezVrasta/node-red-matter](https://github.com/FezVrasta/node-red-matter/releases/tag/v0.2.6)**
>
> Initial support for bridges, a new matter-bridge-node configuration is now available, when you create a matter-device-node you can decide if you want it to be a standalone device (with its own QR c...

---

<div class="post-metadata">

**Author:** ![optic](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@optic](https://discourse.nodered.org/u/optic)\
**Post date:** [30 August 2023 16:23 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/71 "2023-08-30T16:23:36Z")

</div>

still no luck with alexa and 0.2.5 here.  
but has anyone tried pairing a device with Homeassistant?  
The behavior in HA should be pretty similar for everyone.

It still fails for me but at least it seems like its trying to pair the device and the two systems talk to each other.  
Node-red-log shows following error when HA is trying to add the device:

```auto
2023-08-30 18:12:03.539 ERROR PaseServer An error occured during the commissioning (1/2) Received general error status (0)
    at PaseServerMessenger.throwIfErrorStatusReport (/home/optic/.node-red/node_modules/@project-chip/matter.js/dist/cjs/protocol/securechannel/SecureChannelMessenger.js:91:19)
    at PaseServerMessenger.<anonymous> (/home/optic/.node-red/node_modules/@project-chip/matter.js/dist/cjs/protocol/securechannel/SecureChannelMessenger.js:38:18)
    at Generator.next (<anonymous>)
    at fulfilled (/home/optic/.node-red/node_modules/@project-chip/matter.js/dist/cjs/protocol/securechannel/SecureChannelMessenger.js:10:58)

```

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [30 August 2023 16:26 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/72 "2023-08-30T16:26:32Z")

</div>

It would probably make sense to open an issue on the matter.js github repository as they will be able to help more than I can.

> **[Issues · project-chip/matter.js](https://github.com/project-chip/matter.js/issues?q=is%3Aissue%2Bis%3Aopen%2Bsort%3Aupdated-desc)**
>
> Implementation of Matter protocol in typescript. Contribute to project-chip/matter.js development by creating an account on GitHub.

I think the best way to report the issue would be to run the [DeviceNode.ts](https://github.com/project-chip/matter.js/blob/main/packages/matter-node.js-examples/src/examples/DeviceNode.ts) example and try to pair to it. This way any problem that may be introduced by my plugin is out.

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [30 August 2023 16:59 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/73 "2023-08-30T16:59:46Z")

</div>

I'm on Version 0.2.5, not updated yet, with Node.js v 18.17.1.

I can set up a matter-device-node and Alexa recognizes it as a Matter device when asked to "discover new devices" so that I receive a notification on my iPhone to connect via the Alexa App. But it makes no difference as whether I then use the QR code, or the manual pairing code, Alexa fails to connect to the device.

---

<div class="post-metadata">

**Author:** ![bobcroft](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobcroft/32/52443_2.png) [@bobcroft](https://discourse.nodered.org/u/bobcroft)\
**Post date:** [31 August 2023 07:55 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/74 "2023-08-31T07:55:50Z")

</div>

Interesting Home Assistant is now mentioned. I would have thought that was getting to be more widely used then Google Home or the Apple offering. I guess the cloud server concerns are still an issue if using Nabu Casa. Good luck with your Matter node development.

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [31 August 2023 11:40 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/75 "2023-08-31T11:40:11Z")

</div>

I should have emphasised that Alexa succeeds in discovering the Node-Red-Matter virtual devices, but fails to connect to them and doesn't show them post discovery in the list of devices on the Lexa App. Once discovered those device instances cannot be rediscovered. Hope this helps with understanding of what is happening.

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [31 August 2023 11:41 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/76 "2023-08-31T11:41:02Z")

</div>

I setup a Home assistant server and I'm experiencing the same, so at least I have a way to reproduce it.

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [31 August 2023 12:04 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/77 "2023-08-31T12:04:45Z")

</div>

@PdeJ I published 0.2.7 with some improvements around aggregators/bridges. I was able to pair a bridge to Home Assistant both starting from a QR Code generated by Node-RED and one generated by Apple Home (after the bridge was paired to Apple Home first).

I noticed pairing to Home Assistant takes up to 3 minutes, while on Apple Home it's usually instant.

May you test the new version and report back please?

* * *

0.2.8 is out with more bug fixes around flows mixing aggregators and devices

* * *

I reported some slowness I experienced while pairing on Home Assistant and it looks like HA is doing something wrong, I wonder if Alexa is doing the same?

> **[Adding device to Home Assistant takes a very long time ·...](https://github.com/project-chip/matter.js/discussions/301)**
>
> Hi, I'm testing out the Home Assistant Matter integration and I noticed that adding devices to my Raspberry Pi 4 HassOS server is taking much longer than when I try to add it from Apple Home. In bo...

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [31 August 2023 16:37 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/78 "2023-08-31T16:37:17Z")

</div>

No Joy with 0.2.8 and comes up with the following

```auto
2023-08-31 16:32:43.411850: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 8640000 exceeds 10% of free system memory.
2023-08-31 16:32:43.469276: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 8640000 exceeds 10% of free system memory.
2023-08-31 16:32:43.493841: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 8640000 exceeds 10% of free system memory.type or paste code here

```

I've reverted back to 0.2.5 which doesn't report above, and retested. I may have been mistaken about the 'discovery', on reflection that may have been another device being found that flashed up a notification on my iPhone, since I am unable to reproduce that behaviour.

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [31 August 2023 17:26 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/79 "2023-08-31T17:26:32Z")

</div>

The Tensorflow message is unrelated to my plug-in.

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [31 August 2023 18:42 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/80 "2023-08-31T18:42:13Z")

</div>

Sorry was trying to respond in haste, without looking at the actual context of the message. I'm have one other flow on the pi which uses a TensorFlow.js node to run CoCo for object recognition.

---

<div class="post-metadata">

**Author:** ![optic](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@optic](https://discourse.nodered.org/u/optic)\
**Post date:** [31 August 2023 19:28 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/81 "2023-08-31T19:28:10Z")

</div>

alexa can see the device now, but cant connect it.  
Home Assistant tries to add it and still gives this error as i mentioned yesterday.

```auto
ERROR PaseServer An error occured during the commissioning (1/2) Received general error status (0)
    at PaseServerMessenger.throwIfErrorStatusReport (/home/optic/.node-red/node_modules/@project-chip/matter.js/dist/cjs/protocol/securechannel/SecureChannelMessenger.js:91:19)
    at PaseServerMessenger.<anonymous> (/home/optic/.node-red/node_modules/@project-chip/matter.js/dist/cjs/protocol/securechannel/SecureChannelMessenger.js:38:18)
    at Generator.next (<anonymous>)
    at fulfilled (/home/optic/.node-red/node_modules/@project-chip/matter.js/dist/cjs/protocol/securechannel/SecureChannelMessenger.js:10:58)

```

You said it works for you in HA.  
What Version did you try it with?

I am on the most recent version, maybe its a general issue with the latest HA and matter.js?  
Home Assistant 2023.8.4  
Supervisor 2023.08.1  
Operating System 10.5  
Frontend 20230802.1 - latest

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 August 2023 20:05 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/82 "2023-08-31T20:05:22Z")

</div>

I just tried 0.2.8 and I asked Alexa to discover devices and it said it had found a Matter light 🙂

But when I go into the node configuration - I don't see any QR or numeric code anymore

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/207d62be561e3ab67885227aaae4c32a6185cb8a.png)

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [31 August 2023 20:23 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/83 "2023-08-31T20:23:26Z")

</div>

I see there's a problem with the rendering of that config page, do you see any errors in the Node red console or the browser console?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 August 2023 20:32 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/84 "2023-08-31T20:32:56Z")

</div>

uninstalled/reinstalled and added a Matter Server this time

Pairing QR code there this time

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a6bcabcfdbd65ea86ec1c76e0f4150d7270681df.png)

log

```auto
31 Aug 21:28:25 - [warn] [matter-server:282c520cb60a82c5] Not all devices were added to the server, starting anyway but in a potentially unstable state
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Starting matter server
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Connecting all commissioning controllers
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Matter server started
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Added commissioning server for 62243ddd5ecae88d
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] All related nodes added (1/1)
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Starting matter server
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Connecting all commissioning controllers
31 Aug 21:28:25 - [info] [matter-server:282c520cb60a82c5] Matter server started

```

No errors in browser console  
Couldn't pair from Alexa

---

<div class="post-metadata">

**Author:** ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)\
**Post date:** [31 August 2023 20:39 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/85 "2023-08-31T20:39:28Z")

</div>

To cut a VERY long story short, upgraded to NR 3 - and Nodejs 18... so now Im looking in here and wondering why as I want it to work with my Google Home Speaker - in the upgrade I lost the use of the node-red-contrib-eWelink nodes and gained this - comment suggesting not doing much with Google Home - oh well... at least it pushed me to upgrade Node-Red from v2 and nodejs from v14.

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [31 August 2023 22:28 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/86 "2023-08-31T22:28:16Z")

</div>

I'm glad someone else has got that far. I was able to do the same on v0.2.5 but earlier today I couldn't reproduce the finding on either 0.2.5 or or 0.2.8!

Reading your @cymplecy experience I had another go and this time I was once again successful as far as discovering a device and failing to connect. This time I did not associate a server with the node before attempting discovery, which seems to work.

I get the impression that once a matter server starts then the devices become undiscoverable, and this would seem to explain why I could not reproduce their discovery earlier today.

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [1 September 2023 06:11 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/87 "2023-09-01T06:11:04Z")

</div>

Without a server the accessory cannot work. Make sure each device has a server or an aggregator assigned.

I noticed something off in the logs you guys provided, I'll make some changes to ensure everything runs in the right order today (unless the logs came from 0.2.5 and then I already fixed the issue)

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [1 September 2023 06:15 UTC](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860/88 "2023-09-01T06:15:58Z")

</div>

What version did you install?

[Previous page](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860.md?page=3)

[Next page](https://discourse.nodered.org/t/introducing-node-red-matter-create-virtual-devices-with-ease-for-the-matter-protocol/80860.md?page=5)
