New Integration: Scrutiny – Monitor Your HDD/SSD SMART Data in Home Assistant

Hi everyone! :wave:

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.

:electric_plug: 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

:gear: Use cases:

  • Create automations to notify you if a drive shows signs of failure
  • Display current drive stats on your dashboards

:brick: Setup:

  1. Install Scrutiny (using Docker is very straightforward)
  2. Install this custom integration via HACS or manually
  3. Configure it with the host and port of your Scrutiny API

:package: https://github.com/vitals5/ha_scrutiny

I’d love to hear your feedback or suggestions! Let me know if you run into any issues, and feel free to contribute if you’re interested.

Thanks

2 Likes

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.

1 Like

Hey Michael,

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.

That worked well. Thanks.

Hello! Thank you for the integration! Allows me to remove the rest sensors and gain more info!

A few questions:

Would it be possible to clean up the Entity IDs and names? Looks like many have the sensor details duplicated.

Name Entity ID
SMART percentage_used Percentage Used sensor.shgp31_2000gm_nvme0_smart_percentage_used_percentage_used
SMART available_spare Available Spare sensor.shgp31_2000gm_nvme0_smart_available_spare_available_spare
SMART critical_warning Critical Warning sensor.shgp31_2000gm_nvme0_smart_critical_warning_critical_warning
SMART media_errors Media Errors sensor.shgp31_2000gm_nvme0_smart_media_errors_media_errors
SMART num_err_log_entries Numb Err Log Entries sensor.shgp31_2000gm_nvme0_smart_num_err_log_entries_numb_err_log_entries

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. :+1:

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.

  1. open the Scrutiny webpage with the main summary dashboard (e.g. with Chrome-browser)
  2. press F12 to open the developers tools
  3. select there the “Network” tab
  4. then select in the Scrutiny dashboard one of the drives → it will change to the details overview of the selected drive
  5. in the network table you will see a new entry “details” → klick on it and select the tab “Answer”
  6. Here you should see answer data of the API in JSON format. Please copy the whole text and send it to me.

How it looks like:

Thank you!

Thanks for looking into this. Unfortunately no change in the Name or Entity IDs for the smart sensors.

Thank you for providing the JSON data.
That was very helpful. :+1:
I have adjusted the logic. The name formation should now work also for nvme drives.
Please try the pre-release v0.3.3

1 Like

Works perfectly, thanks!

1 Like