I have an old windows machine running HA inside virtualbox. Attached to it are some USB external hard drives that can get a bit warm without a fan running on them.
So I’m looking for a way to get the SMART temperature value of those drives, into somewhere HA can read and then act on a smart plug to turn on or off the fan.
So far the route I’ve taken is to use the windows version of smartctl from here:
And a windows scheduled task to dump out the smart data to a file every 5 minutes, and put it in an SMB share that HA can get hold of to read that data. All this works.
However, when trying to create a sensor to read the file, the configuration appears correct, but when I restart HA, I just don’t get those named sensors turning up when I search for them using the dev tools section.
These are my two different sensor attempts to read the file:
I’m pretty sure the filepath in the file sensor is right, otherwise dev tools complains it can’t find the file, and in the command line sensor version, if I run that in the terminal, it outputs the contents of the file I want.
Any thoughts on why neither show up in dev tools after a restart ?
Or is there a better way to get my HDD temps given that I’m running HA in virtualbox ?
Looked really promising, but doesn’t display any SMART info. I think this is because I’m running inside virtualbox, and I suspect the USB pass through in the VM doesn’t provide this data.
I run ha inside docker container. I didn’t set up scrutiny in container, but I was running this on my debian supervised installation and it worked without any issues.
I also noticed ironically, that scrutiny actually uses smartctl (the command line tool I am using), it just puts a web interface and some nice visuals over the top.
Taking the thought of using a web interface to collect the data from smartctl, I came across:-
Its a tiny light weight web server that I can use to serve files to home assistant via a web interface. This makes it super easy to transfer data between the host running HA (and its hardware), and HA inside the VM.
In this case, I just use smartctl to post log files to a folder that rebex web server can server, then use HA’s restful/scraper/multiscrape interface to grab the data I need.