iobroker.volvo 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +15 -1
- package/admin/i18n/es/translations.json +14 -0
- package/admin/i18n/fr/translations.json +14 -0
- package/admin/i18n/it/translations.json +14 -0
- package/admin/i18n/nl/translations.json +14 -0
- package/admin/i18n/pl/translations.json +14 -0
- package/admin/i18n/pt/translations.json +14 -0
- package/admin/i18n/ru/translations.json +14 -0
- package/admin/i18n/uk/translations.json +14 -0
- package/admin/i18n/zh-cn/translations.json +14 -0
- package/admin/jsonConfig.json +37 -8
- package/admin/tsconfig.json +7 -0
- package/io-package.json +104 -78
- package/main.js +16 -1
- package/package.json +18 -6
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
- package/.github/workflows/test-and-release.yml +0 -91
- package/.releaseconfig.json +0 -3
- package/main.test.js +0 -30
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2020-
|
|
3
|
+
Copyright (c) 2020-2026 TA2k <tombox2020@gmail.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -87,6 +87,20 @@ Use the buttons under `volvo.0.<VIN>.remote` to control your vehicle:
|
|
|
87
87
|
|
|
88
88
|
## Changelog
|
|
89
89
|
|
|
90
|
+
### 1.0.2
|
|
91
|
+
- Fix: adapter stays alive waiting for OTP login when no token stored
|
|
92
|
+
- Fix: better startup log messages explaining next steps
|
|
93
|
+
- Fix: CI deploy job upgraded to Node 24 (resolves `promise-retry` error)
|
|
94
|
+
|
|
95
|
+
### 1.0.1
|
|
96
|
+
- Fix: multi-language support (ru, pt, nl, fr, it, es, pl, uk, zh-cn)
|
|
97
|
+
- Fix: jsonConfig admin UI size attributes for all breakpoints
|
|
98
|
+
- Fix: `protectedNative` / `encryptedNative` for sensitive fields
|
|
99
|
+
- Fix: OTP/sendTo message handlers null-safe
|
|
100
|
+
- Chore: added dependabot, `@iobroker/adapter-dev`, `@iobroker/eslint-config`
|
|
101
|
+
- Chore: CI `adapter-tests` now runs after linting
|
|
102
|
+
- Chore: migrated `.npmignore` to `package.json` `files`
|
|
103
|
+
|
|
90
104
|
### 1.0.0 🎉
|
|
91
105
|
|
|
92
106
|
First stable release — complete rewrite of the Volvo ioBroker adapter.
|
|
@@ -196,7 +210,7 @@ First stable release — complete rewrite of the Volvo ioBroker adapter.
|
|
|
196
210
|
|
|
197
211
|
MIT License
|
|
198
212
|
|
|
199
|
-
Copyright
|
|
213
|
+
Copyright © 2020-2026 TA2k <tombox2020@gmail.com>
|
|
200
214
|
|
|
201
215
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
202
216
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Configuración de cuenta",
|
|
3
|
+
"volvoIdEmail": "Correo electrónico de Volvo ID",
|
|
4
|
+
"volvoIdPassword": "Contraseña de Volvo ID",
|
|
5
|
+
"vccApiKey": "Clave de API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Obtenga su clave de API en developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Intervalo de actualización (minutos)",
|
|
8
|
+
"otpLogin": "Iniciar sesión con contraseña única",
|
|
9
|
+
"otpDescription": "Guarde la configuración primero y luego haga clic en 'Iniciar sesión' para recibir una contraseña única por correo electrónico. Ingrese el código y haga clic en 'Enviar OTP' para completar la autenticación.",
|
|
10
|
+
"startLoginButton": "Iniciar sesión (Enviar OTP)",
|
|
11
|
+
"otpCode": "Código OTP",
|
|
12
|
+
"submitOtpButton": "Enviar OTP",
|
|
13
|
+
"testConnectionButton": "Probar conexión"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Paramètres du compte",
|
|
3
|
+
"volvoIdEmail": "E-mail Volvo ID",
|
|
4
|
+
"volvoIdPassword": "Mot de passe Volvo ID",
|
|
5
|
+
"vccApiKey": "Clé API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Obtenez votre clé API sur developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Intervalle de mise à jour (minutes)",
|
|
8
|
+
"otpLogin": "Connexion avec mot de passe unique",
|
|
9
|
+
"otpDescription": "Enregistrez d'abord les paramètres, puis cliquez sur 'Démarrer la connexion' pour recevoir un mot de passe unique par e-mail. Entrez le code et cliquez sur 'Envoyer OTP' pour terminer l'authentification.",
|
|
10
|
+
"startLoginButton": "Démarrer la connexion (Envoyer OTP)",
|
|
11
|
+
"otpCode": "Code OTP",
|
|
12
|
+
"submitOtpButton": "Envoyer OTP",
|
|
13
|
+
"testConnectionButton": "Tester la connexion"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Impostazioni dell'account",
|
|
3
|
+
"volvoIdEmail": "E-mail Volvo ID",
|
|
4
|
+
"volvoIdPassword": "Password Volvo ID",
|
|
5
|
+
"vccApiKey": "Chiave API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Ottieni la tua chiave API su developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Intervallo di aggiornamento (minuti)",
|
|
8
|
+
"otpLogin": "Accesso con password monouso",
|
|
9
|
+
"otpDescription": "Salva prima le impostazioni, quindi fai clic su 'Avvia accesso' per ricevere una password monouso via email. Inserisci il codice e fai clic su 'Invia OTP' per completare l'autenticazione.",
|
|
10
|
+
"startLoginButton": "Avvia accesso (Invia OTP)",
|
|
11
|
+
"otpCode": "Codice OTP",
|
|
12
|
+
"submitOtpButton": "Invia OTP",
|
|
13
|
+
"testConnectionButton": "Test connessione"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Accountinstellingen",
|
|
3
|
+
"volvoIdEmail": "Volvo ID e-mail",
|
|
4
|
+
"volvoIdPassword": "Volvo ID wachtwoord",
|
|
5
|
+
"vccApiKey": "VCC API-sleutel",
|
|
6
|
+
"vccApiKeyHelp": "Haal uw API-sleutel op bij developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Update-interval (minuten)",
|
|
8
|
+
"otpLogin": "Inloggen met eenmalig wachtwoord",
|
|
9
|
+
"otpDescription": "Sla instellingen eerst op en klik op 'Login starten' om een eenmalig wachtwoord per e-mail te ontvangen. Voer de code in en klik op 'OTP verzenden' om de verificatie te voltooien.",
|
|
10
|
+
"startLoginButton": "Login starten (OTP verzenden)",
|
|
11
|
+
"otpCode": "OTP-code",
|
|
12
|
+
"submitOtpButton": "OTP verzenden",
|
|
13
|
+
"testConnectionButton": "Verbinding testen"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Ustawienia konta",
|
|
3
|
+
"volvoIdEmail": "E-mail ID Volvo",
|
|
4
|
+
"volvoIdPassword": "Hasło ID Volvo",
|
|
5
|
+
"vccApiKey": "Klucz API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Uzyskaj klucz API na developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Interwał aktualizacji (minuty)",
|
|
8
|
+
"otpLogin": "Logowanie za pomocą jednorazowego hasła",
|
|
9
|
+
"otpDescription": "Najpierw zapisz ustawienia, a następnie kliknij 'Rozpocznij logowanie', aby otrzymać jednorazowe hasło na e-mail. Wpisz kod i kliknij 'Wyślij OTP', aby ukończyć uwierzytelnianie.",
|
|
10
|
+
"startLoginButton": "Rozpocznij logowanie (Wyślij OTP)",
|
|
11
|
+
"otpCode": "Kod OTP",
|
|
12
|
+
"submitOtpButton": "Wyślij OTP",
|
|
13
|
+
"testConnectionButton": "Testuj połączenie"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Configurações da conta",
|
|
3
|
+
"volvoIdEmail": "E-mail do Volvo ID",
|
|
4
|
+
"volvoIdPassword": "Senha do Volvo ID",
|
|
5
|
+
"vccApiKey": "Chave de API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Obtenha sua chave de API em developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Intervalo de atualização (minutos)",
|
|
8
|
+
"otpLogin": "Login com senha única",
|
|
9
|
+
"otpDescription": "Salve as configurações primeiro e clique em 'Iniciar Login' para receber uma senha única por e-mail. Digite o código e clique em 'Enviar OTP' para concluir a autenticação.",
|
|
10
|
+
"startLoginButton": "Iniciar Login (Enviar OTP)",
|
|
11
|
+
"otpCode": "Código OTP",
|
|
12
|
+
"submitOtpButton": "Enviar OTP",
|
|
13
|
+
"testConnectionButton": "Testar Conexão"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Параметры учетной записи",
|
|
3
|
+
"volvoIdEmail": "Электронная почта Volvo ID",
|
|
4
|
+
"volvoIdPassword": "Пароль Volvo ID",
|
|
5
|
+
"vccApiKey": "Ключ API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Получите ключ API на developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Интервал обновления (минуты)",
|
|
8
|
+
"otpLogin": "Вход с использованием одноразового пароля",
|
|
9
|
+
"otpDescription": "Сначала сохраните параметры, затем нажмите «Начать вход», чтобы получить одноразовый пароль по электронной почте. Введите код и нажмите «Отправить OTP» для завершения аутентификации.",
|
|
10
|
+
"startLoginButton": "Начать вход (отправить OTP)",
|
|
11
|
+
"otpCode": "Код OTP",
|
|
12
|
+
"submitOtpButton": "Отправить OTP",
|
|
13
|
+
"testConnectionButton": "Проверить подключение"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "Налаштування облікового запису",
|
|
3
|
+
"volvoIdEmail": "Електронна пошта Volvo ID",
|
|
4
|
+
"volvoIdPassword": "Пароль Volvo ID",
|
|
5
|
+
"vccApiKey": "Ключ API VCC",
|
|
6
|
+
"vccApiKeyHelp": "Отримайте ключ API на developer.volvocars.com",
|
|
7
|
+
"updateInterval": "Інтервал оновлення (хвилини)",
|
|
8
|
+
"otpLogin": "Вхід за допомогою одноразового пароля",
|
|
9
|
+
"otpDescription": "Спочатку збережіть параметри, а потім натисніть «Почати вхід», щоб отримати одноразовий пароль по електронній пошті. Введіть код і натисніть «Надіслати OTP», щоб завершити автентифікацію.",
|
|
10
|
+
"startLoginButton": "Почати вхід (Надіслати OTP)",
|
|
11
|
+
"otpCode": "Код OTP",
|
|
12
|
+
"submitOtpButton": "Надіслати OTP",
|
|
13
|
+
"testConnectionButton": "Перевірити з'єднання"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accountSettings": "帐户设置",
|
|
3
|
+
"volvoIdEmail": "沃尔沃 ID 电子邮件",
|
|
4
|
+
"volvoIdPassword": "沃尔沃 ID 密码",
|
|
5
|
+
"vccApiKey": "VCC API 密钥",
|
|
6
|
+
"vccApiKeyHelp": "在 developer.volvocars.com 获取您的 API 密钥",
|
|
7
|
+
"updateInterval": "更新间隔(分钟)",
|
|
8
|
+
"otpLogin": "使用一次性密码登录",
|
|
9
|
+
"otpDescription": "首先保存设置,然后单击\"开始登录\"以通过电子邮件接收一次性密码。输入代码并单击\"发送 OTP\"以完成身份验证。",
|
|
10
|
+
"startLoginButton": "开始登录(发送 OTP)",
|
|
11
|
+
"otpCode": "OTP 代码",
|
|
12
|
+
"submitOtpButton": "发送 OTP",
|
|
13
|
+
"testConnectionButton": "测试连接"
|
|
14
|
+
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -10,29 +10,41 @@
|
|
|
10
10
|
"user": {
|
|
11
11
|
"type": "text",
|
|
12
12
|
"label": "volvoIdEmail",
|
|
13
|
+
"xs": 12,
|
|
13
14
|
"sm": 12,
|
|
14
|
-
"md": 6
|
|
15
|
+
"md": 6,
|
|
16
|
+
"lg": 6,
|
|
17
|
+
"xl": 6
|
|
15
18
|
},
|
|
16
19
|
"password": {
|
|
17
20
|
"type": "password",
|
|
18
21
|
"label": "volvoIdPassword",
|
|
22
|
+
"xs": 12,
|
|
19
23
|
"sm": 12,
|
|
20
|
-
"md": 6
|
|
24
|
+
"md": 6,
|
|
25
|
+
"lg": 6,
|
|
26
|
+
"xl": 6
|
|
21
27
|
},
|
|
22
28
|
"vccapikey": {
|
|
23
29
|
"type": "text",
|
|
24
30
|
"label": "vccApiKey",
|
|
25
31
|
"help": "vccApiKeyHelp",
|
|
32
|
+
"xs": 12,
|
|
26
33
|
"sm": 12,
|
|
27
|
-
"md": 6
|
|
34
|
+
"md": 6,
|
|
35
|
+
"lg": 6,
|
|
36
|
+
"xl": 6
|
|
28
37
|
},
|
|
29
38
|
"interval": {
|
|
30
39
|
"type": "number",
|
|
31
40
|
"label": "updateInterval",
|
|
32
41
|
"min": 1,
|
|
33
42
|
"max": 1440,
|
|
43
|
+
"xs": 12,
|
|
34
44
|
"sm": 12,
|
|
35
|
-
"md": 6
|
|
45
|
+
"md": 6,
|
|
46
|
+
"lg": 6,
|
|
47
|
+
"xl": 6
|
|
36
48
|
},
|
|
37
49
|
"_divider1": {
|
|
38
50
|
"type": "divider"
|
|
@@ -45,6 +57,11 @@
|
|
|
45
57
|
"_otpDescription": {
|
|
46
58
|
"type": "staticText",
|
|
47
59
|
"text": "otpDescription",
|
|
60
|
+
"xs": 12,
|
|
61
|
+
"sm": 12,
|
|
62
|
+
"md": 12,
|
|
63
|
+
"lg": 12,
|
|
64
|
+
"xl": 12,
|
|
48
65
|
"style": {
|
|
49
66
|
"marginBottom": 16
|
|
50
67
|
}
|
|
@@ -56,16 +73,22 @@
|
|
|
56
73
|
"jsonData": "{\"user\": \"${data.user}\", \"password\": \"${data.password}\"}",
|
|
57
74
|
"variant": "contained",
|
|
58
75
|
"color": "primary",
|
|
76
|
+
"xs": 12,
|
|
59
77
|
"sm": 12,
|
|
60
|
-
"md": 4
|
|
78
|
+
"md": 4,
|
|
79
|
+
"lg": 4,
|
|
80
|
+
"xl": 4
|
|
61
81
|
},
|
|
62
82
|
"otp": {
|
|
63
83
|
"type": "text",
|
|
64
84
|
"label": "otpCode",
|
|
65
85
|
"doNotSave": true,
|
|
66
86
|
"noTranslation": true,
|
|
87
|
+
"xs": 12,
|
|
67
88
|
"sm": 12,
|
|
68
|
-
"md": 4
|
|
89
|
+
"md": 4,
|
|
90
|
+
"lg": 4,
|
|
91
|
+
"xl": 4
|
|
69
92
|
},
|
|
70
93
|
"_submitOtp": {
|
|
71
94
|
"type": "sendTo",
|
|
@@ -74,8 +97,11 @@
|
|
|
74
97
|
"jsonData": "{\"otp\": \"${data.otp}\"}",
|
|
75
98
|
"variant": "contained",
|
|
76
99
|
"color": "secondary",
|
|
100
|
+
"xs": 12,
|
|
77
101
|
"sm": 12,
|
|
78
|
-
"md": 4
|
|
102
|
+
"md": 4,
|
|
103
|
+
"lg": 4,
|
|
104
|
+
"xl": 4
|
|
79
105
|
},
|
|
80
106
|
"_divider2": {
|
|
81
107
|
"type": "divider"
|
|
@@ -86,8 +112,11 @@
|
|
|
86
112
|
"command": "testConnection",
|
|
87
113
|
"jsonData": "{\"vccapikey\": \"${data.vccapikey}\"}",
|
|
88
114
|
"variant": "outlined",
|
|
115
|
+
"xs": 12,
|
|
89
116
|
"sm": 12,
|
|
90
|
-
"md": 4
|
|
117
|
+
"md": 4,
|
|
118
|
+
"lg": 4,
|
|
119
|
+
"xl": 4
|
|
91
120
|
}
|
|
92
121
|
}
|
|
93
122
|
}
|
package/io-package.json
CHANGED
|
@@ -1,31 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "volvo",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"news": {
|
|
6
|
-
"1.0.
|
|
7
|
-
"en": "
|
|
8
|
-
"de": "
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
6
|
+
"1.0.2": {
|
|
7
|
+
"en": "Fix: adapter stays alive waiting for OTP login when no token stored; better startup logging; CI deploy on Node 24",
|
|
8
|
+
"de": "Fix: Adapter bleibt aktiv und wartet auf OTP-Login wenn kein Token gespeichert; bessere Startmeldungen; CI Deploy auf Node 24",
|
|
9
|
+
"ru": "Исправление: адаптер остаётся активным в ожидании OTP-входа; улучшенное журналирование запуска; CI на Node 24",
|
|
10
|
+
"pt": "Fix: adaptador permanece ativo aguardando login OTP; melhor log de inicialização; CI deploy no Node 24",
|
|
11
|
+
"nl": "Fix: adapter blijft actief en wacht op OTP-login; betere opstartlogboeken; CI deploy op Node 24",
|
|
12
|
+
"fr": "Fix: l'adaptateur reste actif en attendant la connexion OTP; meilleure journalisation au démarrage; CI sur Node 24",
|
|
13
|
+
"it": "Fix: l'adattatore rimane attivo in attesa del login OTP; migliore logging all'avvio; CI deploy su Node 24",
|
|
14
|
+
"es": "Fix: el adaptador permanece activo esperando el login OTP; mejor registro de inicio; CI deploy en Node 24",
|
|
15
|
+
"pl": "Fix: adapter pozostaje aktywny oczekując na logowanie OTP; lepsze logowanie startowe; CI na Node 24",
|
|
16
|
+
"uk": "Виправлення: адаптер залишається активним в очікуванні OTP-входу; покращене журналювання запуску; CI на Node 24",
|
|
17
|
+
"zh-cn": "修复:适配器保持运行等待 OTP 登录;改善启动日志;CI 部署到 Node 24"
|
|
17
18
|
},
|
|
18
|
-
"0.
|
|
19
|
-
"en": "
|
|
20
|
-
"de": "
|
|
19
|
+
"1.0.1": {
|
|
20
|
+
"en": "Fix: multi-language support, jsonConfig layout, admin checker warnings, CI improvements",
|
|
21
|
+
"de": "Fix: Mehrsprachigkeit, jsonConfig-Layout, Admin-Checker-Warnungen, CI-Verbesserungen",
|
|
22
|
+
"ru": "Исправления: многоязычность, макет jsonConfig, предупреждения Admin-Checker, улучшения CI",
|
|
23
|
+
"pt": "Correção: suporte multilíngue, layout jsonConfig, avisos do verificador de admin, melhorias de CI",
|
|
24
|
+
"nl": "Fix: meertalige ondersteuning, jsonConfig-indeling, admin checker-waarschuwingen, CI-verbeteringen",
|
|
25
|
+
"fr": "Correction : support multilingue, mise en page jsonConfig, avertissements du vérificateur admin, améliorations CI",
|
|
26
|
+
"it": "Correzione: supporto multilingue, layout jsonConfig, avvisi del verificatore admin, miglioramenti CI",
|
|
27
|
+
"es": "Corrección: soporte multilingüe, diseño jsonConfig, advertencias del verificador de admin, mejoras de CI",
|
|
28
|
+
"pl": "Poprawki: obsługa wielojęzyczna, układ jsonConfig, ostrzeżenia sprawdzania administratora, ulepszenia CI",
|
|
29
|
+
"uk": "Виправлення: багатомовна підтримка, макет jsonConfig, попередження перевірки адміністратора, покращення CI",
|
|
30
|
+
"zh-cn": "修复:多语言支持、jsonConfig 布局、管理员检查器警告、CI 改进"
|
|
21
31
|
},
|
|
22
|
-
"0.
|
|
23
|
-
"en": "
|
|
24
|
-
"de": "
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
32
|
+
"1.0.0": {
|
|
33
|
+
"en": "First stable release! Vehicle details, retry logic, command status tracking, auto-refresh, jsonConfig Admin5 UI, connection test, vehicle info display",
|
|
34
|
+
"de": "Erstes stabiles Release! Fahrzeugdetails, Retry-Logik, Befehlsstatus-Tracking, Auto-Refresh, jsonConfig Admin5-UI, Verbindungstest, Fahrzeug-Info-Anzeige",
|
|
35
|
+
"ru": "Первый стабильный выпуск! Подробности автомобиля, логика повтора, отслеживание статуса команды, автообновление, интерфейс Admin5 jsonConfig, проверка подключения, отображение информации об автомобиле",
|
|
36
|
+
"pt": "Primeiro lançamento estável! Detalhes do veículo, lógica de repetição, rastreamento de status de comando, atualização automática, interface Admin5 jsonConfig, teste de conexão, exibição de informações do veículo",
|
|
37
|
+
"nl": "Eerste stabiele release! Voertuiggegevens, retry logica, command statustracking, auto-refresh, jsonConfig Admin5 UI, verbindingstest, voertuiginfo weergave",
|
|
38
|
+
"fr": "Première version stable ! Détails du véhicule, logique de retry, suivi de l'état des commandes, actualisation automatique, interface Admin5 jsonConfig, test de connexion, affichage des informations du véhicule",
|
|
39
|
+
"it": "Primo rilascio stabile! Dettagli del veicolo, logica di ripetizione, tracciamento dello stato del comando, aggiornamento automatico, interfaccia Admin5 jsonConfig, test di connessione, visualizzazione informazioni veicolo",
|
|
40
|
+
"es": "¡Primer lanzamiento estable! Detalles del vehículo, lógica de reintento, seguimiento del estado del comando, actualización automática, interfaz Admin5 jsonConfig, prueba de conexión, visualización de información del vehículo",
|
|
41
|
+
"pl": "Pierwsza stabilna wersja! Szczegóły pojazdu, logika ponawiania, śledzenie stanu polecenia, automatyczne odświeżanie, interfejs Admin5 jsonConfig, test połączenia, wyświetlanie informacji pojazdu",
|
|
42
|
+
"uk": "Перший стабільний випуск! Деталі автомобіля, логіка повтору, відстеження статусу команди, автооновлення, інтерфейс Admin5 jsonConfig, перевірка з'єднання, відображення інформації про автомобіль",
|
|
43
|
+
"zh-cn": "首个稳定版本!车辆详情、重试逻辑、命令状态跟踪、自动刷新、jsonConfig Admin5 UI、连接测试、车辆信息显示"
|
|
29
44
|
},
|
|
30
45
|
"0.1.2": {
|
|
31
46
|
"en": "added support for v2 api",
|
|
@@ -39,18 +54,50 @@
|
|
|
39
54
|
"pl": "dodane wsparcie dla api v2",
|
|
40
55
|
"uk": "додано підтримку v2 api",
|
|
41
56
|
"zh-cn": "为 v2 api 添加支持"
|
|
42
|
-
},
|
|
43
|
-
"0.1.1": {
|
|
44
|
-
"en": "add location API for electric cars"
|
|
45
|
-
},
|
|
46
|
-
"0.1.0": {
|
|
47
|
-
"en": "add new API for electric cars"
|
|
48
|
-
},
|
|
49
|
-
"0.0.6": {
|
|
50
|
-
"en": "fix trip objects naming"
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
|
-
"
|
|
59
|
+
"messages": [
|
|
60
|
+
{
|
|
61
|
+
"condition": {
|
|
62
|
+
"operand": "and",
|
|
63
|
+
"rules": [
|
|
64
|
+
"oldVersion<0.2.0",
|
|
65
|
+
"newVersion>=0.2.0"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"title": {
|
|
69
|
+
"en": "Important: Complete rewrite of authentication",
|
|
70
|
+
"de": "Wichtig: Authentifizierung komplett neu geschrieben",
|
|
71
|
+
"ru": "Важно: Полное переписание аутентификации",
|
|
72
|
+
"pt": "Importante: reescrita completa da autenticação",
|
|
73
|
+
"nl": "Belangrijk: volledig herschrijven van authenticatie",
|
|
74
|
+
"fr": "Important : réécriture complète de l'authentification",
|
|
75
|
+
"it": "Importante: riscrittura completa dell'autenticazione",
|
|
76
|
+
"es": "Importante: reescritura completa de la autenticación",
|
|
77
|
+
"pl": "Ważne: Całkowite przepisanie uwierzytelniania",
|
|
78
|
+
"uk": "Важливо: Повне переписування аутентифікації",
|
|
79
|
+
"zh-cn": "重要:完全重新编写身份验证"
|
|
80
|
+
},
|
|
81
|
+
"text": {
|
|
82
|
+
"en": "This update replaces the old Volvo On Call API with the new Volvo Cars Connected Vehicle API v2. After updating:\n\n1. Open the adapter settings\n2. Enter your VCC API Key (get one at developer.volvocars.com)\n3. Click \"Start Login\" and complete the OTP verification\n4. Recommended: Delete and recreate the adapter instance to remove stale data points from the old API",
|
|
83
|
+
"de": "Dieses Update ersetzt die alte Volvo On Call API durch die neue Volvo Cars Connected Vehicle API v2. Nach dem Update:\n\n1. Öffne die Adapter-Einstellungen\n2. Gib deinen VCC API-Schlüssel ein (erhältlich unter developer.volvocars.com)\n3. Klicke auf \"Login starten\" und schließe die OTP-Verifizierung ab\n4. Empfohlen: Lösche die Adapter-Instanz und erstelle sie neu, um veraltete Datenpunkte der alten API zu entfernen",
|
|
84
|
+
"ru": "Это обновление заменяет старый API Volvo On Call на новый API Volvo Cars Connected Vehicle v2. После обновления:\n\n1. Откройте параметры адаптера\n2. Введите свой ключ API VCC (получите на developer.volvocars.com)\n3. Нажмите \"Начать вход\" и завершите проверку OTP\n4. Рекомендуется: удалите и пересоздайте экземпляр адаптера, чтобы удалить устаревшие точки данных со старого API",
|
|
85
|
+
"pt": "Esta atualização substitui a antiga API Volvo On Call pela nova API Volvo Cars Connected Vehicle v2. Após atualizar:\n\n1. Abra as configurações do adaptador\n2. Digite sua Chave de API VCC (obtenha uma em developer.volvocars.com)\n3. Clique em \"Iniciar Login\" e complete a verificação OTP\n4. Recomendado: Delete e recrie a instância do adaptador para remover pontos de dados obsoletos da API antiga",
|
|
86
|
+
"nl": "Deze update vervangt de oude Volvo On Call API door de nieuwe Volvo Cars Connected Vehicle API v2. Na het updaten:\n\n1. Open de adapterinstellingen\n2. Voer uw VCC API-sleutel in (verkrijg er een op developer.volvocars.com)\n3. Klik op \"Login starten\" en voltooi de OTP-verificatie\n4. Aanbevolen: Verwijder en recreeer de adapterinstantie om verouderde gegevenspunten van de oude API te verwijderen",
|
|
87
|
+
"fr": "Cette mise à jour remplace l'ancienne API Volvo On Call par la nouvelle API Volvo Cars Connected Vehicle v2. Après mise à jour:\n\n1. Ouvrez les paramètres de l'adaptateur\n2. Entrez votre clé API VCC (obtenez-en une sur developer.volvocars.com)\n3. Cliquez sur \"Démarrer la connexion\" et complétez la vérification OTP\n4. Recommandé: Supprimez et recréez l'instance d'adaptateur pour supprimer les points de données obsolètes de l'ancienne API",
|
|
88
|
+
"it": "Questo aggiornamento sostituisce la vecchia API Volvo On Call con la nuova API Volvo Cars Connected Vehicle v2. Dopo l'aggiornamento:\n\n1. Apri le impostazioni dell'adattatore\n2. Inserisci la tua chiave API VCC (ottenine una su developer.volvocars.com)\n3. Fai clic su \"Avvia accesso\" e completa la verifica OTP\n4. Consigliato: Elimina e ricrea l'istanza dell'adattatore per rimuovere i punti dati obsoleti dall'API precedente",
|
|
89
|
+
"es": "Esta actualización reemplaza la antigua API Volvo On Call con la nueva API Volvo Cars Connected Vehicle v2. Después de actualizar:\n\n1. Abra la configuración del adaptador\n2. Ingrese su clave API VCC (obtenga una en developer.volvocars.com)\n3. Haga clic en \"Iniciar sesión\" y complete la verificación OTP\n4. Recomendado: Elimine y recree la instancia del adaptador para eliminar puntos de datos obsoletos de la API anterior",
|
|
90
|
+
"pl": "Ta aktualizacja zastępuje stary interfejs API Volvo On Call nowym interfejsem API Volvo Cars Connected Vehicle v2. Po aktualizacji:\n\n1. Otwórz ustawienia adaptera\n2. Wprowadź swój klucz API VCC (uzyskaj jeden na developer.volvocars.com)\n3. Kliknij \"Rozpocznij logowanie\" i ukończ weryfikację OTP\n4. Zalecane: Usuń i utwórz ponownie instancję adaptera, aby usunąć przestarzałe punkty danych ze starego interfejsu API",
|
|
91
|
+
"uk": "Це оновлення замінює старий API Volvo On Call на новий API Volvo Cars Connected Vehicle v2. Після оновлення:\n\n1. Відкрийте параметри адаптера\n2. Введіть свій ключ API VCC (отримайте його на developer.volvocars.com)\n3. Натисніть \"Почати вхід\" і завершіть перевірку OTP\n4. Рекомендується: видаліть та пересоздайте екземпляр адаптера, щоб видалити застарілі точки даних зі старого API",
|
|
92
|
+
"zh-cn": "此更新用新的 Volvo Cars Connected Vehicle API v2 替换旧的 Volvo On Call API。更新后:\n\n1. 打开适配器设置\n2. 输入你的 VCC API 密钥(在 developer.volvocars.com 获取)\n3. 点击开始登录并完成 OTP 验证\n4. 建议:删除并重新创建适配器实例,以删除旧 API 中的过期数据点"
|
|
93
|
+
},
|
|
94
|
+
"level": "warn",
|
|
95
|
+
"buttons": [
|
|
96
|
+
"agree",
|
|
97
|
+
"cancel"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
],
|
|
54
101
|
"titleLang": {
|
|
55
102
|
"en": "Volvo Cars",
|
|
56
103
|
"de": "Volvo Cars",
|
|
@@ -61,7 +108,8 @@
|
|
|
61
108
|
"it": "Volvo Cars",
|
|
62
109
|
"es": "Volvo Cars",
|
|
63
110
|
"pl": "Volvo Cars",
|
|
64
|
-
"zh-cn": "沃尔沃汽车"
|
|
111
|
+
"zh-cn": "沃尔沃汽车",
|
|
112
|
+
"uk": "Volvo Cars"
|
|
65
113
|
},
|
|
66
114
|
"desc": {
|
|
67
115
|
"en": "Volvo Cars Adapter (Connected Vehicle API v2)",
|
|
@@ -73,39 +121,55 @@
|
|
|
73
121
|
"it": "Adattatore Volvo Cars (Connected Vehicle API v2)",
|
|
74
122
|
"es": "Adaptador Volvo Cars (Connected Vehicle API v2)",
|
|
75
123
|
"pl": "Adapter Volvo Cars (Connected Vehicle API v2)",
|
|
76
|
-
"zh-cn": "沃尔沃汽车适配器 (Connected Vehicle API v2)"
|
|
124
|
+
"zh-cn": "沃尔沃汽车适配器 (Connected Vehicle API v2)",
|
|
125
|
+
"uk": "Адаптер Volvo Cars (Connected Vehicle API v2)"
|
|
77
126
|
},
|
|
78
127
|
"authors": [
|
|
79
|
-
"TA2k <tombox2020@gmail.com>"
|
|
128
|
+
"TA2k <tombox2020@gmail.com>",
|
|
129
|
+
"Vinnedinho <vinnedinho@gmail.com>"
|
|
80
130
|
],
|
|
81
131
|
"keywords": [
|
|
82
132
|
"volvo",
|
|
83
133
|
"volvo cars"
|
|
84
134
|
],
|
|
85
|
-
"
|
|
135
|
+
"licenseInformation": {
|
|
136
|
+
"license": "MIT",
|
|
137
|
+
"type": "free"
|
|
138
|
+
},
|
|
86
139
|
"platform": "Javascript/Node.js",
|
|
87
|
-
"main": "main.js",
|
|
88
140
|
"icon": "volvo.png",
|
|
89
141
|
"enabled": true,
|
|
90
142
|
"extIcon": "https://raw.githubusercontent.com/TA2k/ioBroker.volvo/master/admin/volvo.png",
|
|
91
143
|
"readme": "https://github.com/TA2k/ioBroker.volvo/blob/master/README.md",
|
|
92
144
|
"loglevel": "info",
|
|
145
|
+
"tier": 2,
|
|
93
146
|
"mode": "daemon",
|
|
94
147
|
"type": "vehicle",
|
|
95
148
|
"compact": true,
|
|
96
149
|
"messagebox": true,
|
|
97
150
|
"connectionType": "cloud",
|
|
98
151
|
"dataSource": "poll",
|
|
99
|
-
"materialize": true,
|
|
100
152
|
"dependencies": [
|
|
101
153
|
{
|
|
102
|
-
"js-controller": ">=
|
|
154
|
+
"js-controller": ">=6.0.11"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"globalDependencies": [
|
|
158
|
+
{
|
|
159
|
+
"admin": ">=7.6.20"
|
|
103
160
|
}
|
|
104
161
|
],
|
|
105
162
|
"adminUI": {
|
|
106
163
|
"config": "json"
|
|
107
164
|
}
|
|
108
165
|
},
|
|
166
|
+
"protectedNative": [
|
|
167
|
+
"vccapikey",
|
|
168
|
+
"password"
|
|
169
|
+
],
|
|
170
|
+
"encryptedNative": [
|
|
171
|
+
"password"
|
|
172
|
+
],
|
|
109
173
|
"native": {
|
|
110
174
|
"user": "",
|
|
111
175
|
"vccapikey": "",
|
|
@@ -135,43 +199,5 @@
|
|
|
135
199
|
},
|
|
136
200
|
"native": {}
|
|
137
201
|
}
|
|
138
|
-
]
|
|
139
|
-
"messages": [
|
|
140
|
-
{
|
|
141
|
-
"condition": {
|
|
142
|
-
"operand": "and",
|
|
143
|
-
"rules": [
|
|
144
|
-
"oldVersion<0.2.0",
|
|
145
|
-
"newVersion>=0.2.0"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
"title": {
|
|
149
|
-
"en": "Important: Complete rewrite of authentication",
|
|
150
|
-
"de": "Wichtig: Authentifizierung komplett neu geschrieben"
|
|
151
|
-
},
|
|
152
|
-
"text": {
|
|
153
|
-
"en": "This update replaces the old Volvo On Call API with the new Volvo Cars Connected Vehicle API v2. After updating:\n\n1. Open the adapter settings\n2. Enter your VCC API Key (get one at developer.volvocars.com)\n3. Click \"Start Login\" and complete the OTP verification\n4. Recommended: Delete and recreate the adapter instance to remove stale data points from the old API",
|
|
154
|
-
"de": "Dieses Update ersetzt die alte Volvo On Call API durch die neue Volvo Cars Connected Vehicle API v2. Nach dem Update:\n\n1. Öffne die Adapter-Einstellungen\n2. Gib deinen VCC API-Schlüssel ein (erhältlich unter developer.volvocars.com)\n3. Klicke auf \"Login starten\" und schließe die OTP-Verifizierung ab\n4. Empfohlen: Lösche die Adapter-Instanz und erstelle sie neu, um veraltete Datenpunkte der alten API zu entfernen"
|
|
155
|
-
},
|
|
156
|
-
"level": "warn",
|
|
157
|
-
"buttons": [
|
|
158
|
-
"agree",
|
|
159
|
-
"cancel"
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"news": {
|
|
164
|
-
"0.2.1": {
|
|
165
|
-
"en": "Fix refresh token persistence, remove dead VOC code, update dependencies",
|
|
166
|
-
"de": "Refresh-Token-Speicherung repariert, alten VOC-Code entfernt, Dependencies aktualisiert"
|
|
167
|
-
},
|
|
168
|
-
"0.2.0": {
|
|
169
|
-
"en": "Complete rewrite: OTP auth, Connected Vehicle API v2, Energy API v2, remote commands fixed, German localization",
|
|
170
|
-
"de": "Komplett-Umbau: OTP-Authentifizierung, Connected Vehicle API v2, Energy API v2, Fernbedienung repariert, deutsche Übersetzung"
|
|
171
|
-
},
|
|
172
|
-
"0.2.2": {
|
|
173
|
-
"en": "Fix ESLint, update devDependencies, clean AGENTS.md of credentials",
|
|
174
|
-
"de": "ESLint repariert, devDependencies aktualisiert, Zugangsdaten aus AGENTS.md entfernt"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
202
|
+
]
|
|
177
203
|
}
|
package/main.js
CHANGED
|
@@ -95,6 +95,13 @@ class Volvo extends utils.Adapter {
|
|
|
95
95
|
this.refreshTokenInterval = setInterval(() => {
|
|
96
96
|
this.refreshToken();
|
|
97
97
|
}, refreshMs);
|
|
98
|
+
} else {
|
|
99
|
+
// No valid session yet — stay alive and wait for OTP login via admin UI
|
|
100
|
+
this.log.info('No active session. Adapter is running and waiting for login via admin UI (Settings → Start Login → Submit OTP).');
|
|
101
|
+
// Keep-alive interval so ioBroker doesn't terminate idle daemon
|
|
102
|
+
this.keepAliveInterval = setInterval(() => {
|
|
103
|
+
this.log.debug('Waiting for login...');
|
|
104
|
+
}, 60000);
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
/**
|
|
@@ -190,7 +197,8 @@ class Volvo extends utils.Adapter {
|
|
|
190
197
|
|
|
191
198
|
// Full OTP login flow
|
|
192
199
|
if (!this.config.otp) {
|
|
193
|
-
this.log.warn('No OTP code
|
|
200
|
+
this.log.warn('No stored refresh token and no OTP code. Please use the adapter admin UI to start login and enter the OTP code sent to your email.');
|
|
201
|
+
this.log.info('The adapter will stay running and wait for login via the admin settings page.');
|
|
194
202
|
return;
|
|
195
203
|
}
|
|
196
204
|
|
|
@@ -414,6 +422,12 @@ class Volvo extends utils.Adapter {
|
|
|
414
422
|
this.setState('info.connection', true, true);
|
|
415
423
|
this.authFlowId = null;
|
|
416
424
|
|
|
425
|
+
// Clear keep-alive if it was running
|
|
426
|
+
if (this.keepAliveInterval) {
|
|
427
|
+
clearInterval(this.keepAliveInterval);
|
|
428
|
+
this.keepAliveInterval = null;
|
|
429
|
+
}
|
|
430
|
+
|
|
417
431
|
// Start data fetching
|
|
418
432
|
await this.getDeviceList();
|
|
419
433
|
await this.updateDevice();
|
|
@@ -801,6 +815,7 @@ class Volvo extends utils.Adapter {
|
|
|
801
815
|
this.log.info('cleaned everything up...');
|
|
802
816
|
this.updateInterval && clearInterval(this.updateInterval);
|
|
803
817
|
this.refreshTokenInterval && clearInterval(this.refreshTokenInterval);
|
|
818
|
+
this.keepAliveInterval && clearInterval(this.keepAliveInterval);
|
|
804
819
|
this.responseTimeout && clearTimeout(this.responseTimeout);
|
|
805
820
|
callback();
|
|
806
821
|
} catch (_e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.volvo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Volvo Cars Adapter",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TA2k",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"homepage": "https://github.com/TA2k/ioBroker.volvo",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"keywords": [
|
|
12
|
+
"ioBroker",
|
|
12
13
|
"volvo",
|
|
13
14
|
"volvo cars"
|
|
14
15
|
],
|
|
@@ -16,6 +17,9 @@
|
|
|
16
17
|
"type": "git",
|
|
17
18
|
"url": "https://github.com/TA2k/ioBroker.volvo"
|
|
18
19
|
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20.0.0"
|
|
22
|
+
},
|
|
19
23
|
"dependencies": {
|
|
20
24
|
"@iobroker/adapter-core": "^3.3.2",
|
|
21
25
|
"axios": "^1.14.0",
|
|
@@ -27,11 +31,10 @@
|
|
|
27
31
|
"@alcalzone/release-script-plugin-iobroker": "^5.1.2",
|
|
28
32
|
"@alcalzone/release-script-plugin-license": "^5.1.1",
|
|
29
33
|
"@alcalzone/release-script-plugin-manual-review": "^5.1.1",
|
|
30
|
-
"@
|
|
34
|
+
"@iobroker/adapter-dev": "^1.5.0",
|
|
35
|
+
"@iobroker/eslint-config": "^2.2.0",
|
|
31
36
|
"@iobroker/testing": "^5.2.2",
|
|
32
|
-
"@types/node": "^25.5.0"
|
|
33
|
-
"eslint": "^10.1.0",
|
|
34
|
-
"globals": "^17.4.0"
|
|
37
|
+
"@types/node": "^25.5.0"
|
|
35
38
|
},
|
|
36
39
|
"main": "main.js",
|
|
37
40
|
"scripts": {
|
|
@@ -51,5 +54,14 @@
|
|
|
51
54
|
"bugs": {
|
|
52
55
|
"url": "https://github.com/TA2k/ioBroker.volvo/issues"
|
|
53
56
|
},
|
|
54
|
-
"readmeFilename": "README.md"
|
|
57
|
+
"readmeFilename": "README.md",
|
|
58
|
+
"files": [
|
|
59
|
+
"admin/",
|
|
60
|
+
"lib/",
|
|
61
|
+
"main.js",
|
|
62
|
+
"io-package.json",
|
|
63
|
+
"LICENSE",
|
|
64
|
+
"README.md",
|
|
65
|
+
"vccapikey.png"
|
|
66
|
+
]
|
|
55
67
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Something is not working as it should
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
**Describe the bug**
|
|
10
|
-
A clear and concise description of what the bug is.
|
|
11
|
-
|
|
12
|
-
**To Reproduce**
|
|
13
|
-
Steps to reproduce the behavior:
|
|
14
|
-
1. Go to '...'
|
|
15
|
-
2. Click on '...'
|
|
16
|
-
3. Scroll down to '....'
|
|
17
|
-
4. See error
|
|
18
|
-
|
|
19
|
-
**Expected behavior**
|
|
20
|
-
A clear and concise description of what you expected to happen.
|
|
21
|
-
|
|
22
|
-
**Screenshots & Logfiles**
|
|
23
|
-
If applicable, add screenshots and logfiles to help explain your problem.
|
|
24
|
-
|
|
25
|
-
**Versions:**
|
|
26
|
-
- Adapter version: <adapter-version>
|
|
27
|
-
- JS-Controller version: <js-controller-version> <!-- determine this with `iobroker -v` on the console -->
|
|
28
|
-
- Node version: <node-version> <!-- determine this with `node -v` on the console -->
|
|
29
|
-
- Operating system: <os-name>
|
|
30
|
-
|
|
31
|
-
**Additional context**
|
|
32
|
-
Add any other context about the problem here.
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
name: Test and Release
|
|
2
|
-
|
|
3
|
-
# Run this job on all pushes and pull requests
|
|
4
|
-
# as well as tags with a semantic version
|
|
5
|
-
on:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- '*'
|
|
9
|
-
tags:
|
|
10
|
-
# normal versions
|
|
11
|
-
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
12
|
-
# pre-releases
|
|
13
|
-
- 'v[0-9]+.[0-9]+.[0-9]+-**'
|
|
14
|
-
pull_request: {}
|
|
15
|
-
|
|
16
|
-
# Cancel previous PR/branch runs when a new commit is pushed
|
|
17
|
-
concurrency:
|
|
18
|
-
group: ${{ github.ref }}
|
|
19
|
-
cancel-in-progress: true
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
# Performs quick checks before the expensive test runs
|
|
23
|
-
check-and-lint:
|
|
24
|
-
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
25
|
-
|
|
26
|
-
runs-on: ubuntu-latest
|
|
27
|
-
|
|
28
|
-
steps:
|
|
29
|
-
- uses: ioBroker/testing-action-check@v1
|
|
30
|
-
with:
|
|
31
|
-
node-version: '20.x'
|
|
32
|
-
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
|
|
33
|
-
# install-command: 'npm install'
|
|
34
|
-
lint: true
|
|
35
|
-
|
|
36
|
-
# Runs adapter tests on all supported node versions and OSes
|
|
37
|
-
adapter-tests:
|
|
38
|
-
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
39
|
-
|
|
40
|
-
runs-on: ${{ matrix.os }}
|
|
41
|
-
strategy:
|
|
42
|
-
matrix:
|
|
43
|
-
node-version: [20.x, 22.x]
|
|
44
|
-
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
45
|
-
|
|
46
|
-
steps:
|
|
47
|
-
- uses: ioBroker/testing-action-adapter@v1
|
|
48
|
-
with:
|
|
49
|
-
node-version: ${{ matrix.node-version }}
|
|
50
|
-
os: ${{ matrix.os }}
|
|
51
|
-
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
|
|
52
|
-
# install-command: 'npm install'
|
|
53
|
-
|
|
54
|
-
# TODO: To enable automatic npm releases, create a token on npmjs.org
|
|
55
|
-
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
|
|
56
|
-
# Then uncomment the following block:
|
|
57
|
-
|
|
58
|
-
# Deploys the final package to NPM
|
|
59
|
-
deploy:
|
|
60
|
-
needs: [check-and-lint, adapter-tests]
|
|
61
|
-
|
|
62
|
-
# Trigger this step only when a commit on any branch is tagged with a version number
|
|
63
|
-
if: |
|
|
64
|
-
contains(github.event.head_commit.message, '[skip ci]') == false &&
|
|
65
|
-
github.event_name == 'push' &&
|
|
66
|
-
startsWith(github.ref, 'refs/tags/v')
|
|
67
|
-
|
|
68
|
-
runs-on: ubuntu-latest
|
|
69
|
-
|
|
70
|
-
# Write permissions are required to create Github releases
|
|
71
|
-
permissions:
|
|
72
|
-
contents: write
|
|
73
|
-
|
|
74
|
-
steps:
|
|
75
|
-
- uses: ioBroker/testing-action-deploy@v1
|
|
76
|
-
with:
|
|
77
|
-
node-version: '20.x'
|
|
78
|
-
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
|
|
79
|
-
# install-command: 'npm install'
|
|
80
|
-
npm-token: ${{ secrets.NPM_TOKEN }}
|
|
81
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
82
|
-
# # When using Sentry for error reporting, Sentry can be informed about new releases
|
|
83
|
-
# # To enable create a API-Token in Sentry (User settings, API keys)
|
|
84
|
-
# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
|
|
85
|
-
# # Then uncomment and customize the following block:
|
|
86
|
-
# sentry: true
|
|
87
|
-
# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
88
|
-
# sentry-project: "iobroker-volvo"
|
|
89
|
-
# sentry-version-prefix: "iobroker.volvo"
|
|
90
|
-
# # If your sentry project is linked to a GitHub repository, you can enable the following option
|
|
91
|
-
# # sentry-github-integration: true
|
package/.releaseconfig.json
DELETED
package/main.test.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This is a dummy TypeScript test file using chai and mocha
|
|
5
|
-
*
|
|
6
|
-
* It's automatically excluded from npm and its build output is excluded from both git and npm.
|
|
7
|
-
* It is advised to test all your modules with accompanying *.test.js-files
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// tslint:disable:no-unused-expression
|
|
11
|
-
|
|
12
|
-
const { expect } = require('chai');
|
|
13
|
-
// import { functionToTest } from "./moduleToTest";
|
|
14
|
-
|
|
15
|
-
describe('module to test => function to test', () => {
|
|
16
|
-
// initializing logic
|
|
17
|
-
const expected = 5;
|
|
18
|
-
|
|
19
|
-
it(`should return ${expected}`, () => {
|
|
20
|
-
const result = 5;
|
|
21
|
-
// assign result a value from functionToTest
|
|
22
|
-
expect(result).to.equal(expected);
|
|
23
|
-
// or using the should() syntax
|
|
24
|
-
result.should.equal(expected);
|
|
25
|
-
});
|
|
26
|
-
// ... more tests => it
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// ... more test suites => describe
|