Git Product home page Git Product logo

ha-polar's People

Contributors

burnnat avatar hwikene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ha-polar's Issues

"Detected I/O inside the event loop"; Only "daily activities" are updated

Thanks for this integration!
On my instance, only the "daily activities" are updated
The log presents those warnings, could it be related?

Log Details (WARNING)
Logger: homeassistant.util.async_
Source: util/async_.py:120
First occurred: 1:09:33 AM (187 occurrences)
Last logged: 2:40:04 PM

- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 84: return getattr(self._accesslink, self._endpoint.name).create_transaction(self._user_id, self._access_token)
- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 87: result = getattr(transaction, self._endpoint.list_method)()
- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 91: return getattr(transaction, self._endpoint.get_method)(url)
- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 205: transaction.commit()

Not working wioth newer Home Assistant versions

I'm running HA 2021.11.5 and couldn't install this with HACS. It says it's on a blacklist. Then I manually downloaded the files. After I restarted HA, the logs said the manifest.json was missing the versions attribute. I manually added it and restarted HA again. I added a basic configuration into the configuration.yaml. I registered with Polar as described and used my unique ID and Secret. When I restarted HA to load the config, it came up and said Loading Polar and it wouldn't go away. It blocked other things from loading. I guess this is too old and is incompatible with newer versions of HA. I might take a look at forking it and trying to fix it but that will need to wait until I have a lot more time. I'm not sure even where to start. Would be great to get this working again. Thanks.

oAuth Issue - invalid_grant

I can't make it work with Home Assistant 0.104.3.

On second step (callback from polar to home assiatant) i have this error in logs (in browser i can see 500 error).

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/config/custom_components/polar/config_flow.py", line 137, in get
    await hass.config_entries.flow.async_configure(flow_id, {'code': code})
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/polar/config_flow.py", line 97, in async_step_oauth
    token_response = self.accesslink.get_access_token(user_input['code'])
  File "/usr/local/lib/python3.7/site-packages/accesslink/accesslink.py", line 40, in get_access_token
    return self.oauth.get_access_token(authorization_code)
  File "/usr/local/lib/python3.7/site-packages/accesslink/oauth2.py", line 75, in get_access_token
    headers=headers)
  File "/usr/local/lib/python3.7/site-packages/accesslink/oauth2.py", line 143, in post
    return self.__request("post", endpoint=endpoint, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/accesslink/oauth2.py", line 137, in __request
    return self.__parse_response(response)
  File "/usr/local/lib/python3.7/site-packages/accesslink/oauth2.py", line 121, in __parse_response
    raise HTTPError(message, response=response)
requests.exceptions.HTTPError: 400 Bad Request: {"error":"invalid_grant"}```

Home assistant fails to load configuration

I am trying to follow the instructions, after creating a client in Polar web access I added to the /config/configuration.yaml file (at the bottom) the polar section (with my keys), but after restart the home assistant says that it doesn't recognize "polar".
Did I add the configuration in the correct place?

problem with config

I'm brand new to this space. Trying to use the Polar Flow integration. When I try to configure I get a direct to the website. On the website I get the following on my account page.

"OOPS, SOMETHING WENT WRONG SOMEWHERE ALONG THE WAY. LET'S TRY AGAIN."

what did I do wrong ??

Integration 'polar' not found.

Hi,

I am new to HASS and trying to add polar flow.
I'm struggling : what should i fill in as "Authorization callback domain" in the polar acceslink setup ? is thaat the external url of hass ? I have the "default_config" in my configuration.yaml and cannot find the internal and external url of my hass.
i've tried different url's but get stuck with "ERROR (MainThread) [homeassistant.config] Platform error: sensor " in my log and no polar object in my lovelace.
Thanks in advance for your guidance !

Issue updating while already in progress

If a second update is triggered while a first update is already in progress, the process never has a chance to commit the transaction, so the same updates will be repeated for the next call. If there are enough updates such that the update takes longer than the update interval, this will cause a never-ending loop.

Config flow could not be loaded

After setting up the AccessLink as described and adding to the config i get the following when adding the polar integration.
"Config flow could not be loaded"

Screenshot 2021-03-16 at 11 28 25

Running: core-2021.3.1 & supervisor-2021.03.6
Seems to be related to the depreciated base_url?
I see the following error in the log at startup:


Logger: homeassistant
Source: custom_components/polar/config_flow.py:26
First occurred: 11:57:18 AM (1 occurrences)
Last logged: 11:57:18 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/config/custom_components/polar/config_flow.py", line 66, in async_step_import
return await self.async_step_client(user_input)
File "/config/custom_components/polar/config_flow.py", line 74, in async_step_client
return await self.async_step_oauth()
File "/config/custom_components/polar/config_flow.py", line 94, in async_step_oauth
url=self.accesslink.get_authorization_url(state=self.flow_id)
File "/config/custom_components/polar/config_flow.py", line 44, in accesslink
callback_url = setup_oauth_callback(self.hass)
File "/config/custom_components/polar/config_flow.py", line 26, in setup_oauth_callback
callback_url = f"{hass.config.api.base_url}{AUTH_CALLBACK_PATH}"
AttributeError: 'ApiConfig' object has no attribute 'base_url'


Any ideas?

Add "update timestamp" attribute

This would expose the timestamp the data was recorded in AccessLink, as this may be different from the "last updated" time in Home Assistant, if the user recently entered data for a previous day.

No data loaded

I have created an account and authenticated, but non of the data loads. I have been training a dozen times since installed but no hint at any data. What do you need to see to help me get it working?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.