Giter Site home page Giter Site logo

Comments (8)

ondrej1024 avatar ondrej1024 commented on July 4, 2024

Hi,

I have just recently implemented a new Carelink client which is based on the API used by the Carelink Connect app. This new client has the advantage that it uses a refresh token in addition to the access token. The refresh token can be used to get a new access token, even of it is expired (for a week afterwards). The latest tokens are always saved to a file on disk, so everything works also after reboot.

You can have a look here:
https://github.com/ondrej1024/carelink-python-client/tree/new_client/new_api

The proxy is still missing in this folder, I am still porting and testing it. But you can already try the login script carelink_carepartner_api_login.py (which generates the new token file) and the carelink_client2_cli.py program, to see if it works for you.

from carelink-python-client.

GertVanderstukken avatar GertVanderstukken commented on July 4, 2024

Cool!

I will try it while waiting for the proxy....
Thanks a lot.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

I have just added the new proxy new_api/carelink_client2_proxy.py and updated the README. It's running fine here. Only the WebGUI with the proxy status information is still very basic. I plan to add the possibility to upload the token file via this GUI. Currently you have to copy it manually to the device where the proxy is running.

Please give it a try and report back.

from carelink-python-client.

GertVanderstukken avatar GertVanderstukken commented on July 4, 2024

Great
I will test it tomorrow and let you know!

from carelink-python-client.

GertVanderstukken avatar GertVanderstukken commented on July 4, 2024

OK, I could not wait, so I tested it right away and it works!

I only have to look into the systemd Unit/Service file.
I had to insert an ExecStartPre with a delay, because for some reason the start fails without it.
However: this has off course nothing to do with your script/work.

Right now, I can reboot my server and after the reboot, the proxy is working and exposing the webclient without any manual intervention: Perfect!

I will keep on monitoring and also try to find the exact reason why I have to insert the delay into the service file.
If I find something I will post it here so other people can benefit from it.

Great work!!!

from carelink-python-client.

GertVanderstukken avatar GertVanderstukken commented on July 4, 2024

OK,
I just adapted the systemd service file like this:

From:
After=syslog.target network.target

To:
After=syslog.target network-online.target

All is good now.
FYI: I'm running this on Rocky Linux 8.9

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

Thanks for testing and your feedback. Good to hear that things are working also for you.
I plan to add some more info in the README to describe how to install the proxy as systemd service.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

The new proxy based on the Carelink client2 has been running continuously for 2 weeks here. So it seems stable, at least for me. I have merged the new client code to the main branch (the old code is still in the client1 folder).

Closing this issue.

from carelink-python-client.

Related Issues (15)

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.