Node-red-matter-controller crashing

Hi,

I want to make some experiments with matter devices.
I have installed
Node-RED Matter Controller
@sammachin/node-red-matter-controller
When I add Device Management and add an matter controller
with Network interface 0 and Storage Location set to /data/matter
and deploy the node, nodered throws an error and cannot start.

The same issue is described at

but no solution added

perhaps somebody can help

fischer@fischer-VirtualBox:~/work/docker/testcompose$ docker compose up 
WARN[0000] Found orphan containers ([mygrafana myinfluxdb]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 
[+] Running 2/2
 ✔ Network testcompose_node-red-net  Created                                                                       0.0s 
 ✔ Container mynodered               Created                                                                       0.1s 
Attaching to mynodered
mynodered  | 14 Sep 20:50:27 - [info] 
mynodered  | 
mynodered  | Welcome to Node-RED
mynodered  | ===================
mynodered  | 
mynodered  | 14 Sep 20:50:27 - [info] Node-RED version: v4.1.0
mynodered  | 14 Sep 20:50:27 - [info] Node.js  version: v20.19.4
mynodered  | 14 Sep 20:50:27 - [info] Linux 6.8.0-79-generic x64 LE
mynodered  | 14 Sep 20:50:27 - [info] Loading palette nodes
mynodered  | 14 Sep 20:50:31 - [info] Settings file  : /data/settings.js
mynodered  | 14 Sep 20:50:31 - [info] HTTP Static    : /data/static > /
mynodered  | 14 Sep 20:50:31 - [info] Context store  : 'default' [module=memory]
mynodered  | 14 Sep 20:50:31 - [info] User directory : /data
mynodered  | 14 Sep 20:50:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
mynodered  | 14 Sep 20:50:31 - [info] Flows file     : /data/flows.json
mynodered  | 14 Sep 20:50:31 - [info] Server now running at http://127.0.0.1:1880/
mynodered  | 14 Sep 20:50:31 - [warn] 
mynodered  | 
mynodered  | ---------------------------------------------------------------------
mynodered  | Your flow credentials file is encrypted using a system-generated key.
mynodered  | 
mynodered  | If the system-generated key is lost for any reason, your credentials
mynodered  | file will not be recoverable, you will have to delete it and re-enter
mynodered  | your credentials.
mynodered  | 
mynodered  | You should set your own key using the 'credentialSecret' option in
mynodered  | your settings file. Node-RED will then re-encrypt your credentials
mynodered  | file using your chosen key the next time you deploy a change.
mynodered  | ---------------------------------------------------------------------
mynodered  | 
mynodered  | 14 Sep 20:50:31 - [info] Starting flows
mynodered  | 14 Sep 20:50:31 - [info] [mattercontroller:14b13d095fdd9766] Using Custom Storage Location: /data/matter
mynodered  | 14 Sep 20:50:31 - [info] Started flows
mynodered  | 2025-09-14 20:50:31.632 FATAL  Logger               Unhandled error detected: Required dependency StorageService is not available
mynodered  |   at Environment.get (/data/node_modules/@sammachin/node-red-matter-controller/node_modules/@matter/general/dist/cjs/environment/Environment.js:69:11)
mynodered  |   at new ControllerStore (/data/node_modules/@project-chip/matter.js/node_modules/@matter/node/dist/cjs/node/client/storage/ControllerStore.js:54:33)
mynodered  |   at asyncNew (/data/node_modules/@project-chip/matter.js/node_modules/@matter/general/dist/cjs/util/Construction.js:37:19)
mynodered  |   at ControllerStore.create (/data/node_modules/@project-chip/matter.js/node_modules/@matter/node/dist/cjs/node/client/storage/ControllerStore.js:64:46)
mynodered  |   at CommissioningController.initializeControllerStore (/data/node_modules/@project-chip/matter.js/dist/cjs/CommissioningController.js:339:63)
mynodered  |   at CommissioningController.start (/data/node_modules/@project-chip/matter.js/dist/cjs/CommissioningController.js:350:20)
mynodered  |   at new MatterController (/data/node_modules/@sammachin/node-red-matter-controller/controller.js:52:38)
mynodered  |   at Object.createNode (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/util.js:211:27)
mynodered  |   at Flow.start (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:235:50)
mynodered  |   at Object.start [as startFlows] (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/index.js:403:39)
mynodered  | 2025-09-14 20:50:31.635 FATAL  Logger               Unhandled error detected: Required dependency StorageService is not available
mynodered  |   at Environment.get (/data/node_modules/@sammachin/node-red-matter-controller/node_modules/@matter/general/dist/cjs/environment/Environment.js:69:11)
mynodered  |   at new ControllerStore (/data/node_modules/@project-chip/matter.js/node_modules/@matter/node/dist/cjs/node/client/storage/ControllerStore.js:54:33)
mynodered  |   at asyncNew (/data/node_modules/@project-chip/matter.js/node_modules/@matter/general/dist/cjs/util/Construction.js:37:19)
mynodered  |   at ControllerStore.create (/data/node_modules/@project-chip/matter.js/node_modules/@matter/node/dist/cjs/node/client/storage/ControllerStore.js:64:46)
mynodered  |   at CommissioningController.initializeControllerStore (/data/node_modules/@project-chip/matter.js/dist/cjs/CommissioningController.js:339:63)
mynodered  |   at CommissioningController.start (/data/node_modules/@project-chip/matter.js/dist/cjs/CommissioningController.js:350:20)
mynodered  |   at new MatterController (/data/node_modules/@sammachin/node-red-matter-controller/controller.js:52:38)
mynodered  |   at Object.createNode (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/util.js:211:27)
mynodered  |   at Flow.start (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:235:50)
mynodered  |   at Object.start [as startFlows] (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/index.js:403:39)
mynodered  | [red] Uncaught Exception:
mynodered  | 14 Sep 20:50:31 - [error] Error: Required dependency StorageService is not available
mynodered  |     at Environment.get (/data/node_modules/@sammachin/node-red-matter-controller/node_modules/@matter/general/dist/cjs/environment/Environment.js:69:11)
mynodered  |     at new ControllerStore (/data/node_modules/@project-chip/matter.js/node_modules/@matter/node/dist/cjs/node/client/storage/ControllerStore.js:54:33)
mynodered  |     at asyncNew (/data/node_modules/@project-chip/matter.js/node_modules/@matter/general/dist/cjs/util/Construction.js:37:19)
mynodered  |     at ControllerStore.create (/data/node_modules/@project-chip/matter.js/node_modules/@matter/node/dist/cjs/node/client/storage/ControllerStore.js:64:46)
mynodered  |     at CommissioningController.initializeControllerStore (/data/node_modules/@project-chip/matter.js/dist/cjs/CommissioningController.js:339:63)
mynodered  |     at CommissioningController.start (/data/node_modules/@project-chip/matter.js/dist/cjs/CommissioningController.js:350:20)
mynodered  |     at new MatterController (/data/node_modules/@sammachin/node-red-matter-controller/controller.js:52:38)
mynodered  |     at Object.createNode (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/util.js:211:27)
mynodered  |     at Flow.start (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:235:50)
mynodered  |     at Object.start [as startFlows] (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/index.js:403:39)
mynodered exited with code 1
mynodered exited with code 1
mynodered exited with code 1

Thanks

I suggest adding a comment to the github issue saying that it is affecting you to. If the author of the node does not respond then it may be difficult to solve the problem.

I know it doesn't help you but I have this node running without any issues so it may be worth while going through the instructions again to ensure that everything is as it should be. (I also have the virtual device nodes installed)

Thanks

@Colin
yes this might help

@Buckskin

Thanks, this helps,
how do you have Node-RED running,
nativ in Windows,Linux, Docker ? Docker Compose ?

I have a Docker Compose setup

with the following compose.yml

services:

  node-red:
    image: nodered/node-red:latest
    container_name: mynodered
    restart: always
    environment:
      - TZ=Europe/London
    networks:
      node-red-net:
        ipv4_address: 192.168.70.249
    ports:
      - "1880:1880"
    volumes:
      - node-red-data:/data
volumes:
  node-red-data:
    driver: local # Define the driver and options under the volume name
    driver_opts:
      type: none
      device: ./node-red
      o: bind


networks:
    node-red-net:
        driver: macvlan
        driver_opts:
            parent: enp0s3
        ipam:
            driver: default
            config:
                - subnet: 192.168.70.0/24
                  ip_range: 192.168.70.248/29
                  gateway: 192.168.70.99
        enable_ipv6: true

my Flow is simple

[
    {
        "id": "854cf1cbbae3be84",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "14b13d095fdd9766",
        "type": "mattercontroller",
        "networkInterface": "eth0",
        "storageLocation": "/data/matter",
        "logLevel": "ERROR"
    },
    {
        "id": "1d8fbcce10dd4455",
        "type": "mattermanager",
        "z": "854cf1cbbae3be84",
        "name": "",
        "controller": "14b13d095fdd9766",
        "method": "",
        "code": "",
        "codeType": "str",
        "deviceid": "",
        "deviceidType": "str",
        "label": "",
        "labelType": "str",
        "x": 620,
        "y": 160,
        "wires": [
            []
        ]
    }
]

Sorry I’m a bit busy with the day job at the moment.

This only seems to be an issue for users running under docker so I’d suggest running node red on a native os for now.

the matte nodes use a persistent file system path to store their config data so if you want to try and debug then take a look it that direction, I don’t ha e much docker experience and done geneeallynuse it

Hi,

@sammachin

thanks,
I have installed NodeJS in my Linux Mint 22 Vbox machine and then installed Node-RED
I made a new flow and could deploy the nodes without error.
So good, I can start experiment with matter.
I have a Ikea Dirigera Hub, which is a Matter Bridge and an Arduino Nano Matter.
The Dirigera Matter Bridge has a light and a door sensor connected.
The Dirigera Hub also has an Thread Boarder Router which is used by the Arduino Nano Matter.

I started with Home Assistant an could install these three devices and can control them over HA dashboard.

To keep things simple I want to check if I can run Matter in the future without HA.

I tried to commission these devices in Node-RED but get the following error.
What can be the problem?

[
    {
        "id": "c9a38cdcd1d4a3f3",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "2e3133db5e07c38c",
        "type": "mattermanager",
        "z": "c9a38cdcd1d4a3f3",
        "name": "",
        "controller": "f20492158b1d346a",
        "method": "",
        "code": "",
        "codeType": "str",
        "deviceid": "",
        "deviceidType": "str",
        "label": "",
        "labelType": "str",
        "x": 520,
        "y": 660,
        "wires": [
            [
                "671ce54f8aa7464c"
            ]
        ]
    },
    {
        "id": "671ce54f8aa7464c",
        "type": "debug",
        "z": "c9a38cdcd1d4a3f3",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 760,
        "y": 660,
        "wires": []
    },
    {
        "id": "68a9c4577f9397c0",
        "type": "inject",
        "z": "c9a38cdcd1d4a3f3",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 280,
        "y": 660,
        "wires": [
            [
                "2e3133db5e07c38c"
            ]
        ]
    },
    {
        "id": "b2b7aaba9b1ea9ef",
        "type": "mattermanager",
        "z": "c9a38cdcd1d4a3f3",
        "name": "",
        "controller": "f20492158b1d346a",
        "method": "listDevices",
        "code": "",
        "codeType": "str",
        "deviceid": "",
        "deviceidType": "str",
        "label": "",
        "labelType": "str",
        "x": 510,
        "y": 740,
        "wires": [
            [
                "6677475d0487a6a0"
            ]
        ]
    },
    {
        "id": "6677475d0487a6a0",
        "type": "debug",
        "z": "c9a38cdcd1d4a3f3",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 760,
        "y": 740,
        "wires": []
    },
    {
        "id": "78d56e678d0a034f",
        "type": "inject",
        "z": "c9a38cdcd1d4a3f3",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 280,
        "y": 740,
        "wires": [
            [
                "b2b7aaba9b1ea9ef"
            ]
        ]
    },
    {
        "id": "048cba0f5d799e08",
        "type": "mattermanager",
        "z": "c9a38cdcd1d4a3f3",
        "name": "",
        "controller": "f20492158b1d346a",
        "method": "commissionDevice",
        "code": "payload.code",
        "codeType": "msg",
        "deviceid": "",
        "deviceidType": "str",
        "label": "payload.label",
        "labelType": "msg",
        "x": 530,
        "y": 820,
        "wires": [
            [
                "7093351b60b98e2b"
            ]
        ]
    },
    {
        "id": "7093351b60b98e2b",
        "type": "debug",
        "z": "c9a38cdcd1d4a3f3",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 760,
        "y": 820,
        "wires": []
    },
    {
        "id": "70b6817ca537878e",
        "type": "inject",
        "z": "c9a38cdcd1d4a3f3",
        "name": "Ikea Dirigera Bridge",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"code\":\"04961114136\",\"label\":\"Dirigera\"}",
        "payloadType": "json",
        "x": 230,
        "y": 820,
        "wires": [
            [
                "048cba0f5d799e08",
                "e6a5df600f34e467"
            ]
        ]
    },
    {
        "id": "e6a5df600f34e467",
        "type": "debug",
        "z": "c9a38cdcd1d4a3f3",
        "name": "debug 4",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 520,
        "y": 880,
        "wires": []
    },
    {
        "id": "ac242d177a542086",
        "type": "inject",
        "z": "c9a38cdcd1d4a3f3",
        "name": "arduino nano matter",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"code\":\"34970112332\",\"label\":\"Arduino\"}",
        "payloadType": "json",
        "x": 230,
        "y": 900,
        "wires": [
            [
                "048cba0f5d799e08",
                "e6a5df600f34e467"
            ]
        ]
    },
    {
        "id": "f20492158b1d346a",
        "type": "mattercontroller",
        "networkInterface": "enp0s3",
        "storageLocation": "/root/.matter",
        "logLevel": "ERROR"
    },
    {
        "id": "65a3c715c43d88ec",
        "type": "global-config",
        "env": [],
        "modules": {
            "@sammachin/node-red-matter-controller": "0.1.6"
        }
    }
]

Ok,

learned that I have to share the device from HA,

HA generates an new code and I used this for Node-RED to commission the device

and now

:slight_smile: :grinning_face: :smiling_face_with_three_hearts:

ok, have to learn a little more the basics from Matter,

will then try to control the device next,

thanks

Yes the initial setup of the device needs to be done over Bluetooth to tell the decode the WiFi or thread network details.

Node-red-matter doesn’t have the Bluetooth implementation so you can only use it as a secondary controller sharing a device that is already on the network.

However once the device is commissioned to node-red it doesn’t need the other controller to use it.

I don't have HA or Docker just a pi running standard Rasp Linux. The good thing for me is that I can also control the Matter devices from both Alexa & Google. (Plus Node- red of course)

Hi,

I got it working under docker,

I set Storage location in MatterController to: '/data/.matter'
under node-red folder, I created manual a folder: '.matter'
network is set for node-red in compose.yml with: 'network_mode: host'
network interface is set to promiscuous mode with: 'ip link set enp0s3 promisc on'

my compose.yml

services:

  node-red:
    image: nodered/node-red:latest
    container_name: mynodered2
    restart: always
    environment:
      - TZ=Europe/London
    network_mode: host

    ports:
      - "1880:1880"
    volumes:
      - node-red-data:/data

volumes:
  node-red-data:
    driver: local # Define the driver and options under the volume name
    driver_opts:
      type: none
      device: ./node-red
      o: bind

Thanks this is great, do you mind if I add your post as a section in the readme for the package?

I have similar working setup but do not need/have the setting for "promiscuous" network... as well there was no need to create the manual folder for Matter

Hi,

regarding the storage location:
I don't know how I have managed it, that the folder was not created ?
Maybe I have imported the flow with the controller ?

regarding the network setup:

i forget to mention that I got an additional error

"2025-09-24 21:21:07.227 FATAL Logger Unhandled error detected: MdnsService unavailable due to initialization error"

mynodered    | 24 Sep 21:21:06 - [info] Settings file  : /data/settings.js
mynodered    | 24 Sep 21:21:06 - [info] HTTP Static    : /data/static > /
mynodered    | 24 Sep 21:21:06 - [info] Context store  : 'memoryOnly' [module=memory]
mynodered    | 24 Sep 21:21:06 - [info] Context store  : 'file' [module=localfilesystem]
mynodered    | 24 Sep 21:21:06 - [info] User directory : /data
mynodered    | 24 Sep 21:21:06 - [warn] Projects disabled : editorTheme.projects.enabled=false
mynodered    | 24 Sep 21:21:06 - [info] Flows file     : /data/flows.json
mynodered    | 24 Sep 21:21:06 - [info] Server now running at http://127.0.0.1:1880/
mynodered    | 24 Sep 21:21:06 - [warn]
mynodered    |
mynodered    | ---------------------------------------------------------------------
mynodered    | Your flow credentials file is encrypted using a system-generated key.
mynodered    |
mynodered    | If the system-generated key is lost for any reason, your credentials
mynodered    | file will not be recoverable, you will have to delete it and re-enter
mynodered    | your credentials.
mynodered    |
mynodered    | You should set your own key using the 'credentialSecret' option in
mynodered    | your settings file. Node-RED will then re-encrypt your credentials
mynodered    | file using your chosen key the next time you deploy a change.
mynodered    | ---------------------------------------------------------------------
mynodered    |
mynodered    | 24 Sep 21:21:06 - [info] Starting flows
mynodered    | 24 Sep 21:21:06 - [info] [ui-base:My Dashboard] Node-RED Dashboard 2.0 (v1.27.2) started at /dashboard
mynodered    | 24 Sep 21:21:06 - [info] [ui-base:My Dashboard] Created socket.io server bound to Node-RED port at path /dashboard/socket.io
mynodered    | 24 Sep 21:21:06 - [info] [mattercontroller:c3468191961dfc6d] Using Custom Storage Location: /data/.matter
mynodered    | 24 Sep 21:21:06 - [info] [mattercontroller:f20492158b1d346a] Using Custom Storage Location: /data/.matter
mynodered    | 24 Sep 21:21:06 - [error] [e-mail:thomfischer@t-online.de] No e-mail userid set
mynodered    | 24 Sep 21:21:06 - [error] [e-mail:thomfischer@t-online.de] No e-mail password set
mynodered    | 24 Sep 21:21:07 - [info] Started flows
mynodered    | 2025-09-24 21:21:07.227 FATAL  Logger               Unhandled error detected: MdnsService unavailable due to initialization error
mynodered    |   at crashedError (/data/node_modules/@matter/general/src/util/Construction.ts:600:28)
mynodered    |   at handleRejection (/data/node_modules/@matter/general/src/util/Construction.ts:311:69)
mynodered    |   at processTicksAndRejections (node:internal/process/task_queues:95:5)
mynodered    | 24 Sep 21:21:07 - [red] Uncaught Exception:
mynodered    | 24 Sep 21:21:07 - [error] Error: MdnsService unavailable due to initialization error
mynodered    |     at crashedError (/data/node_modules/@matter/general/src/util/Construction.ts:600:28)
mynodered    |     at handleRejection (/data/node_modules/@matter/general/src/util/Construction.ts:311:69)
mynodered    |     at processTicksAndRejections (node:internal/process/task_queues:95:5)

while playing with the network settings, i found some information of setting the interface to promiscuous mode.
I additional found some information on changing the configuration file of the Avahi service.

avahi-daemon.conf

...
[reflector]
#enable-reflector=no
# !TF for mDNS to work in docker
enable-reflector=yes
#reflect-ipv=no
#reflect-filters=_airplay._tcp.local,_raop._tcp.local
...

and restart service

sudo service avahi-daemon restart

Today I have restarted my VBox Linux Mint machine, so the network interface was no more in promiscuous mode
and matter still works in docker node-red.
I also reverted my change to the 'avahi-daemon.conf' file and docker node-red still works.

so I think that the problems are more operating errors from my side :frowning:
only what I think is necessary is 'network_mode: host' for docker node-red container

@sammachin
thanks for your work, you can add some info to your readme, but don't confuse new users more with my unprofessional work :-),
i hope you will improve and update your work on matter in the future,
next year ikea will switch to matter over thread

@others
thanks for your help

Yes, a network mode "Host" is a must for most elements in Node-Red.

I only have 1 node for Roborock which does require "Bridge" mode :frowning: .. so it got isolated in a dedicated NR intsance :rofl: