The Commands functionality is a powerful feature in Xibo CMS that allows predefined commands to be sent to the devices running your Xibo Players. There are two methods for sending commands, immediately via XMR or by scheduling a Command as an Event. Below is a brief overview on how to create and send a Reboot Command to an Android Device running the Xibo for Android Player.
Please also note that I will be using CMS version 2.3.5 but the same functionality is also available in 1.8.13 and newer. I will also be using the DSCS9 to run the Xibo Player.
First we will start by creating the Command itself. Select the
Commands menu option in your CMS and click the
Add Command button in the top right corner of the page. The window shown in my screenshot below will open. This is where we will confirm the name and reference code for the command, which will be used by Xibo CMS, as well as a Description of the command itself for personal reference. Once you have chosen a name, reference and description for your command, click save to confirm.
Now that the entry has been created, we can add the actual command you want to use to reboot your Android devices. This step is completed in the display profile we are using with our displays. For my example that would be the
Android profile. Go to the
Display Settings menu in your CMS, then click the button at the end of the
Android profile being used by your displays and choose
Edit Profile window will open, click the
Commands tab. This is where we will find the Command entry we created.
As you can see above, I have entered the command that will reboot the device for me. Please note that you do not have to enter a Validation string if you do not wish to. Save to confirm the changes.
And now the command is complete! Below are some other example reboot commands for Android that you can also try:
am start -a android.intent.action.ACTION_REQUEST_REBOOT
setprop sys.powerctl reboot
Now that the command has been created, we can send this to the displays using that profile. If you would like to send the command to a display immediately, you can use the
Send Command option in your CMS. Please note that the XMR push messaging service will need to be configured to be able to use this functionality.
Go to the
Displays menu in your CMS and click the button at the end of the display you wish to send the command to. You will see in the drop down menu that there is an option named
Send Command, as shown in my screenshot below, at the bottom of the list:
Once selected, simply choose your Command and click Save to confirm. The Command will then be sent via XMR to your display:
Alternatively you can schedule a Command to execute at a specific time using your
Event Scheduler. Simply go to the
Schedule menu in your CMS and click the
Add Event button above the Calendar. You can now create an Event as you would for your Layouts and Campaigns, but instead set
Event Type to
Command as shown below.
Please note that commands will run at the scheduled time, regardless of the Priority and Display Order settings you have configured for your Layout Events. This is why those fields remain empty in my example Event.
Whilst it is indeed possible to send or schedule commands to power your device off completely, please note that the Player will not be able to receive a command to power the machine back on.