dummylabs / thewatchman

Home Assistant custom integration to keep track of missing entities and actions in your config files
MIT License
475 stars 20 forks source link

Detected blocking call to open inside the event loop #135

Closed OzGav closed 5 months ago

OzGav commented 5 months ago

Warning in log starting with HA 2024.6.0b1

Detected blocking call to open inside the event loop by custom integration 'watchman' at custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")): (offender: /config/custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")):), please create a bug report at https://github.com/dummylabs/thewatchman/issues

asucrews commented 5 months ago

to add more details, HA 2024.6 adds a check for this type of file I/O happening in the event loop.

Detected blocking call to open inside the event loop by custom integration 'watchman' at custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")): (offender: /config/custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")):), please create a bug report at https://github.com/dummylabs/thewatchman/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, self._args) File "/usr/src/homeassistant/homeassistant/runner.py", line 164, in setup_and_run_hass return await hass.async_run() File "/usr/src/homeassistant/homeassistant/core.py", line 515, in async_run await self.async_start() File "/usr/src/homeassistant/homeassistant/core.py", line 568, in async_start self.bus.async_fire_internal(EVENT_HOMEASSISTANT_STARTED) File "/usr/src/homeassistant/homeassistant/core.py", line 1554, in async_fire_internal self._hass.async_run_hass_job(job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/core.py", line 1418, in call self.hass.async_run_hass_job(self.listener_job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 939, in async_run_hass_job return self._async_add_hass_job(hassjob, *args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", line 748, in _async_add_hass_job task = create_eagertask( File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/watchman/init.py", line 274, in async_on_home_assistant_started parse_config(hass, reason="HA restart") File "/config/custom_components/watchman/init.py", line 351, in parse_config entity_list, service_list, files_parsed, files_ignored = parse( File "/config/custom_components/watchman/utils.py", line 258, in parse for i, line in enumerate(open(yaml_file, encoding="utf-8")):

KruseLuds commented 5 months ago

I am running into what I believe is the same issue. I had to actually disable the integration as this specific long section of messages keep appearing endlessly in my syslog - and also includes the statement "please create a bug report at https://github.com/dummylabs/thewatchman/issues":

