How-To Guides
DeviceHub Guides

Use the Manage Topic to Stop a Device

3min
notes you need to follow the following guidelines for topic names subject based messaging 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 node the manage topic allows you to control the status of a devicehub device video user scenario you'd like to remotely disconnect a plc from litmus edge set up and use the manage topic to set up and use the manage topic follow the steps to connect a device docid\ ish7bqhzxswtdx8vbnszb for this user scenario, a simulator generator device is used navigate to devicehub in the generator device tile, click the display copy options icon and select the manage topic this will copy the manage status topic you will refer to this topic later on navigate to flows manager for a flows manager, click the go to flow definition icon the flow canvas opens in a new browser tab on the flow canvas, copy the datahub publish node and inject node onto the canvas then, connect the two nodes double click the datahub publish node in the topic field, paste the manage topic you copied in step 3 if needed, configure the datahub publish connection see the step 3 configure connector nodes section in create a flow docid\ veyyte7xdcangglzbqya0 to learn more click done double click the inject node the edit inject node dialog box displays for msg payload , select string for msg payload , enter {"command" "stop"} click done , and then click deploy click the inject button this triggers the payload message you configured for the node return to the litmus edge browser window and navigate to devicehub the device now shows a stopped status to restart the device, you can use the following command {"command" "start"}