tomaae / homeassistant-openmediavault

OpenMediaVault integration for Home Assistant
Apache License 2.0
109 stars 16 forks source link

[Bug] Integration is not starting up after update #111

Closed AlexShishko closed 1 year ago

AlexShishko commented 1 year ago

Describe the issue

Integration is not starting up after update

How to reproduce the issue

Steps to reproduce the behavior:

  1. Clear old OMV integration
  2. Update integration via HACS from 1.3.0 to 1.4.0
  3. See error

Expected behavior

It should work)

Traceback/Error logs

Got log: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/openmediavault/init.py", line 35, in async_setup_entry await controller.async_update() File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update await self.hass.async_add_executor_job(self.get_smart) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart tmp_data = parse_api( File "/config/custom_components/openmediavault/apiparser.py", line 153, in parse_api data = fill_vals(data, entry, uid, vals) File "/config/custom_components/openmediavault/apiparser.py", line 285, in fill_vals data[uid][_name] = from_entry(entry, _source, default=_default) File "/config/custom_components/openmediavault/apiparser.py", line 51, in from_entry ret = int(ret) ValueError: invalid literal for int() with base 10: '24330h+33m+29.906s'

Additional context

OMV ver 6.3.10-2 (Shaitan) Works on ESXI 7.3 May be linked to: "openmediavault-cputemp - Crashed integration if sensor is not available on OS " cos it's in virtual machine

tomaae commented 1 year ago

thats a wild smart reply, I need to see debug, so we see what it is related to.

joseska commented 1 year ago

