Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions rinkhals-webui/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,14 @@ actions:
triggers:
- Refresh ACE status

# - title: Toggle LED
# icon: <iconify-icon icon="mdi:lightbulb"></iconify-icon>

- title: Turn LED on
icon: <iconify-icon icon="mdi:lightbulb-on"></iconify-icon>
shell: './scripts/set-led.sh 1'

- title: Turn LED off
icon: <iconify-icon icon="mdi:lightbulb-outline"></iconify-icon>
shell: './scripts/set-led.sh 0'

- title: Refresh ACE status
icon: <iconify-icon icon="mdi:refresh"></iconify-icon>
Expand Down Expand Up @@ -226,6 +232,11 @@ dashboards:
- title: Stop drying {{ ace.action_marker }}
entity: ace
cssClass: 'if-enabled-{{ ace.is_drying }}'
- title: 'LED'
type: fieldset
contents:
- title: Turn LED on
- title: Turn LED off

- title: System
contents:
Expand Down
4 changes: 4 additions & 0 deletions rinkhals-webui/lighttp-proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$HTTP["url"] =~ "^/(Apps|Control|System)" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 1414 ) ) )
proxy.header = ( "upgrade" => "enable" )
}
9 changes: 9 additions & 0 deletions rinkhals-webui/scripts/set-led.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

STATE=$1
if [ "$STATE" != "1" ]; then
STATE=0
fi

cd "$(dirname "$0")"
./klippy-command.sh '{"method":"led/set_led","params":{"S":'$STATE'},"id":37}'