Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions lib/plugins/xdrip-js.js → lib/plugins/xdripjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function init(ctx) {
var lastStateNotification = null;

var sensorState = {
name: 'xdrip-js'
name: 'xdripjs'
, label: 'CGM Status'
, pluginType: 'pill-status'
};
Expand All @@ -25,7 +25,7 @@ function init(ctx) {

if (firstPrefs) {
firstPrefs = false;
console.info('xdrip-js Prefs:', prefs);
console.info('xdripjs Prefs:', prefs);
}

return prefs;
Expand Down Expand Up @@ -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
Expand All @@ -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;
}

Expand Down