HDD SMART data add-on

Yes, something changed in Home Assistant that now we need to disable protection mode :frowning:

I opened two issues without luck:

So at least for the moment we need to disable de protection mode.

If someone is interested, I have published version 0.51.0 that includes attributes to let Home Assistant store the temperature as long term statistic…

Tried to set it up but get an error:

[Tue Dec 28 19:56:34 AWST 2021][INFO] Sensor value: 47°
[Tue Dec 28 19:56:34 AWST 2021][INFO] Sensor update response code: 400
[Tue Dec 28 19:56:34 AWST 2021][INFO] Cron tab SMART update
[Tue Dec 28 19:56:34 AWST 2021][INFO] Cron tab database update ENABLED
[Tue Dec 28 19:56:34 AWST 2021][INFO] Updating drives database...
[Tue Dec 28 19:56:38 AWST 2021][INFO] /usr/share/smartmontools/drivedb.h updated from branches/RELEASE_7_2_DRIVEDB
[Tue Dec 28 19:56:38 AWST 2021][INFO] Apply cron tab
[Tue Dec 28 19:56:38 AWST 2021][INFO] Device /dev/sda found - starting CRON
jq: error: syntax error, unexpected '{', expecting $end (Unix shell quoting issues?) at <top-level>, line 2:
{}
jq: 1 compile error

:pleading_face:

[Fri Dec 31 15:27:08 MSK 2021][INFO] HDD Tools start
[Fri Dec 31 15:27:08 MSK 2021][INFO] Configuration - sensor state type: temperature
[Fri Dec 31 15:27:08 MSK 2021][INFO] Configuration - performance check enabled: false
[Fri Dec 31 15:27:08 MSK 2021][INFO] Configuration - disk path: /dev/nvme0n1
[Fri Dec 31 15:27:08 MSK 2021][INFO] Configuration - check period: 10
[Fri Dec 31 15:27:08 MSK 2021][INFO] Configuration - database update: false
[Fri Dec 31 15:27:09 MSK 2021][INFO] Configuration - database update period: 168
[Fri Dec 31 15:27:09 MSK 2021][INFO] Configuration - output file: temp.log
[Fri Dec 31 15:27:09 MSK 2021][INFO] Configuration - attributes property: smart_status
[Fri Dec 31 15:27:09 MSK 2021][INFO] Init run
[Fri Dec 31 15:27:09 MSK 2021][INFO] Sensor value as temperature: 44
[Fri Dec 31 15:27:09 MSK 2021][DEBUG] Sensor data before attributes: {"state": "44", "attributes": {"unit_of_measurement":"°C","friendly_name":"SSD Temp","device_class":"temperature","state_class":"measurement"}}
jq: error (at <stdin>:1): Cannot index boolean with string "name"
jq: error: syntax error, unexpected $end (Unix shell quoting issues?) at <top-level>, line 1:
.attributes +=               
jq: 1 compile error

Thanks for the addon. I’ve some problems though:

I’m using RPI4 with an USB to NVME adapter. The addon is reporting “null” temperature. Poking with the addon container I found that this kind of adapter needs a special parameter for smartctl, so this command line works for me:

smartctl --all -d sntjmicron /dev/sda

Can you add an option to specify the -d TYPE to smartctl? Maybe add a bit of documentation to point the reader to this fact. Thank you!

1 Like

Can you open an issue in the GitHub repo?

I get everytime value 0 - maybe my ssd-usb adapter cant provide those infos?

Is there any way to get a SMART data from a remote Windows host?

When I install an addon in HASSIO on Raspberry Pi I see an installation error:

The command '/bin/ash -o pipefail -c apk add --no-cache coreutils util-linux ncurses build-base make fio hdparm perl smartmontools vim apk-cron gnupg' returned a non-zero code: 12

Possibly a command line error.

I’ve sent a PR to be able to specify a device type. This probably will permit to people getting “null” to search for a solution. In the meantime the PR is accepted (if ever), you can install the addon from here GitHub - eroldan/hassio-hdd-tools and use the new “Device type” parameter.

Any updates since early 2021 regarding the issue of getting a null temperature value? I do have protection mode disabled and I got response code 200 in the log so everything looks right but still get null. I’m running a Raspberry Pi 4B with external SSD.