From 33172df89fddfa10895ae28a7840a926f38e96cc Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 07:28:41 +0200 Subject: [PATCH 1/7] fixed workflow --- .github/workflows/test-and-deploy.yml | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 4389b73..f48da55 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -81,7 +81,7 @@ jobs: # Deploys the final package to NPM deploy: - needs: [adapter-tests-gui] + needs: [adapter-tests] # Trigger this step only when a commit on master is tagged with a version number if: | @@ -119,32 +119,32 @@ jobs: npm whoami npx lerna publish from-package --yes - #- name: Create Github Release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # tag_name: ${{ github.ref }} - # release_name: Release v${{ steps.extract_release.outputs.VERSION }} - # draft: false - # # Prerelease versions create pre-releases on GitHub - # prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} - # body: ${{ steps.extract_release.outputs.BODY }} - - #- name: Notify Sentry.io about the release - # run: | - # cd packages/admin - # npm i -g @sentry/cli - # export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - # export SENTRY_URL=https://sentry.iobroker.net - # export SENTRY_ORG=iobroker - # export SENTRY_PROJECT=iobroker-admin - # export SENTRY_VERSION=iobroker.admin@${{ steps.extract_release.outputs.VERSION }} - # export SENTRY_RELEASE=${{ steps.extract_release.outputs.VERSION }} - # sentry-cli releases new $SENTRY_VERSION - # sentry-cli releases finalize $SENTRY_VERSION - # sentry-cli sourcemaps inject ./adminWww - # sentry-cli sourcemaps upload ./adminWww + - name: Create Github Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release v${{ steps.extract_release.outputs.VERSION }} + draft: false + # Prerelease versions create pre-releases on GitHub + prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} + body: ${{ steps.extract_release.outputs.BODY }} + + - name: Notify Sentry.io about the release + run: | + cd packages/admin + npm i -g @sentry/cli + export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} + export SENTRY_URL=https://sentry.iobroker.net + export SENTRY_ORG=iobroker + export SENTRY_PROJECT=iobroker-admin + export SENTRY_VERSION=iobroker.admin@${{ steps.extract_release.outputs.VERSION }} + export SENTRY_RELEASE=${{ steps.extract_release.outputs.VERSION }} + sentry-cli releases new $SENTRY_VERSION + sentry-cli releases finalize $SENTRY_VERSION + sentry-cli sourcemaps inject ./adminWww + sentry-cli sourcemaps upload ./adminWww # Dummy job for skipped builds - without this, github reports the build as failed skip-ci: From 6dd4965748d033b24aa0e1acd92c3b8519f7c63b Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 07:44:13 +0200 Subject: [PATCH 2/7] removed index_m.html --- README.md | 1 + admin/index_m.html | 354 --------------------------------------------- 2 files changed, 1 insertion(+), 354 deletions(-) delete mode 100644 admin/index_m.html diff --git a/README.md b/README.md index 4488ee6..a0b38a5 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ All states report whether there is a failure or not. `True` means a failure, `fa - (grizzelbee) New: [#289](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/289) Added Support for Dyson Purifier Big+Quiet Formaldehyde (BP03, Produce type 664) - (grizzelbee) Fix: [#287](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/287) Added Switzerland again to config - (grizzelbee) Upd: Dependencies got updated +- (grizzelbee) Chg: removed index_m.html, since it's no longer used ### 3.1.10 (2024-05-14) (Marching on) diff --git a/admin/index_m.html b/admin/index_m.html deleted file mode 100644 index 30dcd58..0000000 --- a/admin/index_m.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- donation - -
-
- - - - -
-
- - - email_desc -
-
- - - password_desc -
-
- - - country_desc -
-
- - - temperatureUnit_desc -
-
- - - Poll_Interval_desc -
-
- -
- keepValues_desc -
-
- -
- disableReconnectLogging_desc -
-
- - token_inside - token_inside_desc -
-
-
-
-
- - - challengeId_desc -
-
- - - dyson_code_desc -
-
- - -
-
-
- - -


- btn_2fa_desc -
-
- - -


