Skip to content

Commit

Permalink
#33 (#34)
Browse files Browse the repository at this point in the history
* support new login procedure

* improve bug report form

* remove refresh_token
  • Loading branch information
ice987987 authored Jun 16, 2022
1 parent abf2864 commit 8d2df8f
Show file tree
Hide file tree
Showing 17 changed files with 278 additions and 338 deletions.
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ body:
occurs with ioBroker itself, any third party adapters, unofficial or outdated
adapter versions.
Do also not seek support here ("I need help with ...", "I have a
question ...", "Can someone walk me through ..."), that belongs into the
[ioBroker forum at forum.iobroker.net](https://forum.iobroker.net/).
And finally, make sure any bug you want to report is still present with the **current**
adapter (beta) version.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ Set the adapter to debug log mode (Instances -> Expert mode -> Column Log level)

<!-- ### **WORK IN PROGRESS** -->

### **WORK IN PROGRESS**
### 0.2.0 (14.06.2022)
* (ice987987) support new login procedure to husqvarna's webservice using "Application key" and "Application secret" instead of "username (emailadress)" and "password" (issue [#33](https://github.com/ice987987/ioBroker.husqvarna-automower/issues/33))
* (ice987987) update links to husqvarna homepage due to their updated homepage
* (ice987987) improve bug-report form

Expand Down
10 changes: 4 additions & 6 deletions admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "Nutzername",
"usernameHint": "z.B. [email protected]",
"password": "Passwort",
"passwordHint": "Ihr „Husqvarna Automower Connect“-Passwort (mindestens 5 Zeichen)",
"apiKey": "API-Schlüssel",
"apiKeyHint": "Holen Sie sich Ihren 'Husqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>hier</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Holen Sie sich Ihren „Husqvarna Automower Application Key“ <a href='https://developer.husqvarnagroup.cloud' target='_blank'>hier</a>. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Holen Sie sich Ihr „Husqvarna Automower Application Secret“ <a href='https://developer.husqvarnagroup.cloud' target='_blank'>hier</a>. ",
"note": "Beim Speichern wird der Adapter sofort mit der neuen Konfiguration neu gestartet."
}
10 changes: 4 additions & 6 deletions admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "username",
"usernameHint": "e.g. [email protected]",
"password": "password",
"passwordHint": "your 'Husqvarna Automower Connect' password (at least 5 characters)",
"apiKey": "API Key",
"apiKeyHint": "Get your 'Husqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>here</a>. (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
"applicationKey": "Application key",
"applicationKeyHint": "Get your 'Husqvarna Automower Application key' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>here</a>. (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
"applicationSecret": "Application secret",
"applicationSecretHint": "Get your 'Husqvarna Automower Application secret' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>here</a>. (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
"note": "on save adapter restarts with new config immediately."
}
10 changes: 4 additions & 6 deletions admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "nombre de usuario",
"usernameHint": "p.ej. [email protected]",
"password": "clave",
"passwordHint": "su contraseña de 'Husqvarna Automower Connect' (al menos 5 caracteres)",
"apiKey": "Clave API",
"apiKeyHint": "Obtenga su 'HUsqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>aquí</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Obtenga su 'Clave de la aplicación Husqvarna Automower' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>aquí</a>. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Obtenga su 'Secreto de la aplicación Husqvarna Automower' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>aquí</a>. ",
"note": "al guardar, el adaptador se reinicia con una nueva configuración inmediatamente."
}
10 changes: 4 additions & 6 deletions admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "Nom d'utilisateur",
"usernameHint": "par exemple. [email protected]",
"password": "le mot de passe",
"passwordHint": "votre mot de passe 'Husqvarna Automower Connect' (au moins 5 caractères)",
"apiKey": "clé API",
"apiKeyHint": "Obtenez votre 'Husqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>ici</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Obtenez votre « clé d'application Husqvarna Automower » <a href='https://developer.husqvarnagroup.cloud' target='_blank'>ici</a>. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Obtenez votre « secret d'application Husqvarna Automower » <a href='https://developer.husqvarnagroup.cloud' target='_blank'>ici</a>. ",
"note": "lors de l'enregistrement, l'adaptateur redémarre immédiatement avec la nouvelle configuration."
}
10 changes: 4 additions & 6 deletions admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "nome utente",
"usernameHint": "per esempio. [email protected]",
"password": "parola d'ordine",
"passwordHint": "la tua password 'Husqvarna Automower Connect' (almeno 5 caratteri)",
"apiKey": "Chiave API",
"apiKeyHint": "Ottieni la tua \"Husqvarna Automower Connect API-KEY\" <a href='https://developer.husqvarnagroup.cloud' target='_blank'>qui</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Ottieni la tua \"Chiave dell'applicazione Husqvarna Automower\" <a href='https://developer.husqvarnagroup.cloud' target='_blank'>qui</a>. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Ottieni il tuo \"Segreto dell'applicazione Husqvarna Automower\" <a href='https://developer.husqvarnagroup.cloud' target='_blank'>qui</a>. ",
"note": "al salvataggio dell'adattatore si riavvia immediatamente con la nuova configurazione."
}
10 changes: 4 additions & 6 deletions admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "gebruikersnaam",
"usernameHint": "bijv. [email protected]",
"password": "wachtwoord",
"passwordHint": "uw 'Husqvarna Automower Connect'-wachtwoord (minimaal 5 tekens)",
"apiKey": "API sleutel",
"apiKeyHint": "Download uw 'Husqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>hier</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Haal uw 'Husqvarna Automower-toepassingssleutel' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>hier</a> op. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Haal uw 'Husqvarna Automower-toepassingsgeheim' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>hier</a> op. ",
"note": "on save-adapter herstart onmiddellijk met nieuwe configuratie."
}
10 changes: 4 additions & 6 deletions admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "Nazwa Użytkownika",
"usernameHint": "np. [email protected]",
"password": "hasło",
"passwordHint": "hasło „Husqvarna Automower Connect” (co najmniej 5 znaków)",
"apiKey": "Klucz API",
"apiKeyHint": "Pobierz klucz „Husqvarna Automower Connect API-KEY” <a href='https://developer.husqvarnagroup.cloud' target='_blank'>tutaj</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Pobierz „Klucz aplikacji Husqvarna Automower” <a href='https://developer.husqvarnagroup.cloud' target='_blank'>tutaj</a>. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Pobierz „tajemnicę aplikacji Husqvarna Automower” <a href='https://developer.husqvarnagroup.cloud' target='_blank'>tutaj</a>. ",
"note": "po zapisaniu adapter natychmiast uruchamia się ponownie z nową konfiguracją."
}
10 changes: 4 additions & 6 deletions admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "nome de usuário",
"usernameHint": "por exemplo. [email protected]",
"password": "senha",
"passwordHint": "sua senha 'Husqvarna Automower Connect' (pelo menos 5 caracteres)",
"apiKey": "Chave API",
"apiKeyHint": "Obtenha seu 'Husqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>aqui</a>. ",
"applicationKey": "Application key",
"applicationKeyHint": "Obtenha sua 'Chave do aplicativo Husqvarna Automower' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>aqui</a>. ",
"applicationSecret": "Application secret",
"applicationSecretHint": "Obtenha seu 'Segredo do aplicativo Husqvarna Automower' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>aqui</a>. ",
"note": "ao salvar o adaptador é reiniciado com a nova configuração imediatamente."
}
10 changes: 4 additions & 6 deletions admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "имя пользователя",
"usernameHint": "например [email protected]",
"password": "пароль",
"passwordHint": "ваш пароль «Husqvarna Automower Connect» (не менее 5 символов)",
"apiKey": "API-ключ",
"apiKeyHint": "Получите 'Husqvarna Automower Connect API-KEY' <a href='https://developer.husqvarnagroup.cloud' target='_blank'>здесь</a>. ",
"applicationKey": "Ключ приложения",
"applicationKeyHint": "Получите ключ приложения Husqvarna Automower <a href='https://developer.husqvarnagroup.cloud' target='_blank'>здесь</a>. ",
"applicationSecret": "Секрет приложения",
"applicationSecretHint": "Получите свой «секрет приложения Husqvarna Automower» <a href='https://developer.husqvarnagroup.cloud' target='_blank'>здесь</a>. ",
"note": "при сохранении адаптер немедленно перезагружается с новой конфигурацией."
}
10 changes: 4 additions & 6 deletions admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"username": "用户名",
"usernameHint": "例如 [email protected]",
"password": "密码",
"passwordHint": "您的“Husqvarna Automower Connect”密码(至少 5 个字符)",
"apiKey": "API 密钥",
"apiKeyHint": "在<a href='https://developer.husqvarnagroup.cloud' target='_blank'>此处</a>获取您的“Husqvarna Automower Connect API-KEY”。 ",
"applicationKey": "应用程序密钥",
"applicationKeyHint": "在<a href='https://developer.husqvarnagroup.cloud' target='_blank'>此处</a>获取您的“Husqvarna Automower Application key”。 ",
"applicationSecret": "应用秘密",
"applicationSecretHint": "在<a href='https://developer.husqvarnagroup.cloud' target='_blank'>此处</a>获取您的“Husqvarna Automower Application Secret”。 ",
"note": "在保存适配器立即使用新配置重新启动。"
}
47 changes: 18 additions & 29 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,31 @@
"type": "panel",
"i18n": true,
"items": {
"username": {
"applicationKey": {
"newLine": true,
"type": "text",
"label": "username",
"help": "usernameHint",
"placeholder": "[email protected]",
"validator": "data.username.match(/^(([^<>()\\[\\]\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/)",
"validatorNoSaveOnError": true,
"sm": 6,
"md": 4,
"lg": 4
},
"password": {
"newLine": false,
"type": "password",
"label": "password",
"help": "passwordHint",
"repeat": false,
"visible": false,
"validator": "data.password.length >= 5",
"label": "applicationKey",
"help": "applicationKeyHint",
"validator": "data.applicationKey.match(/[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}/)",
"validatorNoSaveOnError": true,
"sm": 6,
"md": 4,
"lg": 4
"visible": true,
"repeat": false,
"sm": 12,
"md": 6,
"lg": 6
},
"apiKey": {
"applicationSecret": {
"newLine": true,
"type": "text",
"label": "apiKey",
"help": "apiKeyHint",
"placeholder": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"validator": "data.apiKey.match(/[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}/)",
"type": "password",
"label": "applicationSecret",
"help": "applicationSecretHint",
"validator": "data.applicationSecret.match(/[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}/)",
"validatorNoSaveOnError": true,
"visible": true,
"repeat": false,
"sm": 12,
"md": 8,
"lg": 8
"md": 6,
"lg": 6
},
"_note": {
"newLine": true,
Expand Down
Loading

0 comments on commit 8d2df8f

Please sign in to comment.