archerne / hastarlink

Starlink Statistics and Alerts Integration
GNU General Public License v3.0
10 stars 1 forks source link

IP and bug #4

Closed Traxeronus closed 1 year ago

Traxeronus commented 2 years ago

Hi, when setting up new integration, it shows me an error. The log is:

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/starlink/__init__.py:183

Integration: Starlink Statistics and Alerts (documentation, issues)
First occurred: 20:59:47 (1 occurrences)
Last logged: 20:59:47

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/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 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *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 280, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_flow.py", line 71, in async_step_confirm
    has_devices = await cast(
  File "/config/custom_components/starlink/config_flow.py", line 14, in _async_has_devices
    devices = await api_client.get()
  File "/config/custom_components/starlink/__init__.py", line 183, in get
    if responseObj["latitude"] == '':
KeyError: 'latitude'

Also I have bypass mode without Starlink router, so my IP is not 192.168... Is there any chance to change it?

Thanks, good job, M.

archerne commented 2 years ago

The starlink dish is hardcoded to 192.168.100.1, if you can't get to that ip from your computer/phone then HomeAssistant cannot get to it either. In order to get to the page on your local network you will need to create a route from the WAN port on the router to 192.168.100.1 see instructions here https://www.reddit.com/r/Starlink/comments/jxkz1q/anyone_know_how_to_get_the_starlink_app_to_work/

Traxeronus commented 2 years ago

I’m on the dishy webpage. But there is another error when attempting to add the integration.

I have a square dish.

I don’t have any location enable/disable option in advanced settings.

This error originated from a custom integration.

Logger: aiohttp.server

Source: custom_components/starlink/dish_common.py:274

Integration: Starlink Statistics and Alerts (documentation, issues)

First occurred: 22:17:09 (1 occurrences)

Last logged: 22:17:09

Error handling request

Traceback (most recent call last):

File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request

resp = await request_handler(request)

File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle

resp = await handler(request)

File "/usr/local/lib/python3.10/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 82, in ban_middleware

return await handler(request)

File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware

return await handler(request)

File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle

result = await result

File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post

return await super().post(request, flow_id)

File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper

result = await method(view, request, data, *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 280, in async_configure

result = await self._async_handle_step(

File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step

result: FlowResult = await getattr(flow, method)(user_input)

File "/usr/src/homeassistant/homeassistant/helpers/config_entry_flow.py", line 71, in async_step_confirm

has_devices = await cast(

File "/config/custom_components/starlink/config_flow.py", line 14, in _async_has_devices

devices = await api_client.get()

File "/config/custom_components/starlink/init.py", line 174, in get

response = _dish_grpc_text.main(obj)

File "/config/custom_components/starlink/dish_grpc_text.py", line 288, in main

lines.append(self.loop_body(opts, gstate, print_file))

File "/config/custom_components/starlink/dish_grpc_text.py", line 239, in loop_body

rc, status_ts, hist_ts = self._dish_common.get_data(opts,

File "/config/custom_components/starlink/dish_common.py", line 233, in get_data

rc, status_ts = self.get_status_data(

File "/config/custom_components/starlink/dish_common.py", line 274, in get_status_data

groups = starlink_grpc.status_data(context=gstate.context)

File "/usr/local/lib/python3.10/site-packages/starlink_grpc.py", line 763, in status_data

"is_snr_above_noise_floor": status.is_snr_above_noise_floor,

AttributeError: 'DishGetStatusResponse' object has no attribute 'is_snr_above_noise_floor'

From: archerne @.> Sent: Thursday, October 20, 2022 9:15 PM To: archerne/hastarlink @.> Cc: Traxeronus @.>; Author @.> Subject: Re: [archerne/hastarlink] IP and bug (Issue #4)

The starlink dish is hardcoded to 192.168.100.1, if you can't get to that ip from your computer/phone then HomeAssistant cannot get to it either. In order to get to the page on your local network you will need to create a route from the WAN port on the router to 192.168.100.1 see instructions here https://www.reddit.com/r/Starlink/comments/jxkz1q/anyone_know_how_to_get_the_starlink_app_to_work/

— Reply to this email directly, view it on GitHub https://github.com/archerne/hastarlink/issues/4#issuecomment-1286020672 , or unsubscribe https://github.com/notifications/unsubscribe-auth/A3IEAUJXHDQYCQVX4ROKAGLWEGK4DANCNFSM6AAAAAARKOIEAQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/A3IEAUNJU2JLKCQEDTENUCLWEGK4DA5CNFSM6AAAAAARKOIEASWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSMU4PEA.gif Message ID: @. @.> >