---
title: "deviceController(_:nodeID:invokeCommands:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrxpcserverprotocol_mtrdevice/devicecontroller(_:nodeid:invokecommands:completion:)"
---

# deviceController(_:nodeID:invokeCommands:completion:)

## Declaration

```swift
optional func deviceController(_ controller: UUID, nodeID: NSNumber, invokeCommands commands: [[MTRCommandWithRequiredResponse]], completion: @escaping @Sendable ([[String : Any]]?, (any Error)?) -> Void)
```

```swift
optional func deviceController(_ controller: UUID, nodeID: NSNumber, invokeCommands commands: [[MTRCommandWithRequiredResponse]]) async throws -> [[String : Any]]
```
