Unfortunately, I cannot use HA as my base OS so I am trying to run the python-matter-server on my Pi.
Unfortunately, it fails to start effectively. I am not sure if things are not properly configured (notice the write error near the start) or there is a missing a dependence associated with chip-repl?
Prior to this I have been running chip-tool and that is having problems with --storage-directory for persistent configurations and I wonder if this might be related.
Any insight?
thanks
-brian
log follows:
pi@noble:~$ sudo python3 -m matter_server.server --log-file /home/pi/MS
2024-12-13 16:11:04.687 (MainThread) INFO [matter_server.server.stack] Initializing CHIP/Matter Logging...
2024-12-13 16:11:04.690 (MainThread) INFO [matter_server.server.stack] Initializing CHIP/Matter Controller Stack...
[1734135065.579701][47072:47072] CHIP:CTL: Setting attestation nonce to random value
[1734135065.633169][47072:47072] CHIP:CTL: Setting CSR nonce to random value
[1734135065.789149][47072:47072] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1734135065.791127][47072:47072] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1734135065.791585][47072:47072] CHIP:DL: failed to open file (/data/chip_factory.ini-mW0bj7) for writing
[1734135065.791672][47072:47072] CHIP:DL: Configuration Manager initialization failed: src/platform/Linux/CHIPLinuxStorageIni.cpp:122: CHIP Error 0x000000AD: Open file failed
2024-12-13 16:11:05.792 (MainThread) ERROR [root] Uncaught exception
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.12/dist-packages/matter_server/server/__main__.py", line 247, in <module>
main()
File "/usr/local/lib/python3.12/dist-packages/matter_server/server/__main__.py", line 224, in main
server = MatterServer(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/matter_server/server/server.py", line 138, in __init__
self.stack = MatterStack(self, bluetooth_adapter_id, enable_server_interactions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/matter_server/server/stack.py", line 108, in __init__
chip.native.Init(999 if bluetooth_adapter_id is None else bluetooth_adapter_id)
File "/usr/local/lib/python3.12/dist-packages/chip/native/__init__.py", line 248, in Init
handle.dll.pychip_CommonStackInit(ctypes.c_char_p(params)).raise_on_error()
File "/usr/local/lib/python3.12/dist-packages/chip/native/__init__.py", line 87, in raise_on_error
raise self.to_exception()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/chip/native/__init__.py", line 119, in to_exception
return chip.exceptions.ChipStackError.from_chip_error(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/chip/exceptions/__init__.py", line 48, in from_chip_error
return cls(chip_error, str(chip_error))
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/chip/native/__init__.py", line 123, in __str__
GetLibraryHandle().pychip_FormatError(ctypes.pointer(self), buf, 256)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/chip/native/__init__.py", line 257, in GetLibraryHandle
handle = _GetLibraryHandle(Library.CONTROLLER, HandleFlags.REQUIRE_INITIALIZATION in flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/chip/native/__init__.py", line 234, in _GetLibraryHandle
raise Exception("CHIP handle has not been initialized!")
Exception: CHIP handle has not been initialized!
[1734135067.285938][47072:47072] CHIP:SPT: VerifyOrDie failure at src/system/SystemLayerImplSelect.h:59: mLayerState.Destroy()