You can use either hd-idle plug in, or make use of internal command "hdparm". In both cases you need to create an "autostart.sh" script file which runs when LE boots.
Here is the example how to do it with "hdparm" command for HDD name "sda1":
Get your external HDD name:
Create/edit autostart script
nano /storage/.config/autostart.sh
Set acoustic and power management functions:
hdparm -B 127 -M 254 -S 244 /dev/sda1
autostart.sh script file should look like this:
#!/bin/sh
(
hdparm -B 127 -M 254 -S 244 /dev/sda1
) &
where parameters are:
-B 127 is the highest power management parameter which allows spin-down
-M 254 is the fastest head-movement, if you want a more silent HDD, set this lower
-S is the number that controls the time when to spin down
Examples:
1. hdparm -S 60 /dev/sda1 => spindown in 5min
2. hdparm -S 120 /dev/sda1 => spindown in 10min
(I use 2. example and am not using -B and -M parameter)
My autostart.sh:
#!/bin/sh
(sleep 60;
hdparm -S 60 /dev/sda1
)&
It waits 60sec before it executes (sleep 60) to give enough time for drive to mount.
If it does not work, check that the autostart.sh script resides in /storage/.config/ folder.
BTW, you can create/copy (my) autostart.sh on a windows PC using Notepad++ editor, save it as autostart.sh and copy it with LE/Kodi File Manager to SD card /storage/.config/
Note: if you'll use Notepad++ when saving file choose "Save as" and then choose "Unix script lile .sh" to get proper file format.