ThisSmartHouse / hass-arvee

A Home Assistant Component Designed for mobile installations (e.g. RVs, etc.)
6 stars 5 forks source link

Arvee for Home Assistant is not working #2

Open NaatuMik opened 9 months ago

NaatuMik commented 9 months ago

Fails to load timezonefinder component. I get this error in log:

Logger: homeassistant.util.package
Source: util/package.py:122
First occurred: 19:33:49 (3 occurrences)
Last logged: 19:35:25

Unable to install package timezonefinder==6.1.9: error: subprocess-exited-with-error × Building wheel for h3 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [11 lines of output] Traceback (most recent call last): File "/tmp/pip-build-env-pjhcv4_r/overlay/lib/python3.12/site-packages/skbuild/setuptools_wrap.py", line 645, in setup cmkr = cmaker.CMaker(cmake_executable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-pjhcv4_r/overlay/lib/python3.12/site-packages/skbuild/cmaker.py", line 148, in __init__ self.cmake_version = get_cmake_version(self.cmake_executable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-pjhcv4_r/overlay/lib/python3.12/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version raise SKBuildError(msg) from err Problem with the CMake installation, aborting build. CMake executable is /tmp/pip-build-env-pjhcv4_r/overlay/lib/python3.12/site-packages/cmake/data/bin/cmake [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for h3 ERROR: Could not build wheels for h3, which is required to install pyproject.toml-based projects
k3vmcd commented 9 months ago

I have a workaround in PR #5 while there is a build issue with h3.

brooksben11 commented 6 months ago

I have a workaround in PR #5 while there is a build issue with h3.

How would I go about using your workaround? I tried using your fork but it looks like it's the same as this one?

k3vmcd commented 6 months ago

I have a workaround in PR #5 while there is a build issue with h3.

How would I go about using your workaround? I tried using your fork but it looks like it's the same as this one?

Either manually edit the files to match PR #5 or use the timeapi.io branch of my fork: https://github.com/k3vmcd/hass-arvee/tree/timeapi.io

However, I just re-tested the unmodified code, and while it throws an error in the logs saying it failed to load the integration, it does still work on the latest Home Assistant with Core 2024.5.5, Supervisor 2024.05.1, and OS 12.3. So this workaround may not be necessary anymore if your Home Assistant is up to date.

k3vmcd commented 6 months ago

@brooksben11 I opened another pull request #6 which creates the services.yaml file that will eliminate the load error message when it actually had a successful build (example below).

2024-05-25 15:39:50.788 ERROR (MainThread) [homeassistant.helpers.service] Failed to load integration: arvee NoneType: None

k3vmcd commented 6 months ago

@brooksben11 My main branch at https://github.com/k3vmcd/hass-arvee/tree/main now has this services.yaml as well as allowing timezonefinder to be any version greater than the original code's 6.1.9.

brooksben11 commented 6 months ago

@brooksben11 My main branch at https://github.com/k3vmcd/hass-arvee/tree/main now has this services.yaml as well as allowing timezonefinder to be any version greater than the original code's 6.1.9.

I must be doing something stupid, because I again tried using your fork and same as the original it just seems to not load? I installed via HACS and restarted HA but no arvee services show up. I also tried adding arvee: to my config file, but when I do a check it just spins and spins (I never tried actually restarting though). I don't see anything relevant in my logs either.

As a sidenote, even though I entered your fork as a custom repository, it still lists the original owner when I actually download it, which is counter to what I've ever seen before (and no, I don't have both as custom repositories).

k3vmcd commented 6 months ago

@brooksben11 You should see the contents of https://github.com/k3vmcd/hass-arvee/tree/main/custom_components/arvee in your HA custom_components/arvee folder. You can manually copy the files there too, if needed.

arvee: needs to go into your configuration.yaml file

Then you'll have to restart HA to load the new custom_component files.

That should work. Let me know if it doesn't and I'll try to clear mine out and reload completely to test it again.

brooksben11 commented 5 months ago

Sorry for the late reply, been on the road (hence my want for this integration) and haven't had easy access to my computer.

@brooksben11 You should see the contents of https://github.com/k3vmcd/hass-arvee/tree/main/custom_components/arvee in your HA custom_components/arvee folder. You can manually copy the files there too, if needed.

arvee: needs to go into your configuration.yaml file

Then you'll have to restart HA to load the new custom_component files.

That should work. Let me know if it doesn't and I'll try to clear mine out and reload completely to test it again.

Just started from scratch again, and the same issue occurs when I try to add the arvee: line to my config file. When I 'Check Configuration' it just spins and spins. This is the error the logs show: Logger: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421 First occurred: 5:09:38 PM (3 occurrences) Last logged: 5:11:28 PM

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp_session/init.py", line 199, in factory response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, *request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin return await func(self, request, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/core.py", line 38, in post res = await check_config.async_check_ha_config_file(request.app[KEY_HASS]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 194, in async_check_ha_config_file component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: '_asyncio.Future' object has no attribute 'async_get_component'

k3vmcd commented 5 months ago

@brooksben11 I haven't been able to fully figure out your problem. There are a few things that have developed over the last few weeks:

  1. In Home Assistant 2024.6.0+ the default timezonefinder package has stopped working again as it is called incorrectly for asyncio. This was on my main branch to minimize changes from this original repo.
  2. I'm still not entirely sure how you are loading these HACS, because if you loaded the code from my current main branch then you would not be using aiohttp which is shown in your error message. Only the timeapi.io branch of my repo uses aiohttp.
  3. Assuming you were still just trying to load the timeapi.io branch, I researched this error. I can't tell exactly what would cause this error on your machine, but most other folks do not have SSL configured at all or configured incorrectly for Home Assistant which causes an issue when aiohttp attempts calls/callbacks over https. (Though, again, I can't say for certain this is your issue). Something else may cause this as well - especially if you weren't using the timeapi.io branch of my repo. Maybe if you just remove the entire "arvee" folder from your custom_components and then try to check your configuration again it would show whether it's just this arvee HACS causing this. If so, then you may have to configure your SSL before the timeapi.io calls will work. Otherwise, it's best to stick to the local calls with timezonefinder, however that goes back to point 1 where it's broken again. I'm currently trying to figure out how to fix the asyncio calls to get it to work again.