Whenever you provision, edit a blueprint, or create a compliance policy, you can apply custom settings to your devices (also known as Device Policy Controller parameters, or ‘DPC params’ for short).
DPC params can be applied during provisioning to a template, blueprint, or after provisioning via the API. When DPC params are added through a template or blueprint, every device linked to that template or blueprint will receive those parameters. As a best practice to avoid errors, test this code on a small group of devices before applying the changes to a larger group.
In this article:
- Applying DPC Params
- Boot on Power
- Disable the Power Button
- Install a File
- Power Off a Device
- Rename Esper Settings
- Apply Fallback Wi-Fi Access Points
- Disable Task Bar for Lenovo Devices (Android 13+)
- Schedule a Power Off or On for Lenovo Devices
Applying DPC Params
DPC params are essentially device commands. They tell the device to perform certain behaviors that are not yet part of the templates or blueprints workflow. Once fired to a device, a DPC param needs to be disabled explicitly for changes to take effect. For example, if you push a DPC param to change the Esper Setting’s app name, and then push another param that installs a file, the Esper Setting’s app name will remain the same until the next time you change it.
Create a blueprint and navigate to the Esper Settings section. Enable JSON and paste the params in the JSON field. Devices will receive the update when you are Done Editing the blueprint, or when you apply the blueprint to that device.
To apply DPC params, create a Template and go to the Settings tab. Enable JSON and paste the params in the JSON field. Parameters can only be applied during provisioning if applied this way.
After Provisioning
After provisioning, devices can receive DPC parameters from the API. See our API Reference or our API documentation for more information.
API
POST https://{tenant_name}-api.esper.cloud/api/v0/enterprise/{enterprise_id}/command/
Body
{
"command_type": "DEVICE",
"command": "UPDATE_DEVICE_CONFIG",
"command_args": {
"custom_settings_config": {
"dpcParams": [
{
"key": "allowPowerOff",
"value": "false"
}
]
}
},
"devices": [
"{device_id}"
],
"groups": [
"{group_id}"
],
"device_type": "all"
}
Use the request Body above as a template to update the device’s DPC parameters. DPC parameters can also be separated by a comma in the dpcParams
array.
Boot on Power
Requirements: Most Samsung and Lenovo devices.
Whenever a device is plugged into a power source, it will turn on. If allowPowerOff
(Disable the Power Button) is also enabled, the device won’t be able to turn on except by being plugged into a power source.
{
"dpcParams": [
{
"key": "bootDeviceOnChargerDisabled",
"value": "false"
}
]
}
Disable the Power Button
Requirements: Most Samsung and Lenovo devices.
If bootDeviceOnChargerDisabled
(Boot on Power) is also enabled, the device won’t be able to turn on except by being plugged into a power source.
{
"dpcParams": [
{
"key": "allowPowerOff",
"value": "false"
}
]
}
Install a File
Requirements: Files must be uploaded in the tenant’s Content Management before using this DPC param.
Install a file on a device, either during provisioning (through a template or blueprint) or after provisioning (through a blueprint or API). Separate multiple file paths by commas.
- Key: fileDownloads
- Value: {'The name of the file as it appears in the Content Management section of the Esper Console' : 'the file path it will be saved to in the device. You can install multiple files by separating the file and path by commas'}
The provided file path is a generic example. File paths vary from device to device. Read more about transferring to the correct file path.
{
"dpcParams": [
{
"key": "fileDownloads",
"value": "{"example.json": "/storage/emulated/Download/"}"
}
]
}
Power Off a Device
Requirements: Most Samsung, Lenovo, and Supervisor enabled devices.
Warnings:
- Esper won’t be able to reach devices that are powered off. Devices will need to be turned on manually to communicate with Esper once again.
- May disrupt provisioning if part of a Provisioning Template. Send an API or edit a blueprint when using this param.
Power off devices. Intended for powering off a large number of devices intended for storage.
"dpcParams": [
{
"key": "powerOff",
"value": "true"
}
]
}
Rename Esper Settings
Rename the Esper Settings app.
{
"dpcParams": [
{
"key": "renameESettings",
"value": "Other Settings"
}
]
}
Before DPC param applied:
After DPC param applied:
Apply Fallback Wi-Fi Access Points
Apply fallback Wi-Fi access points to the device. The device will connect to these access points in the event it loses access to its primary network. Allow 10 - 15 minutes for the device to re-connect. This parameter also accepts Regex (as shown in the example). In many cases, providers append 5G to network names. Instead of manually entering a Wi-Fi network for each instance (5G and non-5G), use Regex to add all networks containing a matching string. Learn more about Regex or use this tool to check your Regex expressions.
To use this DPC param, edit the following information:
- hidden: true or false. Indicate if the network is hidden or not.
- wifiSsid: the name of the access point with optional Regex.
- wifiPassword: the password for the access points. The access points will need to have the same password if using Regex for the SSIDs.
- wifiPhase2Auth: Access point authentication or NONE.
- wifiSecurityType: Any of the following: WEP, WPA, WPA2, SAE, EAP, or NONE. SAE security types require Android 11+ and Esper Agent version 7.18.0000+.
{
"dpcParams": [
{
"key": "wifiRegex",
"value": "[{\"hidden\":false,\"wifiSsid\":\"Pixel[^*]*\",\"wifiPhase2Auth\":\"NONE\",\"wifiSecurityType\":\"SAE\",\"wifiPassword\":\"password\"}]"
}
]
}
Disable Task Bar for Lenovo Devices (Android 13+)
Lenovo devices that run Android 13+ come with a taskbar by default. You can disable this taskbar by using a DPC param.
The taskbar can be set on or off with the following param:
- value: true or false. true to disable the taskbar, false to enable the taskbar (default).
{
"commands": [
{
"command": "UPDATE_OEM_CONFIG",
"oemSettingsConfig": "{\"lenovoConfig\":[{\"key\":\"hideTaskBar\",\"value\":\"true\"}]}",
"type": "Simple"
}
]
}
You can also use an API to disable the taskbar. Learn more about Esper's API.
URI
POST https://{tenant_name}-api.esper.cloud/api/v0/{enterprise_id}/command/
Body
{
"command_type": "DEVICE",
"devices": [
"{device_id}"
],
"command": "UPDATE_DEVICE_CONFIG",
"command_args": {
"custom_settings_config": {
"commands": [
{
"type": "Simple",
"command": "UPDATE_OEM_CONFIG",
"oemSettingsConfig": "{\"lenovoConfig\":[{\"key\":\"hideTaskBar\",\"value\":\"true\"}]}"
}
]
}
}
}
Schedule a Power Off or On for Lenovo Devices
Schedule a power on or off.
Requirements: Select supervised Lenovo devices
Notes
- The scheduled power-on command should be fired before the device powers off. For example, if you scheduled the device to power off at 6 PM, it will need to receive the scheduled power on command before that time.
- The scheduled power-on and power-off commands will need to be fired at least three minutes before they are scheduled to occur.
- In some devices, the power-on command may execute a minute or so before it is scheduled to occur.
- Use a tool, such as Postman or cURL, to fire these commands. You can also paste the JSON body into a blueprint.
- If the device lacks sufficient power, it will not boot up.
Request
POST https://{tenant_name}-api.esper.cloud/api/v0/enterprise/{enterprise_id}/command/
Body
{
"command_type": "DEVICE",
"devices": [
"{device-id}"
],
"command": "UPDATE_OEM_CONFIG",
"command_args": {
"oem_settings_config": {
"lenovoConfig": [
{
"key": "{lenovoBootUp/lenovoShutDown}",
"value": "argument 1 (Hours in 24 hours time), argument 2 (Minutes in 24 hours time), argument 3 (days of week) (default value 0), argument 4 (switch time) (default value 0)"
}
]
}
}
}
Key values
Key: Use lenovoBootUp to power on a device and lenovoShutDown to power off a device.
Value:
A string of four numbers separated by commas.
- Argument 1: Hours. Accepts 0 - 23, with 0 being 12 AM and 23 being 11 PM.
- Argument 2: Minutes. Accepts 00, 01, etc. (or 0, 1, etc) - 59.
- Argument 3: Refer to the Days of the Week table below.
- Argument 4: Should be kept at 0.
Use the following values to specify the schedule for days of the week (argument 3):
Value | Days of the Week |
0 | Everyday |
1 | Monday |
2 | Tuesday |
3 | Monday, Tuesday |
4 | Wednesday |
5 | Monday, Wednesday |
6 | Tuesday, Wednesday |
7 | Monday, Tuesday, Wednesday |
8 | Thursday |
9 | Monday, Thursday |
10 | Tuesday, Thursday |
11 | Monday, Tuesday, Thursday |
12 | Wednesday, Thursday |
13 | Monday, Wednesday, Thursday |
14 | Tuesday, Wednesday, Thursday |
15 | Monday, Tuesday, Wednesday, Thursday |
16 | Friday |
17 | Monday, Friday |
18 | Tuesday, Friday |
19 | Monday, Tuesday, Friday |
20 | Wednesday, Friday |
21 | Monday, Wednesday, Friday |
22 | Tuesday, Wednesday, Friday |
23 | Monday, Tuesday, Wednesday, Friday |
24 | Thursday, Friday |
25 | Monday, Thursday, Friday |
26 | Tuesday, Thursday, Friday |
27 | Monday, Tuesday, Thursday, Friday |
28 | Wednesday, Thursday, Friday |
29 | Monday, Wednesday, Thursday, Friday |
30 | Tuesday, Wednesday, Thursday, Friday |
31 | Monday, Tuesday, Wednesday, Thursday, Friday |
32 | Saturday |
33 | Monday, Saturday |
34 | Tuesday, Saturday |
35 | Monday, Tuesday, Saturday |
36 | Wednesday, Saturday |
37 | Monday, Wednesday, Saturday |
38 | Tuesday, Wednesday, Saturday |
39 | Monday, Tuesday, Wednesday, Saturday |
40 | Thursday, Saturday |
41 | Monday, Thursday, Saturday |
42 | Tuesday, Thursday, Saturday |
43 | Monday, Tuesday, Thursday, Saturday |
44 | Wednesday, Thursday, Saturday |
45 | Monday, Wednesday, Thursday, Saturday |
46 | Tuesday, Wednesday, Thursday, Saturday |
47 | Monday, Tuesday, Wednesday, Thursday, Saturday |
48 | Friday, Saturday |
49 | Monday, Friday, Saturday |
50 | Tuesday, Friday, Saturday |
51 | Monday, Tuesday, Friday, Saturday |
52 | Wednesday, Friday, Saturday |
53 | Monday, Wednesday, Friday, Saturday |
54 | Tuesday, Wednesday, Friday, Saturday |
55 | Monday, Tuesday, Wednesday, Friday, Saturday |
56 | Thursday, Friday, Saturday |
57 | Monday, Thursday, Friday, Saturday |
58 | Tuesday, Thursday, Friday, Saturday |
59 | Monday, Tuesday, Thursday, Friday, Saturday |
60 | Wednesday, Thursday, Friday, Saturday |
61 | Monday, Wednesday, Thursday, Friday, Saturday |
62 | Tuesday, Wednesday, Thursday, Friday, Saturday |
63 | Monday, Tuesday, Wednesday, Thursday, Friday, Saturday |
64 | Sunday |
65 | Monday, Sunday |
66 | Tuesday, Sunday |
67 | Monday, Tuesday, Sunday |
68 | Wednesday, Sunday |
69 | Monday, Wednesday, Sunday |
70 | Tuesday, Wednesday, Sunday |
71 | Monday, Tuesday, Wednesday, Sunday |
72 | Thursday, Sunday |
73 | Monday, Thursday, Sunday |
74 | Tuesday, Thursday, Sunday |
75 | Monday, Tuesday, Thursday, Sunday |
76 | Wednesday, Thursday, Sunday |
77 | Monday, Wednesday, Thursday, Sunday |
78 | Tuesday, Wednesday, Thursday, Sunday |
79 | Monday, Tuesday, Wednesday, Thursday, Sunday |
80 | Friday, Sunday |
81 | Monday, Friday, Sunday |
82 | Tuesday, Friday, Sunday |
83 | Monday, Tuesday, Friday, Sunday |
84 | Wednesday, Friday, Sunday |
85 | Monday, Wednesday, Friday, Sunday |
86 | Tuesday, Wednesday, Friday, Sunday |
87 | Monday, Tuesday, Wednesday, Friday, Sunday |
88 | Thursday, Friday, Sunday |
89 | Monday, Thursday, Friday, Sunday |
90 | Tuesday, Thursday, Friday, Sunday |
91 | Monday, Tuesday, Thursday, Friday, Sunday |
92 | Wednesday, Thursday, Friday, Sunday |
93 | Monday, Wednesday, Thursday, Friday, Sunday |
94 | Tuesday, Wednesday, Thursday, Friday, Sunday |
95 | Monday, Tuesday, Wednesday, Thursday, Friday, Sunday |
96 | Saturday, Sunday |
97 | Monday, Saturday, Sunday |
98 | Tuesday, Saturday, Sunday |
99 | Monday, Tuesday, Saturday, Sunday |
100 | Wednesday, Saturday, Sunday |
101 | Monday, Wednesday, Saturday, Sunday |
102 | Tuesday, Wednesday, Saturday, Sunday |
103 | Monday, Tuesday, Wednesday, Saturday, Sunday |
104 | Thursday, Saturday, Sunday |
105 | Monday, Thursday, Saturday, Sunday |
106 | Tuesday, Thursday, Saturday, Sunday |
107 | Monday, Tuesday, Thursday, Saturday, Sunday |
108 | Wednesday, Thursday, Saturday, Sunday |
109 | Monday, Wednesday, Thursday, Saturday, Sunday |
110 | Tuesday, Wednesday, Thursday, Saturday, Sunday |
111 | Monday, Tuesday, Wednesday, Thursday, Saturday, Sunday |
112 | Friday, Saturday, Sunday |
113 | Monday, Friday, Saturday, Sunday |
114 | Tuesday, Friday, Saturday, Sunday |
115 | Monday, Tuesday, Friday, Saturday, Sunday |
116 | Wednesday, Friday, Saturday, Sunday |
117 | Monday, Wednesday, Friday, Saturday, Sunday |
118 | Tuesday, Wednesday, Friday, Saturday, Sunday |
119 | Monday, Tuesday, Wednesday, Friday, Saturday, Sunday |
120 | Thursday, Friday, Saturday, Sunday |
121 | Monday, Thursday, Friday, Saturday, Sunday |
122 | Tuesday, Thursday, Friday, Saturday, Sunday |
123 | Wednesday, Thursday, Friday, Saturday, Sunday |
124 | Wednesday, Thursday, Friday, Saturday, Sunday |
125 | Monday, Wednesday, Thursday, Friday, Saturday, Sunday |
126 | Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
Examples
Power on
Request
POST https://{tenant_name}-api.esper.cloud/api/v0/enterprise/{enterprise_id}/command/
Body
{
"command_type": "DEVICE",
"devices": [
"device_id"
],
"command": "UPDATE_OEM_CONFIG",
"command_args": {
"oem_settings_config": {
"lenovoConfig": [
{
"key": "lenovoBootUp",
"value": "10,0,0,0"
}
]
}
}
}
The following will turn on the device at the next 10 AM. This action will occur every day.
Power off
Request
POST https://{tenant_name}-api.esper.cloud/api/v0/enterprise/{enterprise_id}/command/
Body
{
"command_type": "DEVICE",
"devices": [
"device_id"
],
"command": "UPDATE_OEM_CONFIG",
"command_args": {
"oem_settings_config": {
"lenovoConfig": [
{
"key": "lenovoShutDown",
"value": "9,58,0,0"
}
]
}
}
}
The following will turn off the device at 9:58 AM. This action will occur every day.
Not working? Contact Esper with your model information.
Use DPC parameters to customize your device fleet interactions.