Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICLOUD DEVICES #3

Closed
poudenes opened this issue Dec 18, 2022 · 5 comments
Closed

ICLOUD DEVICES #3

poudenes opened this issue Dec 18, 2022 · 5 comments

Comments

@poudenes
Copy link

poudenes commented Dec 18, 2022

Installed everything. Integration migration seems to be working ok.

Now I try to view the "iCloud devices" to check and get a unknown error in red.

Also all sensors are empty.

10:14:16a          iCloud initializing interface
10:14:16a          iCloud3 Error > An error occurred communicating with iCloud Account servers. This can be caused by:, •You
                                        r network or wifi is down, or, •Apple iCloud servers are down, Error-(`Invalid email/password combin
10:14:16a          All Devices are offline or have a pending status. They may be in AirPlane Mode and not available
10:14:16a          Apple ID Verification - Completed

Then I did a manual re-enter username and password. Give the 2way authcode and now this is de log:

10:21:56a          AUTHENTICATE PyiCloud, [email protected], config_flow
10:21:57a          ADDED FamShr PyiCloudDevice-, Apple Watch van Peter/QkKnPAD4aj
10:21:57a          NO LOCATION FamShr PyiCloudData-Peter’s MacBook Pro
10:21:57a          ADDED FamShr PyiCloudDevice-, iMac van Peter/2DdaH7FTtm
10:21:57a          ADDED FamShr PyiCloudDevice-, Peter iPhone/5yAbrrC4uE
10:21:57a          NO LOCATION FamShr PyiCloudData-cenkay’s iPhone
10:21:57a          NO LOCATION FamShr PyiCloudData-cenkay’s iPhone
10:21:57a          NO LOCATION FamShr PyiCloudData-iPhone
10:21:57a          ADDED FamShr PyiCloudDevice-, Cenkay 13/nA/v6NXyDu
10:21:57a          ADDED FamShr PyiCloudDevice-, AirPods van Cenkay/nKz8eqmhd1
10:21:57a          CREATED PyiCloud FamShr, [email protected], config_flow
10:21:59a          CREATED PyiCloud FmF, [email protected], config_flow
10:22:14a          Alert > Apple ID Verification completed successfully (366347)
10:22:14a          Cancel previous alerts

Still all sensors not updated. Battery has a !
Will it change when I will move from home so there will be data coming in?

Also the ICLOUD DEVICES Gives me same error "unknown error in red."

@poudenes
Copy link
Author

Maybe this is also related to this error?

Scherm­afbeelding 2022-12-18 om 10 55 27

@gcobb321
Copy link
Owner

The Display As screenshot is not related to the device NO LOCATION items in the first message.

Ic3 will restart when exiting the configurator and should locate the devices. If not, turn on ‘rawdata’ logging Go to the Configurator > menu page 2 > Other Parameters > Log Level > Rawdata. That will dump the data received from iCloud to the HA log file.

@poudenes
Copy link
Author

The Display As screenshot is not related to the device NO LOCATION items in the first message.

Ic3 will restart when exiting the configurator and should locate the devices. If not, turn on ‘rawdata’ logging Go to the Configurator > menu page 2 > Other Parameters > Log Level > Rawdata. That will dump the data received from iCloud to the HA log file.

Did the change but there is no RAW data visible in HA. Restart iCloud and try to reload it.

@poudenes
Copy link
Author

I see same errors now:

2022-12-18 15:43:35.100 ERROR (MainThread) [icloud3] Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
Traceback (most recent call last):
  File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 151, in request
    response = Session.request(self, method, url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1293, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 219, in putrequest
    return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 180, in protected_loop_func
    check_loop(func, strict=strict)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop
    raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
2022-12-18 15:43:35.110 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 151, in request
    response = Session.request(self, method, url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1293, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 219, in putrequest
    return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 180, in protected_loop_func
    check_loop(func, strict=strict)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop
    raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)

During handling of the above exception, another exception occurred:

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 81, 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 241, 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 281, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/icloud3/config_flow.py", line 556, in async_step_menu
    return await self.async_step_device_list()
  File "/config/custom_components/icloud3/config_flow.py", line 1512, in async_step_device_list
    self._build_device_form_selection_lists()
  File "/config/custom_components/icloud3/config_flow.py", line 1998, in _build_device_form_selection_lists
    self._build_opt_famshr_devices_list()
  File "/config/custom_components/icloud3/config_flow.py", line 2012, in _build_opt_famshr_devices_list
    devices_desc = start_ic3.get_famshr_devices(self.PyiCloud)
  File "/config/custom_components/icloud3/support/start_ic3.py", line 1315, in get_famshr_devices
    Gb.PyiCloud.FindMyFriends.refresh_client()
  File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 1161, in refresh_client
    response = self.Session.post(self._friend_endpoint, data=mock_payload, params=params)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 156, in request
    self._raise_error(-2, "Failed to establish a new connection")
  File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 272, in _raise_error
    raise api_error
custom_components.icloud3.support.pyicloud_ic3.PyiCloudAPIResponseException: Failed to establish a new connection (Status Code -2)

@gcobb321
Copy link
Owner

Beta 2 has been posted. You will find it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants