Instructions Settings View¶
List the settings for a component instance or service on a node. Use the list-components and list-services commands to discover the available services.
When generating CSV
output, the --full-csv
option will cause valid Settings CSV
to be generated, which can be directly imported into SolarNode.
Additionally the specification for a service can be shown, which is useful for applications dynamically discovering how to configure the settings.
Info
For more information about setting specifications, see the Developer Settings section of the SolarNode Handbook.
Usage¶
s10k instructions settings view [-FS] -node=<nodeId> -s=<serviceId>
[-c=<componentId>] [-mode=<displayMode>]
Options¶
Output¶
A listing of service setting, or setting specification, records.
Examples¶
You can view the settings for a service on a node like this:
s10k instructions settings view --node-id 101 \
--service-id net.solarnetwork.node.metadata.json.JsonDatumMetadataService
+---------------------------+-------+---------+
| Key | Value | Default |
+---------------------------+-------+---------+
| updatePersistDelaySeconds | 2 | true |
+---------------------------+-------+---------+
| updateThrottleSeconds | 60 | true |
+---------------------------+-------+---------+
Key,Value,Default
updatePersistDelaySeconds,2,true
updateThrottleSeconds,60,true
[
{
"key": "updatePersistDelaySeconds",
"value": "2",
"default": true
},
{
"key": "updateThrottleSeconds",
"value": "60",
"default": true
}
]
You can view the settings for a component instance with the --component-id
option
s10k instructions settings view --node-id 101 \
--component-id net.solarnetwork.node.datum.control \
--service-id 1
+-----------------------------------------------------+--------------+---------+
| Key | Value | Default |
+-----------------------------------------------------+--------------+---------+
| schedule | 0 * * * * ? | true |
+-----------------------------------------------------+--------------+---------+
| jobService.multiDatumDataSource.uid | | true |
+-----------------------------------------------------+--------------+---------+
| jobService.multiDatumDataSource.groupUid | | true |
+-----------------------------------------------------+--------------+---------+
| jobService.multiDatumDataSource.controlIdRegexValue | | true |
+-----------------------------------------------------+--------------+---------+
| jobService.multiDatumDataSource.eventModeValue | Change | true |
+-----------------------------------------------------+--------------+---------+
| jobService.multiDatumDataSource.persistModeValue | PollAndEvent | false |
+-----------------------------------------------------+--------------+---------+
Key,Value,Default
schedule,0 * * * * ?,true
jobService.multiDatumDataSource.uid,,true
jobService.multiDatumDataSource.groupUid,,true
jobService.multiDatumDataSource.controlIdRegexValue,,true
jobService.multiDatumDataSource.eventModeValue,Change,true
jobService.multiDatumDataSource.persistModeValue,PollAndEvent,false
[
[
{
"key": "schedule",
"value": "0 * * * * ?",
"default": true
},
{
"key": "jobService.multiDatumDataSource.uid",
"value": "",
"default": true
},
{
"key": "jobService.multiDatumDataSource.groupUid",
"value": "",
"default": true
},
{
"key": "jobService.multiDatumDataSource.controlIdRegexValue",
"value": "",
"default": true
},
{
"key": "jobService.multiDatumDataSource.eventModeValue",
"value": "Change",
"default": true
},
{
"key": "jobService.multiDatumDataSource.persistModeValue",
"value": "PollAndEvent",
"default": false
}
]
]
When generating CSV
output, the --full-csv
option will cause valid Settings CSV
to be generated, which can be directly imported into SolarNode:
s10k instructions settings view --node-id 101 \
--component-id net.solarnetwork.node.datum.control \
--service-id 1 \
--display-mode CSV --full-csv
Note
Any settings that are set to a system default value will be commented out with a leading
#
character. If you want to change that setting value, be sure to un-comment the line
by removing the leading #
.
Key,Type,Value
#net.solarnetwork.node.datum.control.1,schedule,0 * * * * ?
#net.solarnetwork.node.datum.control.1,jobService.multiDatumDataSource.uid,
#net.solarnetwork.node.datum.control.1,jobService.multiDatumDataSource.groupUid,
#net.solarnetwork.node.datum.control.1,jobService.multiDatumDataSource.controlIdRegexValue,
#net.solarnetwork.node.datum.control.1,jobService.multiDatumDataSource.eventModeValue,Change
net.solarnetwork.node.datum.control.1,jobService.multiDatumDataSource.persistModeValue,PollAndEvent
net.solarnetwork.node.datum.control.FACTORY,1,1
You can view the setting specification for a service with the --specification
option,
to understand more about how each setting is configured:
s10k instructions settings view --node-id 101 \
--component-id net.solarnetwork.node.datum.control \
--service-id 1 \
--specification
Note
Note the output is always JSON
when using --specification
.
[
[
{
"type": "net.solarnetwork.settings.CronExpressionSettingSpecifier",
"key": "schedule",
"defaultValue": "0 * * * * ?",
"descriptionArguments": [
"https://github.com/SolarNetwork/solarnetwork/wiki/SolarNode-Cron-Job-Syntax"
]
},
{
"type": "net.solarnetwork.settings.TextFieldSettingSpecifier",
"key": "jobService.multiDatumDataSource.uid"
},
{
"type": "net.solarnetwork.settings.TextFieldSettingSpecifier",
"key": "jobService.multiDatumDataSource.groupUid"
},
{
"type": "net.solarnetwork.settings.TextFieldSettingSpecifier",
"key": "jobService.multiDatumDataSource.controlIdRegexValue"
},
{
"type": "net.solarnetwork.settings.MultiValueSettingSpecifier",
"key": "jobService.multiDatumDataSource.eventModeValue",
"defaultValue": "Change",
"valueTitles": {
"None": "Polled Only",
"Capture": "Sampled",
"Change": "Changed",
"CaptureAndChange": "Sampled and changed"
}
},
{
"type": "net.solarnetwork.settings.MultiValueSettingSpecifier",
"key": "jobService.multiDatumDataSource.persistModeValue",
"defaultValue": "Poll",
"valueTitles": {
"Poll": "Poll",
"PollAndEvent": "Poll and event"
}
}
]
]