tomaae / homeassistant-openmediavault

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

[Bug] CPU usage at 0% #156

Open diego9393 opened 1 month ago

diego9393 commented 1 month ago

Describe the issue

The OMV CPU usage value always returns 0%, when it should indicate the real usage value. In the attached image it can be seen that while the value in HA is 0% in OMV it is not.

How to reproduce the issue

Steps to reproduce the behavior:

  1. just install this extension

Expected behavior

always returns 0% cpu usage, when it should show the actual usage value

Screenshots

omv ha

Software versions

Diagnostics data

Traceback/Error logs

Additional context

sezlony commented 1 month ago

long time known problem, still not solved - just get on with it!

rofo69 commented 3 days ago

If you want to fix this yourself, then these instructions worked for me:-

A workaround is to open the folder: your_homeassistant_folder\custom_components\openmediavault With the help of Visual Studio Code or similar, search through all the files (although there are really 2 [omv_controller.py, sensor_types.py]): cpuUsage and replace with: cpuUtilization Save and restart Home Assistant.

sezlony commented 2 days ago

anyone reading this sh*t above I beg you DO NOT TRY THIS! for god's sake

this "workaround" just made my HA crash, I can't reach it anymore...

rofo69 commented 2 days ago

Manually editing files always comes with risk, but these instructions were originally posted on the community forums and have worked for many people. Unless you are sure what you are doing, do not attempt this.

The workaround had also been posted on other threads in this GitHub.

sezlony commented 2 days ago

it cannot be a coincidence that the owner did not apply this as a fix...

(telling people to do this at their own risk only after shtf is very meh... well, not really fair)

rofo69 commented 2 days ago

Seriously.. I am not the owner of the fix, its been posted on this github before, and on the community forums. Editting anything manually has risk. This repo is not actively maintained, the last changes were 9 months ago. I suggest you ssh into your ha and check for typo's. I assume you backed up the file first ? Just use ssh onto HA and restore your backup.

BebeMischa commented 2 days ago

anyone reading this sh*t above I beg you DO NOT TRY THIS! for god's sake

this "workaround" just made my HA crash, I can't reach it anymore...

First seriously check, what you have done yourself, before calling something shit. This is very unfriendly to anyone spending time around here and trying to help.

As you can see here: https://github.com/tomaae/homeassistant-openmediavault/issues/133 , the fix is confirmed working by many people, inclusive me. This fix is not shit. The problem has to be found between your monitor and your chair.

Please, use friendly language around here, no one here is your enemy. ;-)