Skip to content

Commit 7fbe2bb

Browse files
Merge pull request #188 from timoschlueter/feature/support-cn-region
Support for CN region added
2 parents 716da52 + 1b13082 commit 7fbe2bb

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ work with at least Freestyle Libre 2 (FGM) and Libre 3 CGM sensors.
1111

1212
The script takes the following environment variables
1313

14-
| Variable | Description | Example | Required |
15-
|--------------------------|----------------------------------------------------------------------------------------------------------------------------|------------------------------------------|----------|
16-
| LINK_UP_USERNAME | LibreLink Up Login Email | mail@example.com | X |
17-
| LINK_UP_PASSWORD | LibreLink Up Login Password | mypassword | X |
18-
| LINK_UP_CONNECTION | LibreLink Up Patient-ID. Can be received from the console output if multiple connections are available. | 123456abc-abcd-efgh-7891def | |
19-
| LINK_UP_TIME_INTERVAL | The time interval of requesting values from libre link up | 5 | |
20-
| LINK_UP_REGION | Your region. Used to determine the correct LibreLinkUp service (Possible values: AE, AP, AU, CA, DE, EU, EU2, FR, JP, US, LA, RU) | EU | |
21-
| NIGHTSCOUT_URL | Hostname of the Nightscout instance (without https://) | nightscout.yourdomain.com | X |
22-
| NIGHTSCOUT_API_TOKEN | SHA1 Hash of Nightscout access token | 162f14de46149447c3338a8286223de407e3b2fa | X |
23-
| NIGHTSCOUT_DISABLE_HTTPS | Disables the HTTPS requirement for Nightscout URLs | true | |
24-
| NIGHTSCOUT_DEVICE_NAME | Sets the device name used in Nightscout | nightscout-librelink-up | |
25-
| LOG_LEVEL | The setting of verbosity for logging, should be one of info or debug | info | |
26-
| SINGLE_SHOT | Disables the scheduler and runs the script just once | true | |
27-
| ALL_DATA | Upload all available data from LibreLink Up instead of just data newer than last upload. LibreLinkUp sometimes lags behind in reporting recent historical data, so it is advised to run the script with ALL_DATA set to true at least once a day. | true | |
14+
| Variable | Description | Example | Required |
15+
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|----------|
16+
| LINK_UP_USERNAME | LibreLink Up Login Email | mail@example.com | X |
17+
| LINK_UP_PASSWORD | LibreLink Up Login Password | mypassword | X |
18+
| LINK_UP_CONNECTION | LibreLink Up Patient-ID. Can be received from the console output if multiple connections are available. | 123456abc-abcd-efgh-7891def | |
19+
| LINK_UP_TIME_INTERVAL | The time interval of requesting values from libre link up | 5 | |
20+
| LINK_UP_REGION | Your region. Used to determine the correct LibreLinkUp service (Possible values: AE, AP, AU, CA, DE, EU, EU2, FR, JP, US, LA, RU, CN) | EU | |
21+
| NIGHTSCOUT_URL | Hostname of the Nightscout instance (without https://) | nightscout.yourdomain.com | X |
22+
| NIGHTSCOUT_API_TOKEN | SHA1 Hash of Nightscout access token | 162f14de46149447c3338a8286223de407e3b2fa | X |
23+
| NIGHTSCOUT_DISABLE_HTTPS | Disables the HTTPS requirement for Nightscout URLs | true | |
24+
| NIGHTSCOUT_DEVICE_NAME | Sets the device name used in Nightscout | nightscout-librelink-up | |
25+
| LOG_LEVEL | The setting of verbosity for logging, should be one of info or debug | info | |
26+
| SINGLE_SHOT | Disables the scheduler and runs the script just once | true | |
27+
| ALL_DATA | Upload all available data from LibreLink Up instead of just data newer than last upload. LibreLinkUp sometimes lags behind in reporting recent historical data, so it is advised to run the script with ALL_DATA set to true at least once a day. | true | |
2828

2929
## Usage
3030

@@ -98,16 +98,19 @@ services:
9898
9999
### Hashing API token
100100
101-
`NIGHTSCOUT_API_TOKEN` must be a SHA1 hash of an Access Token from Nightscout (_Add new subject_ first in Nightscout's _Admin Tools_ if required), e.g. your Access Token for a subject named _LibreLinkUp_ might be `librelinku-123456789abcde`.
101+
`NIGHTSCOUT_API_TOKEN` must be a SHA1 hash of an Access Token from Nightscout (_Add new subject_ first in Nightscout's _Admin Tools_ if required), e.g. your
102+
Access Token for a subject named _LibreLinkUp_ might be `librelinku-123456789abcde`.
102103

103104
Obtain your hash with
104105

105106
```shell
106107
echo -n "librelinku-123456789abcde" | sha1sum | cut -d ' ' -f 1
107108
```
109+
108110
(use `shasum` instead of `sha1sum` on Mac)
109111

110112
which will print the hash (40 characters in length):
113+
111114
```
112115
14c779d01a34ad1337ab59c2168e31b141eb2de6
113116
```

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightscout-librelink-up",
3-
"version": "2.7.4",
3+
"version": "2.8.0",
44
"description": "Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout",
55
"main": "dist/index.js",
66
"scripts": {

src/constants/llu-api-endpoints.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
interface LluApiEndpoints {
1+
interface LluApiEndpoints
2+
{
23
[key: string]: string;
34
}
45

@@ -15,4 +16,5 @@ export const LLU_API_ENDPOINTS: LluApiEndpoints = {
1516
US: "api-us.libreview.io",
1617
LA: "api-la.libreview.io",
1718
RU: "api.libreview.ru",
19+
CN: "api-cn.myfreestyle.cn"
1820
} as const;

0 commit comments

Comments
 (0)