GithubHelp home page GithubHelp logo

arandall / home-assistant-carelink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yo-han/home-assistant-carelink

0.0 0.0 0.0 720 KB

Unofficial Home Assistant Carelink Component

License: MIT License

Shell 0.79% Python 99.21%

home-assistant-carelink's Introduction

Carelink Integration - Home Assistant

Custom component for Home Assistant to interact the Carelink platform by Medtronic with integrated Nightscout uploader. The api is mostly the works of @ondrej1024 who made the Python port from another JAVA api.

hacs_badge "Buy Me A Coffee"

Carelink integration preview

Supported devices

Installation using HACS

HACS is a community store for Home Assistant. You can install HACS and then install Carelink Integration from the HACS store.

Then you can install the integration Open your Home Assistant instance and start setting up a new integration.

Manual

Copy the custom_components/carelink to your custom_components folder. Reboot Home Assistant and configure the 'Carelink' integration via the integrations page or press the blue button below.

Open your Home Assistant instance and start setting up a new integration.

Integration Setup

Carelink Login Data

The needed information for the authentification process can either be provided as file (=logindata.json), or entered during the initial setup of the integration.

Get the data

The Home Assistant Carelink Integration needs the initial login data stored in the logindata.json file. This file can be created by running the login script on a PC with a screen. The login script from @ondrej1024's Carelink Python API, written by @palmarci (Pal Marci), was slightly modified and can be found here "carelink_carepartner_api_login.py".

Simply run:

python carelink_carepartner_api_login.py 

You might need to install the following Python packages to satisfy the script's dependencies:

- requests
- OpenSSL (pip install pyOpenSSL)
- seleniumwire (pip install selenium-wire)

The script opens a Firefox web browser with the Carelink login page. You have to provide your Carelink patients or follower credentials (recommended) and solve the reCapcha. On successful completion of the login, the data file will be created with the following structure:

grafik

Provide the data

Either the content of the logindata.json file can be taken over into the setup of the HA Carelink integration, or the entire file can be uploaded into the custom_componend/carelink folder (recommended).

grafik

All parameters during setup are optional and a provided file will have a higher priority and overwrite the manual configuration. If the file was copied to custom_components/carelink before the integration setup was started in Home Assistant, all parameters during the setup can stay empty. With those information, the Home Assistant Carelink Integration will be able to automatically refresh the login data when it expires. It should be able to do so within one week of the last refresh.

Scan Interval

The scan interval of the integration can be configured during the integration setup. User can configure anything between 30 and 300 seconds. Default is 60 seconds.

Nightscout

To use the Nightscout uploader, it is mandatory to provide the Nightscout URL and the Nightscout API secret. The Nightscout uploader can upload all SG data and add Treatments with the amount of carbs and insulin. In order to be able to show the active insulin reported by the pump, the remaining reservoir amount parameter of the nightscout pump plugin has been reused. grafik

Uploaded data

  • DeviceStatus
  • Glucose entries
  • Basal
  • Bolus
  • AutoBolus
  • Alarms
  • Alerts
  • Messages

Enable debug logging

The logger integration lets you define the level of logging activities in Home Assistant. Turning on debug mode will show more information about unsupported devices in your logbook.

logger:
  default: critical
  logs:
    custom_components.carelink: debug

Limitations

  • CareLink MFA is not supported
  • Notification messages are in English

Requirements

  • CareLink follower account (with MFA NOT ENABLED)
  • Guardian Connect CGM outside US: patient or care partner account
  • Guardian Connect CGM inside US: not tested yet! (possibly a care partner account)
  • 7xxG pump outside US: care partner account (same as for Medtronic CareLink Connect app)
  • 7xxG pump inside US: care partner account (same as for Medtronic CareLink Connect app)

home-assistant-carelink's People

Contributors

yo-han avatar sedy89 avatar increddibelly avatar timvermeulen avatar

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.