So the script updates I made are working now, to include monitoring of drive state and to not measure drive temperatures when they’re sleeping, which prevents them from waking back up. I’ve set my interval at 900, or 15 minutes. If it’s set to 10 minutes or less, you risk having the script keep the drives awake by checking their temperatures, since WD sleeps them after 10 minutes of inactivity. Some additional coding could remove this limitation.
See the logging below. When the program had started, the drives had been sleeping for several hours before I copied the latest version of the program over and ran it. So with a 10-20 minute interval of the drives on, the system temperature increased by 3C, and then began cooling down again when the drives went back to sleep. It’s clear that, with the drives sleeping, the system temperature does stay a lot lower, as shown here. So for people that are concerned about temperatures, enabling the drives to sleep may help. The other quirk to get them to sleep successfully is to change the Twonky rescan interval for enabled media servers, as the default is to scan continuously (sigh).
I also like this latest version because I can see in the logging if my drives are sleeping, which could help people to troubleshoot items that may be keeping them awake (like a persistent Twonky scan).
2017-07-26 16:27:14 program_fan - STATUS: Temperatures... Sys: 46 Hd1: 34 Hd2: 34 - Drive Status... Hd1: Active Hd2: Active - Fan... Index: 0 Speed: 0 RPM
2017-07-26 16:42:20 program_fan - STATUS: Temperatures... Sys: 49 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM
2017-07-26 16:57:25 program_fan - STATUS: Temperatures... Sys: 48 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM
2017-07-26 17:12:30 program_fan - STATUS: Temperatures... Sys: 48 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM
2017-07-26 17:27:36 program_fan - STATUS: Temperatures... Sys: 47 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM
2017-07-26 17:42:41 program_fan - STATUS: Temperatures... Sys: 47 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM
2017-07-26 17:57:46 program_fan - STATUS: Temperatures... Sys: 47 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM
2017-07-26 18:12:51 program_fan - STATUS: Temperatures... Sys: 47 Hd1: NA Hd2: NA - Drive Status... Hd1: Standby Hd2: Standby - Fan... Index: 0 Speed: 0 RPM