NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Updated : 2026-03-16
ObjServiceLibreGlucose integrates with the LibreLinkUp API to
retrieve real-time and historical glucose data from FreeStyle Libre 2
continuous glucose monitors (CGM). Data is stored in the data_glucose
table for reporting, alerting, and workflow consumption.
The module lives in factory.service/package.gekkoridge/ as part of the
GekkoRidge home monitoring package.
LibreLinkUp is Abbott's mobile companion app for FreeStyle Libre. It
allows followers to view a patient's glucose data in real-time. The
API is the backend used by the LibreLinkUp Android/iOS app.
API base URL: https://api-eu.libreview.io/llu (EU region)
All endpoints require:
product: llu.android headerversion: 4.16.0 header (minimum version enforced server-side)Authorization: Bearer {token} header (after login)Account-Id: {sha256(user_id)} header (newer API requirement)base:
libre:
email: "user@example.com"
password: "your_password"
settings:
base_url: https://api-eu.libreview.io/llu
api_version: "4.16.0"
min_record_interval_seconds: 60
Login uses POST /llu/auth/login with email and plaintext password.
The API returns a JWT token valid for approximately 6 months.
Newer API versions (4.16+) require the Account-Id header, which is
the SHA256 hash of the user ID from the login response. This is
computed automatically at login.
The API also returns refreshed tokens in the ticket field of
subsequent responses. These are captured automatically to extend the
session.
| Endpoint | Method | Description |
|---|---|---|
POST /llu/auth/login |
authenticate() |
Login and obtain token |
GET /llu/connections |
get_connections() |
List patients with latest glucose |
GET /llu/connections/{id}/graph |
get_graph(patient_id) |
12h historical glucose data |
| Field | Description |
|---|---|
Value |
Glucose in mmol/L |
ValueInMgPerDl |
Glucose in mg/dL |
TrendArrow |
1=falling_fast, 2=falling, 3=stable, 4=rising, 5=rising_fast |
MeasurementColor |
1=in_range, 2=high, 3=low |
isHigh / isLow |
Boolean range flags |
Timestamp |
Local time of reading |
FactoryTimestamp |
UTC factory time |
Same fields as above except TrendArrow is not available on
historical graph readings.
Stores individual glucose readings as time-series rows. One row per
reading per patient. Guid is generated via get_uuid("LIBRE").
| Column | Type | Description |
|---|---|---|
| Guid | VARCHAR(64) PK | get_uuid("LIBRE") |
| PatientId | VARCHAR(128) | LibreLinkUp patient UUID |
| FirstName | VARCHAR(128) | Patient first name |
| LastName | VARCHAR(128) | Patient last name |
| ValueMmol | DECIMAL(5,1) | Glucose in mmol/L |
| ValueMgdl | INT | Glucose in mg/dL |
| TrendArrow | INT | Trend direction (1-5) |
| TrendLabel | VARCHAR(32) | Trend text (stable, rising, etc.) |
| MeasurementColor | INT | Range colour code (1-3) |
| ColorLabel | VARCHAR(32) | Range text (in_range, high, low) |
| IsHigh | TINYINT(1) | Above target range |
| IsLow | TINYINT(1) | Below target range |
| SensorSn | VARCHAR(32) | Libre sensor serial number |
| DeviceTimestamp | VARCHAR(64) | Local time from device |
| FactoryTimestamp | VARCHAR(64) | UTC factory time |
| TargetLow | INT | Patient low target (mg/dL) |
| TargetHigh | INT | Patient high target (mg/dL) |
| Package | VARCHAR(255) | Axion package |
| Module | VARCHAR(255) | ObjServiceLibreGlucose |
| CreateTime | DATETIME | DB insert timestamp |
| Method | Description |
|---|---|
record_glucose(min_interval) |
Fetch latest reading per patient, insert if not recorded within min_interval seconds |
record_graph(patient_id) |
Fetch 12h graph data, insert only readings not already in DB (dedup by DeviceTimestamp + PatientId) |
| Query | Description |
|---|---|
get_glucose_daily_summary |
Min/max/avg glucose, high/low/in-range counts per day |
get_glucose_hourly_average |
Hourly average glucose for charting |
get_time_in_range |
Time-in-range percentage between target bounds |
| Command | Required Context | Result Key |
|---|---|---|
current |
patient_id (optional) |
_libre_result (JSON) |
record |
— | _libre_result |
graph |
patient_id (optional) |
_libre_result |
connections |
— | _libre_result (JSON) |
python ObjServiceLibreGlucose.py authenticate
python ObjServiceLibreGlucose.py connections
python ObjServiceLibreGlucose.py current [patient_id]
python ObjServiceLibreGlucose.py graph [patient_id]
python ObjServiceLibreGlucose.py record
python ObjServiceLibreGlucose.py backfill [patient_id]
Patient: Francois Van Heyningen
Sensor: MH01E330N8 (Libre 2)
Current: 7.4 mmol/L (133 mg/dL) — stable
Target: 117-171 mg/dL (6.5-9.5 mmol/L)
Graph: 46 readings over 12 hours
Range: 6.7-7.4 mmol/L (in range)
from ObjServiceLibreGlucose import ObjServiceApi
svc = ObjServiceApi()
svc.authenticate()
glucose = svc.get_current_glucose()
print(f"{glucose['value_mmol']} mmol/L ({glucose['trend']})")
readings = svc.get_graph_readings()
for r in readings:
print(f" {r['timestamp']} {r['value_mmol']} mmol/L")
svc.record_glucose()
svc.record_graph()
Updated : 2026-03-16