Logi Circle camera with HASS

@evanjd I’ve had the Logi Circle configuration working really well for several months until recently. I was having some issues with HA and recently deleted the .logi_cache.pickle file. I then deleted the existing Logi Integration, rebooted, and tried setting up the Logi Integration again. I’m getting prompted for the link, I’m able to authorize HA via Logitech, but when I go back to the integration page in HA and hit Submit I get the message to follow the link again. Here is what my log shows:

2020-04-23 19:01:37 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 109, in async_init
result = await self._async_handle_step(flow, flow.init_step, data)
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 172, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File “/usr/src/homeassistant/homeassistant/components/logi_circle/config_flow.py”, line 148, in async_step_code
return await self._async_create_session(code)
File “/usr/src/homeassistant/homeassistant/components/logi_circle/config_flow.py”, line 178, in _async_create_session
account_id = (await logi_session.account)[“accountId”]
File “/usr/local/lib/python3.7/site-packages/logi_circle/init.py”, line 66, in account
return await self._fetch(ACCOUNT_ENDPOINT)
File “/usr/local/lib/python3.7/site-packages/logi_circle/init.py”, line 205, in _fetch
resp.raise_for_status()
File “/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py”, line 946, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 429, message=‘’, url='https://api.circle.logi.com/api/accounts/self

This doesn’t look like the permission issue, but something else. Any help would be greatly appreciated!

Hmm, a 429 error suggests you’ve hit a rate limit on the API. How many cameras do you have?

I have 3 cameras.

OK - I have the same so it’s probably not that.

I just deleted and re-added my integration and it worked. Hard to tell what’s gone wrong here, the Logi API wrapper does throttle requests to most endpoints to prevent this from happening, but maybe there’s a bug somewhere.

My suggestion would be to remove the integration, then add it back again in 24 hours (I’m assuming/hoping that Logi sample API calls over 24 hours, so whatever rate limit you’ve hit will lift the following day). If it happens again, let me know and I’ll do what I can to fix this.

I just restored from a snapshot and retried the Logi integration. I’m back up and running. Not sure what happened…

I have a problem setting up my configuration. I go to logi.com, authenticate and get back to my redirect-URI which is at Netlify. When I change that to http://192.168.1.20:8123/api/logi_circle/?code=xxxxxxxxxxxxxxxxxxxxxx&lang=sv I get “404: Not Found” and in the log I get the following message:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method

I run hassio on Synology, Hass.io on Synology DSM (native package)

Any help appreciated

Drop the / after logi_circle. So the URL should be: http://192.168.1.20:8123/api/logi_circle?code=xxxxxxxxxxxxxxxxxxxxxx

Thanks Evan! Now it’s working :grinning:

1 Like

Hi, i’ve been using the legacy integration meanwhile i receive the api token, but after 6 months of requesting i didnt receive any mail from logitech, now is not working the legacy integration after april 6, can anyone help me?

Hi @evanjd

I’m changing my ssid at home. To change what WiFi the Logitech Circle connects to, it needs a factory reset. Do you expect me to have troubles with the api key after a factory reset?

I reset mine a year ago without issue, you should be OK.

1 Like

hello,

I’ve just add my logi circle camera to my HA.
But i just can see snapshot and not the live stream.
Someone can tell me if it’s possible to see the live stream and if yes how can i setup ?
Regards,

I think I’m having a Logi Circle problem similar to a few others, where I follow the link to authenticate and it says it was save {"message": "Authorisation code saved"} but then it continues to tell me to do it again when trying to click “Submit”. I’ll paste the log belong in case its helpful.

I tried following the GitHub issue where it talks about systemd, but I’m not sure I understood how to take action. Any help is appreciated!

Logger: homeassistant
Source: components/logi_circle/config_flow.py:177 
First occurred: 9:02:00 AM (1 occurrences) 
Last logged: 9:02:00 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 150, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 176, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 257, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/logi_circle/config_flow.py", line 146, in async_step_code
    return await self._async_create_session(code)
  File "/usr/src/homeassistant/homeassistant/components/logi_circle/config_flow.py", line 177, in _async_create_session
    account_id = (await logi_session.account)["accountId"]
  File "/usr/local/lib/python3.8/site-packages/logi_circle/__init__.py", line 66, in account
    return await self._fetch(ACCOUNT_ENDPOINT)
  File "/usr/local/lib/python3.8/site-packages/logi_circle/__init__.py", line 205, in _fetch
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://api.circle.logi.com/api/accounts/self')

I’m having the same problem. Did you figure this out @hdkiller?

Does anyone know how to download (no record) the videos of last day?

can you please tell me how to configure it in a hassos environment?

Hi Evan,
I have 4 cameras now and usually once a day I end up getting the dreaded "ClientResponseError: 429, message=’’ . This last several hours until I assume Logitech resets my rate limit. I’ve deleted and re-added the integration as you suggested with no change. Is there anything that can be done to limit the connections Home Assistant is making to the Logitech API. Most of my cameras only turn on recording when my home alarm is set. Once I start hitting the rate limit, I can’t turn on or off recording. Thanks.

Hey all, I see Killian asked back in May, but there really wasn’t a response. Can anyone confirm if Live Streaming from Logi Circle to HASS is supposed to be operational at this point? Or is it still only expected to have updating stills?

This is now on the OAuth2 request form:
“Starting Jan 1st, 2022, no new requests will be accepted.”
I tried deleting and adding back the integration but I get a blank page when I “submit”.

I just had to change my redirect (not a new request) so we’ll see if they even will honor that.

I noticed this too. :frowning: I e-mailed Logitech but the response wasn’t encouraging.

I’ve raised an issue: Logitech no longer accepting API applications for Logi Circle API · Issue #71945 · home-assistant/core · GitHub

And a PR to add an alert to the integration’s docs: Add alert for Logi Circle by evanjd · Pull Request #528 · home-assistant/alerts.home-assistant.io · GitHub