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

:electric_plug: Hey there! I wanted to share my latest project with you called Node-RED-Matter.

:hourglass: TL;DR — Custom nodes that let you create Matter devices on Node-RED and pair them with Apple Home, Google Home, Alexa, etc...

:thinking: So, what's Node-RED-Matter all about? It's a handy plugin I developed for the Node-RED community. This plugin allows you to effortlessly build virtual devices that seamlessly integrate with the Matter protocol — perfect for anyone interested in smart home automation and IoT development.

:sparkles: Let's take a look at its key features:

  1. Simple Virtual Device Creation: With Node-RED-Matter, you can easily define device types, configure capabilities, and set it all up right within Node-RED. No complications or headaches!
  2. Smooth Matter Integration: Connect your virtual devices with Matter-enabled ecosystems effortlessly. This enables smooth communication and interaction with other Matter-compatible devices and platforms.
  3. Flexible Device Control: Utilize Node-RED's flow-based programming to implement complex device logic, create automation routines, and trigger actions based on various events. The possibilities are quite extensive.
  4. Real-Time Device Monitoring: Keep an eye on your Matter virtual devices in real-time. This feature allows you to observe their behavior and status.

:globe_with_meridians: Getting Started:

To start using Node-RED-Matter, simply install the plugin from the Node-RED plugin repository. Look for "@node-red-matter/node-red-matter". I've also prepared documentation and examples to help you along the way.

:test_tube: Very Experimental:

The project is quite recent and doesn't yet support all the Matter device types, you can create lights and outlets for now. It may also have bugs so don't hesitate to report them in the issue tracker on GitHub!

:raised_hands: Your Feedback Matters:

I value your feedback and suggestions to enhance Node-RED-Matter further. Your insights can help me improve the plugin and make it more suitable for your specific requirements.

:books: Plugin Repository & documentation: GitHub - FezVrasta/node-red-matter: Create Virtual Devices with Ease for the Matter Protocol!

I would love to receive your feedback and know what do you plan to build with it!:bulb::house::globe_with_meridians:

7 Likes

I have installed it and restarted node-red, but I get this error in the node red log

28 Aug 14:19:36 - [warn] [@node-red-matter/node-red-matter/matter-device] Error: Cannot find module '/home/colinl/.node-red/node_modules/@node-red-matter/node-red-matter/lib/src/nodes/matter-device-node.js'
Require stack:
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js

Ah! There was a npm configuration issue, it should work now, try 0.1.6 please. I've been using it from yarn link so far so I didn't spot it yet. Thanks for the report!

OK, it installs now. I can't actually do anything with it as I have no devices, but I have at least checked that it installs. I am using nodejs 20 in case it is of interest.

Thanks for the feedback. You can create a Matter device using this plugin and add them to Apple Home, Alexa, Google Home, etc

Example:

I don't use anything like that.

Installed on my dev PC (Windows 11, Node-RED beta).

image

Created a new device and used the QR code to add to Google Home. GH eventually reported "Not a Matter-certified device" and would not connect.

Both the PC and the Phone are on the same network. The phone using WiFi and the PC a wired connection but they are both part of the same 255.255.255.0 LAN space.

No errors reported in Node-RED.

The "non certified" message is expected as this plugin is indeed not certified, but the pairing should proceed nonetheless.

Did Google let you continue with the pairing and it failed or it simply disallowed you from continuing because it's not certified?

It also says "This device can't be set up or controlled with Google". The only option is "Exit setup".

By the way, the GH controller is a confusingly named "Google Home" smart speaker.

I tried to use Apple Home as well but that requires an Apple Home Hub which I don't have and will never get.

I see, I only tried with Apple Home so far but matter.js supports Alexa and Google too so it should work.

I don't have an Android phone handy so I can't test it with Google right now. I can suggest to try a few times as Google is quite glitchy when it comes to Matter.

It might be that Windows won't let it connect. When I get time, I'll try on my live server.

FYI I was at an event at the weekend and there was a talk about the likes of us using Matter

Summary
Don't :frowning:

The whole Matter spec is about validated devices that have been certified (at considerable cost) with complex security requirements

I think Apple Home must be faulty to talk to un-certified devices :slight_smile:

I'll try setting up one with my Alexas and see what happens :slight_smile:

Colin, what is the magic words to install the 0.1.6 from the command line please?

Doesn't install for me (unless I am doing something wrong).

@cymplecy i tried - npm install node-red-matter@v0.1.6

...
40 silly placeDep ROOT node-red-matter@ OK for: node-red-project@0.0.1 want: v0.1.6
41 timing idealTree:#root Completed in 1177ms
42 timing idealTree:node_modules/node-red-matter Completed in 0ms
43 timing idealTree:buildDeps Completed in 1179ms
44 timing idealTree:fixDepFlags Completed in 63ms
45 timing idealTree Completed in 2568ms
46 timing command:install Completed in 2580ms
47 verbose stack TypeError: Cannot convert undefined or null to object
47 verbose stack     at Function.keys (<anonymous>)
47 verbose stack     at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:213:22)
47 verbose stack     at RegistryFetcher.manifest (/usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:119:22)
47 verbose stack     at async [nodeFromEdge] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1059:19)
47 verbose stack     at async [buildDepStep] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:929:11)
47 verbose stack     at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:207:7)
47 verbose stack     at async Promise.all (index 1)
47 verbose stack     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
47 verbose stack     at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:146:5)
47 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:134:5)
48 verbose cwd /home/administrator/.node-red
49 verbose Linux 5.10.0-23-arm64
50 verbose node v18.16.1
51 verbose npm  v9.5.1

Note this is on an arm based device.

That should be
npm install @node-red-matter/node-red-matter
from your .node-red directory of course.

I published a couple more versions after that, better use @latest

Ok, so the command to install (from .node-red folder) is
npm install @node-red-matter/node-red-matter@latest

1 Like

The whole Matter spec is about validated devices that have been certified (at considerable cost) with complex security requirements

I had this concern as well - then again Apple has allowed unsupported devices since the beginning of Homekit, hopefully they will not change their mindset when it comes to matter.

@FezVrasta Thanks for this node. I can confirm it functions quite well here in Homekit, I don't have immediate need for it for now, but great to have options (I am using homebridge with custom devices).

With Google Home you need to add a
Project to the developer console with the matter Vendor ID and Product ID you are using.
https://console.home.google.com/projects

For development you can use a Vendor ID of 0x8000-0x8006 which doesn’t require certification.
Most ecosystems will preset a warning that this is an uncertified device (a bit like side loading on android) only google requires some custom settings in their developer console.

1 Like

Anyone knows why the palette manager is still displaying 0.1.5 instead of 0.1.7?