tomaae / homeassistant-openmediavault

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

[Bug]Doesn't work with OMV in NanoPC T6 (FriendlyElec) #146

Closed Pharizna closed 8 months ago

Pharizna commented 8 months ago

Describe the issue

It works in the CM3588 (FriendlyElec) but not in the NanoPC T6 (a "clone" of the previous one with the same processor, etc).

How to reproduce the issue

Configure the integration for the T6 ... and error :(

Expected behavior

In the next screenshot you can see the "good integration" with the CM3588 (OMV) ... and the problem with the T6 (OMVT6)

Screenshots

image

Software versions

Diagnostics data

Logger: homeassistant.config_entries Source: config_entries.py:406 First occurred: 9 de febrero de 2024, 22:52:32 (3 occurrences) Last logged: 11:10:45

Error setting up entry OMVT6 for openmediavault Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openmediavault/init.py", line 34, in async_setup_entry await controller.async_hwinfo_update() File "/config/custom_components/openmediavault/omv_controller.py", line 150, in async_hwinfo_update await self.hass.async_add_executor_job(self.get_hwinfo) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openmediavault/omv_controller.py", line 245, in get_hwinfo if int(self.data["hwinfo"]["version"].split(".")[0]) > 5: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'unknown'

Traceback/Error logs

Additional context

tomaae commented 8 months ago

looks like a broken api. I would need to see debugs

Pharizna commented 8 months ago

Thank you...but it's strange that the same "installation" is working fine with the CM3588 and not with the T6.

Can I help you sending debugs?

tomaae commented 8 months ago

well, I need to see those debugs to know what is happening.

Pharizna commented 8 months ago

Ok. Where are those debugs?  I can send you if you direct me ;)

tomaae commented 8 months ago

https://github.com/tomaae/homeassistant-openmediavault?tab=readme-ov-file#enabling-debug debugs will be in ha log

Pharizna commented 8 months ago

Thanks but it's very strange because now it's working "fine" ;)

Only there is a bug:

As I explained I have two OMV installed: OMV (in the CM3588) and OMV_T6 (in the T6)

As you can see in the attached figure there is a problem with the device "SERVICES" name.

error

It would be OMV_T6 services...

error_det

but not OMV_ service... services_2

error_2

tomaae commented 8 months ago

we will know more from debugs, without them its not possible to tell whats happening in this case.

Pharizna commented 8 months ago

I attach the two last ha.log ... when it's "working"

ha.log.zip

tomaae commented 8 months ago

Seems to be working correctly. Are you sure those are not leftover entities from previous tries? Only entity I see crashing is following: sensor.buhardilla_dect but I dont think its related.

Pharizna commented 8 months ago

@tomaae As I was saying, although it’s strange, the issue resolved on its own, and this LOG is after the problem, so it’s logical that nothing related to it appeared. On the other hand, indeed, the other entity has nothing to do with it.

Thank you and sorry for the inconvenience. 😊

tomaae commented 8 months ago

no problem, I guess OMV went bit crazy. I seen that happen few times