Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Turn leds on/off on Synology DiskStation

Synology scheduled tasks


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


Codes have been taken from this article.

  • turns leds off
  • turn leds back on

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

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
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
Copy link

pquerner commented Jan 1, 2016

Nice. ;)

Copy link

mikkelnl commented Jun 25, 2016

Hi! This doesn't seem to work on DSM 6 because it changed the way root works, can you expand your script to work on DMS 6 maybe?

Copy link

kostasns commented Aug 26, 2016

Works fine for me on DSM 6. Just select user 'root' under General Settings.

Copy link

whispy commented Aug 31, 2016

It doesn't work for me on DSM 6 with root selected.

Copy link

m11y commented Sep 25, 2016

Doesn't work for on DSM 6.0, device model: DS212j.

Copy link

ghost commented Oct 4, 2016

Very cool, thank you

Copy link

dstancioff commented Oct 21, 2016

Turns off my Power and status light, but not LAN or USB. DSM 6.0, DS216j

Copy link

neddy commented Feb 15, 2017

Hey Guys, thanks for the script, I really appreciate it... I've just found that in DSM there is actually a feature now to completely control the LEDs. It's under 'Control Panel>Hardware & Power>LED Brightness Control' it allows you to completely turn off the LEDs and to set a schedule too... Hopefully this helps someone. Cheers

Copy link

Kirdock commented Feb 19, 2017

The setting "LED Brightness Control" does not exist on my NAS. (DS1515+; DSM 6.0.2-8451 Update 9).
Does nobody has a solution for LAN LED?

Copy link

mornology commented Aug 12, 2017

I have the RS3617xs with DSM 6.1.3-15152 Update 1 and the LED options within control panel do not exist. I used the script trick with the DS1515+ but once I updated that system to DSM 6.0 it no longer worked. I tried the script with my RS3617xs but only the power button goes out, not the insanely bright HDD lights.

Copy link

mosauter commented Dec 29, 2017

Has anybody tried that with a extension unit? In my case a DX513. Cause the main module has a led control via the website but I seem to be unable to find the settings for the extension...

Copy link

vistalba commented Jul 25, 2018

For me only Power, Status and USB works on DS211+ :(
The option to control the LED from Synology itself is only avaiable on newer devices. (DS916+ in my case).

Is there a way also to switch off LAN, DISC1 and DISC2? That would be great for me :)

Copy link

johnflan commented Dec 30, 2018

Thanks for this, like some of the people it works for power LEDs etc but not for disk activity LEDs.

Copy link

howdey57 commented Jan 1, 2019

Does anyone know the codes to turn off the LAN, DISC1 and DISC2 lights too?


Copy link

sniarn commented Feb 17, 2019

Thanks for this. The blue power LED was driving me nuts (ds3617xs).

Copy link

neolith commented Aug 12, 2020

Awesome! Thank you so much!

Copy link

stevenfoxhound commented Feb 10, 2021

Function code working from Task scheduler script on the DSM or from SSH:

echo 0 >/dev/ttyS1 Power on
echo 1 >/dev/ttyS1 Power off
echo 2 >/dev/ttyS1 Short beep
echo 3 >/dev/ttyS1 Long beep
echo 4 >/dev/ttyS1 Power LED on
echo 5 >/dev/ttyS1 Power LED flash
echo 6 >/dev/ttyS1 Power LED off
echo 7 >/dev/ttyS1 Status LED off
echo 8 >/dev/ttyS1 Status LED on green
echo 9 >/dev/ttyS1 Status LED flash green
echo A >/dev/ttyS1 USBCopy LED flash
echo B >/dev/ttyS1 USBCopy LED off
echo C >/dev/ttyS1 Reset
echo @ >/dev/ttyS1 USBCopy LED on
echo : >/dev/ttyS1 Status LED on orange
echo ; >/dev/ttyS1 Status LED flash orange

You can mix several code together.

echo 48 >/dev/ttyS1 Power LED on + Status LED on green

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