Introduction
Scheduling events is always a useful feature for signage deployment. Certain tasks can be scheduled to run on a signage device, allowing the device to pick up the scheduled events and execute them accordingly, without the need for human interaction.
This functionality is particularly valuable for deployments that require routine changes in displayed content. The ability to send scheduling events to the signage device significantly reduces the workload of the operator.
This article provides guidelines and examples to showcase the ability to schedule content on Amino Digital Signage
There are 2 methods to accomplish the goal of sending a scheduler command:
- EELM APIs
- Orchestrate APIs
Which method you choose depends on your network deployment.
Prerequisites
Understanding of how to use EELM / Orchestrate APIs
Basic Understanding of Android App development or Android Intents
Install the attached sample APP in this article
In This Article
Schedule an intent with EELM API
Schedule an intent with Orchestrate API
Schedule any command using EELM API via Orchestrate API
Summary
Schedule an intent with EELM API
The Amino Signage device features its own RESTful API server called EELM (Enable Enterprise Local Management) server.
With a range of APIs available, users can securely control and operate the signage device remotely as long as they are in their local network.
For detailed information, please refer to other articles that demonstrate the configuration and usage of EELM.
The Command Scheduler API serves as a container for other EELM APIs. It allows for the execution of specific EELM APIs on a scheduled basis. This provides users with the flexibility to run tasks on the signage device at predetermined times in the future.
The Deeplink API is another EELM API that can trigger an intent on the signage device. The intent structure follows that of Android intents, allowing users to send data, URIs, or activities to operate the signage device.
By combining the Command Scheduler and Deeplink APIs, users can achieve the goal of operating the signage device at a specific time without any user interaction.
The terminal message below provides an example of using the Command Scheduler and Deeplink APIs to fire an intent to the Amino Sample Player. The Amino signage device will schedule and play the required HLS channel via the Sample Player (APK attached to this article):
INPUT:
curl -vv -X 'POST' \
'https://<signage_ip>:8090/api/v2/commandScheduler/schedule' \
-H 'accept: application/json' \
-d '{
"apiBaseUrl":"http://localhost:8090",
"commands":[
{
"url":"/system/deeplink",
"method":"POST",
"timeout":10,
"params":{
"action": "com.aminocom.playerwrapper.demo.action.VIEW",
"data": "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8"
}
}
],
"execTs": 1706267283,
"inSeq": true
}'
OUTPUT:
> POST /api/v2/commandScheduler/schedule HTTP/1.1
> User-Agent: curl/7.35.0
> Host: <Signage_IP>:10444
> Referer: y
> accept: application/json
> Content-Length: 324
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 324 out of 324 bytes
< HTTP/1.1 200 OK
< Date: Fri, 02 Feb 2024 03:51:16 GMT
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: *
< Content-Type: application/json;charset=utf-8
< Content-Length: 10
* Server Jetty(9.4.35.v20201120) is not blacklisted
< Server: Jetty(9.4.35.v20201120)
<
{"id":12}
* Connection #0 to host <Signage_IP> left intact
Remarks :
<signage_ip>: The IP address for your amino signage device
"execTs": Refer to the Unix timestamp to execute the scheduler command
"id": Refer to the batch ID of the command scheduler
The schedule status can be obtained by <commandScheduler/schedule/"id">
Schedule an intent with Orchestrate API
The Amino Orchestrate is a cloud-based management server that enables remote control of your signage devices without the need to set up your own network infrastructure for device management.
Your Amino signage device will remain connected to the Orchestrate server, and batch commands will be securely delivered to the device over an SSL-encrypted channel.
To securely control your signage device using the Orchestrate server, operators simply need a key pair and a certification to access the Orchestrate APIs.
The Orchestrate server provides a set of RESTful batch APIs that allow for direct and remote command delivery to multiple devices.
To obtain the required certification file, please contact Amino Support with your SSL certificate signing request (CSR).
With an SSL key pair and certification, users are authorized to remotely operate multiple devices within their own management domain.
If the batch command is targeted to operate on multiple signage devices, the Orchestrate server will process the batch command and distribute it individually to the corresponding devices.
The terminal message below provides an example of scheduling a deeplink with a batch operation command via the Amino Orchestrate server. The deeplink contains an intent to broadcast a view action to the Apollo sample app (APK attached to this article).
By parsing the URL of an HLS (HTTP live streaming):
INPUT:
curl -vv -X 'POST' --cert orchestrate_api.crt --key orchestrate_api.key \
'https://system.amino-orchestrate.com:2444/system/sapi/device/webengine/batch'
-H 'Content-Type: application/json' \
-d '{
"devices":[
{
"sn":"<signage_sn>"
}
],
"inSeq": true,
"execTs": 1706613192,
"params":[
{
"url":"/system/deeplink",
"method":"POST",
"params": {
"action":"com.aminocom.playerwrapper.demo.action.VIEW",
"data":"https://storage.googleapis.com/exoplayer-test-media-1/60fps/bbb-clear-1080/manifest.mpd"
}
}
]
}'
OUTPUT:
> POST /system/sapi/device/webengine/batch HTTP/1.1
> User-Agent: curl/7.35.0
> Host: system.amino-orchestrate.com:2444
> Accept: */*
> Content-Type: application/json
> Content-Length: 294
>
* upload completely sent off: 294 out of 294 bytes
< HTTP/1.1 200 OK
< Date: Fri, 02 Feb 2024 04:16:03 GMT
* Server Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips is not blacklisted
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
< X-RateLimit-Limit: 60
< X-RateLimit-Remaining: 59
< X-RateLimit-Reset: 1706847423
< Cache-Control: no-cache, no-store, must-revalidate
< Pragma: no-cache
< Expires: 0
< Set-Cookie: JSESSIONID=6C90AD1739F3452E06F083B5187FD948; Path=/resolve; Secure; HttpOnly
< Content-Type: application/json
< Content-Length: 32
<
* Connection #0 to host system.amino-orchestrate.com left intact
{"batch_id":1100000000000002722}
Remarks :
<signage_sn>: The serial number(s) for your amino signage device . Separate by comma for multiple devices
"execTs": Refer to the Unix timestamp to execute the scheduler command
"batch_id": Refer to the batch ID of the command scheduler with Orchestrate server
The schedule status can be obtained by </system/sapi/ensight/batch-command/status">
Application receiving broadcast intent
To register the scheduler intent for a custom application on Android, you need to declare an intent receiver in the application's manifest file. This allows your application to receive and handle scheduled commands from the scheduler at a specified time.
The code block below provides an example of declaring an intent receiver on the application manifest :
<!-- If this receiver listens for broadcasts sent from the system or from
other apps, even other apps that you own, set android:exported to "true". -->
<receiver android:name=".MyBroadcastReceiver" android:exported="false">
<intent-filter>
<action android:name="APP_SPECIFIC_BROADCAST" />
</intent-filter>
</receiver>
Once the application receives the intent, the application will process and execute the containing commands.
Schedule any command using EELM API via Orchestrate API
The majority of the Orchestrate APIs are system operations-related commands with only a small list that can control the device directly, although most of them are to get information except the audio control and the reboot request.
Using the scheduler command in the Orchestrate API as a container the user can send EELM API parameters to control the signage device.
This is particularly useful to have full control of the signage device remotely without the need to send commands from the local network.
To integrate EELM API with the Orchestrate scheduler command API the user will have to first call the Orchestrate API </system/sapi/device/webengine/batch> and then insert the wanted EELM API call in the "params" section.
Here are some examples:
Open an APP:
curl -vv -X 'POST' --cert orchestrate_api.crt --key orchestrate_api.key \
'https://system.amino-orchestrate.com:2444/system/sapi/device/webengine/batch'
-H 'Content-Type: application/json' \
-d '{
"devices":[
{
"sn":"<signage_sn>"
}
],
"inSeq": true,
"execTs": 1706613192,
"params":[
{
"url":"/system/deeplink",
"method":"POST",
"params": {
"action": "android.intent.action.MAIN",
"activity": "com.aminocom.playerwrapper.demo.MainActivity",
"package": "com.aminocom.playerwrapper.demo",
"packageName": "string"
}
}
]
}'
Zapper change to channel number 3:
curl -vv -X 'POST' --cert orchestrate_api.crt --key orchestrate_api.key \
'https://system.amino-orchestrate.com:2444/system/sapi/device/webengine/batch'
-H 'Content-Type: application/json' \
-d '{
"devices":[
{"sn":"107-xxxxxxx"}, {"sn":"107-xxxxxxx"}
],
"inSeq": true,
"execTs": 1706613192,
"params":[
{
"url": "/zapper/changeChannel",
"method": "POST",
"params": {
"name": "3"
}
}
]
}'
Standby ON:
curl -vv -X 'POST' --cert orchestrate_api.crt --key orchestrate_api.key \
'https://system.amino-orchestrate.com:2444/system/sapi/device/webengine/batch'
-H 'Content-Type: application/json' \
-d '{
"devices":[
{
"sn":"<signage_sn>"
}
],
"inSeq": true,
"execTs": 1706613192,
"params":[
{
"url": "/system/power/standby",
"method": "POST"
}
]
}'
Standby OFF:
curl -vv -X 'POST' --cert orchestrate_api.crt --key orchestrate_api.key \
'https://system.amino-orchestrate.com:2444/system/sapi/device/webengine/batch'
-H 'Content-Type: application/json' \
-d '{
"devices":[
{
"sn":"<signage_sn>"
}
],
"inSeq": true,
"execTs": 1706613192,
"params":[
{
"url": "/system/power/activate",
"method": "POST"
}
]
}'
Remarks :
<signage_sn>: The serial number(s) for your amino signage device . Separate by comma for multiple devices
"execTs": Refer to the Unix timestamp to execute the scheduler command. Consider 0 for instant action.
Reference
Orchestrate API Reference and Guide