2022-09-18 23:00:46 +01:00
|
|
|
{
|
|
|
|
"api-version": "v0.0.0",
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": "Best Kaylon",
|
|
|
|
"result_of": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "button",
|
|
|
|
"title": "Tell Me!",
|
|
|
|
"on_click": {
|
|
|
|
"action": "command",
|
|
|
|
"run": "echo ISAAC"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": "Smartest Kaylon",
|
|
|
|
"result_of": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "toggle",
|
|
|
|
"title": "Switch",
|
|
|
|
"description": "Toggle me!",
|
|
|
|
"on_toggle": {
|
|
|
|
"action": "command",
|
|
|
|
"run": "echo \"Toggle is now ${CAYLON_VALUE}\""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": " ",
|
|
|
|
"result_of": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "slider",
|
|
|
|
"title": "Slider",
|
|
|
|
"min": 0,
|
|
|
|
"max": 10,
|
|
|
|
"notches": null,
|
|
|
|
"on_set": {
|
|
|
|
"action": "command",
|
|
|
|
"run": "echo \"Slider is now ${CAYLON_VALUE}\""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": " ",
|
|
|
|
"result_of": 5
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "reading",
|
2023-02-19 03:24:54 +00:00
|
|
|
"title": "Fan Speed Frozen",
|
2022-09-18 23:00:46 +01:00
|
|
|
"period_ms": null,
|
|
|
|
"on_period": {
|
|
|
|
"action": "sequence",
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"action": "command",
|
|
|
|
"run": "cat /sys/class/hwmon/hwmon5/fan1_input"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"action": "transform",
|
|
|
|
"transformer": {
|
|
|
|
"rule": "expand",
|
|
|
|
"format": "$CAYLON_VALUE RPM"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "toggle",
|
|
|
|
"title": "Lighthouses",
|
|
|
|
"description": "Turn Valve Index Lighthouses on",
|
|
|
|
"on_toggle": {
|
|
|
|
"action": "sequence",
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"action": "transform",
|
|
|
|
"transformer": {
|
|
|
|
"rule": "replace",
|
|
|
|
"patterns": [
|
|
|
|
{"pattern": "TRUE", "format": "on", "i": true},
|
|
|
|
{"pattern": "FALSE", "format": "off", "i": true}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"action": "command",
|
|
|
|
"run": "python3 ./bin/lighthouse_ctrl.py ${CAYLON_VALUE}"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"action": "transform",
|
|
|
|
"transformer": {
|
|
|
|
"rule": "replace",
|
|
|
|
"patterns": [{"pattern": ".*", "format": "Done", "s": true}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "slider",
|
|
|
|
"title": "JS Test",
|
|
|
|
"min": 0,
|
|
|
|
"max": 10,
|
|
|
|
"notches": null,
|
|
|
|
"on_set": {
|
|
|
|
"action": "javascript",
|
2023-02-19 03:24:54 +00:00
|
|
|
"run": "console.warn(\"YAAAAAAAAAAAAAAAAAAAAAAAAAAAARG JS Slider is now\", CAYLON_VALUE); \"JS Result \" + CAYLON_VALUE"
|
2022-09-18 23:00:46 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "result-display",
|
|
|
|
"title": "JS Test says",
|
|
|
|
"result_of": 9
|
2022-10-13 22:53:44 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "event-display",
|
|
|
|
"title": "Now Playing",
|
|
|
|
"event": "game-start",
|
|
|
|
"on_event": {
|
|
|
|
"action": "json",
|
|
|
|
"jmespath": "join(' ', [action, to_string(gameID)])"
|
|
|
|
}
|
2022-12-04 01:24:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "event-display",
|
|
|
|
"title": "JSON -> JS -> Out",
|
|
|
|
"event": "game-start",
|
|
|
|
"on_event": {
|
|
|
|
"action": "sequence",
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"action": "json",
|
|
|
|
"jmespath": "join(' ', [action, to_string(gameID)])"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"action": "javascript",
|
|
|
|
"run": "console.warn(\"TEST CAYLON game started\", CAYLON_VALUE); CAYLON_VALUE"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2023-02-19 03:24:54 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"element": "reading",
|
|
|
|
"title": "Fan Speed fast",
|
|
|
|
"period_ms": 100,
|
|
|
|
"on_period": {
|
|
|
|
"action": "sequence",
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"action": "command",
|
|
|
|
"run": "cat /sys/class/hwmon/hwmon5/fan1_input"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"action": "transform",
|
|
|
|
"transformer": {
|
|
|
|
"rule": "expand",
|
|
|
|
"format": "$CAYLON_VALUE RPM"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2022-09-18 23:00:46 +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"
|
|
|
|
}
|
|
|
|
}
|