Garmin Connect Integration - Errors

Working in 2021.6.1, broken in 2021.6.2.
Have rolled back to 2021.6.1.

Per the dev, it’s fixed in 6.3: Bump garminconnect_aio to 0.1.4 by cyberjunky · Pull Request #51507 · home-assistant/core · GitHub

2 Likes

just upgraded to 2021.6.3, and my Garmin woes are resolved!! Thanks heaps to the dev :smiley:

2 Likes

I second that!

1 Like

although - I’m seeing this after a restart - I’m assuming it’s Garmin rate-limiting…

Logger: homeassistant.components.garmin_connect
Source: components/garmin_connect/init.py:41
Integration: Garmin Connect (documentation, issues)
First occurred: 1:57:14 PM (1 occurrences)
Last logged: 1:57:14 PM

Error occurred during Garmin Connect login request: Too many requests

Getting Unexpected error when I try to set up the integration on 2021.6.3.

This is in the logs (ContentEncodingError):

Logger: homeassistant.components.garmin_connect.config_flow
Source: deps/lib/python3.8/site-packages/garminconnect_aio/__init__.py:188
Integration: Garmin Connect (documentation, issues)
First occurred: 9:02:23 PM (1 occurrences)
Last logged: 9:02:23 PM

Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 890, in start
    message, payload = await self._protocol.read()  # type: ignore
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/streams.py", line 604, in read
    await self._waiter
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_proto.py", line 213, in data_received
    messages, upgraded, tail = self._parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 546, in aiohttp._http_parser.HttpParser.feed_data
  File "aiohttp/_http_parser.pyx", line 693, in aiohttp._http_parser.cb_on_headers_complete
  File "aiohttp/_http_parser.pyx", line 467, in aiohttp._http_parser.HttpParser._on_headers_complete
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/http_parser.py", line 823, in __init__
    raise ContentEncodingError(
aiohttp.http_exceptions.ContentEncodingError: 400, message='Can not decode content-encoding: brotli (br). Please install `brotlipy`'```

I checked for errors in the log after reading your comment, but mine is clean.

I’ll try again later on - might be requests from my IP, dunno

edit: seems to have sorted itself now

Update: installed brotlipy and the integration is working again. :+1:t3: I’d assumed aiohttp (which was throwing the error) would handle the dependency but I guess not.

2021.6.3 accepted the credentials, but not all of my sensors were available.
As with 6.1, some sensors are there, some are not.
And today, without touching on anything, all of my sensors turned to be unavailable.

wait a couple of hours, and they’ll come back again

mine were unavailable this morning, and back again this afternoon - I’m almost certain it’s ratelimiting happening somewhere

Yes I am expecting that to happen, but I am not seeing it to becoming available for more than
12 hours already.

Okey, so now I see some sensors available.
But as it goes again, still not for all.

A few days ago the Garmin Connect integration stopped working. I installed yesterday HA 2021.6.3 and when I try to login in the Garmin Connect integgration I get an “unknown error” on the screen.
In the logs I see that I need to install brotlipy:

aiohttp.http_exceptions.ContentEncodingError: 400, message='Can not decode content-encoding: brotli (br). Please install brotlipy

When I try to install it manual then I see this:
homeassistant@VanDerMedPlay:~$ pip3 install brotlipy
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: brotlipy in ./.pyenv/versions/3.8.10/lib/python3.8/site-packages (0.7.0)
Requirement already satisfied: cffi>=1.0.0 in ./.pyenv/versions/3.8.10/lib/python3.8/site-packages (from brotlipy) (1.14.5)
Requirement already satisfied: pycparser in ./.pyenv/versions/3.8.10/lib/python3.8/site-packages (from cffi>=1.0.0->brotlipy) (2.20)
WARNING: You are using pip version 20.2.4; however, version 21.1.2 is available.
You should consider upgrading via the ‘/home/homeassistant/.pyenv/versions/3.8.10/bin/python3.8 -m pip install --upgrade pip’ command.
homeassistant@VanDerMedPlay:~$

So no brotlipy is installed. Someone knows why?
Regards
Bernd

read the whole topic, follow the links, and you will see, hard work is now being done and still not finished to fix it… :wink:

@BernieV, I run hass on “bare” linux so for me it was as simple as installing brotlipy with pip. Your installation will depend on how you’re running hass on your machine but that should do the trick.

Finally it works… After times of trying and then I tried pip install brotlipy --force-reinstall and it works again. I suppose the brotlipy was broken.

I see that the new garminconnect_ha has been implemented in 2021.6.5 - when I upgraded, the existing integration told me it couldn’t be loaded, which I expected, so I deleted it.

Now it sits there spinning whilst trying to authenticate either of my two accounts, without any logs being created anywhere, and the Integration shows this in the interface

image

EDIT: rolled back to 2021.6.4, loaded the previous iteration of the Garmin Connect Integration, which worked for a single account, then rolled forward to 2021.6.5.

Once rolled forward, my Home Assistant installation wouldn’t finish starting until the Garmin Integration was removed, again nothing in any of the logs that I know the existence of

1 Like

Kind of same here, and it looks, like it will not come back again :frowning:

@rdnzl got a little tired of this. And i understand that.

I just rolled back to 2021.6.3 again and it’s still working ok… Did not work for me in 2021.6.4 or 2021.6.5.

I’d be happy to help fix it, but I’m doing well to code “Hello World” these days :frowning: