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

Usage in Home-assistant #23

Open
khzd opened this issue Sep 23, 2018 · 8 comments
Open

Usage in Home-assistant #23

khzd opened this issue Sep 23, 2018 · 8 comments

Comments

@khzd
Copy link

khzd commented Sep 23, 2018

Hello
thanks for this new release of python-nokia, now again withings :)

I'm trying to integrate it with home-assistant and i'm meeting a challenge around the callback url
I tried with success the nokia command with http:/home-assistant.io as a call back, with redirect me to home-assistant.io:)
but this is not the target usage, need to back called from My home-assistant.
would appreciate any help?
do you know if someone is using this release with home-assistant ? found no trace oh github :(
cheers

@jmtatsch
Copy link

Not sure if my custom component
https://github.com/jmtatsch/Home-Assistant-Config/blob/master/custom_components/sensor/nokia_health.py
survived the new update
but it may give you some hints.

@brad
Copy link
Member

brad commented Sep 24, 2018

@khzd I don't know of anyone using it for home assistant but I know someone using it for SmartHomeNG https://github.com/smarthomeNG/plugins/tree/master/nokia_health
A user named psilo99 managed to integrate the oauth2 process into the smarthomeng web interface if you want to come on to gitter to pick their brain about it.

@psilo909
Copy link

psilo909 commented Sep 24, 2018

@jmtatsch from what i experienced you will definitely need to update your component. the whole auth process changed. not sure how that can be implemented in home assistant, but you will need a web interface to allow the user to run through that process. you will also need something to save the tokens to. in our case i used items, that are persisted to the file system or to a database.

IMPORTANT: you dont need an internet URL as callback.. just an ordinary website in your LAN will be sufficiant.

By the way: the new version is only in develop branch, but completely functional: https://github.com/smarthomeNG/plugins/tree/develop/nokia_health

The callback (code parameter) is handled here: https://github.com/smarthomeNG/plugins/blob/develop/nokia_health/__init__.py#CL375

@khzd
Copy link
Author

khzd commented Sep 27, 2018

@jmtatsch
sorry i didn't precise that it was your HA sensor that I was migrationg to 1.0.0.
the Auth2 is implemented in HA and the configurator is asking to register in the correct url, and unfortunately I'm stick on the callback : what is the code that i need to configure in the withing site?

NB:
consumer key, client id ... are all ok, but the nokia site is responding that the callback is either
missing (nokia-healh 0.4.0)
or incorrect for nokia_health 1.0.0 all from @brad.
cheers

@MattL0
Copy link

MattL0 commented Jan 3, 2019

No links is working here :(

@vangorra
Copy link

Home assistant now has a withings component built in that uses this api.

@bmxp
Copy link

bmxp commented Dec 10, 2020

We get errors installing this lib due to outdated dependencies:

ERROR: nokia 1.2.0 has requirement arrow<0.13,>=0.12, but you'll have arrow 0.13.1 which is incompatible.
ERROR: nokia 1.2.0 has requirement cherrypy<17.4,>=17.3, but you'll have cherrypy 18.6.0 which is incompatible.
ERROR: nokia 1.2.0 has requirement requests<2.20,>=2.19, but you'll have requests 2.25.0 which is incompatible.

@brad could you probably update the dependencies?
@vangorra do you have similar problems in HomeAssistant?

@psilo909 could you check if we can provide a PR?

@vangorra
Copy link

The withing api used by home assistant does but have this issue.

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

7 participants