Hi together,
as promised here comes the more integrated Solution for the setSleep Function to be used in conjuntion with the sdparm Bitbake Package to be build first and included in the Image. All parts are tested.
This Patch should fix the issue, when some external connected USB-HDD (like in IMS case) won't Spin down (Standby).
under def startIdle must be changed lines for external usb disk too:
# disable HDD standby timer
if self.bus() == "External":
Console().ePopen(("sdparm", "sdparm", "--set=SCT=0", self.disk_path))
else:
Console().ePopen(("hdparm", "hdparm", "-S0", self.disk_path))