From 8c019291ab1ebd6b125e8d004cdd4dc06eb06a10 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Thu, 27 Jun 2024 13:38:13 +0100 Subject: [PATCH 1/5] add support for EmbraceTALK meter --- app/reducers/devices.js | 11 +++++++++++ lib/core/device.js | 2 ++ lib/core/driverManifests.js | 8 ++++++++ lib/drivers/i-sens/glucocardExpression.js | 5 +++++ 4 files changed, 26 insertions(+) diff --git a/app/reducers/devices.js b/app/reducers/devices.js index 55bdfc440..da6b1d957 100644 --- a/app/reducers/devices.js +++ b/app/reducers/devices.js @@ -89,6 +89,17 @@ const devices = { source: {type: 'device', driverId: 'Dexcom'}, enabled: {mac: true, win: true, linux: true} }, + embracetalk: { + instructions: { + text: i18n.t('Plug in meter with cable and set meter to'), + linkText: i18n.t('PC Link Mode'), + link: 'https://support.tidepool.org/hc/en-us/articles/4402234174100', + }, + name: 'EmbraceTALK', + key: 'embracetalk', + source: {type: 'device', driverId: 'EmbraceTALK'}, + enabled: {mac: true, win: true, linux: true} + }, weitai: { instructions: 'Plug in PDA with micro-USB', name: 'Equil Insulin Patch/Micro Pump', diff --git a/lib/core/device.js b/lib/core/device.js index a2533b8f1..b7d74e975 100644 --- a/lib/core/device.js +++ b/lib/core/device.js @@ -107,6 +107,7 @@ device.deviceDrivers = { AbbottLibreView: libreViewDriver, GlucoRx: glucoRxDriver, ReliOnPlatinum: accuChekUSBDriver, + EmbraceTALK: glucocardExpression, }; device.deviceComms = { @@ -142,6 +143,7 @@ device.deviceComms = { AbbottLibreView: libreViewDriver, GlucoRx: hidDevice, ReliOnPlatinum: usbDevice, + EmbraceTALK: serialDevice, }; _.forEach(_.keys(device.deviceComms), (driverId) => { diff --git a/lib/core/driverManifests.js b/lib/core/driverManifests.js index 8e695b3e8..4debe98c6 100644 --- a/lib/core/driverManifests.js +++ b/lib/core/driverManifests.js @@ -227,6 +227,14 @@ const driverManifests = { { vendorId: 5946, productId: 8664 }, ], }, + EmbraceTALK: { + mode: 'serial', + bitrate: 19200, + usb: [ + { vendorId: 1659, productId: 8963, driver: 'pl2303' }, + { vendorId: 1027, productId: 24577, driver: 'ftdi' }, // FTDI cable + ], + }, }; export default driverManifests; diff --git a/lib/drivers/i-sens/glucocardExpression.js b/lib/drivers/i-sens/glucocardExpression.js index a4bc874d3..f03999bfa 100644 --- a/lib/drivers/i-sens/glucocardExpression.js +++ b/lib/drivers/i-sens/glucocardExpression.js @@ -271,6 +271,11 @@ module.exports = (config) => { manufacturers: ['Arkray'], model: 'GlucocardExpression', }); + + if (cfg.deviceInfo.driverId === 'EmbraceTALK') { + cfg.deviceInfo.model = 'EmbraceTALK'; + cfg.deviceInfo.manufacturers.push('Omnis Health'); + } const serialDevice = config.deviceComms; const driver = new GlucocardExpression(cfg); From 5c57457adb48938f8c07eaf4e9f93fb4e9701a5b Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 2 Jul 2024 10:44:05 +0100 Subject: [PATCH 2/5] fix device info and support link --- app/reducers/devices.js | 2 +- lib/drivers/i-sens/glucocardExpression.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/reducers/devices.js b/app/reducers/devices.js index da6b1d957..32d6e5b51 100644 --- a/app/reducers/devices.js +++ b/app/reducers/devices.js @@ -93,7 +93,7 @@ const devices = { instructions: { text: i18n.t('Plug in meter with cable and set meter to'), linkText: i18n.t('PC Link Mode'), - link: 'https://support.tidepool.org/hc/en-us/articles/4402234174100', + link: 'https://support.tidepool.org/hc/en-us/articles/27971030950804', }, name: 'EmbraceTALK', key: 'embracetalk', diff --git a/lib/drivers/i-sens/glucocardExpression.js b/lib/drivers/i-sens/glucocardExpression.js index f03999bfa..b23b5c343 100644 --- a/lib/drivers/i-sens/glucocardExpression.js +++ b/lib/drivers/i-sens/glucocardExpression.js @@ -274,7 +274,7 @@ module.exports = (config) => { if (cfg.deviceInfo.driverId === 'EmbraceTALK') { cfg.deviceInfo.model = 'EmbraceTALK'; - cfg.deviceInfo.manufacturers.push('Omnis Health'); + cfg.deviceInfo.manufacturers = ['Omnis Health']; } const serialDevice = config.deviceComms; @@ -310,7 +310,8 @@ module.exports = (config) => { if (checksum !== raw.checksum) { debug('BG checksum is', checksum, ', expected', raw.checksum); - throw new Error('Checksum mismatch'); + //debugger; + //throw new Error('Checksum mismatch'); FIXME } // According to spec, HI >= 600 and LO <= 20 From b58eb5241e854439593892ae2f48969ef9c48c6a Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 30 Jul 2024 13:23:21 +0100 Subject: [PATCH 3/5] remove debugger statement --- lib/drivers/i-sens/glucocardExpression.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/drivers/i-sens/glucocardExpression.js b/lib/drivers/i-sens/glucocardExpression.js index b23b5c343..ebef7ec54 100644 --- a/lib/drivers/i-sens/glucocardExpression.js +++ b/lib/drivers/i-sens/glucocardExpression.js @@ -271,7 +271,7 @@ module.exports = (config) => { manufacturers: ['Arkray'], model: 'GlucocardExpression', }); - + if (cfg.deviceInfo.driverId === 'EmbraceTALK') { cfg.deviceInfo.model = 'EmbraceTALK'; cfg.deviceInfo.manufacturers = ['Omnis Health']; @@ -310,8 +310,7 @@ module.exports = (config) => { if (checksum !== raw.checksum) { debug('BG checksum is', checksum, ', expected', raw.checksum); - //debugger; - //throw new Error('Checksum mismatch'); FIXME + throw new Error('Checksum mismatch'); } // According to spec, HI >= 600 and LO <= 20 From 05eba717196ae171d52a4483aded0fe7f71f9c0a Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 30 Jul 2024 13:24:02 +0100 Subject: [PATCH 4/5] v2.58.0-embrace-support.1 --- app/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index 00424f4fb..d8efce123 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "tidepool-uploader", "productName": "tidepool-uploader", - "version": "2.58.0-react-oidc-context.4", + "version": "2.58.0-embrace-support.1", "description": "Tidepool Project Universal Uploader", "main": "./main.prod.js", "author": { diff --git a/package.json b/package.json index 2865ae1b2..f7e6292d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tidepool-uploader", - "version": "2.58.0-react-oidc-context.4", + "version": "2.58.0-embrace-support.1", "description": "Tidepool Project Universal Uploader", "private": true, "main": "main.prod.js", From 0772c8b72e63e790e3e57f6202123c9c2bc6c817 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Tue, 30 Jul 2024 13:37:04 +0100 Subject: [PATCH 5/5] fix linting --- lib/drivers/i-sens/glucocardExpression.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/drivers/i-sens/glucocardExpression.js b/lib/drivers/i-sens/glucocardExpression.js index ebef7ec54..1568a90d9 100644 --- a/lib/drivers/i-sens/glucocardExpression.js +++ b/lib/drivers/i-sens/glucocardExpression.js @@ -273,8 +273,8 @@ module.exports = (config) => { }); if (cfg.deviceInfo.driverId === 'EmbraceTALK') { - cfg.deviceInfo.model = 'EmbraceTALK'; - cfg.deviceInfo.manufacturers = ['Omnis Health']; + cfg.deviceInfo.model = 'EmbraceTALK'; + cfg.deviceInfo.manufacturers = ['Omnis Health']; } const serialDevice = config.deviceComms;