I am using a QNAP TR-004 USB enclosure (ya i know...) which is getting SMART info (https://github.com/openmediavault/openmediavault/issues/1302) but intermittently.
The webgui's smart status will consistently toggle between 'GOOD' and 'UNKNOWN' while the temperature will sometimes show 'n/a' during refreshes.
Running smartctl will give consistent results but when using omv-rpc, the values are not consistent.
The following are commands ran consecutively to illustrate the changes and provide a comparison (see the 3rd time the command was ran). Full output of both commands in attachment.
QuoteDisplay Moreroot@rock-5b:/var/log# smartctl -d jmb39x-q,0 -a /dev/sda | grep 'assessment\|Temperature_Celsius' && omv-rpc -u admin 'Smart' 'enumerateDevices' | jq -c '.[] | select( .devicename | contains("sda"))'
SMART overall-health self-assessment test result: PASSED
194 Temperature_Celsius 0x0022 039 043 000 Old_age Always - 39 (0 24 0 0 0)
{"devicename":"sda","canonicaldevicefile":"/dev/sda","devicefile":"/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","devicelinks":["/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","/dev/disk/by-path/platform-xhci-hcd.4.auto-usb-0:1:1.0-scsi-0:0:0:0"],"model":"ST3000DM008-2DM166","size":"3000592982016","temperature":39,"description":"TR-004 DISK00 [/dev/sda, 2.72 TiB]","vendor":"QNAP","serialnumber":"Z0382WH3","wwn":"","overallstatus":"GOOD"}
root@rock-5b:/var/log# smartctl -d jmb39x-q,0 -a /dev/sda | grep 'assessment\|Temperature_Celsius' && omv-rpc -u admin 'Smart' 'enumerateDevices' | jq -c '.[] | select( .devicename | contains("sda"))'
SMART overall-health self-assessment test result: PASSED
194 Temperature_Celsius 0x0022 039 043 000 Old_age Always - 39 (0 24 0 0 0)
{"devicename":"sda","canonicaldevicefile":"/dev/sda","devicefile":"/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","devicelinks":["/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","/dev/disk/by-path/platform-xhci-hcd.4.auto-usb-0:1:1.0-scsi-0:0:0:0"],"model":"ST3000DM008-2DM166","size":"3000592982016","temperature":39,"description":"TR-004 DISK00 [/dev/sda, 2.72 TiB]","vendor":"QNAP","serialnumber":"Z0382WH3","wwn":"","overallstatus":"GOOD"}
root@rock-5b:/var/log# smartctl -d jmb39x-q,0 -a /dev/sda | grep 'assessment\|Temperature_Celsius' && omv-rpc -u admin 'Smart' 'enumerateDevices' | jq -c '.[] | select( .devicename | contains("sda"))'
SMART overall-health self-assessment test result: PASSED
194 Temperature_Celsius 0x0022 039 043 000 Old_age Always - 39 (0 24 0 0 0)
{"devicename":"sda","canonicaldevicefile":"/dev/sda","devicefile":"/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","devicelinks":["/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","/dev/disk/by-path/platform-xhci-hcd.4.auto-usb-0:1:1.0-scsi-0:0:0:0"],"model":"ST3000DM008-2DM166","size":"3000592982016","temperature":"","description":"TR-004 DISK00 [/dev/sda, 2.72 TiB]","vendor":"QNAP","serialnumber":"Z0382WH3","wwn":"","overallstatus":"BAD_STATUS"}
root@rock-5b:/var/log# smartctl -d jmb39x-q,0 -a /dev/sda | grep 'assessment\|Temperature_Celsius' && omv-rpc -u admin 'Smart' 'enumerateDevices' | jq -c '.[] | select( .devicename | contains("sda"))'
SMART overall-health self-assessment test result: PASSED
194 Temperature_Celsius 0x0022 039 043 000 Old_age Always - 39 (0 24 0 0 0)
{"devicename":"sda","canonicaldevicefile":"/dev/sda","devicefile":"/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","devicelinks":["/dev/disk/by-id/usb-QNAP_TR-004_DISK00_51368948208707737614-0:0","/dev/disk/by-path/platform-xhci-hcd.4.auto-usb-0:1:1.0-scsi-0:0:0:0"],"model":"ST3000DM008-2DM166","size":"3000592982016","temperature":39,"description":"TR-004 DISK00 [/dev/sda, 2.72 TiB]","vendor":"QNAP","serialnumber":"Z0382WH3","wwn":"","overallstatus":"GOOD"}