How to implement device binding between two matter devices via HA?

In Matter (formerly Project CHIP), it is possible to bind two matter deives (i.e, ESP32-H2 with a lighting app (0x0101) and ESP32-H2 with a dimmer switch (0x0104)) via the Linux terminal using the below commands. I need to achieve the same binding via the HA app instead of the Linux terminal. How do we achieve this so that we can communicate between devices and controllers even when the HUB is powered OFF? The same binding was available in the HA system for the Zigbee devices. But this binding was not available for the Matter devices.

I have achieved this from Linux terminal (CHIPTool) using the below commands:
For pairing to Network:
./chip-tool pairing code 1

Providing access control:
./chip-tool accesscontrol write acl ‘[{“fabricIndex”: 1, “privilege”: 5, “authMode”: 2, “subjects”: [1], “targets”: null },{“fabricIndex”: 1, “privilege”: 3, “authMode”: 2, “subjects”: [2], “targets”: null }]’ 1 0

For binding:
./chip-tool binding write binding ‘[{“node”:1, “endpoint”:1, “cluster”:6},{“node”:1, “endpoint”:1, “cluster”:8}]’ 2 1

1 Like

I have attempted to establish communication between two Matter devices by loading the Dimmer Light and Dimmer Switch products onto an ESP32 chip. I executed the matter-binding.py script, and the binding process was successfully completed.

Script Log:

PS D:\poc> C:\Users\schnell\AppData\Local\Programs\Python\Python312\python.exe matter-binding.py --from 148 --to 147  
Connection successful to ws://homeassistant.local:5580/ws  
Fabric ID: 2  
Updating ACL…  
ACL updated  
Creating binding…  
Bindings Data: {  
  “message_id”: “3”,  
  “result”: {  
    “1/30/0”:   
  }  
}  
Existing Bindings:   
Binding created  

However, after creating the binding, the ON/OFF controls for the Dimmer Light are not functioning from both the Home Assistant app and the configured switch. The following error is displayed:

Error Message:
Failed to perform the action light/turn_on. InteractionModelError. UnsupportedAccess(0x7e)

Could you please advise on resolving this issue?