Skip to content

Instantly share code, notes, and snippets.

@stfclv
Forked from amercier/synology-scheduled-tasks.md
Created September 29, 2022 23:59
Show Gist options
  • Save stfclv/f7d04476c41cdacbd588bb16fc6ca807 to your computer and use it in GitHub Desktop.
Save stfclv/f7d04476c41cdacbd588bb16fc6ca807 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