<commit_before># minimed-connect-to-nightscout

[MiniMed Connect] is a device which communicates with a Medtronic insulin pump over 916MHz radio to gather data about pump status. This data may include readings from an Enlite continuous glucose monitor (CGM). The Connect forwards pump data via Bluetooth LE to a [proprietary app][connect-app] running on an iPhone. The iPhone app uploads the data to Medtronic's servers, enabling authorized users to view it on the [Medtronic CareLink Connect][carelink] website.

[Nightscout] is an open source, DIY project that allows real-time access to CGM data on any platform. The core of the Nightscout project is [cgm-remote-monitor], a web service which can receive and broadcast CGM data using a Mongo database. Various other software projects communicate with an instance of `cgm-remote-monitor`, either to transmit data from a CGM device, or to display that CGM data on a computer, smartphone/tablet, or smartwatch.

**minimed-connect-to-nightscout** is a web scraper which sends data from Medtronic CareLink Connect to Nightscout. It does so by posing as a web browser, logging into CareLink Connect, periodically downloading pump status data from the Medtronic server, and uploading that data to a Nightscout server.

## Prerequisites

* A [MiniMed Connect] and compatible Medtronic insulin pump
* An iPhone running the [MiniMed Connect app][connect-app]
* Username and password for a [CareLink][carelink] account linked to the Connect
* A working Nightscout website and Mongo database

## Install

1. Install [PhantomJS].
1. Clone this repository or [download a zip] with the latest version.
1. Create a `config.js` file based on the provided `config.js.example`.
1. Run `phantomjs scraper.js` and leave it running.

**Coming soon:** Deploy instructions for Heroku

## Currently supported data

* Sensor glucose values
* Pump: active insulin, reservoir level in units, reservoir level as percentage
* MiniMed Connect: battery level, connection status to phone, connection status to pump
* Pump model and serial number (included in all Nightscout entries)<commit_msg>It reports pump battery level, too<commit_after># minimed-connect-to-nightscout

[MiniMed Connect] is a device which communicates with a Medtronic insulin pump over 916MHz radio to gather data about pump status. This data may include readings from an Enlite continuous glucose monitor (CGM). The Connect forwards pump data via Bluetooth LE to a [proprietary app][connect-app] running on an iPhone. The iPhone app uploads the data to Medtronic's servers, enabling authorized users to view it on the [Medtronic CareLink Connect][carelink] website.

[Nightscout] is an open source, DIY project that allows real-time access to CGM data on any platform. The core of the Nightscout project is [cgm-remote-monitor], a web service which can receive and broadcast CGM data using a Mongo database. Various other software projects communicate with an instance of `cgm-remote-monitor`, either to transmit data from a CGM device, or to display that CGM data on a computer, smartphone/tablet, or smartwatch.

**minimed-connect-to-nightscout** is a web scraper which sends data from Medtronic CareLink Connect to Nightscout. It does so by posing as a web browser, logging into CareLink Connect, periodically downloading pump status data from the Medtronic server, and uploading that data to a Nightscout server.

## Prerequisites

* A [MiniMed Connect] and compatible Medtronic insulin pump
* An iPhone running the [MiniMed Connect app][connect-app]
* Username and password for a [CareLink][carelink] account linked to the Connect
* A working Nightscout website and Mongo database

## Install

1. Install [PhantomJS].
1. Clone this repository or [download a zip] with the latest version.
1. Create a `config.js` file based on the provided `config.js.example`.
1. Run `phantomjs scraper.js` and leave it running.

**Coming soon:** Deploy instructions for Heroku

## Currently supported data

* Sensor glucose values
* Pump: active insulin, reservoir level in units, reservoir level as percentage, battery level
* MiniMed Connect: battery level, connection status to phone, connection status to pump
* Pump model and serial number (included in all Nightscout entries)
{'fraction_non_alphanumeric': 0.05628517823639775, 'fraction_numerical': 0.003283302063789869, 'mean_word_length': 4.973389355742297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3154553', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1062, 'n_words': 602}