Draggon / hassio-hdd-tools

27 stars 13 forks source link

prevents disk spun down #8

Open segator opened 3 years ago

segator commented 3 years ago

I think this addons is preventing disks can go to standby mode, maybe we should check the status of the disk before trying to get data periodically, if disk is in standby mode then not trying to fetch data.

boesing commented 3 years ago

Just curious. Why would you assume your HDD being in standby? In my scenario, the HDD is used as primary data store and thus any state change is constantly written to the Recorder DB. There should be no time for the HDD to be in standby.

Could you tell a bit more about your use case of the HDD you want to monitor?

segator commented 3 years ago

I have secondary disks where I use for backups and other stuff so the disks should be able to go to sleep but are always spinning up.

boesing commented 3 years ago

But why would you need the temperature of those devices? You wont receive any temperature while devices are in "standby" and thus, home assistant assumes the temperature is the last reported temperature over the amount of time which the device is in standby.

These would be false informations as the temperature might be much lower?

TBH: I dont think you should use this extension for non-primary disks.

So we have two options here: You can provide a PR where this feature is implemented or you choose another addon. I am not going to spend any time on this.

segator commented 3 years ago

The problem is the addon dont allow the disk go sleep, i asume the temp wont be readef meanwhile

El mié., 10 mar. 2021 11:12, Maximilian Bösing @.***> escribió:

But why would you need the temperature of those devices? You wont receive any temperature while devices are in "standby" and thus, home assistant assumes the temperature is the last reported temperature over the amount of time which the device is in standby.

These would be false informations as the temperature might be much lower?

TBH: I dont think you should use this extension for non-primary disks.

So we have two options here: You can provide a PR where this feature is implemented or you choose another addon. I am not going to spend any time on this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Draggon/hassio-hdd-tools/issues/8#issuecomment-795193794, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR5IY5WRFSRSAIW2JVP6HDTC5AXJANCNFSM4XHJPOZQ .

boesing commented 3 years ago

Exactly, but what I want to try to tell you is, that if this addon will not update temperatures from the device when its in standby, the sensor wont update aswell. Thus, you end up having weird gaps between the last updated temperature and the temperature which is being updated when the device comes back online.

But it looks like smartctl has a parameter -n which can be passed along with standby,q. The thing is, I would need the return value of the smartctl in that case as I cannot reproduce that and I need some "early exit" logic so the sensor is not updated with invalid data.

It would be great if you provide some informations for us so we can provide a feature targeting this. So what we need is the smartctl output when the device is in standby. You have to pass -n standby,q to smartctl aswell. If the device does not stay in standby when executing smartctl with -n standby,q, that wont be the solution and we might want to dig deeper in there.

segator commented 3 years ago

well you could actually save last valid state and send this until next time disk is running.

boesing commented 3 years ago

Not gonna happen.