Skip to content

Instantly share code, notes, and snippets.

@amercier
Last active July 3, 2026 21:52
Show Gist options
  • Select an option

  • Save amercier/e64ee30eb3f96fcc42e3 to your computer and use it in GitHub Desktop.

Select an option

Save amercier/e64ee30eb3f96fcc42e3 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
@Dragodraki

Dragodraki commented Jul 3, 2026

Copy link
Copy Markdown

Does anyone know how to reset all LEDs (including the Power LED, Status LED and USBCopy LED)? I would have "Automatic" back so that my NAS colors them according the the disk state again (green blinking for okay, orange for failures etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment