Skip to content

Commit 34707f0

Browse files
authored
Merge branch 'dev' into crowdin_incoming
2 parents 22272b4 + 03c01d0 commit 34707f0

8 files changed

Lines changed: 39 additions & 9 deletions

File tree

.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/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');

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.3",
3+
"version": "15.0.4",
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",

views/clockviews/clock.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,25 @@
9292
window.addEventListener('click', function() {
9393
showClose();
9494
});
95+
96+
// This fixes the issue of a "stale" CGM value displaying indefinately.
97+
// It displays "Internet offline." until internet is restored.
98+
function uOffline() {
99+
document.body.innerHTML =
100+
'Internet offline.'
101+
}
102+
// Return to normal as soon as internet connectivity is restored.
103+
function uOnline() {
104+
location.reload()
105+
}
106+
if(window.addEventListener) {
107+
window.addEventListener('offline', uOffline);
108+
window.addEventListener('online', uOnline);
109+
} else {
110+
document.body.attachEvent('onoffline', uOffline);
111+
document.body.attachEvent('ononline', uOnline);
112+
}
113+
95114
<% } %>
96115
</script>
97116
<%if (face == 'config') { %>

0 commit comments

Comments
 (0)