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

Device command, invalid arguments? #858

Open
olavt opened this issue Aug 17, 2024 · 3 comments
Open

Device command, invalid arguments? #858

olavt opened this issue Aug 17, 2024 · 3 comments

Comments

@olavt
Copy link

olavt commented Aug 17, 2024

I have some code that worked before. Not sure when this broke, since I haven't tested it in a while.

This is the message I'm sending and the response I get back:

[17.08.2024 19:31:09.716 INF] MatterServerClient.SendCommandAsync: Sending command:
{
"message_id": "23",
"command": "device_command",
"args": {
"node_id": 2,
"endpoint_id": 1,
"cluster_id": 6,
"command_name": "Off",
"payload": null
}
}
[17.08.2024 19:31:09.718 INF] MatterServerClient.ReceiveFromWebSocket: 60 bytes received.
[17.08.2024 19:31:09.719 INF] Received response:
{
"message_id": "23",
"error_code": 8,
"details": ""
}

In the Python Matter Server log I get:

2024-08-17 19:31:09.717 (MainThread) ERROR [matter_server.server.client_handler] [548423327568] Error while handling: device_command (node 2): InvalidArguments

What is the problem with the "devive_command" message?

What argument is invalid?

@olavt
Copy link
Author

olavt commented Aug 17, 2024

It seems like the issue is using null for payload and not {} (empty object). Using null in the past was not triggering the InvalidArguments error.

Is this caused by a change in Python Matter Server, or in the Matter SDK?

@marcelveldt
Copy link
Contributor

It seems like the issue is using null for payload and not {} (empty object). Using null in the past was not triggering the InvalidArguments error.

Is this caused by a change in Python Matter Server, or in the Matter SDK?

@marcelveldt
Copy link
Contributor

null is an actual value - maybe better just omit the payload

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

2 participants