same here... v1.3.0 work perfect....

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/openmediavault/init.py", line 35, in async_setup_entry await controller.async_update() File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update await self.hass.async_add_executor_job(self.get_smart) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/openmediavault/omv_controller.py", line 331, in get_smart self.data["disk"] = parse_api( File "/config/custom_components/openmediavault/apiparser.py", line 157, in parse_api data = fill_vals(data, entry, uid, vals) File "/config/custom_components/openmediavault/apiparser.py", line 289, in fill_vals data[uid][_name] = from_entry(entry, _source, default=_default) File "/config/custom_components/openmediavault/apiparser.py", line 53, in from_entry ret = int(ret) ValueError: invalid literal for int() with base 10: '44°C'

AlexShishko commented 1 year ago

thats a wild smart reply, I need to see debug, so we see what it is related to.

How can i help you?

Shinigami777 commented 1 year ago

I have exactly the same problem after the update.

Ten błąd pochodzi z niestandardowej integracji.

Logger: homeassistant.config_entries
Source: custom_components/openmediavault/apiparser.py:53
Integration: OpenMediaVault (documentation, issues)
First occurred: 20:39:06 (1 occurrences)
Last logged: 20:39:06

Error setting up entry OMV for openmediavault
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/openmediavault/__init__.py", line 35, in async_setup_entry
    await controller.async_update()
  File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update
    await self.hass.async_add_executor_job(self.get_smart)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart
    tmp_data = parse_api(
  File "/config/custom_components/openmediavault/apiparser.py", line 157, in parse_api
    data = fill_vals(data, entry, uid, vals)
  File "/config/custom_components/openmediavault/apiparser.py", line 289, in fill_vals
    data[uid][_name] = from_entry(entry, _source, default=_default)
  File "/config/custom_components/openmediavault/apiparser.py", line 53, in from_entry
    ret = int(ret)
ValueError: invalid literal for int() with base 10: '1429h+00m+00.000s'
tomaae commented 1 year ago

same here... v1.3.0 work perfect....

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/openmediavault/init.py", line 35, in async_setup_entry await controller.async_update() File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update await self.hass.async_add_executor_job(self.get_smart) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/openmediavault/omv_controller.py", line 331, in get_smart self.data["disk"] = parse_api( File "/config/custom_components/openmediavault/apiparser.py", line 157, in parse_api data = fill_vals(data, entry, uid, vals) File "/config/custom_components/openmediavault/apiparser.py", line 289, in fill_vals data[uid][_name] = from_entry(entry, _source, default=_default) File "/config/custom_components/openmediavault/apiparser.py", line 53, in from_entry ret = int(ret) ValueError: invalid literal for int() with base 10: '44°C'

thats actually different issue. this is OMV fault, OP is is smart response issue.

tomaae commented 1 year ago

thats a wild smart reply, I need to see debug, so we see what it is related to.

How can i help you?

send me debugs capturing this issue. I need to see what is that value of and why. could be just ESX filling in fake random data

korbendallas78 commented 1 year ago

same here

korbendallas78 commented 1 year ago

Error setting up entry OMV for openmediavault Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/openmediavault/init.py", line 35, in async_setup_entry await controller.async_update() File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update await self.hass.async_add_executor_job(self.get_smart) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/openmediavault/omv_controller.py", line 331, in get_smart self.data["disk"] = parse_api( File "/config/custom_components/openmediavault/apiparser.py", line 157, in parse_api data = fill_vals(data, entry, uid, vals) File "/config/custom_components/openmediavault/apiparser.py", line 289, in fill_vals data[uid][_name] = from_entry(entry, _source, default=_default) File "/config/custom_components/openmediavault/apiparser.py", line 53, in from_entry ret = int(ret) ValueError: invalid literal for int() with base 10: '25°C'

AlexShishko commented 1 year ago

@tomaae, restarted few times with debug mode enabled got same:

2023-04-27 16:58:47.198 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry OMV for openmediavault
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/openmediavault/__init__.py", line 35, in async_setup_entry
    await controller.async_update()
  File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update
    await self.hass.async_add_executor_job(self.get_smart)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart
    tmp_data = parse_api(
  File "/config/custom_components/openmediavault/apiparser.py", line 153, in parse_api
    data = fill_vals(data, entry, uid, vals)
  File "/config/custom_components/openmediavault/apiparser.py", line 285, in fill_vals
    data[uid][_name] = from_entry(entry, _source, default=_default)
  File "/config/custom_components/openmediavault/apiparser.py", line 51, in from_entry
    ret = int(ret)
ValueError: invalid literal for int() with base 10: '24330h+32m+08.797s'
2023-04-27 16:58:48.190 WARNING (MainThread) [homeassistant.config_entries] Config entry 'zhimi.humidifier.cb1' for xiaomi_miio integration not ready yet: Unable to discover the device 192.168.1.134; Retrying in background
2023-04-27 16:59:41.019 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry OMV for openmediavault
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/openmediavault/__init__.py", line 35, in async_setup_entry
    await controller.async_update()
  File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update
    await self.hass.async_add_executor_job(self.get_smart)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart
    tmp_data = parse_api(
  File "/config/custom_components/openmediavault/apiparser.py", line 153, in parse_api
    data = fill_vals(data, entry, uid, vals)
  File "/config/custom_components/openmediavault/apiparser.py", line 285, in fill_vals
    data[uid][_name] = from_entry(entry, _source, default=_default)
  File "/config/custom_components/openmediavault/apiparser.py", line 51, in from_entry
    ret = int(ret)
ValueError: invalid literal for int() with base 10: '24330h+33m+02.611s'
2023-04-27 16:59:49.175 ERROR (MainThread) [frontend.js.latest.202304111] :0:0 ResizeObserver loop completed with undelivered notifications.
2023-04-27 17:00:08.321 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry OMV for openmediavault
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/openmediavault/__init__.py", line 35, in async_setup_entry
    await controller.async_update()
  File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update
    await self.hass.async_add_executor_job(self.get_smart)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart
    tmp_data = parse_api(
  File "/config/custom_components/openmediavault/apiparser.py", line 153, in parse_api
    data = fill_vals(data, entry, uid, vals)
  File "/config/custom_components/openmediavault/apiparser.py", line 285, in fill_vals
    data[uid][_name] = from_entry(entry, _source, default=_default)
  File "/config/custom_components/openmediavault/apiparser.py", line 51, in from_entry
    ret = int(ret)
ValueError: invalid literal for int() with base 10: '24330h+33m+29.906s'
BUT
after 4-5 try get a lot of logs and 2023-04-27 22:02:37.584 ERROR (SyncWorker_7) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 unable to connect: Session expired.
2023-04-27 22:03:22.464 DEBUG (SyncWorker_5) [custom_components.openmediavault.apiparser] Processing entry {'devicename': 'sdb1', 'devicefile': '/dev/disk/by-uuid/443fefbd-7355-4a08-a6ec-4d3e038814f8', 'predictabledevicefile': '/dev/disk/by-uuid/443fefbd-7355-4a08-a6ec-4d3e038814f8', 'canonicaldevicefile': '/dev/sdb1', 'parentdevicefile': '/dev/sdb', 'devlinks': ['/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH-part1', '/dev/disk/by-id/wwn-0x5000c500c3a05b73-part1', '/dev/disk/by-partlabel/primary', '/dev/disk/by-partuuid/e6469075-4cc3-4b4b-b957-0c45aa6ff027', '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:1:0-part1', '/dev/disk/by-uuid/443fefbd-7355-4a08-a6ec-4d3e038814f8'], 'uuid': '443fefbd-7355-4a08-a6ec-4d3e038814f8', 'label': '', 'type': 'ext4', 'blocks': '960302096', 'mounted': True, 'mountpoint': '/srv/dev-disk-by-uuid-443fefbd-7355-4a08-a6ec-4d3e038814f8', 'used': '613.83 GiB', 'available': '274223116288', 'size': '983349346304', 'percentage': 71, 'description': '/dev/sdb1 [EXT4, 613.83 GiB (71%) used, 255.39 GiB available]', 'propposixacl': True, 'propquota': True, 'propresize': True, 'propfstab': True, 'propcompress': False, 'propautodefrag': False, 'hasmultipledevices': False, 'devicefiles': ['/dev/sdb1'], 'comment': '', '_readonly': False, '_used': True, 'propreadonly': False}
2023-04-27 22:03:22.465 DEBUG (SyncWorker_1) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 query: Smart, getList, {'start': 0, 'limit': -1}, {'updatelastaccess': True}
2023-04-27 22:03:23.266 DEBUG (SyncWorker_1) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 query response: {'response': {'total': 2, 'data': [{'devicename': 'sda', 'canonicaldevicefile': '/dev/sda', 'devicefile': '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0', 'devicelinks': ['/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0'], 'model': 'Virtual disk', 'size': '17179869184', 'temperature': '0', 'description': 'Virtual disk [/dev/sda, 16.00 GiB]', 'vendor': 'VMware', 'serialnumber': '', 'wwn': '', 'overallstatus': 'BAD_STATUS', 'uuid': 'fa4b1c66-ef79-11e5-87a0-0002b3a176b4', 'monitor': False, '_used': False}, {'devicename': 'sdb', 'canonicaldevicefile': '/dev/sdb', 'devicefile': '/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH', 'devicelinks': ['/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH', '/dev/disk/by-id/wwn-0x5000c500c3a05b73', '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:1:0'], 'model': 'ST1000DM010-2EP102', 'size': '1000204886016', 'temperature': 43, 'description': 'ST1000DM010-2EP102 [/dev/sdb, 931.51 GiB]', 'vendor': 'ATA', 'serialnumber': 'ZN1B07AH', 'wwn': '0x5000c500c3a05b73', 'overallstatus': 'GOOD', 'uuid': 'b416d2a7-d9ef-49fd-91a7-5b9df625ba0e', 'monitor': True, '_used': True}]}, 'error': None}
2023-04-27 22:03:23.267 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing source [{'devicename': 'sda', 'canonicaldevicefile': '/dev/sda', 'devicefile': '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0', 'devicelinks': ['/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0'], 'model': 'Virtual disk', 'size': '17179869184', 'temperature': '0', 'description': 'Virtual disk [/dev/sda, 16.00 GiB]', 'vendor': 'VMware', 'serialnumber': '', 'wwn': '', 'overallstatus': 'BAD_STATUS', 'uuid': 'fa4b1c66-ef79-11e5-87a0-0002b3a176b4', 'monitor': False, '_used': False}, {'devicename': 'sdb', 'canonicaldevicefile': '/dev/sdb', 'devicefile': '/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH', 'devicelinks': ['/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH', '/dev/disk/by-id/wwn-0x5000c500c3a05b73', '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:1:0'], 'model': 'ST1000DM010-2EP102', 'size': '1000204886016', 'temperature': 43, 'description': 'ST1000DM010-2EP102 [/dev/sdb, 931.51 GiB]', 'vendor': 'ATA', 'serialnumber': 'ZN1B07AH', 'wwn': '0x5000c500c3a05b73', 'overallstatus': 'GOOD', 'uuid': 'b416d2a7-d9ef-49fd-91a7-5b9df625ba0e', 'monitor': True, '_used': True}]
2023-04-27 22:03:23.267 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'devicename': 'sda', 'canonicaldevicefile': '/dev/sda', 'devicefile': '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0', 'devicelinks': ['/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0'], 'model': 'Virtual disk', 'size': '17179869184', 'temperature': '0', 'description': 'Virtual disk [/dev/sda, 16.00 GiB]', 'vendor': 'VMware', 'serialnumber': '', 'wwn': '', 'overallstatus': 'BAD_STATUS', 'uuid': 'fa4b1c66-ef79-11e5-87a0-0002b3a176b4', 'monitor': False, '_used': False}
2023-04-27 22:03:23.267 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'devicename': 'sdb', 'canonicaldevicefile': '/dev/sdb', 'devicefile': '/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH', 'devicelinks': ['/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1B07AH', '/dev/disk/by-id/wwn-0x5000c500c3a05b73', '/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:1:0'], 'model': 'ST1000DM010-2EP102', 'size': '1000204886016', 'temperature': 43, 'description': 'ST1000DM010-2EP102 [/dev/sdb, 931.51 GiB]', 'vendor': 'ATA', 'serialnumber': 'ZN1B07AH', 'wwn': '0x5000c500c3a05b73', 'overallstatus': 'GOOD', 'uuid': 'b416d2a7-d9ef-49fd-91a7-5b9df625ba0e', 'monitor': True, '_used': True}
2023-04-27 22:03:23.267 DEBUG (SyncWorker_1) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 query: Smart, getAttributes, {'devicefile': '/dev/sda'}, {'updatelastaccess': True}
2023-04-27 22:03:23.342 DEBUG (SyncWorker_1) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 query response: {'response': [], 'error': None}
2023-04-27 22:03:23.343 DEBUG (SyncWorker_1) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 query: Smart, getAttributes, {'devicefile': '/dev/sdb'}, {'updatelastaccess': True}
2023-04-27 22:03:23.925 DEBUG (SyncWorker_1) [custom_components.openmediavault.omv_api] OpenMediaVault 192.168.1.110 query response: {'response': [{'id': 1, 'attrname': 'Raw_Read_Error_Rate', 'flags': 'POSR--', 'value': 83, 'worst': 63, 'threshold': 6, 'whenfailed': '-', 'rawvalue': '234733672', 'description': 'Frequency of errors while reading raw data from the disk', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 3, 'attrname': 'Spin_Up_Time', 'flags': 'PO----', 'value': 97, 'worst': 97, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Time needed to spin up the disk', 'prefailure': True, 'assessment': 'BAD_STATUS'}, {'id': 4, 'attrname': 'Start_Stop_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 20, 'whenfailed': '-', 'rawvalue': '237', 'description': 'Number of spindle start/stop cycles', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 5, 'attrname': 'Reallocated_Sector_Ct', 'flags': 'PO--CK', 'value': 100, 'worst': 100, 'threshold': 10, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of remapped sectors', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 7, 'attrname': 'Seek_Error_Rate', 'flags': 'POSR--', 'value': 75, 'worst': 60, 'threshold': 45, 'whenfailed': '-', 'rawvalue': '33294135', 'description': 'Frequency of errors while positioning', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 9, 'attrname': 'Power_On_Hours', 'flags': '-O--CK', 'value': 71, 'worst': 71, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '26136', 'description': 'Number of hours elapsed in the power-on state', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 10, 'attrname': 'Spin_Retry_Count', 'flags': 'PO--C-', 'value': 100, 'worst': 100, 'threshold': 97, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of retry attempts to spin up', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 12, 'attrname': 'Power_Cycle_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 20, 'whenfailed': '-', 'rawvalue': '232', 'description': 'Number of power-on events', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 183, 'attrname': 'Runtime_Bad_Block', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 184, 'attrname': 'End-to-End_Error', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 99, 'whenfailed': '-', 'rawvalue': '0', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 187, 'attrname': 'Reported_Uncorrect', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of errors that could not be recovered using hardware ECC', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 188, 'attrname': 'Command_Timeout', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0 0 0', 'description': 'The count of aborted operations due to HDD timeout', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 189, 'attrname': 'High_Fly_Writes', 'flags': '-O-RCK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of times a recording head is flying outside its normal operating range', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 190, 'attrname': 'Airflow_Temperature_Cel', 'flags': '-O---K', 'value': 57, 'worst': 48, 'threshold': 40, 'whenfailed': '-', 'rawvalue': '43 (Min/Max 33/45)', 'description': 'Airflow temperature of the drive', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 193, 'attrname': 'Load_Cycle_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '1296', 'description': 'Number of cycles into landing zone position', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 194, 'attrname': 'Temperature_Celsius', 'flags': '-O---K', 'value': 43, 'worst': 12, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '43 (0 12 0 0 0)', 'description': 'Current internal temperature of the drive', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 195, 'attrname': 'Hardware_ECC_Recovered', 'flags': '-O-RC-', 'value': 5, 'worst': 1, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '234733672', 'description': 'Number of ECC on-the-fly errors', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 197, 'attrname': 'Current_Pending_Sector', 'flags': '-O--C-', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of sectors waiting to be remapped', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 198, 'attrname': 'Offline_Uncorrectable', 'flags': '----C-', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'The total number of uncorrectable errors when reading/writing a sector', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 199, 'attrname': 'UDMA_CRC_Error_Count', 'flags': '-OSRCK', 'value': 200, 'worst': 200, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of CRC errors during UDMA mode', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 240, 'attrname': 'Head_Flying_Hours', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '24335h+36m+45.116s', 'description': 'Time spent during the positioning of the drive heads', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 241, 'attrname': 'Total_LBAs_Written', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '8217218230', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 242, 'attrname': 'Total_LBAs_Read', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '40078116986', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}], 'error': None}
2023-04-27 22:03:23.926 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing source [{'id': 1, 'attrname': 'Raw_Read_Error_Rate', 'flags': 'POSR--', 'value': 83, 'worst': 63, 'threshold': 6, 'whenfailed': '-', 'rawvalue': '234733672', 'description': 'Frequency of errors while reading raw data from the disk', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 3, 'attrname': 'Spin_Up_Time', 'flags': 'PO----', 'value': 97, 'worst': 97, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Time needed to spin up the disk', 'prefailure': True, 'assessment': 'BAD_STATUS'}, {'id': 4, 'attrname': 'Start_Stop_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 20, 'whenfailed': '-', 'rawvalue': '237', 'description': 'Number of spindle start/stop cycles', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 5, 'attrname': 'Reallocated_Sector_Ct', 'flags': 'PO--CK', 'value': 100, 'worst': 100, 'threshold': 10, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of remapped sectors', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 7, 'attrname': 'Seek_Error_Rate', 'flags': 'POSR--', 'value': 75, 'worst': 60, 'threshold': 45, 'whenfailed': '-', 'rawvalue': '33294135', 'description': 'Frequency of errors while positioning', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 9, 'attrname': 'Power_On_Hours', 'flags': '-O--CK', 'value': 71, 'worst': 71, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '26136', 'description': 'Number of hours elapsed in the power-on state', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 10, 'attrname': 'Spin_Retry_Count', 'flags': 'PO--C-', 'value': 100, 'worst': 100, 'threshold': 97, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of retry attempts to spin up', 'prefailure': True, 'assessment': 'GOOD'}, {'id': 12, 'attrname': 'Power_Cycle_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 20, 'whenfailed': '-', 'rawvalue': '232', 'description': 'Number of power-on events', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 183, 'attrname': 'Runtime_Bad_Block', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 184, 'attrname': 'End-to-End_Error', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 99, 'whenfailed': '-', 'rawvalue': '0', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 187, 'attrname': 'Reported_Uncorrect', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of errors that could not be recovered using hardware ECC', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 188, 'attrname': 'Command_Timeout', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0 0 0', 'description': 'The count of aborted operations due to HDD timeout', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 189, 'attrname': 'High_Fly_Writes', 'flags': '-O-RCK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of times a recording head is flying outside its normal operating range', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 190, 'attrname': 'Airflow_Temperature_Cel', 'flags': '-O---K', 'value': 57, 'worst': 48, 'threshold': 40, 'whenfailed': '-', 'rawvalue': '43 (Min/Max 33/45)', 'description': 'Airflow temperature of the drive', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 193, 'attrname': 'Load_Cycle_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '1296', 'description': 'Number of cycles into landing zone position', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 194, 'attrname': 'Temperature_Celsius', 'flags': '-O---K', 'value': 43, 'worst': 12, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '43 (0 12 0 0 0)', 'description': 'Current internal temperature of the drive', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 195, 'attrname': 'Hardware_ECC_Recovered', 'flags': '-O-RC-', 'value': 5, 'worst': 1, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '234733672', 'description': 'Number of ECC on-the-fly errors', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 197, 'attrname': 'Current_Pending_Sector', 'flags': '-O--C-', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of sectors waiting to be remapped', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 198, 'attrname': 'Offline_Uncorrectable', 'flags': '----C-', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'The total number of uncorrectable errors when reading/writing a sector', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 199, 'attrname': 'UDMA_CRC_Error_Count', 'flags': '-OSRCK', 'value': 200, 'worst': 200, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of CRC errors during UDMA mode', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 240, 'attrname': 'Head_Flying_Hours', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '24335h+36m+45.116s', 'description': 'Time spent during the positioning of the drive heads', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 241, 'attrname': 'Total_LBAs_Written', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '8217218230', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}, {'id': 242, 'attrname': 'Total_LBAs_Read', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '40078116986', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}]
2023-04-27 22:03:23.926 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 1, 'attrname': 'Raw_Read_Error_Rate', 'flags': 'POSR--', 'value': 83, 'worst': 63, 'threshold': 6, 'whenfailed': '-', 'rawvalue': '234733672', 'description': 'Frequency of errors while reading raw data from the disk', 'prefailure': True, 'assessment': 'GOOD'}
2023-04-27 22:03:23.926 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 3, 'attrname': 'Spin_Up_Time', 'flags': 'PO----', 'value': 97, 'worst': 97, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Time needed to spin up the disk', 'prefailure': True, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.926 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 4, 'attrname': 'Start_Stop_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 20, 'whenfailed': '-', 'rawvalue': '237', 'description': 'Number of spindle start/stop cycles', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.926 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 5, 'attrname': 'Reallocated_Sector_Ct', 'flags': 'PO--CK', 'value': 100, 'worst': 100, 'threshold': 10, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of remapped sectors', 'prefailure': True, 'assessment': 'GOOD'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 7, 'attrname': 'Seek_Error_Rate', 'flags': 'POSR--', 'value': 75, 'worst': 60, 'threshold': 45, 'whenfailed': '-', 'rawvalue': '33294135', 'description': 'Frequency of errors while positioning', 'prefailure': True, 'assessment': 'GOOD'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 9, 'attrname': 'Power_On_Hours', 'flags': '-O--CK', 'value': 71, 'worst': 71, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '26136', 'description': 'Number of hours elapsed in the power-on state', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 10, 'attrname': 'Spin_Retry_Count', 'flags': 'PO--C-', 'value': 100, 'worst': 100, 'threshold': 97, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of retry attempts to spin up', 'prefailure': True, 'assessment': 'GOOD'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 12, 'attrname': 'Power_Cycle_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 20, 'whenfailed': '-', 'rawvalue': '232', 'description': 'Number of power-on events', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 183, 'attrname': 'Runtime_Bad_Block', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 184, 'attrname': 'End-to-End_Error', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 99, 'whenfailed': '-', 'rawvalue': '0', 'description': '', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.927 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 187, 'attrname': 'Reported_Uncorrect', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of errors that could not be recovered using hardware ECC', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 188, 'attrname': 'Command_Timeout', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0 0 0', 'description': 'The count of aborted operations due to HDD timeout', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 189, 'attrname': 'High_Fly_Writes', 'flags': '-O-RCK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of times a recording head is flying outside its normal operating range', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 190, 'attrname': 'Airflow_Temperature_Cel', 'flags': '-O---K', 'value': 57, 'worst': 48, 'threshold': 40, 'whenfailed': '-', 'rawvalue': '43 (Min/Max 33/45)', 'description': 'Airflow temperature of the drive', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 193, 'attrname': 'Load_Cycle_Count', 'flags': '-O--CK', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '1296', 'description': 'Number of cycles into landing zone position', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 194, 'attrname': 'Temperature_Celsius', 'flags': '-O---K', 'value': 43, 'worst': 12, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '43 (0 12 0 0 0)', 'description': 'Current internal temperature of the drive', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 195, 'attrname': 'Hardware_ECC_Recovered', 'flags': '-O-RC-', 'value': 5, 'worst': 1, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '234733672', 'description': 'Number of ECC on-the-fly errors', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 197, 'attrname': 'Current_Pending_Sector', 'flags': '-O--C-', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of sectors waiting to be remapped', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 198, 'attrname': 'Offline_Uncorrectable', 'flags': '----C-', 'value': 100, 'worst': 100, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'The total number of uncorrectable errors when reading/writing a sector', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.928 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 199, 'attrname': 'UDMA_CRC_Error_Count', 'flags': '-OSRCK', 'value': 200, 'worst': 200, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '0', 'description': 'Number of CRC errors during UDMA mode', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.929 DEBUG (SyncWorker_1) [custom_components.openmediavault.apiparser] Processing entry {'id': 240, 'attrname': 'Head_Flying_Hours', 'flags': '------', 'value': 100, 'worst': 253, 'threshold': 0, 'whenfailed': '-', 'rawvalue': '24335h+36m+45.116s', 'description': 'Time spent during the positioning of the drive heads', 'prefailure': False, 'assessment': 'BAD_STATUS'}
2023-04-27 22:03:23.930 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry OMV for openmediavault
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/openmediavault/__init__.py", line 35, in async_setup_entry
    await controller.async_update()
  File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update
    await self.hass.async_add_executor_job(self.get_smart)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openmediavault/omv_controller.py", line 350, in get_smart
    tmp_data = parse_api(
  File "/config/custom_components/openmediavault/apiparser.py", line 153, in parse_api
    data = fill_vals(data, entry, uid, vals)
  File "/config/custom_components/openmediavault/apiparser.py", line 285, in fill_vals
    data[uid][_name] = from_entry(entry, _source, default=_default)
  File "/config/custom_components/openmediavault/apiparser.py", line 51, in from_entry
    ret = int(ret)
ValueError: invalid literal for int() with base 10: '24335h+36m+45.116s'

Accordin to others log errors and mine it looks like S.M.A.R.T values parsing error

tomaae commented 1 year ago

ok, thats all I need. I will look for more reliable fix for all these different types of replies

Electronlibre2012 commented 1 year ago

Error setting up entry OMV for openmediavault Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/openmediavault/init.py", line 35, in async_setup_entry await controller.async_update() File "/config/custom_components/openmediavault/omv_controller.py", line 184, in async_update await self.hass.async_add_executor_job(self.get_smart) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/openmediavault/omv_controller.py", line 331, in get_smart self.data["disk"] = parse_api( File "/config/custom_components/openmediavault/apiparser.py", line 157, in parse_api data = fill_vals(data, entry, uid, vals) File "/config/custom_components/openmediavault/apiparser.py", line 289, in fill_vals data[uid][_name] = from_entry(entry, _source, default=_default) File "/config/custom_components/openmediavault/apiparser.py", line 53, in from_entry ret = int(ret) ValueError: invalid literal for int() with base 10: '25°C'

I have the same problem but after "reloading" the configuration 3 times, all is working back.

The temp SDA sensor first display 0°C and after a couple of minute back to 46°C.

In "configure" of the integration i have check "Disable S.M.A.R.T" dont know if the issue is related to?

EDIT : speak too fast : my temp sensor SDA and SDB are 0°C and dont move anymore.

tomaae commented 1 year ago

yes, if you disable smart, you cant get that data

Shinigami777 commented 1 year ago

In my case, turning off the SMART and reloading has helped and for now it works, of course without SMART.

Shinigami777 commented 1 year ago

Everything works now, thanks for such a quick fix.