I’ve just released a new custom integration for Home Assistant that connects to Scrutiny – a powerful web-based S.M.A.R.T. monitoring tool.
I built this integration because I was looking for an easy and reliable way to monitor the health of my hard drives and SSDs (on my server and NAS) directly from within Home Assistant. Scrutiny provides detailed S.M.A.R.T. data and is super easy to deploy.
What the integration does:
Connects to your running Scrutiny instance
Adds each drive as a device in Home Assistant
Exposes key SMART attributes like temperature, reallocated sectors, power-on hours, and many more
Monitors the overall health status of each drive
Use cases:
Create automations to notify you if a drive shows signs of failure
Display current drive stats on your dashboards
Setup:
Install Scrutiny (using Docker is very straightforward)
Install this custom integration via HACS or manually
Configure it with the host and port of your Scrutiny API
Very nice. It would be good if the entity ids included the device (eg. sda). My 4 drives ended up being called (for example) sensor.smart_1_read_error_rate then _2, _3, _4. And so on for each sensor, and since there’s so many it’s too painful to rename manually.
It might also be nice to create the non-critical sensors as disabled so there’s not so many.
thanks for testing and your good suggestions. I have implemented them. Please download the new release v0.3.1
You have to remove and reinsert your scrutiny instance after that.
Edit: appears there are many more hidden entities that also have this issue.
Also, if any of the tests fail, will they raise a repair issue?
One other thing, does it make sense to change the sensors to binary sensors with a “problem” device class? Seems this might closer fit home assistant device classes.
Thank you for reporting!
I have doublechecked all my entity ids and they are ok.
But I have only SATA hdd and ssd. In your case, I see you have a NVME ssd. And your ssd seems to be has more or different attributes, than mine.
But I will check the code, if there is something, what could cause this behaviour.
If some SMART attribute sensors show “Failed”, they will not raise a repair issue.
I use an automation for the “Overall Device Status”. It creates a persistent notification, if the status changes to something else then “Passed”.
As I understood, the repair issues are more for home assistant related problems. To be honest, I have never seen any issue there from other integrations.
The SMART attr sensors are not binary, because the Scrutiny API currently delivers more than 2 possible states:
Passed, Failed (S.M.A.R.T.), Warning (Scrutiny), Failed (Scrutiny)
Please try the pre-release v0.3.2.
You have to select and re-download it in HACS. Hopefully it will solve the problem with the double names in entity ids. Perhaps you have to re-add your devices.
Let me know if it works or not.
If not, it would be very helpful if you could send me the response-data of the Scrutiny API. This would help me to understand the difference to my data.
open the Scrutiny webpage with the main summary dashboard (e.g. with Chrome-browser)
press F12 to open the developers tools
select there the “Network” tab
then select in the Scrutiny dashboard one of the drives → it will change to the details overview of the selected drive
in the network table you will see a new entry “details” → klick on it and select the tab “Answer”
Here you should see answer data of the API in JSON format. Please copy the whole text and send it to me.
Thank you for providing the JSON data.
That was very helpful.
I have adjusted the logic. The name formation should now work also for nvme drives.
Please try the pre-release v0.3.3
This perfect ! Thank you for making this, it worked perfect for running Truenas as a VM under Proxmox, then HA in a docker container in a Ubuntu VM and get the HD data into HA!