- finish_desc -
-
-
- - From e074af029e68b2f184db4c8eb83546362f6b198a Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 10:41:59 +0200 Subject: [PATCH 3/7] Fixed broken NO2Index --- main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 6756b57..86449d8 100644 --- a/main.js +++ b/main.js @@ -883,13 +883,14 @@ class dysonAirPurifier extends utils.Adapter { // NO2 QualityIndex // 0-3: Good, 4-6: Medium, 7-8, Bad, >9: very Bad let NO2Index = 0; - if (message[row].noxl < 4) { + const value = Math.floor(message[row].noxl / 10); + if (value < 4) { NO2Index = 0; - } else if (message[row].noxl >= 4 && message[row].noxl <= 6) { + } else if (value >= 4 && value <= 6) { NO2Index = 1; - } else if (message[row].noxl >= 7 && message[row].noxl <= 8) { + } else if (value >= 7 && value <= 8) { NO2Index = 2; - } else if (message[row].noxl >= 9) { + } else if (value >= 9) { NO2Index = 3; } this.createOrExtendObject( From 4b93131494dcf30d60fbca65b55aa42665fdd48d Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 14:52:16 +0200 Subject: [PATCH 4/7] reacts to fnsp=auto --- dysonConstants.js | 2 +- main.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dysonConstants.js b/dysonConstants.js index 6e787f0..9d644bb 100644 --- a/dysonConstants.js +++ b/dysonConstants.js @@ -241,7 +241,7 @@ const datapoints = new Map([ writeable: true, role: 'value', unit: '', - displayValues: { 11: 'Auto' } + displayValues: { 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10', 11: 'Auto' } } ], [ diff --git a/main.js b/main.js index 86449d8..8da29bd 100644 --- a/main.js +++ b/main.js @@ -343,7 +343,10 @@ class dysonAirPurifier extends utils.Adapter { } } } - + // check whether fanspeed has been set to Auto + if ('fnsp' === dysonAction && 11 === value){ + messageData = {'auto':'ON'}; + } // only send to device if change should set a device value if (action === 'Hostaddress') { return; From 23b451e77684df37cd20a7e48d6197709d4f906e Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 14:58:03 +0200 Subject: [PATCH 5/7] fixed polling of data --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 8da29bd..8d3f10d 100644 --- a/main.js +++ b/main.js @@ -1193,7 +1193,6 @@ class dysonAirPurifier extends utils.Adapter { // msg: 'REQUEST-CURRENT-STATE' // msg: 'REQUEST-PRODUCT-ENVIRONMENT-CURRENT-SENSOR-DATA' // msg: 'REQUEST-CURRENT-FAULTS' - // msg: 'REQUEST-CURRENT-STATE', thisDevice.mqttClient.publish( `${thisDevice.ProductType}/${thisDevice.Serial}/command`, JSON.stringify({ @@ -1208,6 +1207,13 @@ class dysonAirPurifier extends utils.Adapter { time: new Date().toISOString() }) ); + thisDevice.mqttClient.publish( + `${thisDevice.ProductType}/${thisDevice.Serial}/command`, + JSON.stringify({ + msg: 'REQUEST-PRODUCT-ENVIRONMENT-CURRENT-SENSOR-DATA', + time: new Date().toISOString() + }) + ); } catch (error) { adapterLog.error( `${thisDevice.Serial} - MQTT interval error: ${error}` From cd1d8a876a6336989f00f11252333897715c6c22 Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 15:00:23 +0200 Subject: [PATCH 6/7] v.3.2.0 --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a0b38a5..f34a492 100644 --- a/README.md +++ b/README.md @@ -185,12 +185,18 @@ All states report whether there is a failure or not. `True` means a failure, `fa ### **WORK IN PROGRESS** -- (grizzelbee) Chg: Lamps (Product type 552a) won't generate a warning on startup anymore but show an info that they are not supported by this adapter. -- (grizzelbee) Chg: Vacuum cleaner robots (Product types 276 and 277) won't generate a warning on startup anymore but show an info that they are not supported by this adapter. +### 3.2.0 (2024-05-27) (Marching on) + +- (grizzelbee) Chg: Lamps (Product type 552a) won't generate a warning on startup any longer but show an info that they are not supported by this adapter. +- (grizzelbee) Chg: Vacuum cleaner robots (Product types 276 and 277) won't generate a warning on startup any longer but show an info that they are not supported by this adapter. - (grizzelbee) New: [#289](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/289) Added Support for Dyson Purifier Big+Quiet Formaldehyde (BP03, Produce type 664) - (grizzelbee) Fix: [#287](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/287) Added Switzerland again to config - (grizzelbee) Upd: Dependencies got updated -- (grizzelbee) Chg: removed index_m.html, since it's no longer used +- (grizzelbee) Chg: removed obsolete index_m.html +- (grizzelbee) Fix: Fixed broken NO2Index +- (grizzelbee) Fix: Fixed broken fan speeds 0-10 +- (grizzelbee) Fix: Fixed polling of sensor data +- (grizzelbee) Fix: setting fan speed = Auto works ### 3.1.10 (2024-05-14) (Marching on) From fe3b16313dde7e5df285c632e16d36eb28d5a6e9 Mon Sep 17 00:00:00 2001 From: grizzelbee Date: Mon, 27 May 2024 15:00:33 +0200 Subject: [PATCH 7/7] cleanup --- io-package.json | 44 ++------------------------------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/io-package.json b/io-package.json index b681efe..6b538ec 100644 --- a/io-package.json +++ b/io-package.json @@ -145,45 +145,6 @@ "pl": "\nAktualizacja: zaktualizowano zależności \nNowość: Dodano HCHO-Index \nPIERWSZE ZMIANY: \nZastąpiono wartości w polu pm25 wartościami z pm25r i przeliczono je zgodnie z aplikacją dyson \nZastąpiono wartości w polu pm10 wartościami z pm10r i przeliczono je odpowiednio do aplikacja dyson \nZastąpiono wartości w polu hcho wartościami z hchr i przeliczono je zgodnie z aplikacją dyson \nPola pm25r i pm10r są obecnie przestarzałe i zostaną usunięte", "uk": "\nОновлено: оновлено залежності \nНове: додано HCHO-індекс \nОСНОВНІ ЗМІНИ: \nЗамінено значення в полі pm25 на значення з pm25r і обчислення їх відповідно до програми dyson \nЗамінено значення в полі pm10 на значення з pm10r і обчислення їх відповідно до програма dyson \nЗамінено значення в полі hcho на значення з hchr і обчислення їх відповідно до програми dyson \nПоля pm25r і pm10r тепер не підтримуються та будуть видалені", "zh-cn": "\n更新:依赖项已更新 \n新功能:添加了 HCHO 索引 \n重大更改: \n将字段 pm25 中的值替换为 pm25r 中的值,并根据 Dyson 应用程序相应地计算它们 \n将字段 pm10 中的值替换为 pm10r 中的值,并相应地计算它们Dyson 应用程序 \n将字段 hcho 中的值替换为 hchr 中的值,并根据 Dyson 应用程序相应地计算它们 \n字段 pm25r 和 pm10r 现已弃用并将被删除" - }, - "2.5.9": { - "en": "Updated year in license- and readme file to make adapter checker happy", - "de": "Aktualisiertes Jahr in der Lizenz- und Readme-Datei, um den Adapterprüfer glücklich zu machen", - "ru": "Обновлен год в файле лицензии и файле readme, чтобы сделать проверку адаптера счастливой.", - "pt": "Ano atualizado no arquivo de licença e leia-me para deixar o verificador do adaptador feliz", - "nl": "Bijgewerkt jaar in licentie- en leesmij-bestand om adapter checker blij te maken", - "fr": "Année mise à jour dans le fichier de licence et readme pour rendre le vérificateur d'adaptateur heureux", - "it": "Anno aggiornato nel file di licenza e readme per rendere felice il controllore dell'adattatore", - "es": "Año actualizado en la licencia y el archivo Léame para que el verificador de adaptadores sea feliz", - "pl": "Zaktualizowano rok w licencji i pliku readme, aby uszczęśliwić narzędzie do sprawdzania adapterów", - "uk": "Оновлено рік у файлі ліцензії та readme, щоб зробити інструмент перевірки адаптера щасливим", - "zh-cn": "更新了许可证和自述文件中的年份,以使适配器检查器满意" - }, - "2.5.8": { - "en": "Fixed calculation of hmax values for heaters", - "de": "Berechnung der hmax-Werte für Heizungen korrigiert", - "ru": "Исправлен расчет значений hmax для обогревателей", - "pt": "Cálculo fixo de valores hmax para aquecedores", - "nl": "Vaste berekening van hmax-waarden voor verwarmingen", - "fr": "Calcul fixe des valeurs hmax pour les appareils de chauffage", - "it": "Calcolo fisso dei valori hmax per i riscaldatori", - "es": "Cálculo fijo de valores hmax para calentadores.", - "pl": "Naprawiono obliczanie wartości hmax dla grzejników", - "uk": "Виправлено розрахунок значень hmax для нагрівачів", - "zh-cn": "修复了加热器 hmax 值的计算" - }, - "2.5.7": { - "en": "Added support for Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K)", - "de": "Unterstützung für Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K) hinzugefügt", - "ru": "Добавлена ​​поддержка Dyson Pure Humidify+Cool Formальдегид (PH04, ProductType 358K).", - "pt": "Adicionado suporte para Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K)", - "nl": "Ondersteuning toegevoegd voor Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K)", - "fr": "Ajout de la prise en charge de Dyson Pure Humidify+Cool Formaldéhyde (PH04, ProductType 358K)", - "it": "Aggiunto il supporto per Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K)", - "es": "Se agregó soporte para Dyson Pure Humidify+Cool Formaldehído (PH04, ProductType 358K)", - "pl": "Dodano obsługę Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K)", - "uk": "Додано підтримку для Dyson Pure Humidify+Cool Formaldehyde (PH04, ProductType 358K)", - "zh-cn": "添加了对 Dyson Pure Humidify+Cool Formaldehyde(PH04,产品类型 358K)的支持" } }, "titleLang": { @@ -239,9 +200,8 @@ "materialize": true, "supportCustoms": false, "connectionType": "local", - "dataSource": "poll", + "dataSource": "push", "messagebox": true, - "subscribe": "messagebox", "globalDependencies": [ { "admin": ">=6.13.16" @@ -249,7 +209,7 @@ ], "dependencies": [ { - "js-controller": ">=3.0.0" + "js-controller": ">=5.0.16" } ], "plugins": {