Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wittyfilter/7ff3635e14173ac5dee8a846e4f6ea04 to your computer and use it in GitHub Desktop.
Save wittyfilter/7ff3635e14173ac5dee8a846e4f6ea04 to your computer and use it in GitHub Desktop.
Turn leds on/off on Synology DiskStation

Synology scheduled tasks

Usage

Go to Control Panel / Task Scheduler and add the content of these scripts as root scripts.

Leds

Codes have been taken from this article.

  • turn-leds-off.sh: turns leds off
  • turn-leds-on.sh: turn leds back on

Ex (this is how I use it): turn leds daily at 10PM, turn them back on at 6AM.

#!/bin/sh
printf \\x36 > /dev/ttyS1 # UART2_CMD_LED_POWER_OFF
printf \\x37 > /dev/ttyS1 # UART2_CMD_LED_HD_OFF
printf \\x42 > /dev/ttyS1 # UART2_CMD_LED_USB_OFF
printf \\x4B > /dev/ttyS1 # UART2_CMD_LED_10G_LAN_OFF
printf \\x50 > /dev/ttyS1 # UART2_CMD_LED_MIRROR_OFF
#!/bin/sh
printf \\x34 > /dev/ttyS1 # UART2_CMD_LED_POWER_ON
printf \\x38 > /dev/ttyS1 # UART2_CMD_LED_HD_GS
printf \\x40 > /dev/ttyS1 # UART2_CMD_LED_USB_ON
printf \\x4A > /dev/ttyS1 # UART2_CMD_LED_10G_LAN_ON
printf \\x51 > /dev/ttyS1 # UART2_CMD_LED_MIRROR_GS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment