From 1122d8d8db31774eb1dc32b4a9d667135c640545 Mon Sep 17 00:00:00 2001 From: Jeremy Cunningham Date: Sun, 1 Sep 2019 13:34:57 -0500 Subject: [PATCH 1/5] rename xdrip-js to xdripjs --- lib/plugins/index.js | 4 ++-- lib/plugins/{xdrip-js.js => xdripjs.js} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename lib/plugins/{xdrip-js.js => xdripjs.js} (99%) diff --git a/lib/plugins/index.js b/lib/plugins/index.js index 5970c16836c..2568b634afd 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -37,7 +37,7 @@ function init (ctx) { , require('./careportal')(ctx) , require('./pump')(ctx) , require('./openaps')(ctx) - , require('./xdrip-js')(ctx) + , require('./xdripjs')(ctx) , require('./loop')(ctx) , require('./override')(ctx) , require('./boluswizardpreview')(ctx) @@ -63,7 +63,7 @@ function init (ctx) { , require('./cob')(ctx) , require('./pump')(ctx) , require('./openaps')(ctx) - , require('./xdrip-js')(ctx) + , require('./xdripjs')(ctx) , require('./loop')(ctx) , require('./boluswizardpreview')(ctx) , require('./cannulaage')(ctx) diff --git a/lib/plugins/xdrip-js.js b/lib/plugins/xdripjs.js similarity index 99% rename from lib/plugins/xdrip-js.js rename to lib/plugins/xdripjs.js index d66f112cfcf..1c2e10e182d 100644 --- a/lib/plugins/xdrip-js.js +++ b/lib/plugins/xdripjs.js @@ -11,7 +11,7 @@ function init(ctx) { var lastStateNotification = null; var sensorState = { - name: 'xdrip-js' + name: 'xdripjs' , label: 'CGM Status' , pluginType: 'pill-status' }; @@ -25,7 +25,7 @@ function init(ctx) { if (firstPrefs) { firstPrefs = false; - console.info('xdrip-js Prefs:', prefs); + console.info('xdripjs Prefs:', prefs); } return prefs; From d3d08844f7afdd5094c1d750deb8471c6012f452 Mon Sep 17 00:00:00 2001 From: Jeremy Cunningham Date: Sun, 8 Sep 2019 13:04:19 -0500 Subject: [PATCH 2/5] update readme for xdrip-js name change --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fd85b987107..e85112057e8 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ Community maintained fork of the - [`openaps` (OpenAPS)](#openaps-openaps) - [`loop` (Loop)](#loop-loop) - [`override` (Override Mode)](#override-override-mode) - - [`xdrip-js` (xDrip-js)](#xdrip-js-xdrip-js) + - [`xdripjs` (xDrip-js)](#xdripjs-xdripjs) - [`alexa` (Amazon Alexa)](#alexa-amazon-alexa) - [`speech` (Speech)](#speech-speech) - [`cors` (CORS)](#cors-cors) @@ -501,12 +501,12 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs.htm Additional monitoring for DIY automated insulin delivery systems to display real-time overrides such as Eating Soon or Exercise Mode: * Requires `DEVICESTATUS_ADVANCED="true"` to be set -##### `xdrip-js` (xDrip-js) +##### `xdripjs` (xDrip-js) Integrated xDrip-js monitoring, uses these extended settings: * Requires `DEVICESTATUS_ADVANCED="true"` to be set - * `XDRIP-JS_ENABLE_ALERTS` (`false`) - Set to `true` to enable notifications when CGM state is not OK or battery voltages fall below threshold. - * `XDRIP-JS_STATE_NOTIFY_INTRVL` (`0.5`) - Set to number of hours between CGM state notifications - * `XDRIP-JS_WARN_BAT_V` (`300`) - The voltage of either transmitter battery, a warning will be triggered when dropping below this threshold. + * `XDRIPJS_ENABLE_ALERTS` (`false`) - Set to `true` to enable notifications when CGM state is not OK or battery voltages fall below threshold. + * `XDRIPJS_STATE_NOTIFY_INTRVL` (`0.5`) - Set to number of hours between CGM state notifications + * `XDRIPJS_WARN_BAT_V` (`300`) - The voltage of either transmitter battery, a warning will be triggered when dropping below this threshold. ##### `alexa` (Amazon Alexa) Integration with Amazon Alexa, [detailed setup instructions](docs/plugins/alexa-plugin.md) From de06df155b899f9c11ae6adb72f8763a4b21e60e Mon Sep 17 00:00:00 2001 From: Jeremy Cunningham Date: Tue, 17 Sep 2019 19:52:47 -0500 Subject: [PATCH 3/5] update from CGM to XDRIPJS label --- lib/plugins/xdripjs.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/plugins/xdripjs.js b/lib/plugins/xdripjs.js index 1c2e10e182d..7f6dd27c8c4 100644 --- a/lib/plugins/xdripjs.js +++ b/lib/plugins/xdripjs.js @@ -12,7 +12,7 @@ function init(ctx) { var sensorState = { name: 'xdripjs' - , label: 'CGM Status' + , label: 'XDRIPJS Status' , pluginType: 'pill-status' }; @@ -154,8 +154,8 @@ function init(ctx) { }; } - message = 'CGM state: ' + sensorInfo.xdripjs.stateString; - title = 'CGM state: ' + sensorInfo.xdripjs.stateString; + message = 'CGM Transmitter state: ' + sensorInfo.xdripjs.stateString; + title = 'CGM Transmitter state: ' + sensorInfo.xdripjs.stateString; if (sensorInfo.xdripjs.state == 0x7) { // If it is a calibration request, only use INFO @@ -167,15 +167,15 @@ function init(ctx) { if (sensorInfo.xdripjs.voltagea && (sensorInfo.xdripjs.voltagea < prefs.warnBatV)) { sendNotification = true; - message = 'CGM Battery A Low Voltage: ' + sensorInfo.xdripjs.voltagea; - title = 'CGM Battery Low'; + message = 'CGM Transmitter Battery A Low Voltage: ' + sensorInfo.xdripjs.voltagea; + title = 'CGM Transmitter Battery Low'; result.level = levels.WARN; } if (sensorInfo.xdripjs.voltageb && (sensorInfo.xdripjs.voltageb < (prefs.warnBatV - 10))) { sendNotification = true; - message = 'CGM Battery B Low Voltage: ' + sensorInfo.xdripjs.voltageb; - title = 'CGM Battery Low'; + message = 'CGM Transmitter Battery B Low Voltage: ' + sensorInfo.xdripjs.voltageb; + title = 'CGM Transmitter Battery Low'; result.level = levels.WARN; } @@ -314,7 +314,7 @@ function init(ctx) { sbx.pluginBase.updatePillText(sensorState, { value: (sensor && sensor.lastStateStringShort) || (sensor && sensor.lastStateString) || 'Unknown' - , label: 'CGM' + , label: 'XDRIPJS' , info: info , pillClass: statusClass }); From 76e64dce6505eaa87887effe522b39ef78b1f313 Mon Sep 17 00:00:00 2001 From: Jeremy Cunningham Date: Tue, 17 Sep 2019 20:13:15 -0500 Subject: [PATCH 4/5] change label from all caps to mixed case for xDripJS --- lib/plugins/xdripjs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/xdripjs.js b/lib/plugins/xdripjs.js index 7f6dd27c8c4..4d1b789b3ee 100644 --- a/lib/plugins/xdripjs.js +++ b/lib/plugins/xdripjs.js @@ -12,7 +12,7 @@ function init(ctx) { var sensorState = { name: 'xdripjs' - , label: 'XDRIPJS Status' + , label: 'xDripJS Status' , pluginType: 'pill-status' }; @@ -314,7 +314,7 @@ function init(ctx) { sbx.pluginBase.updatePillText(sensorState, { value: (sensor && sensor.lastStateStringShort) || (sensor && sensor.lastStateString) || 'Unknown' - , label: 'XDRIPJS' + , label: 'xDripJS' , info: info , pillClass: statusClass }); From 8b1686ad7a08fa9a195ab1e97388957726ee16d9 Mon Sep 17 00:00:00 2001 From: Jeremy Cunningham Date: Mon, 21 Oct 2019 20:32:08 -0500 Subject: [PATCH 5/5] change pill label back to CGM --- lib/plugins/xdripjs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/xdripjs.js b/lib/plugins/xdripjs.js index 4d1b789b3ee..a36a42de2e0 100644 --- a/lib/plugins/xdripjs.js +++ b/lib/plugins/xdripjs.js @@ -12,7 +12,7 @@ function init(ctx) { var sensorState = { name: 'xdripjs' - , label: 'xDripJS Status' + , label: 'CGM Status' , pluginType: 'pill-status' }; @@ -314,7 +314,7 @@ function init(ctx) { sbx.pluginBase.updatePillText(sensorState, { value: (sensor && sensor.lastStateStringShort) || (sensor && sensor.lastStateString) || 'Unknown' - , label: 'xDripJS' + , label: 'CGM' , info: info , pillClass: statusClass });