Skip to content

Command Widgets

Jefferey Neuffer edited this page Apr 25, 2021 · 1 revision

Command Widgets allows you to run shell commands, scripts and applications and display the results in the dashboard. This is a versatile method to extend the dashboard. You can configure multiple Command Widgets for different purposes. Each Widget has a selectable icon and a displayname. The stdout output from the configured command will be displayed as the widget value. The commands will be executed by the OctoPrint server every 60 seconds with the privileges of the OctoPrint system user. Make sure to use full paths to each command that is not built into the system shell.

Echo Hello World #This will return "Hello World" and display that in the widget

/opt/vc/bin/vcgencmd measure_volts | tr -d "volt=" #This will return the RPi core voltage

snmpwalk -v 1 -One -c public 192.168.0.13 .1.3.6.1.4.1.8072.1.3.2.3.1.2.10.117.112.115.46.115.116.97.116.117.115 | awk -F'"' '{print $2}'

Note! Make sure that the command returns a text string that fits in the value field. Also make sure that the command actually returns within a reasonable time.