OpenMediaVault integration

Monitor your OpenMediaVault 5/6 NAS from Home Assistant.

Features:

  • Filesystem usage sensors
  • System sensors (CPU, Memory, Uptime)
  • System status sensors (Available updates, Required reboot and Dirty config)
  • Disk and smart sensors
  • Service sensors

Integration available via HACS

My other work

Features

Filesystem usage

Monitor your filesystem usage.

Filesystem usage

System

Monitor your OpenMediaVault system.

System

Disk smart

Monitor your disks.

6 Likes

Hey, thanks for the integration, have a bit of an issue.
My open media vault server is set to automatically suspend if it doesn’t detect any activity for 1 hour, the integration works fine and retrieves all the system info just fine until the server goes into suspend mode the integration errors out and doesn’t recover even if the server is woken up.

Open an issue for that on github and include all relevant error messages. I will have a look.

Would it be possible to add sensors for the disks?

So if you run an RPC api call to the service smart and the method as enumerateDevices it will return disk temperatures and status of each disk.
Tim

It you mean smart status, then yes. I have to test it in more details, since I dont want any sensors that would wake up sleeping disks. I had that issue with smart in past.

Here a list of features I want to implement:


Other then that, it depends on what people will want.

Added, but using different method. enumerating devices using smart wakes up all sleeping devices, so thats not ideal.
Current method will not wake up any devices.

Just updated the integration looks good. To keep from walking disks though we are not going to have the current status of disk example “good”?

I can no longer add this integration after updating. I’m on hass 109.6 Below is what I get. Tried removing integration, restarting, and installing again but no dice.

May 10 23:27:18 hass hass[559]: 2020-05-10 23:27:18 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to custom component author for openmediavault doing I/O at , line 140: verify=self._ssl_verify,
May 10 23:27:18 hass hass[559]: 2020-05-10 23:27:18 INFO (MainThread) [homeassistant.setup] Setting up openmediavault
May 10 23:27:18 hass hass[559]: 2020-05-10 23:27:18 INFO (MainThread) [homeassistant.setup] Setup of domain openmediavault took 0.0 seconds.
May 10 23:27:20 hass hass[559]: 2020-05-10 23:27:20 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry NAS for openmediavault
May 10 23:27:20 hass hass[559]: Traceback (most recent call last):
May 10 23:27:20 hass hass[559]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 216, in async_setup
May 10 23:27:20 hass hass[559]:     hass, self
May 10 23:27:20 hass hass[559]:   File "/home/homeassistant/.homeassistant/custom_components/openmediavault/__init__.py", line 31, in async_setup_entry
May 10 23:27:20 hass hass[559]:     await controller.async_hwinfo_update()
May 10 23:27:20 hass hass[559]:   File "/home/homeassistant/.homeassistant/custom_components/openmediavault/omv_controller.py", line 116, in async_hwinfo_update
May 10 23:27:20 hass hass[559]:     await self.hass.async_add_executor_job(self.get_disk)
May 10 23:27:20 hass hass[559]:   File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
May 10 23:27:20 hass hass[559]:     result = self.fn(*self.args, **self.kwargs)
May 10 23:27:20 hass hass[559]:   File "/home/homeassistant/.homeassistant/custom_components/openmediavault/omv_controller.py", line 233, in get_disk
May 10 23:27:20 hass hass[559]:     {"name": "smartsupportis", "type": "bool", "default": False},
May 10 23:27:20 hass hass[559]:   File "/home/homeassistant/.homeassistant/custom_components/openmediavault/helper.py", line 86, in parse_api
May 10 23:27:20 hass hass[559]:     data = fill_vals(data, entry, uid, vals)
May 10 23:27:20 hass hass[559]:   File "/home/homeassistant/.homeassistant/custom_components/openmediavault/helper.py", line 225, in fill_vals
May 10 23:27:20 hass hass[559]:     data[_name] = from_entry(entry, _source, default=_default)
May 10 23:27:20 hass hass[559]:   File "/home/homeassistant/.homeassistant/custom_components/openmediavault/helper.py", line 15, in from_entry
May 10 23:27:20 hass hass[559]:     if param not in entry:
May 10 23:27:20 hass hass[559]: TypeError: argument of type 'NoneType' is not iterable

No, to access that attribute, it would be necessary to wake up disks.
I’m not that knowledgeable about “SMART”, so not sure if it is result of last test or calculation based on smart attributes. If it is the latter one, it should be possible to create our own disk status without waking up sleeping disks.

Just for others, this is caused by memory cards connected to OMV (Raspberry PI in this case). Issue is already identified and will be fixed in next release.

Edit: This has been solved already.

Hi, what user access rights/groups are needed in OVM to get the full functionality of the integration?

Not sure if you can use OS user to access rpc via web.

Hi !
What exactly does “dirty configuration” mean?

Unapplied OMV configuration

hi there, i’ve decided to give this a try.

i was able to successfully create the integration after adding this via HACS (and then restarted).

the integration creates 6 sensors: omv config dirty, omv cpu load, omv memory, omv reboot pending, omv update available, and omv uptime. i dont get any information about shares or disks.

however, the information in those 6 entities also seems to be static and not populating from OMV. are there special permissions i need to set in OMV? i started with just a normal user account, then i changed it to an admin and still don’t receive any data.

I’m running HA version 0.112.3 and OMV integration version 1.1.5

image

My guess would be that you are using OMV4. I wont be adding support for that version as it is already EOL.

i’m running 5.5.0-1

Reinstall OMV
https://pimylifeup.com/raspberry-pi-openmediavault/

Thanks for the integration! It would be awesome to be able to support alternative port numbers. I had to change OMV standard port 80 for NginX and NextCloud. It breaks te integrations.

Thanks again!

Rectification:
This integration works with alternative ports. The integration stops working when you change the port. Reinstall the integration to solve this.

+1, I had to change port as well

1 Like