Skip to content

Commit 91cd601

Browse files
authored
Merge pull request #8145 from nightscout/dev
dev next release 15.0.3
2 parents 21e0591 + 7d209bc commit 91cd601

File tree

17 files changed

+686
-633
lines changed

17 files changed

+686
-633
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
node-version: [14.x, 16.x]
19+
node-version: [14.x, 16.x, 20, lts/*]
2020
mongodb-version: [4.4, 5.0, 6.0]
2121

2222
steps:
@@ -87,4 +87,4 @@ jobs:
8787
platforms: ${{ env.PLATFORMS }}
8888
tags: |
8989
${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
90-
${{ env.DOCKER_IMAGE }}:latest
90+
${{ env.DOCKER_IMAGE }}:latest

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)
112112
- [`override` (Override Mode)](#override-override-mode)
113113
- [`xdripjs` (xDrip-js)](#xdripjs-xdrip-js)
114114
- [`alexa` (Amazon Alexa)](#alexa-amazon-alexa)
115-
- [`googlehome` (Google Home/DialogFLow)](#googlehome-google-homedialogflow)
115+
- [`googlehome` (Google Home/DialogFLow)](#googlehome-google-homedialogflow) [broken]
116116
- [`speech` (Speech)](#speech-speech)
117117
- [`cors` (CORS)](#cors-cors)
118118
- [Extended Settings](#extended-settings)
@@ -666,9 +666,11 @@ For remote overrides, the following extended settings must be configured:
666666
##### `alexa` (Amazon Alexa)
667667
Integration with Amazon Alexa, [detailed setup instructions](docs/plugins/alexa-plugin.md)
668668

669-
##### `googlehome` (Google Home/DialogFLow)
669+
##### `googlehome` (Google Home/DialogFLow) [broken]
670670
Integration with Google Home (via DialogFlow), [detailed setup instructions](docs/plugins/googlehome-plugin.md)
671671

672+
Unfortunately this integration broke when [Google discontinued conversational actions](https://developers.google.com/assistant/ca-sunset). We'll keep this here for reference, in case it can be revived at some point in the future.
673+
672674
##### `speech` (Speech)
673675
Speech synthesis plugin. When enabled, speaks out the blood glucose values, IOB and alarms. Note you have to set the LANGUAGE setting on the server to get all translated alarms.
674676

docs/plugins/googlehome-plugin.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The Google Assistant integration is broken!
2+
Unfortunately this integration broke when [Google discontinued conversational actions](https://developers.google.com/assistant/ca-sunset). We'll keep this here for reference, in case it can be revived at some point in the future.
3+
14
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
25
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
36
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

lib/plugins/openaps.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function init (ctx) {
392392
function addSuggestion () {
393393
if (prop.lastSuggested) {
394394
var bg = prop.lastSuggested.bg;
395-
var units = sbx.data.profile.getUnits();
395+
var units = sbx.settings.units;
396396

397397
if (units === 'mmol') {
398398
bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10;
@@ -478,9 +478,15 @@ function init (ctx) {
478478

479479
if ('enacted' === prop.status.code) {
480480
var canceled = prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0;
481+
var bg = prop.lastEnacted.bg;
482+
var units = sbx.settings.units;
483+
484+
if (units === 'mmol') {
485+
bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10;
486+
}
481487

482488
var valueParts = [
483-
valueString('BG: ', prop.lastEnacted.bg)
489+
valueString('BG: ', bg)
484490
, ', <b>Temp Basal' + (canceled ? ' Canceled' : ' Started') + '</b>'
485491
, canceled ? '' : ' ' + prop.lastEnacted.rate.toFixed(2) + ' for ' + prop.lastEnacted.duration + 'm'
486492
, valueString(', ', prop.lastEnacted.reason)

lib/server/booterror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function bootError(env, ctx) {
2929
return '<dt><b>' + obj.desc + '</b></dt><dd>' + message.replace(/\\n/g, '<br/>') + '</dd>';
3030
}).join(' ');
3131

32-
res.render('error.html', {
32+
res.status(500).render('error.html', {
3333
errors,
3434
locals
3535
});

lib/server/bootevent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function boot (env, language) {
3838

3939
const isLTS = process.release.lts ? true : false;
4040

41-
if (isLTS && (semver.satisfies(nodeVersion, '^20.0.0') || semver.satisfies(nodeVersion, '^18.0.0') || semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0'))) {
41+
if (isLTS || (semver.satisfies(nodeVersion, '^20.0.0') || semver.satisfies(nodeVersion, '^18.0.0') || semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0'))) {
4242
//Latest Node 14 LTS and Node 16 LTS are recommended and supported.
4343
//Require at least Node 14 without known security issues
4444
console.debug('Node LTS version ' + nodeVersion + ' is supported');

lib/server/loop.js

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,36 @@ function init (env, ctx) {
130130
notification.payload = payload;
131131
notification.interruptionLevel = "time-sensitive"
132132

133-
provider.send(notification, [loopSettings.deviceToken]).then( (response) => {
133+
provider.send(notification, [loopSettings.deviceToken]).then((response) => {
134134
if (response.sent && response.sent.length > 0) {
135135
completion();
136136
} else {
137-
console.log("APNs delivery failed:", response.failed)
138-
completion("APNs delivery failed: " + response.failed[0].response.reason);
137+
console.log("APNs delivery failed:", response.failed);
138+
139+
// Check if response.failed and response.failed[0] are defined
140+
if (response.failed && response.failed.length > 0) {
141+
const failedResponse = response.failed[0];
142+
const reason = failedResponse.response && failedResponse.response.reason
143+
? failedResponse.response.reason
144+
: 'Unknown reason';
145+
146+
// Provide detailed debugging information
147+
const errorMessage = `APNs delivery failed: ${reason}`;
148+
console.error(errorMessage, failedResponse);
149+
completion(errorMessage);
150+
} else {
151+
// Handle the case where response.failed is undefined or empty
152+
const errorMessage = 'APNs delivery failed: No failure details available.';
153+
console.error(errorMessage, response);
154+
completion(errorMessage);
155+
}
139156
}
157+
}).catch((error) => {
158+
// Catch any other unexpected errors
159+
console.error('Unexpected error during APNs delivery:', error);
160+
completion(`APNs delivery failed: ${error.message || 'Unknown error'}`);
140161
});
162+
141163
};
142164

143165
return loop();

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightscout",
3-
"version": "15.0.2",
3+
"version": "15.0.3",
44
"description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.",
55
"license": "AGPL-3.0",
66
"author": "Nightscout Team",

translations/ar_SA.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,15 @@
329329
"Edit treatment": "تعديل المعالجة",
330330
"Duration": "المدة",
331331
"Duration in minutes": "المدة بالدقائق",
332-
"Temp Basal": "درجة الحرارة القاعدية",
333-
"Temp Basal Start": "بداية درجة الحرارة القاعدية",
334-
"Temp Basal End": "نهاية درجة الحرارة القاعدية",
332+
"Temp Basal": "الجرعة القاعدية المؤقتة",
333+
"Temp Basal Start": "بداية الجرعة القاعدية المؤقتة",
334+
"Temp Basal End": "نهاية الجرعة القاعدية المؤقتة",
335335
"Percent": "بالمائة",
336336
"Basal change in %": "التغيير الأساسي بالمائة",
337337
"Basal value": "القيمة الأساسية",
338338
"Absolute basal value": "القيمة الأساسية المطلقة",
339339
"Announcement": "إعلان",
340-
"Loading temp basal data": "تحميل درجة حرارة البيانات القاعدية",
340+
"Loading temp basal data": "جارٍ تحميل بيانات الجرعة القاعدية المؤقتة",
341341
"Save current record before changing to new?": "حفظ السجل الحالي قبل التغيير إلى جديد؟",
342342
"Profile Switch": "تبديل الملف الشخصي",
343343
"Profile": "الملف الشخصي",
@@ -413,8 +413,8 @@
413413
"Targets": "الأهداف",
414414
"Bolus insulin:": "جرعة أنسولين:",
415415
"Base basal insulin:": "الأنسولين القاعدي الأساسي:",
416-
"Positive temp basal insulin:": "الأنسولين القاعدي ذو درجة الحرارة الإيجابية:",
417-
"Negative temp basal insulin:": "الأنسولين القاعدي ذو درجة الحرارة السلبية:",
416+
"Positive temp basal insulin:": "الأنسولين القاعدي المؤقت الإيجابي:",
417+
"Negative temp basal insulin:": "الأنسولين القاعدي المؤقت السلبي:",
418418
"Total basal insulin:": "إجمالي الأنسولين القاعدي:",
419419
"Total daily insulin:": "إجمالي الأنسولين اليومي:",
420420
"Unable to save Role": "تعذر حفظ الدور",
@@ -452,10 +452,10 @@
452452
"Current Carb Ratio": "نسبة الكربوهيدرات الحالية",
453453
"Basal timezone": "المنطقة الزمنية القاعدية",
454454
"Active profile": "ملف نشط",
455-
"Active temp basal": "درجة الحرارة القاعدية النشطة",
456-
"Active temp basal start": "بداية درجة الحرارة القاعدية النشطة",
457-
"Active temp basal duration": "مدة درجة الحرارة القاعدية النشطة",
458-
"Active temp basal remaining": "درجة الحرارة القاعدية النشطة المتبقية",
455+
"Active temp basal": "الجرعة القاعدية المؤقتة النشطة",
456+
"Active temp basal start": "بداية الجرعة القاعدية المؤقتة النشطة",
457+
"Active temp basal duration": "مدة الجرعة القاعدية المؤقتة النشطة",
458+
"Active temp basal remaining": "الوقت المتبقي للجرعة القاعدية المؤقتة النشطة",
459459
"Basal profile value": "قيمة الملف القاعدي",
460460
"Active combo bolus": "جرعة تركيبة نشطة",
461461
"Active combo bolus start": "بداية جرعة تركيبة نشطة",
@@ -492,8 +492,8 @@
492492
"or adjust basal": "أو ضبط القاعدية",
493493
"Check BG using glucometer before correcting!": "-> تحقق من نسبة السكر في الدم باستخدام مقياس السكر قبل التصحيح!",
494494
"Basal reduction to account %1 units:": "التخفيض القاعدي لحساب%1 وحدة:",
495-
"30m temp basal": "30 متر من درجة الحرارة القاعدية",
496-
"1h temp basal": "ساعة واحدة من درجة الحرارة القاعدية",
495+
"30m temp basal": "جرعة قاعدية مؤقتة لمدة 30 دقيقة",
496+
"1h temp basal": "جرعة قاعدية مؤقتة لمدة ساعة واحدة",
497497
"Cannula change overdue!": "تغيير قنية متأخر!",
498498
"Time to change cannula": "ميعاد تغيير القنية الطبية",
499499
"Change cannula soon": "تغيير القنية الطبية قريبا",
@@ -578,7 +578,7 @@
578578
"virtAsstTitleDelta": "دلتا جلوكوز الدم",
579579
"virtAsstStatus": "%1 و%2 اعتبارًا من %3.",
580580
"virtAsstBasal": "%1 القاعدي الحالي هو %2 وحدة في الساعة",
581-
"virtAsstBasalTemp": "%1 درجة الحرارة القاعدية من %2 وحدة في الساعة ستنتهي %3",
581+
"virtAsstBasalTemp": "%1 جرعة قاعدية مؤقتة من %2 وحدة في الساعة ستنتهي %3",
582582
"virtAsstIob": "ولديك %1 من الأنسولين النشط.",
583583
"virtAsstIobIntent": "لديك %1 من الأنسولين النشط",
584584
"virtAsstIobUnits": "%1 وحدة من",
@@ -682,7 +682,7 @@
682682
"Previous day": "اليوم السابق",
683683
"Next day": "اليوم التالي",
684684
"Next": "التالي",
685-
"Temp basal delta": "درجة حرارة دلتا الأساسية",
685+
"Temp basal delta": "تغير الجرعة القاعدية المؤقتة",
686686
"Authorized by token": "مصرح به من قبل رمز",
687687
"Auth role": "دور المصادقة",
688688
"view without token": "عرض بدون رمز",

translations/es_ES.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
"View all treatments": "Visualizar todos los tratamientos",
224224
"Enable Alarms": "Activar las alarmas",
225225
"Pump Battery Change": "Cambio batería bomba",
226-
"Pump Battery Age": "Edad de la batería en la bomba",
226+
"Pump Battery Age": "Edad de la batería de la bomba",
227227
"Pump Battery Low Alarm": "Alarma de Bomba Baja",
228228
"Pump Battery change overdue!": "Cambio de batería de bomba atrasado!",
229229
"When enabled an alarm may sound.": "Cuando estén activas, una alarma podrá sonar",
@@ -704,4 +704,5 @@
704704
"Weak API_SECRET detected. Please use a mix of small and CAPITAL letters, numbers and non-alphanumeric characters such as !#%&/ to reduce the risk of unauthorized access. The minimum length of the API_SECRET is 12 characters.": "Detectada API_SECRET débil. Por favor, utilice una mezcla de letras en minúscula y en mayúscula, números y caracteres no alfanuméricos como !#%&/ para reducir el riesgo de acceso no autorizado. La longitud mínima de la API_SECRET es de 12 caracteres.",
705705
"less than 1": "menos de 1",
706706
"MongoDB password and API_SECRET match. This is a really bad idea. Please change both and do not reuse passwords across the system.": "La contraseña de MongoDB y la API_SECRET coinciden. Esto es una muy mala idea. Por favor, cambie ambas contraseñas y no reutilice contraseñas en el sistema."
707+
"virtAsstLaunch":"¿Qué quieres saber de Nightscout?"
707708
}

0 commit comments

Comments
 (0)