Receiving Actions
This guide shows you how to receive Actions (Commands) from the Cloud and execute them.
Let us have a look at how to create a "reboot" action that restarts the device.
To do this we need to first register this action with uplink using its configuration file config.toml. If you have followed the guide this file will be present in /usr/local/share/bytebeam folder.
Edit this file to add the line actions=[{name="reboot"}] under [tcpapps.1] section.
Restart the uplink using the following commands

Create a new action type called "Reboot" by following the Creating new Action Types guide:
The reboot action should now be visible on the device management page.
Do not trigger the action yet. We need to first integrate the action into our application. Below you can find a sample application code for receiving actions.

Once your app has been modified and is running, you can go to Bytebeam Cloud and click on the Reboot action button to trigger the action. Next, you will see the following message
Click on Yes. Next, on the action panel, you can monitor the status of your last triggered action
After completion of an action, the Action Status changes to Completed, and you should see your device reboot