Code Monkey home page Code Monkey logo

Comments (16)

tomaae avatar tomaae commented on September 26, 2024

It depends, most sensors are updated every 60 seconds.
Check your logs for any error messages.

from homeassistant-openmediavault.

ephirial avatar ephirial commented on September 26, 2024

Thanks for your reply, now I know something is wrong.
I found the following error in the logs:

Logger: homeassistant.core
Source: custom_components/openmediavault/helper.py:15
First occurred: 14:26:40 (1 occurrences)
Last logged: 14:26:40
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/openmediavault/omv_controller.py", line 126, in force_update
await self.async_update()
File "/config/custom_components/openmediavault/omv_controller.py", line 141, in async_update
await self.hass.async_add_executor_job(self.get_hwinfo)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/openmediavault/omv_controller.py", line 169, in get_hwinfo
ensure_vals=[{"name": "memUsage", "default": 0}],
File "/config/custom_components/openmediavault/helper.py", line 86, in parse_api
data = fill_vals(data, entry, uid, vals)
File "/config/custom_components/openmediavault/helper.py", line 225, in fill_vals
data[_name] = from_entry(entry, _source, default=_default)
File "/config/custom_components/openmediavault/helper.py", line 15, in from_entry
if param not in entry:
TypeError: argument of type 'NoneType' is not iterable

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

That most likely means that OMV reported some kind of error inside json.
If you are running OMV5, try debugging the integration. It should tell us more.

from homeassistant-openmediavault.

kdvlr avatar kdvlr commented on September 26, 2024

Edited for Clarity

I think I have a similar problem, but I don't see any error in the logs. I get all the sensors updated when Home Assistant starts up. After that, there are no updates.

No errors in OMV Log(grepped though /var/log/syslog) or Home Assistant logs. It looks as if the integration polls once during startup and does not poll again. I set logs to DEBUG and still don't see any info on Home assistant logs.

I am running HomeAssistant core on docker.

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

Set debugging like this:

logger:
  default: info
  logs:
    custom_components.openmediavault: debug

Restart HA and after issue is replicated, check home-assistant.log

from homeassistant-openmediavault.

kdvlr avatar kdvlr commented on September 26, 2024

Thanks !!
This is what I got. It says session not authenticated.

2020-06-08 18:09:39 DEBUG (SyncWorker_9) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: System, getInformation, {}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_9) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: FileSystemMgmt, enumerateFilesystems, {}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: Smart, getAttributes, {'devicefile': '/dev/mmcblk0'}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: Smart, getAttributes, {'devicefile': '/dev/sda'}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: Smart, getAttributes, {'devicefile': '/dev/sdb'}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: Smart, getAttributes, {'devicefile': '/dev/sdc'}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query: Smart, getAttributes, {'devicefile': '/dev/sdd'}, {'updatelastaccess': False}
2020-06-08 18:09:39 DEBUG (SyncWorker_5) [custom_components.openmediavault.omv_api] OpenMediaVault nas query response: {'response': None, 'error': {'code': 0, 'message': 'Session not authenticated.', 'trace': 'OMV\\HttpErrorException: Session not authenticated. in /usr/share/php/openmediavault/session.inc:146\nStack trace:\n#0 /usr/share/php/openmediavault/rpc/proxy/json.inc(81): OMV\\Session->validateAuthentication()\n#1 /var/www/openmediavault/rpc.php(45): OMV\\Rpc\\Proxy\\Json->handle()\n#2 {main}'}}
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-system_cpuUsage
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-system_memUsage
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-system_uptimeEpoch
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-708ffa3e-2991-47c2-b768-38a81a1dfb5e
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-706944a6-7d0f-4a45-9f8c-7fb07375e9f7
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-592B-C92C
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-54f0a4f9-451a-4d7f-8542-b414b5df3f73
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-a87ff7ed-8674-49b1-b358-ac3934f16907
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-cb65df2c-0ce3-40bd-a3ae-3abb52be3ba0
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-fs-a4846fe0-ee85-4ce3-9125-c8d44a129d5f
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-disk-mmcblk0
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-disk-sda
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-disk-sdb
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-disk-sdc
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.sensor] Updating sensor OMV-disk-sdd
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.binary_sensor] Updating binary_sensor OMV-system_pkgUpdatesAvailable
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.binary_sensor] Updating binary_sensor OMV-system_rebootRequired
2020-06-08 18:09:39 DEBUG (MainThread) [custom_components.openmediavault.binary_sensor] Updating binary_sensor OMV-system_configDirty

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

could be something with corrupted in cookies.
try this:
remove integration
delete .omv_cookies.json
add integration again

also check what are your auto logout settings

in case it still does not work, include all debugs from custom_components.openmediavault since ha starts, including where it works

from homeassistant-openmediavault.

kdvlr avatar kdvlr commented on September 26, 2024

My auto logout was set to 5 minutes. I changed it to 15 minutes. After that I removed the integration, restarted and added the integration with a new prefix. It worked for about 15 mins (21:27 - 21:44) and then got the session Authenticated error again.

I have attached the log here.
home-assistant.log

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

Did you deleted the file ".omv_cookies.json"?
I think I see whats going on now. I have to test few things and possibly open an issue with OMV.

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

Yeah, it is a mess up in one of recent OMV releases. Everything now returns error code 0, instead of proper error code.
Workaround released in v1.1.5

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

ah right, this issue is different from what OP had

from homeassistant-openmediavault.

kdvlr avatar kdvlr commented on September 26, 2024

Perfect! It seems to be working now.. Thanks!

from homeassistant-openmediavault.

ephirial avatar ephirial commented on September 26, 2024

Hey, sorry for my late reply. I have activated debug now and left the integreation on v1.1.4 to see if I maybe have the same issue as kdvlr. My auto logout is set to 60 minutes. After exactly 60 minutes, the same errors ('code': 0, 'message': 'Session not authenticated.') showed up in my logs.
I have updated to v1.1.5 now. I will post an update tomorrow if it works now.
Many thanks to you! 👍

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

So you no longer get the original error message from your 2nd post?

from homeassistant-openmediavault.

ephirial avatar ephirial commented on September 26, 2024

Yes, the issue seems to be gone, now the sensor updates frequently as it should. Many thanks, the integration looks great now. :-)

omv

from homeassistant-openmediavault.

tomaae avatar tomaae commented on September 26, 2024

thats good to hear :)

from homeassistant-openmediavault.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.