HDD SMART data add-on

Hi All,

For those who want to know HDD temp (+ all HDD S.M.A.R.T data attributes) and are using HASS.IO I’ve created simple addon that monitors disk temp using smartctl. Addons schedules CRON and provide data in HA via sensor.hdd_temp.

It’s more like alfa version but works fine.
Repo: https://github.com/Draggon/hassio-hdd-tools

Thanks
Michal

4 Likes

Does this offer anything over and above the hddtemp integration? I assume it’s possible to run hddtemp on a HASS.IO installation?

image

Hi

Yes it will report all S.M.A.R.T data soon.

In my case hddtemp integration did not work because I’m on RPI4 booting form SD card and then switching to SSD. Home assistant is not aware of sda disk.

1 Like

And it’s there - new version provides all S.M.A.R.T data as attributes + full output of smartctl in log file.

I’ve added execution of https://jamesachambers.com/raspberry-pi-storage-benchmarks-2019-benchmarking-script - so now it’s possible to check the performance of our HDD. Test is being executed on add-od start and output is in file: /share/hdd_tools/performance.log

1 Like

Hello!

I am only getting these strange results:

[Thu Oct  8 16:53:00 CEST 2020][Info] Sensor value: 0)°
[Thu Oct  8 16:53:00 CEST 2020][Info] Sensor update response code: 200
[Thu Oct  8 16:54:00 CEST 2020][Info] Sensor value: 0)°
[Thu Oct  8 16:54:00 CEST 2020][Info] Sensor update response code: 200
[Thu Oct  8 16:55:00 CEST 2020][Info] Sensor value: 0)°
[Thu Oct  8 16:55:00 CEST 2020][Info] Sensor update response code: 200
[Thu Oct  8 16:56:00 CEST 2020][Info] Sensor value: 0)°
[Thu Oct  8 16:56:00 CEST 2020][Info] Sensor update response code: 200

Here is my results:

[Wed Oct 28 20:35:01 SAST 2020][Info] Sensor value: 33/33)
99°
[Wed Oct 28 20:35:01 SAST 2020][Info] Sensor update response code: 400

But I do not see the sensor.hdd_temp. It was not created by the add on. Any suggestion?

Was looking for possibility of jamesachambers performance test which is not possible (or at least easy) to proceed on HassOS
But start with test is restarting my RPi. Is it normal?

And not always show the score:

     Category                  Test                      Result              
HDParm                    Disk Read                  MB/s                    
HDParm                    Cached Disk Read           MB/s                    
DD                        Disk Write                143 MB/s                 
FIO                       4k random read             IOPS ( KB/s)            
FIO                       4k random write            IOPS ( KB/s)            
IOZone                    4k read                   9324 KB/s                
IOZone                    4k write                  15390 KB/s               
IOZone                    4k random read            6279 KB/s                
IOZone                    4k random write           6340 KB/s                
                          Score:                                             
Compare with previous benchmark results at:

But I do have sensor :slight_smile:
but with state null :frowning:

Today I found this in the Supervisor log file:

21-02-08 13:11:55 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of HDD Tools
21-02-08 13:11:55 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'devices' use a deprecated format, the new format uses a list of paths only. Please report this to the maintainer of HDD Tools

This addon has stopped working since Supervisor 2021.02.11. It seems something has changed in the permissions, if I enter the docker and I execute the command manually I get:

ash-5.1# smartctl -a /dev/sda
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-5.4.83-v8] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Operation not permitted

Someone knows if this can be fixed in some way?

1 Like

If someone is interested, I’ve pushed some code to the addon and now, version 0.50, it must be working again.
If someone finds some problem, please open an issue in the repo.

Here it is working fine again!
Thank you!

Thank you for your work, great job! This is exactly what I was looking for. Is it possible to monitor more than one device?

where?please?
thank you

My code is at the official repo.

ok thanks, but i not have the link
could you give me the link please?
sorry

thanks!

It’s at the first post: https://github.com/Draggon/hassio-hdd-tools

Sorry but unfortunately I keep getting this error:

[Fri Oct 15 11:03:22 CEST 2021] [INFO] Init run
[Fri Oct 15 11:03:23 CEST 2021] [INFO] Sensor value: null °
[Fri Oct 15 11:03:23 CEST 2021] [INFO] Sensor update response code: 200
[Fri Oct 15 11:03:23 CEST 2021] [INFO] Cron tab SMART update
[Fri Oct 15 11:03:23 CEST 2021] [INFO] Cron tab database update ENABLED
[Fri Oct 15 11:03:23 CEST 2021] [INFO] Updating drives database …
[Fri Oct 15 11:03:26 CEST 2021] [INFO] /usr/share/smartmontools/drivedb.h updated from branches / RELEASE_7_2_DRIVEDB
[Fri Oct 15 11:03:26 CEST 2021] [INFO] Apply cron tab
[Fri Oct 15 11:03:26 CEST 2021] [INFO] Device / dev / sda found - starting CRON
[Fri Oct 15 11:04:01 CEST 2021] [INFO] Sensor value: null °
[Fri Oct 15 11:04:01 CEST 2021] [INFO] Sensor update response code: 200

i use HASSIO on rapsberry PI4 with SSD, can you help?
thank you very much

I did installed it yesterday, no problem working good.
Sensor update response code: 200 = good.
Try to disable Protection Mode.

YESSSS!!! it works! Thanks was the protection mode enabled! I disabled it and now it works thank you very much!