Jun 6 12:19:53 kruse-pi homeassistant[1536]: #033[33m2024-06-06 12:19:53.589 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'watchman' at custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")): (offender: /config/custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")):), please create a bug report at https://github.com/dummylabs/thewatchman/issues Jun 6 12:19:53 kruse-pi homeassistant[1536]: Traceback (most recent call last): Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "", line 198, in _run_module_as_main Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "", line 88, in _run_code Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/main.py", line 223, in Jun 6 12:19:53 kruse-pi homeassistant[1536]: sys.exit(main()) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main Jun 6 12:19:53 kruse-pi homeassistant[1536]: exit_code = runner.run(runtime_conf) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run Jun 6 12:19:53 kruse-pi homeassistant[1536]: return loop.run_until_complete(setup_and_run_hass(runtime_config)) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete Jun 6 12:19:53 kruse-pi homeassistant[1536]: self.run_forever() Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._run_once() Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once Jun 6 12:19:53 kruse-pi homeassistant[1536]: handle._run() Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._context.run(self._callback, *self._args) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request Jun 6 12:19:53 kruse-pi homeassistant[1536]: resp = await request_handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle Jun 6 12:19:53 kruse-pi homeassistant[1536]: resp = await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: response = await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle Jun 6 12:19:53 kruse-pi homeassistant[1536]: result = await handler(request, request.match_info) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await func(self, request, *args, kwargs) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/config/view.py", line 130, in post Jun 6 12:19:53 kruse-pi homeassistant[1536]: hass.async_create_task( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 806, in async_create_task Jun 6 12:19:53 kruse-pi homeassistant[1536]: return self.async_create_task_internal(target, name, eager_start) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 828, in async_create_task_internal Jun 6 12:19:53 kruse-pi homeassistant[1536]: task = create_eagertask(target, name=name, loop=self.loop) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task Jun 6 12:19:53 kruse-pi homeassistant[1536]: return Task(coro, loop=loop, name=name, eager_start=True) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/config/script.py", line 28, in hook Jun 6 12:19:53 kruse-pi homeassistant[1536]: await hass.services.async_call(DOMAIN, SERVICE_RELOAD) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 2722, in async_call Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._hass.bus.async_fire_internal( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 1554, in async_fire_internal Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._hass.async_run_hass_job(job, event) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 939, in async_run_hass_job Jun 6 12:19:53 kruse-pi homeassistant[1536]: return self._async_add_hass_job(hassjob, args, background=background) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 748, in _async_add_hass_job Jun 6 12:19:53 kruse-pi homeassistant[1536]: task = create_eagertask( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task Jun 6 12:19:53 kruse-pi homeassistant[1536]: return Task(coro, loop=loop, name=name, eager_start=True) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/config/custom_components/watchman/init.py", line 287, in async_on_configuration_changed Jun 6 12:19:53 kruse-pi homeassistant[1536]: parse_config(hass, reason="configuration changes") Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/config/custom_components/watchman/init.py", line 351, in parse_config Jun 6 12:19:53 kruse-pi homeassistant[1536]: entity_list, service_list, files_parsed, files_ignored = parse( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/config/custom_components/watchman/utils.py", line 258, in parse Jun 6 12:19:53 kruse-pi homeassistant[1536]: for i, line in enumerate(open(yaml_file, encoding="utf-8")): Jun 6 12:19:53 kruse-pi homeassistant[1536]: #033[0m Jun 6 12:19:53 kruse-pi homeassistant[1536]: #033[33m2024-06-06 12:19:53.602 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'watchman' at custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")): (offender: /config/custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")):), please create a bug report at https://github.com/dummylabs/thewatchman/issues Jun 6 12:19:53 kruse-pi homeassistant[1536]: Traceback (most recent call last): Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "", line 198, in _run_module_as_main Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "", line 88, in _run_code Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/main.py", line 223, in Jun 6 12:19:53 kruse-pi homeassistant[1536]: sys.exit(main()) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main Jun 6 12:19:53 kruse-pi homeassistant[1536]: exit_code = runner.run(runtime_conf) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run Jun 6 12:19:53 kruse-pi homeassistant[1536]: return loop.run_until_complete(setup_and_run_hass(runtime_config)) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete Jun 6 12:19:53 kruse-pi homeassistant[1536]: self.run_forever() Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._run_once() Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once Jun 6 12:19:53 kruse-pi homeassistant[1536]: handle._run() Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._context.run(self._callback, self._args) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request Jun 6 12:19:53 kruse-pi homeassistant[1536]: resp = await request_handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle Jun 6 12:19:53 kruse-pi homeassistant[1536]: resp = await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware Jun 6 12:19:53 kruse-pi homeassistant[1536]: response = await handler(request) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle Jun 6 12:19:53 kruse-pi homeassistant[1536]: result = await handler(request, request.match_info) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin Jun 6 12:19:53 kruse-pi homeassistant[1536]: return await func(self, request, *args, kwargs) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/config/view.py", line 130, in post Jun 6 12:19:53 kruse-pi homeassistant[1536]: hass.async_create_task( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 806, in async_create_task Jun 6 12:19:53 kruse-pi homeassistant[1536]: return self.async_create_task_internal(target, name, eager_start) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 828, in async_create_task_internal Jun 6 12:19:53 kruse-pi homeassistant[1536]: task = create_eagertask(target, name=name, loop=self.loop) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task Jun 6 12:19:53 kruse-pi homeassistant[1536]: return Task(coro, loop=loop, name=name, eager_start=True) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/components/config/script.py", line 28, in hook Jun 6 12:19:53 kruse-pi homeassistant[1536]: await hass.services.async_call(DOMAIN, SERVICE_RELOAD) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 2722, in async_call Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._hass.bus.async_fire_internal( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 1554, in async_fire_internal Jun 6 12:19:53 kruse-pi homeassistant[1536]: self._hass.async_run_hass_job(job, event) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 939, in async_run_hass_job Jun 6 12:19:53 kruse-pi homeassistant[1536]: return self._async_add_hass_job(hassjob, *args, background=background) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/core.py", line 748, in _async_add_hass_job Jun 6 12:19:53 kruse-pi homeassistant[1536]: task = create_eagertask( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task Jun 6 12:19:53 kruse-pi homeassistant[1536]: return Task(coro, loop=loop, name=name, eager_start=True) Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/config/custom_components/watchman/init.py", line 287, in async_on_configuration_changed Jun 6 12:19:53 kruse-pi homeassistant[1536]: parse_config(hass, reason="configuration changes") Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/config/custom_components/watchman/init.py", line 351, in parse_config Jun 6 12:19:53 kruse-pi homeassistant[1536]: entity_list, service_list, files_parsed, files_ignored = parse( Jun 6 12:19:53 kruse-pi homeassistant[1536]: File "/config/custom_components/watchman/utils.py", line 258, in parse Jun 6 12:19:53 kruse-pi homeassistant[1536]: for i, line in enumerate(open(yaml_file, encoding="utf-8")): Jun 6 12:19:53 kruse-pi homeassistant[1536]: #033[0m

