---
title: "subscribe(withController:nodeId:minInterval:maxInterval:params:shouldCache:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrdevicecontrollerserverprotocol/subscribe(withcontroller:nodeid:mininterval:maxinterval:params:shouldcache:completion:)"
---

# subscribe(withController:nodeId:minInterval:maxInterval:params:shouldCache:completion:)

## Declaration

```swift
func subscribe(withController controller: Any?, nodeId: UInt64, minInterval: NSNumber, maxInterval: NSNumber, params: [String : Any]?, shouldCache: Bool, completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func subscribe(withController controller: Any?, nodeId: UInt64, minInterval: NSNumber, maxInterval: NSNumber, params: [String : Any]?, shouldCache: Bool) async throws
```
