From ea31d346494790eeb596f90e590ae96644b980c5 Mon Sep 17 00:00:00 2001 From: ZoneMR Date: Tue, 30 Jun 2020 19:51:25 +0100 Subject: [PATCH 1/6] Fix #2030 - Clock can be off by a minute Set minute/second in our model based on the actual time from moment() rather than our own attempt to track the time - which can drift or fail to respond to time changes. Also, schedule time refreshes to happen 50ms after the minute/second is expected to change - preventing premature fires and rapid re-firings of notifications due to accuracy limits in setTimeout --- modules/default/clock/clock.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 08dcced0..293ff93b 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -51,10 +51,12 @@ Module.register("clock",{ //Calculate how many ms should pass until next update depending on if seconds is displayed or not var delayCalculator = function(reducedSeconds) { + var EXTRA_DELAY = 50; //Deliberate imperceptable delay to prevent off-by-one timekeeping errors + if (self.config.displaySeconds) { - return 1000 - moment().milliseconds(); + return 1000 - moment().milliseconds() + EXTRA_DELAY; } else { - return ((60 - reducedSeconds) * 1000) - moment().milliseconds(); + return ((60 - reducedSeconds) * 1000) - moment().milliseconds() + EXTRA_DELAY; } }; @@ -64,7 +66,7 @@ Module.register("clock",{ //If seconds is displayed CLOCK_SECOND-notification should be sent (but not when CLOCK_MINUTE-notification is sent) if (self.config.displaySeconds) { - self.second = (self.second + 1) % 60; + self.second = moment().second(); if (self.second !== 0) { self.sendNotification("CLOCK_SECOND", self.second); setTimeout(notificationTimer, delayCalculator(0)); @@ -73,7 +75,7 @@ Module.register("clock",{ } //If minute changed or seconds isn't displayed send CLOCK_MINUTE-notification - self.minute = (self.minute + 1) % 60; + self.minute = moment().minute(); self.sendNotification("CLOCK_MINUTE", self.minute); setTimeout(notificationTimer, delayCalculator(0)); }; From c9d0bd2d7f9f019488f0b6f32378970cd66670cb Mon Sep 17 00:00:00 2001 From: Lyubomir Vasilev Date: Wed, 1 Jul 2020 10:08:41 +0300 Subject: [PATCH 2/6] Updated the BG translation --- CHANGELOG.md | 1 + translations/bg.json | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f77a0769..592c7e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ _This release is scheduled to be released on 2020-07-01._ - Replaced insecure links with https ones - Cleaned up all "no-undef" warnings from eslint - Added location title wrapping for calendar module +- Updated the BG translation ### Deleted diff --git a/translations/bg.json b/translations/bg.json index 786f8643..f6af6c5d 100644 --- a/translations/bg.json +++ b/translations/bg.json @@ -1,10 +1,10 @@ { - "LOADING": "Зареждане …", + "LOADING": "Зареждане на …", "TODAY": "Днес", "TOMORROW": "Утре", "DAYAFTERTOMORROW": "Вдругиден", - "RUNNING": "Свършва на", + "RUNNING": "Свършва след", "EMPTY": "Няма предстоящи събития.", "WEEK": "Седмица {weekNumber}", @@ -26,8 +26,8 @@ "NW": "СЗ", "NNW": "ССЗ", - "UPDATE_NOTIFICATION": "Налична актуализация за MagicMirror².", - "UPDATE_NOTIFICATION_MODULE": "Налична актуализация за {MODULE_NAME} модул.", - "UPDATE_INFO_SINGLE": "Текущата инсталация е изостанала с {COMMIT_COUNT} commit къмита на клон {BRANCH_NAME}.", - "UPDATE_INFO_MULTIPLE": "Текущата инсталация е изостанала с {COMMIT_COUNT} commits къмита на клон {BRANCH_NAME}." -} + "UPDATE_NOTIFICATION": "Налична е актуализация за MagicMirror².", + "UPDATE_NOTIFICATION_MODULE": "Налична е актуализация за модула „{MODULE_NAME}“.", + "UPDATE_INFO_SINGLE": "Инсталираната версия е с {COMMIT_COUNT} ревизия назад от клона „{BRANCH_NAME}“.", + "UPDATE_INFO_MULTIPLE": "Инсталираната версия е с {COMMIT_COUNT} ревизии назад от клона „{BRANCH_NAME}“." +} \ No newline at end of file From 8c0141367b7a6ca0c6fb04e9b85ed3c6851dfef6 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 1 Jul 2020 19:25:00 +0200 Subject: [PATCH 3/6] Fix EOF issue. --- translations/bg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/bg.json b/translations/bg.json index f6af6c5d..b48b0a2d 100644 --- a/translations/bg.json +++ b/translations/bg.json @@ -30,4 +30,4 @@ "UPDATE_NOTIFICATION_MODULE": "Налична е актуализация за модула „{MODULE_NAME}“.", "UPDATE_INFO_SINGLE": "Инсталираната версия е с {COMMIT_COUNT} ревизия назад от клона „{BRANCH_NAME}“.", "UPDATE_INFO_MULTIPLE": "Инсталираната версия е с {COMMIT_COUNT} ревизии назад от клона „{BRANCH_NAME}“." -} \ No newline at end of file +} From 5d90a0801162e8628a5b0bfcd39bc0d05b370cfd Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 1 Jul 2020 19:47:09 +0200 Subject: [PATCH 4/6] Prepare release 2.12.0 --- CHANGELOG.md | 46 ++++++++++++++++++++++++---------------------- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b345e01d..78182857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,42 +5,44 @@ This project adheres to [Semantic Versioning](https://semver.org/). ❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror² -## [2.12.0] - Unreleased (Develop Branch) +## [2.12.0] - 2020-07-01 -_This release is scheduled to be released on 2020-07-01._ +Special thanks to the following contributors: @AndreKoepke, @DarthBrento, @Ekristoffe, @Legion2, @XBCreepinJesus, @ZoneMR, @andrezibaia, @bryanzzhu, @chamakura, @khassel, @ndom91, @radokristof & @rejas. + +ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. ### Added -- Added option to config the level of logging -- Added prettier for an even cleaner codebase -- Hide Sunrise/Sunset in Weather module -- Hide Sunrise/Sunset in Current Weather module -- Added Met Office DataHub (UK) provider +- Added option to config the level of logging. +- Added prettier for an even cleaner codebase. +- Hide Sunrise/Sunset in Weather module. +- Hide Sunrise/Sunset in Current Weather module. +- Added Met Office DataHub (UK) provider. ### Updated -- Cleaned up alert module code -- Cleaned up check_config code -- Replaced grunt-based linters with their non-grunt equivalents -- Switch to most of the eslint:recommended rules and fix warnings -- Replaced insecure links with https ones -- Cleaned up all "no-undef" warnings from eslint -- Added location title wrapping for calendar module -- Updated the BG translation +- Cleaned up alert module code. +- Cleaned up check_config code. +- Replaced grunt-based linters with their non-grunt equivalents. +- Switch to most of the eslint:recommended rules and fix warnings. +- Replaced insecure links with https ones. +- Cleaned up all "no-undef" warnings from eslint. +- Added location title wrapping for calendar module. +- Updated the BG translation. ### Deleted -- Removed truetype (ttf) fonts +- Removed truetype (ttf) fonts. ### Fixed -- The broken modules due to Socket.io change from last release [#1973](https://github.com/MichMich/MagicMirror/issues/1973) -- Add backward compatibility for old module code in socketclient.js [#1973](https://github.com/MichMich/MagicMirror/issues/1973) -- Support multiple instances of calendar module with different config [#1109](https://github.com/MichMich/MagicMirror/issues/1109) -- Fix the use of "maxNumberOfDays" in the module "weatherforecast" [#2018](https://github.com/MichMich/MagicMirror/issues/2018) -- Throw error when check_config fails [#1928](https://github.com/MichMich/MagicMirror/issues/1928) +- The broken modules due to Socket.io change from last release. [#1973](https://github.com/MichMich/MagicMirror/issues/1973) +- Add backward compatibility for old module code in socketclient.js. [#1973](https://github.com/MichMich/MagicMirror/issues/1973) +- Support multiple instances of calendar module with different config. [#1109](https://github.com/MichMich/MagicMirror/issues/1109) +- Fix the use of "maxNumberOfDays" in the module "weatherforecast". [#2018](https://github.com/MichMich/MagicMirror/issues/2018) +- Throw error when check_config fails. [#1928](https://github.com/MichMich/MagicMirror/issues/1928) - Bug fix related to 'maxEntries' not displaying Calendar events. [#2050](https://github.com/MichMich/MagicMirror/issues/2050) -- Updated ical library to latest version [#1926](https://github.com/MichMich/MagicMirror/issues/1926) +- Updated ical library to latest version. [#1926](https://github.com/MichMich/MagicMirror/issues/1926) ## [2.11.0] - 2020-04-01 diff --git a/package-lock.json b/package-lock.json index b29b7ec4..15a6644a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.12.0-develop", + "version": "2.12.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 741d1d2e..5b9562d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.12.0-develop", + "version": "2.12.0", "description": "The open source modular smart mirror platform.", "main": "js/electron.js", "scripts": { From e16db2233ff29fbc623071d2e8fc050a9c270194 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 1 Jul 2020 19:52:38 +0200 Subject: [PATCH 5/6] Fix contributor list. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78182857..3b4ee497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [2.12.0] - 2020-07-01 -Special thanks to the following contributors: @AndreKoepke, @DarthBrento, @Ekristoffe, @Legion2, @XBCreepinJesus, @ZoneMR, @andrezibaia, @bryanzzhu, @chamakura, @khassel, @ndom91, @radokristof & @rejas. +Special thanks to the following contributors: @AndreKoepke, @andrezibaia, @bryanzzhu, @chamakura, @DarthBrento, @Ekristoffe, @khassel, @Legion2, @ndom91, @radokristof, @rejas, @XBCreepinJesus & @ZoneMR. ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. From 26ed05ba3a5a2e00b98bf485ee89f861710f1154 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 1 Jul 2020 20:07:12 +0200 Subject: [PATCH 6/6] Prepare 2.13.0-develop --- CHANGELOG.md | 12 ++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b4ee497..069c61f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ This project adheres to [Semantic Versioning](https://semver.org/). ❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror² +## [2.13.0] - Unreleased (Develop Branch - Please add your contributions to this release.) + +_This release is scheduled to be released on 2020-10-01._ + +### Added + +### Updated + +### Deleted + +### Fixed + ## [2.12.0] - 2020-07-01 Special thanks to the following contributors: @AndreKoepke, @andrezibaia, @bryanzzhu, @chamakura, @DarthBrento, @Ekristoffe, @khassel, @Legion2, @ndom91, @radokristof, @rejas, @XBCreepinJesus & @ZoneMR. diff --git a/package-lock.json b/package-lock.json index 15a6644a..e421d505 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.12.0", + "version": "2.13.0-develop", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5b9562d5..63d9fcdd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.12.0", + "version": "2.13.0-develop", "description": "The open source modular smart mirror platform.", "main": "js/electron.js", "scripts": {