jesserockz/ha-leafspy

Error trying to set up

jatgm1 opened this issue · 8 comments

Version of the custom_component

Configuration

Add your logs here.

Describe the bug

A clear and concise description of what the bug is.

Debug log


Add your logs here.

Logger: aiohttp.server
Source: helpers/network.py:201
First occurred: 5:34:53 AM (2 occurrences)
Last logged: 5:34:55 AM

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 435, in _handle_request
resp = await request_handler(request)
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py”, line 504, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py”, line 117, in impl
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/security_filter.py”, line 60, in security_filter_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/forwarded.py”, line 100, in forwarded_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 28, in request_context_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 79, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 219, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 137, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 206, in post
return await super().post(request, flow_id)
File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 260, in async_configure
result = await self._async_handle_step(
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 335, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File “/config/custom_components/leafspy/config_flow.py”, line 29, in async_step_user
url = get_url(self.hass, prefer_external = True, prefer_cloud = True)
File “/usr/src/homeassistant/homeassistant/helpers/network.py”, line 201, in get_url
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError

Just removed leaf spy from hacs, reinstalled, and then hit restart, and tried again and got the same error

Is there a port I need to open or something? I have Apache running and it said something about a http server. Should I change Apache off of port 80?

Edit I turned it off and still it wouldn't setup the Integration. I'm out of ideas.

So hey it won't let me set the Internal url because it uses https and not the cloud naba thing. I think maybe that's related.

It does not use the internal URL, only the external/internet URL. If that is going through Apache then that is fine. Mine is via Caddy.

What?

Ok so idk how to set up an external URL via the GUI but I have an error that mentions something about a URL and idk how to make it work,
Edit do I need to use caddy as a reverse proxy to access the leaf spy thing?

No you have Apache already.

Open your Home Assistant instance and manage your systems network configuration.

Screenshot from 2022-05-07 11-01-35

Ok I got it I think but idk what the car name is and the Integration hasn't make and entities I know of.

Edit
I used the name of what it's called when I connect it to Bluetooth and restarted the integration and put it in test mode and it seems to work now I think.