Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Ability to set Binding (x/30/0) attribute from dashboard #815

Open
sgryphon opened this issue Jul 19, 2024 · 9 comments
Open

Comments

@sgryphon
Copy link

In the dashboard UI, as well as exploring nodes and viewing (reading) attribute values, it would be good if there was a way to write attribute values, specifically to write the Binding attribute.

This could be hidden behind an Advanced mode (like Home Assistant administration) if there was worry that it could mess things up.

Example:

node_id = 6
attribute_path = "1/30/0"
binding target:
node = 12
group = null
endpoint = 1
cluster = 0x0006 (On/Off cluster -- needs to be a client cluster)
fabricIndex = 2

We know the node and endpoint, and the relevant cluster. The valid binding target struct would depend on what clusters are in the descriptor client list ("1/29/2"), and the valid nodes and endpoints in the fabric (and the server list of the target node/endpoint)

Binding is a key feature for disconnected operation, e.g. where a switch can directly interface with a device (such as a light) by binding an On/Off client cluster with On/Off server on the destination light.

I have a Zemismart switch that has 0x6 client cluster supported, and I would like to bind it to a light (which all have 0x6 server).

image

The device supports the binding attribute, but there is no way to set it in the dashboard (I can via the programming UI)

image

@marcelveldt
Copy link
Contributor

Yes, this is all on the long list - not a priority for now due to a lack of capacity

@lboue
Copy link
Contributor

lboue commented Sep 15, 2024

@sgryphon
Could you share the commands used to set up binding on the command line?

I would try with a Window Covering Controller:

image

image

@sgryphon
Copy link
Author

sgryphon commented Sep 16, 2024

Could you share the commands used to set up binding on the command line?

Sure. I have some example scripts and commands in a GitHub repository.

https://github.com/sgryphon/iot-demo-build/blob/main/matter-thread/scripts/Send-MatterCommand.ps1

This is a PowerShell script that opens a websocket connection, reads the initial details, sends a command, waits for the response, and then closes the connection.

The 5th example shows a read_attribute command, to read the current binding object.

The 6th example (in the script header) shows using write_attribute to set the binding value.

You need a device that:

  • Supports setting bindings (cluster 0x1e (30), which is a Core cluster and should be support as a Server feature by all simple Base devices... although only a few of my devices have it listed -- Nanoleaf and the Zemismart switch -- most others (Eve, Wiz, Tapo, Sonoff do not list it as a capability, even though it is supposed to be part of simple Base, i.e. all devices).
  • The device with the binding needs to have the Client cluster you are operating (in my case it was the 0x6 On/Off cluster
    and with the client. Most, but not all, of my devices have client 0x29 (41) for OTA updates on the root node. Only the Zemismart has any other client clusters (0x3 and 0x6). This is so that it knows what commands it is sending (that are presumable wired up to some reason -- e.g. I assumed changing the physical switch on the Zemismart would trigger the on/off client).
  • The target device needs to have the Server cluster.

@sgryphon
Copy link
Author

BTW @lboue what is that UI you have screen shots of? I am using the Matter Server via Home Assistant, and some of the buttons look the same (e.g. the Interview, Update, etc along the bottom), but I don't have the same config screens (can only view nodes).

@lboue
Copy link
Contributor

lboue commented Sep 17, 2024

@sgryphon The first screenshot is ZAP tool used with the CHIP SDK.
The second one is from Python Matter Server WebUI. You can to enable the Show in sidebar checkbox in the Matter Server addon.

Thanks for the script. I will give a try.

@Apollon77
Copy link

Ok, maybe also my 5cents about bindings :-)

As summarized above:

  • you need a source device which supports the Binding cluster at all
  • that device also needs to have a relevant client cluster defined for the type you want to use (e.g. OnOff)
  • and ... the device also need to do anything with it ... but n fact you will not know for sure what exactly happens :-)
  • Then you can add a proper entry in the binding table of the binding to configure the "target" for the action (as shown above)
  • Then you need to add an ACL entry on the target node to allow the source node to access the relevant endpoint (that was missing above)

The reality is that there are not that many real devices out there that bring client clusters with them ... and even if they are there it is unclear if they are functual ... Because of the fact that currently no ecosystem out there supports setting that up I think it was also not the highest prio for device manufacturers.

@lboue
Copy link
Contributor

lboue commented Sep 17, 2024

@Apollon77 I'm going to use 2 development kits to do this binding test with chip-tool.

@hoppel118
Copy link

@Apollon77

and even if they are there it is unclear if they are functual ... Because of the fact that currently no ecosystem out there supports setting that up I think it was also not the highest prio for device manufacturers.

EVE launched the EVE Thermo Control some days ago. With that device you can control the temperature of up to 5 EVE Thermos. It also acts as a temperature sensor for the paired EVE Thermos.

It uses Matter bindings. You can set that up via the EVE app. So, it’s already possible, when you are an Apple Home user. 😉

@Apollon77
Copy link

@hoppel118 Yes and that's the only official device I know where bindings are communicated as a feature. :-) An other device I know are Innovelli Matter switches. But that's it what I know is out there. There could be more, but when well hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants