> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/roboflow/roboflow-hi/deploy/device-manager/making-changes/trigger-a-stream.md).

# Stream Trigger करें

जब Streams को "Triggered" mode पर सेट किया जाता है, तो वे हर frame पर inference नहीं चलाते। इसके बजाय, वे लगातार camera से frames capture करते हैं और सबसे हालिया frame के against configured Workflow चलाने के लिए एक explicit trigger का इंतज़ार करते हैं। यह तब उपयोगी है जब inference महँगा हो, जब results केवल खास moments पर चाहिए हों (उदाहरण के लिए, जब PLC संकेत दे कि कोई part position में है), या जब कोई external system inspection की cadence नियंत्रित करता हो।

आप किसी stream को दो तरीकों से trigger कर सकते हैं:

1. Cloud से, Deployment Manager dashboard का उपयोग करके।
2. Edge से, device पर local HTTP endpoint को call करके।

किसी भी method का उपयोग करने के लिए, जब आप [इसे जोड़ें](/roboflow/roboflow-hi/deploy/device-manager/setting-up/add-a-stream.md) या द्वारा [device configuration update करके](/roboflow/roboflow-hi/deploy/device-manager/making-changes/update-device-configuration.md).

## Cloud Trigger

Cloud trigger Roboflow app से जारी किया जाता है और Deployment Manager द्वारा device तक forward किया जाता है। इसे manual triggering, demos, या तब उपयोग करें जब trigger शुरू करने वाले system के पास internet access हो लेकिन वह device के local network पर न हो।

Deployment Manager dashboard से, उस Device पर क्लिक करें जो stream host कर रहा है। हर Triggered stream में एक "Trigger" button होता है। नवीनतम frame के against एक single inference run जारी करने के लिए "Trigger" पर क्लिक करें:

जब device trigger process कर रहा होता है, stream "Waiting for device..." दिखाती है। जब device result लौटाता है, status "Inference complete" में update हो जाता है और rendered frame Workflow output के साथ refresh हो जाता है।

Trigger device पर एक command के रूप में queued होता है और अगली बार जब device Deployment Manager को poll करता है तब process होता है (आमतौर पर कुछ seconds के भीतर)। Cloud triggers high-frequency triggering के लिए डिज़ाइन नहीं किए गए हैं। अगर आपको sub-second latency चाहिए या आप प्रति minute कुछ से अधिक triggers जारी कर रहे हैं, तो इसके बजाय edge trigger का उपयोग करें।

## Edge Trigger

Edge trigger एक HTTP call है जो सीधे device पर चल रहे inference server को किया जाता है। इसे PLC, local script, या device के साथ same network पर किसी भी system से production triggering के लिए उपयोग करें। Edge triggers Deployment Manager के through round trip से बचाते हैं और latency-sensitive integrations के लिए recommended approach हैं।

Device पर inference server हर running stream के लिए एक trigger endpoint expose करता है:

```
POST http://<device-ip>:8000/inference_pipelines/{pipeline_id}/trigger
```

Replace `<device-ip>` को अपने network पर device के IP address से बदलें, और `{pipeline_id}` को उस stream के ID से बदलें जिसे आप trigger करना चाहते हैं। आप pipeline ID को Deployment Manager में stream details में ढूँढ सकते हैं।

Request body वैकल्पिक है। एक single trigger के लिए stream पर configured Workflow parameters को override करने हेतु, उन्हें body में शामिल करें:

```json
{
  "workflows_parameters": {
    "confidence": 0.7
  }
}
```

एक सफल trigger captured frame के लिए Workflow output लौटाता है:

```json
{
  "success": true,
  "data": {
    "frame_id": 1024,
    "timestamp": 1716220800.123,
    "workflow_output": [
      {
        "predictions": []
      }
    ]
  }
}
```

यदि device ने अभी तक कोई frame capture नहीं किया है, या pipeline चल नहीं रही है, तो response लौटाता है `success: false` एक संदेश के साथ जो कारण बताता है।

{% hint style="info" %}
Edge trigger endpoint केवल device के local network से ही reachable है। इसे बाहर से call करने के लिए, device को अपनी network infrastructure के माध्यम से expose करें या cloud trigger का उपयोग करें।
{% endhint %}

## Cloud और Edge Triggers के बीच चयन

| Use case                                                        | Recommended trigger |
| --------------------------------------------------------------- | ------------------- |
| Roboflow app से किसी stream का manually निरीक्षण करना           | Cloud               |
| Triggered stream का demo देना या test करना                      | Cloud               |
| PLC, sensor, या barcode scanner जो device के same network पर हो | Edge                |
| Local script जिसे उसी request में inference result वापस चाहिए   | Edge                |
| High-frequency triggering (प्रति minute कुछ से अधिक)            | Edge                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-hi/deploy/device-manager/making-changes/trigger-a-stream.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