johntdyer commented 5 months ago

So i'm a little worried about this, the owner of this repo has basically no commit history this year and is the only contributor .... Even if a PR was opened with a fix do we think it will be merged?

andreasbrett commented 5 months ago

Maybe it's the perfect moment for a fork that addresses some of the issues and takes care of some PRs.

andreasbrett commented 5 months ago

@mariusthvdb @OzGav @asucrews @johntdyer I think about creating a maintained fork of this repo. Not introducing lots of new features but rather taking care of due maintenance, small fixes and ensuring it works with the next versions of HA. There's no activity in here and as @johntdyer already pointed out: this might be a sinking ship. Would be great if we could maintain that ship until maybe @dummylabs re-surfaces and takes over again.

Since I don't want to end like @dummylabs and have to do it all alone and you've either contributed to this project or commented and seem to have dev and/or tech backgrounds: would anybody like to join me in realizing this?

asucrews commented 5 months ago

@andreasbrett not 100% sure what i can do, but i am willing to help out

OzGav commented 5 months ago

Sorry I am unable to commit to helping as I am busy on other projects.

andreasbrett commented 5 months ago

I just released a beta over on my fork. It fixes this issue. Could you please test it in your HA installations? Find the installation instructions in README and in HACS don't forget to enable "show beta versions".

https://github.com/andreasbrett/thewatchman/releases/tag/v0.6.2-beta0

jhemak commented 5 months ago

Sees to be fixed for me using your beta. Great work!

AnthonyBe commented 5 months ago

I've also replaced the old version with your form beta 0.6.2 beta0 and it's working perfectly! Thanks @andreasbrett !

Mariusthvdb commented 5 months ago

Thanks for picking this up! I’ll surely test drive.

having said that, I am surprised I dit see these loggings… I did add the line to the manifest some iterations ago forcing to be correctly using HA internals but other than that, I have not a single issue with the original.

let me check more and I’ll report back

edit

I see I didnt have that anymore at all, simply have the manifest:

{
  "domain": "watchman",
  "name": "Watchman",
  "documentation": "https://github.com/dummylabs/thewatchman",
  "issue_tracker": "https://github.com/dummylabs/thewatchman/issues",
  "iot_class": "local_push",
  "version": "0.5.1",
  "requirements": [
    "prettytable==3.0.0"
  ],
  "codeowners": [
    "@dummylabs"
  ],
  "config_flow": true
}

not sure why I dont get the errors mentioned above in that case....

alexsaas commented 5 months ago

Hey @Mariusthvdb could you explain which line you added where? I'm a bit confused, the manifest looks the same in my installation, like in your example.

Mariusthvdb commented 5 months ago

Correct, as I stated above. It is no longer there. Core HA now forces Custom components to use the guarded system, except when they bail out in the manifest.

alexsaas commented 5 months ago

Correct, as I stated above. It is no longer there.

Core HA now forces Custom components to use the guarded system, except when they bail out in the manifest.

Thank you very much for your feedback. Unfortunately, I'm not good enough to understand everything. I don't have core 2024.6.0 or higher installed yet.

Is there anything I can or must do to avoid getting the error later after the core update?

Mariusthvdb commented 5 months ago

Tbh: I am not the expert here. Important thing is that

Import executor is on by default now so they don’t need to add that anymore

you could check at discord dev channel ask around. BDraco is the expert on the matter, maybe catch him in the release community post

RK62 commented 5 months ago

I just released a beta over on my fork. It fixes this issue. Could you please test it in your HA installations? Find the installation instructions in README and in HACS don't forget to enable "show beta versions".

@andreasbrett I try your beta 0.6.2 beta0 and it's working great on two systems with HA 2024.6.1 Thank you!

popy2k14 commented 5 months ago

@andreasbrett Tried your 0.6.2 beta0 and it fixed the issue for me. thx a lot for keeping the MUST HAVE integration alive!

PS.: I wonder why this integration is not a standard one.

alexsaas commented 5 months ago

Tbh: I am not the expert here. Important thing is that

Import executor is on by default now so they don’t need to add that anymore

you could check at discord dev channel ask around.

BDraco is the expert on the matter, maybe catch him in the release community post

Thank you for your response. Maybe I'll just wait a bit. @andreasbrett seems to be on the right track.

Edit:

Furthermore, I am even less of an expert. I am a simple user. And somewhat overwhelmed by the problem.

gcoan commented 5 months ago

Thanks @andreasbrett I swapped from dummylabs' version to your fork and installed the 0.6.2 beta0 and it fixed the issue for me.

Steps I followed to move to the new version:

