Skip to content

Commit

Permalink
Merge pull request #153 from Grizzelbee/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Grizzelbee authored Oct 20, 2021
2 parents 4b20912 + 4482c53 commit 3add6aa
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 21 deletions.
3 changes: 2 additions & 1 deletion admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "Behalten Sie alte Sensorwerte bei, wenn die kontinuierliche Überwachung ausgeschaltet ist.",
"password_desc": "Passwort Ihres Dyson-Kontos.",
"switzerland": "Schweiz",
"temperatureUnit_desc": "Einheit zur Anzeige der Temperatur."
"temperatureUnit_desc": "Einheit zur Anzeige der Temperatur.",
"token_inside": "Ein Token wurde empfangen und gespeichert."
}
3 changes: 2 additions & 1 deletion admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "keep old sensor values when continuous monitoring is switched off.",
"password_desc": "Password of your dyson account.",
"switzerland": "Switzerland",
"temperatureUnit_desc": "Unit to display the temperature."
"temperatureUnit_desc": "Unit to display the temperature.",
"token_inside": "A token has been received and stored."
}
3 changes: 2 additions & 1 deletion admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "mantenga los valores de los sensores antiguos cuando la monitorización continua esté desactivada.",
"password_desc": "Contraseña de su cuenta de dyson.",
"switzerland": "Suiza",
"temperatureUnit_desc": "Unidad para mostrar la temperatura."
"temperatureUnit_desc": "Unidad para mostrar la temperatura.",
"token_inside": "Se ha recibido y almacenado un token."
}
3 changes: 2 additions & 1 deletion admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "conserver les anciennes valeurs de capteur lorsque la surveillance continue est désactivée.",
"password_desc": "Mot de passe de votre compte dyson.",
"switzerland": "Suisse",
"temperatureUnit_desc": "Unité pour afficher la température."
"temperatureUnit_desc": "Unité pour afficher la température.",
"token_inside": "Un jeton a été reçu et stocké."
}
3 changes: 2 additions & 1 deletion admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "mantenere i vecchi valori del sensore quando il monitoraggio continuo è disattivato.",
"password_desc": "Password del tuo account dyson.",
"switzerland": "Svizzera",
"temperatureUnit_desc": "Unità per visualizzare la temperatura."
"temperatureUnit_desc": "Unità per visualizzare la temperatura.",
"token_inside": "Un token è stato ricevuto e archiviato."
}
3 changes: 2 additions & 1 deletion admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "bewaar oude sensorwaarden als continue bewaking is uitgeschakeld.",
"password_desc": "Wachtwoord van uw dyson-account.",
"switzerland": "Zwitserland",
"temperatureUnit_desc": "Eenheid om de temperatuur weer te geven."
"temperatureUnit_desc": "Eenheid om de temperatuur weer te geven.",
"token_inside": "Er is een token ontvangen en opgeslagen."
}
3 changes: 2 additions & 1 deletion admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "zachować stare wartości czujnika, gdy ciągłe monitorowanie jest wyłączone.",
"password_desc": "Hasło Twojego konta Dyson.",
"switzerland": "Szwajcaria",
"temperatureUnit_desc": "Jednostka do wyświetlania temperatury."
"temperatureUnit_desc": "Jednostka do wyświetlania temperatury.",
"token_inside": "Token został odebrany i zapisany."
}
3 changes: 2 additions & 1 deletion admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "mantenha os valores antigos do sensor quando o monitoramento contínuo estiver desligado.",
"password_desc": "Senha da sua conta dyson.",
"switzerland": "Suíça",
"temperatureUnit_desc": "Unidade para exibir a temperatura."
"temperatureUnit_desc": "Unidade para exibir a temperatura.",
"token_inside": "Um token foi recebido e armazenado."
}
3 changes: 2 additions & 1 deletion admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "сохранять старые значения датчиков при отключении непрерывного мониторинга.",
"password_desc": "Пароль вашей учетной записи dyson.",
"switzerland": "Швейцария",
"temperatureUnit_desc": "Единица для отображения температуры."
"temperatureUnit_desc": "Единица для отображения температуры.",
"token_inside": "Токен получен и сохранен."
}
3 changes: 2 additions & 1 deletion admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"keepValues_desc": "连续监控关闭时,请保留旧的传感器值。",
"password_desc": "dyson帐户的密码。",
"switzerland": "瑞士",
"temperatureUnit_desc": "显示温度的单位。"
"temperatureUnit_desc": "显示温度的单位。",
"token_inside": "已接收并存储令牌。"
}
13 changes: 12 additions & 1 deletion admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
$key.prop('checked', settings[id])
.on('change', () => onChange());
} else {
if (id === 'token'){
if (settings[id] != '') {
document.getElementById("token_inside").checked=true;
}
}
if (id === 'Password') {
// get the system secret for pwd de-/encryption
socket.emit('getObject', 'system.config', function (err, obj) {
Expand Down Expand Up @@ -154,6 +159,7 @@
} else if (response.token){
console.log(`Setting token [${JSON.stringify(response)}] to input.`);
$('input[id=token]').val(response.token).change();
document.getElementById("token_inside").checked=true;
if (M) M.updateTextFields();
showMessage(`Received token [${JSON.stringify(response)}] from dyson and saved it to config.`);
}
Expand Down Expand Up @@ -245,11 +251,16 @@
<label class="translate" for="dyson_code">Lbl_dyson_code</label>
<span class="translate">dyson_code_desc</span>
</div>
<div class="input field col s6 m4">
</br></br>
<input type="checkbox" id="token_inside" class="value" onclick="return false;" onkeydown="return false;" disabled="true"/>
<span for="token_inside" class="translate">token_inside</span>
</br>
</div>
<div class="input-field col s12 m4 hide">
<input class="value hide" id="token" type="text">
<label class="translate hide" for="token">Lbl_token</label>
</div>

</div>
<div class="row">
<div class="col s12 m12"> <!--s12 m4 l2 -->
Expand Down
1 change: 1 addition & 0 deletions admin/words.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"common": {
"name": "dysonairpurifier",
"version": "2.1.3",
"version": "2.1.4",
"news": {
"2.1.4": {
"en": "Added token-indicator to config page.",
"de": "Token-Indikator zur Konfigurationsseite hinzugefügt.",
"ru": "На страницу конфигурации добавлен токен-индикатор.",
"pt": "Adicionado indicador de token à página de configuração.",
"nl": "Token-indicator toegevoegd aan configuratiepagina.",
"fr": "Ajout d'un indicateur de jeton à la page de configuration.",
"it": "Aggiunto indicatore di token alla pagina di configurazione.",
"es": "Se agregó un indicador de token a la página de configuración.",
"pl": "Dodano wskaźnik tokena do strony konfiguracji.",
"zh-cn": "向配置页面添加了令牌指示器。"
},
"2.1.3": {
"en": "Bugfix release!\nHostaddress is used properly when given.\nOscillationAngle \"Breeze\" is working now\nStrange delay and jumping of boolean switches is fixed",
"de": "Bugfix-Release! \nHostadresse wird korrekt verwendet, wenn sie angegeben wird. \nOscillationAngle \"Breeze\" funktioniert jetzt \nSeltsame Verzögerung und Springen von Booleschen Schaltern wurde behoben",
Expand Down
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,8 @@ class dysonAirPurifier extends utils.Adapter {
}
} catch (error) {
this.setState('info.connection', false, true);
adapterLog.error(`[main()] error: ${error.message}, stack: ${error.stack}`);
adapterLog.error(`[main] Error while querying devices from dyson servers. The most common issue is that you haven't finished the 2FA process. Please refer to the ReadMe for instructions.`);
adapterLog.error(`[main] error: ${error}, stack: ${error.stack}`);
}
}

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.dysonairpurifier",
"version": "2.1.3",
"version": "2.1.4",
"description": "dyson air purifiers and fans",
"author": {
"name": "grizzelbee",
Expand Down Expand Up @@ -31,7 +31,7 @@
"lodash": "^4.17.21",
"mqtt": "^4.2.8",
"path": "^0.12.7",
"snyk": "^1.738.0",
"snyk": "^1.741.0",
"ssl-root-cas": "^1.3.1"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
![Number of Installations (latest)](http://iobroker.live/badges/dysonairpurifier-installed.svg)
[![NPM version](https://img.shields.io/npm/v/iobroker.dysonairpurifier.svg)](https://www.npmjs.com/package/iobroker.dysonairpurifier)
![Number of Installations (stable)](http://iobroker.live/badges/dysonairpurifier-stable.svg)
[![Dependency Status](https://david-dm.org/Grizzelbee/iobroker.dysonairpurifier.svg)](https://david-dm.org/Grizzelbee/iobroker.dysonairpurifier)
[![Known Vulnerabilities](https://snyk.io/test/github/Grizzelbee/ioBroker.dysonairpurifier/badge.svg)](https://snyk.io/test/github/Grizzelbee/ioBroker.dysonairpurifier)
[![Test and Release](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/actions/workflows/test-and-deploy.yml/badge.svg)](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/actions/workflows/test-and-deploy.yml)
[![NPM](https://nodei.co/npm/iobroker.dysonAirPurifier.svg?downloads=true)](https://nodei.co/npm/iobroker.dysonairpurifier/)
Expand Down Expand Up @@ -143,12 +142,15 @@ Which is what the dyson app does also.

## Changelog

### V2.1.4 (2021-10-20) (Running to the edge)
* (grizzelbee) New: [#152](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/152) Added token-indicator to config page in admin to show whether a token has already been received and saved or not.

### V2.1.3 (2021-10-17) (Running to the edge)
* (grizzelbee) Fix: [#148](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/148) Hostaddress is used properly when given.
* (grizzelbee) Fix: [#149](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/149) OscillationAngle "Breeze" is working now
* (grizzelbee) Fix: [#150](https://github.com/Grizzelbee/ioBroker.dysonairpurifier/issues/150) Strange delay and jumping of boolean switches is fixed

* ### V2.1.2 (2021-10-07) (Running to the edge)
### V2.1.2 (2021-10-07) (Running to the edge)
* (grizzelbee) New: Removed NO2 from general AirQuality to be more compliant to dyson-app
* (grizzelbee) Upd: Code cleanup
* (grizzelbee) Upd: Removed delay between sending a command and new values getting displayed (max 30 Secs)
Expand Down

0 comments on commit 3add6aa

Please sign in to comment.