Settings¶
Set Settings¶
There are multiple ways to configure settings on a data logger. These methods have evolved from early implementations to the current system, and we strive to maintain backward compatibility. However, it is recommended to use current configuration over the alternate method whenever possible.
SetSettings¶
Set a single or multiple settings in a data logger using one payload.
Subscribe <baseTopic>/cc/<deviceID>/SetSettings
Properties
"settings": {}{object} A dictionary of one or more setting name/value or setting ID/value pairs to apply.If the key is a setting name (e.g., “PakBusAddress”), the value must be a string, even if the setting represents a number or boolean.
If the key is a setting ID (e.g., “3”), the value must be the appropriate native type expected for that setting (e.g., number, boolean, string).
- Example entries:
"PakBusAddress": "314"Uses the name “PakBusAddress”, so value must be string."3": 314Uses the ID 3 (which maps to “PakBusAddress”), so the value is a number.
Example Command
Subscribe cs/v2/cc/ABCD-EFGH-1234/SetSettings
{
"settings": {
"StationName": "Sir Logs-a-Lot",
"3": "314",
"USRDriveSize": "10240"
}
}
Progress may be published on the state topic.
Publish cs/v2/state/ABCD-EFGH-1234
Applying a setting that requires a reboot
{
"clientId": "7GY3-DZYK-KBWF",
"state": "offline",
"reason": "Applying settings"
}
{
"clientId": "7GY3-DZYK-KBWF",
"state": "online"
}
Response
The data logger will publish a final result of the process on the cr topic.
Publish cs/v2/cr/ABCD-EFGH-1234/SetSettings
{
"success": "Settings applied, rebooted"
}
Set Setting <Alternate>¶
Instructs the data logger to change a single setting. Each change is sent as its own payload object. Changes are staged and will not take effect until a payload includes “apply”: true, which applies all staged changes immediately.
Subscribe <baseTopic>/cc/<deviceID>/setting
Properties
"action": "set"Indicates the operation is a setting change."name":{string, required} The name of the setting to modify (e.g., “PakBusAddress”). - The value must be provided as a string, even if the setting represents a number or boolean."value":{string, required}: The new value for the setting. Must be a string."apply":{boolean, optional}: - Iftrue, the setting change is immediately applied. - If omitted orfalse, the change is staged but not yet applied.
- Example entries:
{"action": "set", "name": "PakBusAddress", "value": "10"}Stages a change to “PakBusAddress”.{"action": "set", "name": "StationName", "value": "Sir Logs-a-Lot"}Stages a change to “StationName”.{"action": "set", "name": "USRDriveSize", "value": "10240", "apply": true}Changes “USRDriveSize” and applies immediately.
- Setting Arrays:
Some settings are defined as arrays and require an explicit numeric index.
Symbolic or descriptive names (for example, interface labels) are not valid indices.
Array settings are referenced using the form
<SettingName>(<index>).
- Example:
Baudrateis an array-valued setting.Baudrate(9)is valid and maps to theComC1port on the CR1000X.Baudrate(ComC1)is not valid becauseComC1is not a numeric index.
Example Command [Single Setting]:
Subscribe cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "set",
"name": "PakBusAddress",
"value": "3",
"apply": true
}
Response [Single Setting]:
Publish cs/v2/cr/ABCD-EFGH-1234/setting
{
"success":"Settings applied, no reboot required"
}
Example Command [Multiple Setting]:
Subscribe cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "set",
"name": "PakBusAddress",
"value": "3"
}
Publish cs/v2/cr/ABCD-EFGH-1234/setting
{
"success":"Settings set successfully"
}
Subscribe cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "set",
"name": "StationName",
"value": "Sir Logs-a-Lot Sr"
}
Publish cs/v2/cr/ABCD-EFGH-1234/setting
{
"success":"Settings set successfully"
}
Subscribe cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "set",
"name": "USRDriveSize",
"value": "10240",
"apply": true
}
Publish cs/v2/cr/ABCD-EFGH-1234/setting
{
"success":"Settings applied, rebooted"
}
Get Settings¶
There are multiple ways to read/get settings on a data logger. These methods have evolved from early implementations to the current system, and we strive to maintain backward compatibility.
GetSettings <Beta>¶
This Feature is still in Development and is subject to change. Request a single setting or a specified list of settings. Settings can be selected by name or by ID.
Subscribe
<baseTopic>/cc/<deviceID>/GetSettings
Properties
"names": [][array] An array of one or more setting names.Setting Names (e.g., “PakBusAddress”) must be strings.
If names are used setting IDs are not allowed.
"ids": [][array] An array of one or more setting IDs.Setting IDs must be an integers.
The response to the Settings IDs will be as an array some ID’s are an array of settings.
- Example entries:
{"names": ["StationName", "PakBusAddress"]}{"ids": [2,3]
Example Command: By Names
Subscribe
cs/v2/cc/ABCD-EFGH-1234/GetSetting
{
"names": ["StationName", "PakBusAddress"]
}
Response
Publish
cs/v2/cr/ABCD-EFGH-1234/GetSettings
{
"StationName":"RedShirt_Lab",
"PakBusAddress":"1"
}
Example Command: By IDs
Subscribe
cs/v2/cc/ABCD-EFGH-1234/GetSetting
{
"ids": [2, 3]
}
Response
Publish
cs/v2/cr/ABCD-EFGH-1234/GetSettings
{
"2":["RedShirt_Lab"],
"3":[1]
}
Get Single Setting <Alternate>¶
Subscribe
<baseTopic>/cc/<deviceID>/setting
Properties
"action": "get"- One of:
"name":{string} Setting name to publish"id":{number} Setting id (from Device Configuration Utility) to publish
- Setting Arrays:
Some settings are defined as arrays and require an explicit numeric index.
Symbolic or descriptive names (for example, interface labels) are not valid indices.
Array settings are referenced using the form
<SettingName>(<index>).
- Example:
Baudrateis an array-valued setting.Baudrate(9)is valid and maps to theComC1port on the CR1000X.Baudrate(ComC1)is not valid becauseComC1is not a numeric index.
Example Command: By Setting Name
Subscribe
cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "get",
"name": "PakBusAddress"
}
Response
Publish
cs/v2/cr/ABCD-EFGH-1234/setting
{
"setting": "PakBusAddress",
"value": "3"
}
Example Command: By Setting ID
Subscribe
cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "get",
"id": 3
}
Response
Publish
cs/v2/cr/ABCD-EFGH-1234/setting
{
"id": 3,
"value": "3"
}
Note
Setting IDs must be sent as integers
Get all settings¶
Subscribe
<baseTopic>/cc/<deviceID>/setting
Properties
"action": "get""name": nullor[]empty list object
Warning
This will be a large payload (~7KB). All data logger settings will be in a single payload.
If the data logger does not output to the cr topic try increasing the Max TLS Server Connection settings.
Example Command
Subscribe
cs/v2/cc/ABCD-EFGH-1234/setting
{
"action": "get",
"name": null
}
Response
Publish
cs/v2/cr/ABCD-EFGH-1234/setting
{
"StationName": "12345",
"Security": "0",
"PakBusAddress": "1"
...
...
}