2022-09-12 04:45:31 +01:00
|
|
|
{
|
|
|
|
"api-version": "v0.0.0",
|
|
|
|
"items": [
|
2022-09-13 02:08:50 +01:00
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": "Best Kaylon",
|
|
|
|
"result_of": 1
|
|
|
|
},
|
2022-09-12 04:45:31 +01:00
|
|
|
{
|
|
|
|
"element": "button",
|
2022-09-13 02:08:50 +01:00
|
|
|
"title": "Tell Me!",
|
2022-09-12 04:45:31 +01:00
|
|
|
"on_click": {
|
|
|
|
"action": "command",
|
2022-09-13 02:08:50 +01:00
|
|
|
"run": "echo ISAAC"
|
2022-09-12 04:45:31 +01:00
|
|
|
}
|
|
|
|
},
|
2022-09-13 02:08:50 +01:00
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": "Smartest Kaylon",
|
|
|
|
"result_of": 1
|
|
|
|
},
|
2022-09-12 04:45:31 +01:00
|
|
|
{
|
|
|
|
"element": "toggle",
|
2022-09-13 02:08:50 +01:00
|
|
|
"title": "Switch",
|
|
|
|
"description": "Toggle me!",
|
2022-09-12 04:45:31 +01:00
|
|
|
"on_toggle": {
|
|
|
|
"action": "command",
|
2022-09-13 02:08:50 +01:00
|
|
|
"run": "echo \"Toggle is now ${KAYLON_VALUE}\""
|
2022-09-12 04:45:31 +01:00
|
|
|
}
|
|
|
|
},
|
2022-09-13 02:08:50 +01:00
|
|
|
{
|
|
|
|
"element": "result-display",
|
2022-09-15 01:39:52 +01:00
|
|
|
"title": " ",
|
2022-09-13 02:08:50 +01:00
|
|
|
"result_of": 3
|
|
|
|
},
|
2022-09-12 04:45:31 +01:00
|
|
|
{
|
|
|
|
"element": "slider",
|
2022-09-13 02:08:50 +01:00
|
|
|
"title": "Slider",
|
2022-09-12 04:45:31 +01:00
|
|
|
"min": 0,
|
2022-09-13 02:08:50 +01:00
|
|
|
"max": 10,
|
2022-09-12 04:45:31 +01:00
|
|
|
"notches": null,
|
|
|
|
"on_set": {
|
|
|
|
"action": "command",
|
2022-09-13 02:08:50 +01:00
|
|
|
"run": "echo \"Slider is now ${KAYLON_VALUE}\""
|
2022-09-12 04:45:31 +01:00
|
|
|
}
|
|
|
|
},
|
2022-09-13 02:08:50 +01:00
|
|
|
{
|
|
|
|
"element": "result-display",
|
2022-09-15 01:39:52 +01:00
|
|
|
"title": " ",
|
2022-09-13 02:08:50 +01:00
|
|
|
"result_of": 5
|
|
|
|
},
|
2022-09-12 04:45:31 +01:00
|
|
|
{
|
|
|
|
"element": "reading",
|
2022-09-13 02:08:50 +01:00
|
|
|
"title": "Fan Speed",
|
|
|
|
"period_ms": 1000,
|
2022-09-12 04:45:31 +01:00
|
|
|
"on_period": {
|
2022-09-15 01:39:52 +01:00
|
|
|
"action": "transform",
|
|
|
|
"target": {
|
|
|
|
"action": "command",
|
|
|
|
"run": "cat /sys/class/hwmon/hwmon5/fan1_input"
|
|
|
|
},
|
|
|
|
"transformer": {
|
|
|
|
"rule": "post-expand",
|
|
|
|
"format": "$KAYLON_VALUE RPM"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "toggle",
|
|
|
|
"title": "Lighthouses",
|
|
|
|
"description": "Turn Valve Index Lighthouses on",
|
|
|
|
"on_toggle": {
|
|
|
|
"action": "transform",
|
|
|
|
"target": {
|
|
|
|
"action": "transform",
|
|
|
|
"target": {
|
|
|
|
"action": "command",
|
|
|
|
"run": "python3 ./bin/lighthouse_ctrl.py ${KAYLON_VALUE}"
|
|
|
|
},
|
|
|
|
"transformer": {
|
|
|
|
"rule": "post-replace",
|
|
|
|
"patterns": [{"pattern": ".*", "format": "Done", "s": true}]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"transformer": {
|
|
|
|
"rule": "pre-replace",
|
|
|
|
"patterns": [
|
|
|
|
{"pattern": "TRUE", "format": "on", "i": true},
|
|
|
|
{"pattern": "FALSE", "format": "off", "i": true}
|
|
|
|
]
|
|
|
|
}
|
2022-09-12 04:45:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"about": {
|
|
|
|
"name": "Test name",
|
|
|
|
"version": "v0.42.0",
|
|
|
|
"description": "Test description",
|
|
|
|
"url": "https://github.com/NGnius/kaylon",
|
|
|
|
"authors": [
|
|
|
|
"NGnius <ngniusness@gmail.com>"
|
|
|
|
],
|
|
|
|
"license": "MIT"
|
|
|
|
}
|
|
|
|
}
|