No reconfiguration required and all working fine

teskanoo commented 5 months ago

Thank you @andreasbrett for the update to this repo and to @gcoan for the update instructions.

I am using the new (experimental) HACS user interface.

In order to obtain the 0.6.2 beta0 version, I had to 'redownload' the after initially switching to the new repository.

'redownload' gave me the option to enable beta versions and to select 0.6.2 beta0 version

cbhiii commented 5 months ago

Yes, thank you! This is working great thanks to your time and efforts.

On Tue, Jun 18, 2024 at 21:54 teskanoo @.***> wrote:

Thank you @andreasbrett https://github.com/andreasbrett for the update to this repo and to @gcoan https://github.com/gcoan for the update instructions.

I am using the new (experimental) HACS user interface.

In order to obtain the 0.6.2 beta0 version, I had to 'redownload' the after initially switching to the new repository.

'redownload' gave me the option to enable beta versions and to select 0.6.2 beta0 version

— Reply to this email directly, view it on GitHub https://github.com/dummylabs/thewatchman/issues/135#issuecomment-2177374369, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSZYBOI7ECHGOTR3PAFQ7DZIDQHDAVCNFSM6AAAAABIQES64GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXGM3TIMZWHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dummylabs commented 5 months ago

Hey @andreasbrett, thank you for your efforts. Hopefully, I’m getting back on track and am ready to maintain this repo. Could you please create a pull request for your fix so that I can incorporate it?

ncd7 commented 5 months ago

@dummylabs - thanks for coming back! You can probably just diff his fork and pick up all the updates in case @andreasbrett doesn't get back to you soon

dummylabs commented 5 months ago

Yep, just wanted to have proper attribution in the code. Anyway, I really appreciate the valuable contribution of @andreasbrett and other guys. Thank you!

andreasbrett commented 5 months ago

Hey @andreasbrett, thank you for your efforts. Hopefully, I’m getting back on track and am ready to maintain this repo. Could you please create a pull request for your fix so that I can incorporate it?

I just created the PR for the "blocking call" fix.

dummylabs commented 5 months ago

For some strange reason, I couldn’t run it in the devcontainer with HA version 2024.6.0 because of an error message: "No module named ‘aiofiles’". However, adding it to the manifest file solved the problem. I’ll continue testing tomorrow.

dummylabs commented 5 months ago

Fix is in the main branch (available in HACS as beta). The new version will be published soon.

dummylabs commented 5 months ago

Should be fixed in 0.6.2.

popy2k14 commented 5 months ago

thx, for keeping the original watchman repo alive! PS.: any chance to see this in the core?

dummylabs commented 4 months ago

any chance to see this in the core?

Don’t believe it’s ready yet. I see several areas for improvement in how watchman should function, particularly:

  1. The standard configuration popup feels too cramped for the numerous configuration options. Having a dedicated panel for configuration (and perhaps reporting) would be beneficial. Every time I attempt to add a new config option, I encounter this issue. However, this requires frontend programming skills, which I don't have at the moment.
  2. The concept of storing a large amount of data in sensor attributes (even though it was an experiment to support custom Lovelace cards). Perhaps creating a separate entity for each detected problem would be a better approach. This would ensure that watchman findings are compatible with most Lovelace cards out of the box. The "repairs" feature is another option here to consider.
Mariusthvdb commented 4 months ago

well, if anything, I find the current install working very nicely! and I dread the moment you would change to creating repairs for each file Watchman finds..... maybe per category, but not per file, that would be not be a nice user experience at all, aas Ive seen moments in the config where over 70 or so files where either not used or missing etc etc....

this is one of those very useful components that probably will never be in core, so if you ask me, dont strive for that at all. Just make it better!

thanks for doing so!

btw a FR (will open a separate) would be to add a service to update the readings, (not create a report but actually a rerun of the component) after one has made changes on the config/yaml/recorder etc etc.

we now have to reload the integration, which is not very UI friendly. Seems also not to be reliable, because after commenting an offender, it is still reported after the reload of the integration. but that is per design:

By default, watchman's sensors are updated by homeassistant_started event.

I would just like to add a button in the Dashboard and click that ;-) Additional to the default.....

dummylabs commented 4 months ago

Thank you for your kind words!

we now have to reload the integration, which is not very UI friendly actually a rerun of the component

Watchman listens to several events in Home Assistant and should automatically update its sensors when Home Assistant starts and when configuration parts gets reloaded via UI (YAML configuration reloading). I will check it out, may be things have changed since this feature was released.

Mariusthvdb commented 4 months ago

Sure.

please also see if you can add functionality for changing recorded entities filters.

thats when I noticed .