#Python Matter Server attempts to commission a node that already belongs to the fabric.
1 messages · Page 1 of 1 (latest)
I would like to raise an issue in GitHub, but would like to collect more evidence of this happening.
Is there a Debug logs mode that I can enable?
(Using docker python-matter-server:stable)
Also, how can I counter check the log information and Node IDs already being managed?
in the web UI, I can see the endpoints with several properties, but these seem to be Matter spec being published by the node.
Here is some examples of a light bulb already managed, attempted to be commissioned a second time and failing (which makes sense, but it should be a more friendly message):
2024-08-21 13:19:14.392 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 12.
2024-08-21 13:19:18.337 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:217058261 on exchange 2114i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-08-21 13:19:19.296 (Dummy-2) CHIP_ERROR [chip.native.DMG] Subscription Liveness timeout with SubscriptionID = 0x8780d3bc, Peer = 01:0000000000000006
2024-08-21 13:19:20.725 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2024-08-21 13:19:22.755 (Dummy-2) INFO [chip.ChipDeviceCtrl] Established secure session with Device
2024-08-21 13:19:25.456 (Dummy-2) CHIP_ERROR [chip.native.CTL] Error on commissioning step 'SendNOC': 'src/controller/CHIPDeviceController.cpp:1502: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists'
2024-08-21 13:19:25.468 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to send Solitary ack for MessageCounter:61789621 on exchange 2127i with Node: <0000000000000000, 0>:src/messaging/ExchangeContext.cpp:99: CHIP Error 0x00000002: Connection aborted
2024-08-21 13:19:25.469 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to commission: src/controller/CHIPDeviceController.cpp:1502: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists
2024-08-21 13:19:25.470 (MainThread) ERROR [matter_server.server.client_handler] [139668975205328] Error while handling: commission_with_code: Commission with code failed for node 12.
The logs essentially do contain a WARNING at 13:19:25 confirming this, even though it technically tried to do it anyway before simply checking in the first place.
But in the phone, doing the normal Google based commissioning, it just says that Something went wrong.
Python Matter Server attempts to commission a node that already belongs to the fabric.
Problem is that there is no way to know if the node already has been commisisoned (due to security measurements) other than it failing
You really need to remember; you can only use the QR code once.
In this case we could potentially discover it because our fabric already exists (Trying to add a NOC for a fabric that already exists error) but that is a not so common mistake. The most common mistake is a device that is already added to a fabric
I understand that, but after the bulbs are installed, there is no easy to way to remember which QR code belongs to what unless you take note, specially GU10 which are flush mounted.
Isn't there a way to even when the Matter Server realizes that the node already belongs to is own fabric to give a better message to the end user in the phone?
Right now it will just show "retry" and induces the user in keep trying and assuming something is wrong
One theory is to keep track of all scanned qr codes. That is what Google is doing for example.
Problem is that in most cases we dont even know the qr code because the first part is done by the OS (as you already know now)
so yes we could do this for direct commission nodes but considered that would be only a handful users atm, it doenst have any priority considered we are so underpowered
Please note that this experience is still with the indirect commissioning using the phone.
I can reproduce it to show the end-user experience.
I feel that it's an easy mistake to make if you get a lot of matter devices at once
Oh yeah, this is frustration number one in Matter. There is some active talk about it within CSA to smoothen the experience
The Google part went well and is at the step where you tell it to give admin to HA
multi admin is super powerful feature but also super complex to understand
Hence, me wondering, to what extent wouldn't be possible to have HA App either just report as "yes, it was successfull" and than show a message when you switch to it saying "the node {device Name} was already being managed"
unfortunately we can almost never detect that
we just know "it failed" but not because it was already commissioned. We do plan to add some more info to the dialog such as "is the device already paired?" and such
We already help a bit by asking if the device is already paired as first step
it is exactly because of this reason
technically you can, the logs show this, don't they?
2024-08-21 13:19:25.456 (Dummy-2) CHIP_ERROR [chip.native.CTL] Error on commissioning step 'SendNOC': 'src/controller/CHIPDeviceController.cpp:1502: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists'
Or this means something else?
Yes, but like I said, that is an exception. In most cases you wont even get this far and the pase session simply fails
So yeah, I agree we should try to handle this case but for now other things to do - I hope this will eventually get a more generic solution
Strange, in my scenario it always gets this far.
I guess the difference is that you tried to add the device to the exact same fabric. The most common mistake is just trying to scan the qr code on a second fabric
What device was it ? wifi ?
yes, was to the exact same fabric.
Strictly taken this is also a device issue because apparantly this device still has its commissioning window open
Once a device is commissioned it should close that
The "Trying to add a NOC for a fabric that already exists" should normally only appear for an on-network commissioning to an existing fabric
So this is starnge for multiple reasons 🙂
ah... wiz... yeah they behave a bit strange
I can put the bulbs into pairing mode (by On/Off 3 times in a row) and they don't loose the commisioning of the previous Fabrics or Wiz app
they added matter on top of their existing implementation
Hence, even while being already commissioned, they will still go into pairing mode and aallow the entire process again
yeah, probably 5 toggles is reset and 3 times only commission mode.
A but now I get it. You DID enable commission mode then
I've ordered a Matter bulb from another brand to compare
Imo this is a device bug
the device should reset the creds if you put it in commisisoning mode again
but maybe they are unique and allow the qr code to multiple fabrics (which would be a violation of spec)
I have a wiz light here somewhere, worth a test
With any other matter device I have tested so far, you can only commission just once using the QR. Then the device closes the commisisoning over bluetooth
lets see if I can do the same with the new bulb 😄
I haven't received it yet, should have arrived today, but Amazon failed delivery, so tomorrow
its a Nous P8
its a cheap bulb that I got literally just to compare behaviors lol
well, surprise surprise, the courier just delivered the Nous P8 lol
It starts well, it's failing at the "Checking connectivity" step lol, saying it can't connect to my wifi 😄
Ok I know why, I need to change my setup, I have 2 SSIDs with the same name, just different PW (due to a compatibility issue I had in the past with Shelly), need to marge everything into one
Well, so far it paired fine after retrying a couple times to pass the connectivity part
The white quality is noticeable, WiZ are better lol
The P8 doesn't do fades turning on or off, is always instant, but at least tge power recovery config works
@earnest fox I have bad news 🤣
I'm able to reproduce the issue with the Nous P8, but in a different way
It allows to be put in pairing more also with the On/off 3 times
Goes thru the process of commissioning, etc
When it gets to the step where it's added to HA, it's accepted and works, but kinda...
The same device that was already there stays, but a new light entity is created
The old light becomes unavailable
I will PM you a screenshot
What a mess lol
I haven't look at the Matter Server logs yet, will do in a second
It just overwrote the existing entry then, that is crappy
So this is not fixable - we have no way to tell upfront to tell if the device was already commissioned
for you, you now can remove the orphan device from the Matter server UI
HA linked the both together into one device due to the same serial
it didn't, it's kind of a mix
I have a feeling that was mostly within HA
in Matter Server, the first pairing shows as Node 14 (currently Offline) and the second attempt where I reproduce the issue, shows as Node 15.
In HA is where it overwrote the device, but for some reason, the light entity decided to add a "_2" one
yes, exactly
Yeah, HA tries to be smart and matches the device on serial
I've sent you a screenshot of the new light entity
and it did
something that it can't do with WiZ, because is not exposing the serial
still, it's weird that if HA goes and matches the device by Serial, but than decides to mess up with the light entities
and leave an orphaned entity
yes because it merged two matter devices
the orphaned one and the new one
so this is expected
right, but I since it matched the device by serial, I would expect it to just override the entities
it's contradictory in a sence the current behavior
btw now you can just delete node 14 from the matter server
I know, I just didn't get to it yet
also, curious to compare the endpoints
they will be exact the same, its the same device
the device itself just threw away the entry for our fabric when it detected the same
Just leaving it here in case someone runs into this thread in the future:
I do not recommend Nous P8 lamps at all looool
They are not color accurate at all, like by a lot.
Yeah, I tested one of those cheap bulbs here as well and have the same experience
I went for the WiZ due to being one of the few that I found being CRI90 and being Matter (even though I know the integration is shit).
What is your favorite light bulbs?
Hue for Zigbee and Nanoleaf for Matter over Thread
My biggest issue with Hue is really the price, they are a bit overpriced
I've heard people complaining about Nanoleaf where it frequently becomes unavailable, etc, have you ran into issues like that?
Yeah, you pay for quality is my conclusion after years of stubborn trying cheaper options.
The Hue bulbs are the most reliable piece of IoT gear in my whole home and I test/mess with a lot of stuff. I just make sure to buy them second hand or at a promotion discount, open box etc.
Yes, Nanoleaf were probably the most unreliable piece lights of the universe when they launched them and they learned that the hard way. This discord server exploded and I was totally overloaded with support requests as they were not only unreliable themselves, they also took down entire thread networks. But... they have been fixing their stuff for weeks/months and we also worked actively with them and now they are pretty damn good. especially when you compare them to Hue. They have the same good colors and build quality but for a fraction of the price. Still, I have both in my home, the Hue ones never fail me. The Nnaoleaf lights do but I account that more to Thread being unreliable still sometimes.
Heads up on this.
I removed the node from Python Matter Server and resulted in the device getting removed in HA
which I didn't expect to happen, since the other node was still linked to it
Now I still see Node 15 on Python Matter Server web UI, but not in HA
so will need to re-add it
First simply try to reload the HA integration to see if it recovers
HA got confused due to the linked devices
Which is btw an interesting issue on its own 🙂
Due to running on docker, was easier to simply restart HA container