---
title: Use the Manage Topic to Stop a Device
slug: manufacturing-connect-edge-v2/use-the-manage-topic-to-stop-a-device
docTags: 
createdAt: 2023-09-27T15:19:38.155Z
---

:::hint{type="info"}
**Notes**:

- You need to follow the following guidelines for topic names: [Subject-Based Messaging](https://docs.nats.io/nats-concepts/subjects).&#x20;
- When publishing structured data such as JSON, you must convert to a byte array (string) first. To do this in a flow, you can use the **json&#x20;**&#x6E;ode.&#x20;
:::

The Manage topic allows you to control the status of a DeviceHub device.&#x20;

# User Scenario

You'd like to remotely disconnect a PLC from Manufacturing Connect Edge.&#x20;

# Set Up and Use the Manage Topic

**To set up and use the Manage topic:**

1. Follow the steps to [Connect a Device](docId\:SqalV8ImyZmn8xA-56gno). For this user scenario, a Simulator Generator device is used.&#x20;
2. Navigate to **DeviceHub**.
3. In the Generator device tile, click the **Action menu**, click **Copy Topics**, and then select the Manage topic.  This will copy the Manage status topic.  You will refer to this topic later on.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/zuwzRhc7gB2Wh7d1AHtN2_manage-topicmce.png" size="80" width="803" height="427" caption="Copy the manage topic" position="center" showCaption="true"}
4. Navigate to **Flows Manager**.&#x20;
5. For a Flows Manager, click the **Go To Flow Definition** icon.&#x20;
   The Flow canvas opens in a new browser tab.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/QYgLZyaDfck4p0DbqRoIv_go-to-flow-definitionmce.png" size="80" width="937" height="548" caption="Go To Flow Definition icon" position="center" showCaption="true"}
6. On the Flow canvas, copy the **DataHub Publish** node and **inject&#x20;**&#x6E;ode onto the canvas. Then, connect the two nodes.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/hxeBGHjI4zRRnTQbC11Lj_manage-nodes.png" size="80" width="767" height="503" caption="The nodes needed for the manage topic" position="center" showCaption="true"}
7. Double-click the DataHub Publish node.&#x20;
   - In the **Topic&#x20;**&#x66;ield, paste the Manage topic you copied in step 3.&#x20;
   - If needed, configure the Datahub Subscribe connection. See the *Step 3: Configure Connector Nodes* section in [Create a Flow](docId\:cvhYwrcRDrQPGReHBQNZ-) to learn more.&#x20;
   - Click **Done**.&#x20;
8. Double-click the **inject&#x20;**&#x6E;ode.&#x20;
   The *Edit inject* node dialog box displays.&#x20;
9. For **msg.payload**, select **string**.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/kq5hmoJOK102KwP524Kd-_string-payload.png" size="80" width="565" height="883" caption="Select a string payload" position="center" showCaption="true"}
10. For **msg.payload**, enter `{"command" : "stop"}`.&#x20;
    ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/r2q-Y9AvRkXGIstxxuL4m_stop-command.png" size="60" width="561" height="890" caption="Command to stop device" position="center" showCaption="true"}
11. Click **Done**, and then click **Deploy**.
12. Click the **inject&#x20;**&#x62;utton. This triggers the payload message you configured for the node.&#x20;
    ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/5Asv74QwMTjgwjEd4worC_activate-inject-button.png "The inject button")
13. Return to the Manufacturing Connect Edge browser window and navigate to **DeviceHub**. The device now shows a Stopped status.&#x20;
    ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/3I0hLUKSo7i1EjA6oI6HE_device-stoppedmce.png" size="60" width="399" height="340" caption="Stopped status" position="center" showCaption="true"}

To restart the device, you can use the following command: `{"command" : "start"}`.

