iobroker.influxdb 3.1.0 → 3.1.3
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/README.md +9 -3
- package/admin/i18n/de/translations.json +3 -3
- package/admin/jsonConfig.json +1 -1
- package/admin/words.js +3 -3
- package/io-package.json +25 -25
- package/main.js +12 -1
- package/package.json +4 -4
- package/lib/tools.js +0 -99
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This adapter saves state history into InfluxDB.
|
|
|
21
21
|
If you have an InfluxDB 1.x installation (preferably 1.8.x or 1.9.x) then you choose " 1.x" in the adapter configuration and enter the Host-IP and Port together with Username and Password for the Access.
|
|
22
22
|
You can also define a database name. The default is "iobroker". On first adapter start this database is created.
|
|
23
23
|
|
|
24
|
-
When doing custom queries via the "query" message you can use InfluxQL to select the data you want.
|
|
24
|
+
When doing custom queries via the "query" message you can use InfluxQL to select the data you want. FluxQL with InfluxDB 1.x is not supported (and will also not be added).
|
|
25
25
|
|
|
26
26
|
### InfluxDB 2.x
|
|
27
27
|
Since 2.0 of the adapter also InfluxDB 2.x is supported which works a bit different.
|
|
@@ -446,12 +446,18 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
|
|
|
446
446
|
|
|
447
447
|
<!--
|
|
448
448
|
Placeholder for the next version (at the beginning of the line):
|
|
449
|
-
###
|
|
449
|
+
### **WORK IN PROGRESS**
|
|
450
450
|
-->
|
|
451
451
|
|
|
452
452
|
## Changelog
|
|
453
|
+
### 3.1.3 (2022-06-01)
|
|
454
|
+
* (Apollon77) Corrected issue when testing connection to InfluxDBv1 with weird passwords
|
|
455
|
+
|
|
456
|
+
### 3.1.2 (2022-05-31)
|
|
457
|
+
* (Apollon77) Workaround an admin issue when testing connection to InfluxDB
|
|
458
|
+
|
|
453
459
|
### 3.1.0 (2022-05-27)
|
|
454
|
-
* (Apollon77) Data are not converted to
|
|
460
|
+
* (Apollon77) Data are not converted to number if they are other data types on getHistory to respect the saved data formats as defined in the datapoint settings for storage.
|
|
455
461
|
* (Apollon77) Fix retention change to lower checkbox in UI
|
|
456
462
|
* (Apollon77) Allow storeState again to write to InfluxDB for "unknown state ids" - "rules" usage is not supported in for this and storeState would be silently discarded in this case!
|
|
457
463
|
* (Apollon77) Fix several crash cases reported by Sentry
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"Buffer Datapoints": "Schreibaktionen zusammenfassen",
|
|
22
22
|
"Buffer Flush Interval": "Schreibintervall",
|
|
23
23
|
"Confirmation required.": "Bestätigung erforderlich.",
|
|
24
|
-
"Counter": "
|
|
24
|
+
"Counter": "Zähler",
|
|
25
25
|
"Custom retention duration (days)": "Benutzerdefinierte Aufbewahrungsdauer (Tage)",
|
|
26
26
|
"Custom timeframe": "Benutzerdefinierter Zeitrahmen",
|
|
27
27
|
"DB Name": "DB Name",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"Seconds": "Sekunden",
|
|
60
60
|
"Send health-check pings to database": "Pings zur Verfügbarkeitsprüfung an die Datenbank senden",
|
|
61
61
|
"Start or enable adapter first": "Adapter muss zuerst aktiviert werden",
|
|
62
|
-
"Storage retention": "
|
|
62
|
+
"Storage retention": "Aufbewahrungsdauer",
|
|
63
63
|
"Store as": "Speichern als",
|
|
64
64
|
"String": "Zeichenfolge",
|
|
65
65
|
"Test connection": "Verbindung testen",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"health-check help": "Regelmäßige Verfügbarkeits-Anfragen werden an den DB-Server gesendet, um zu überprüfen, ob er noch aktiv ist.",
|
|
75
75
|
"ignore values above x": "Ignoriere Werte größer als",
|
|
76
76
|
"ignore values below x": "Ignoriere Werte kleiner als",
|
|
77
|
-
"ignore values below zero": "
|
|
77
|
+
"ignore values below zero": "Werte unter 0 ignorieren (<0)",
|
|
78
78
|
"ignore zero or null values": "Ignoriere 0 oder Nullwerte (==0)",
|
|
79
79
|
"keep forever": "keine automatische Löschung",
|
|
80
80
|
"log changes interval(s)":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LjU4NSA4LjAyIDguMDIgMCAwIDAgLTMuMTQgNC4wODZ6bTcuNTgxIDguNTRhNS45ODggNS45ODggMCAwIDEgLTUuODUxLTcuMzE1Yy4wMDYtLjAxOS4wMTEtLjAzOS4wMTYtLjA1OHMuMDA5LS4wMzkuMDEyLS4wNTlhNiA2IDAgMSAxIDUuODIzIDcuNDMyeiIvPg0KICAgIDxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0ibTE5LjYzOSAyMS45YTEgMSAwIDAgMCAxLjQxOCAxLjQxMSAyLjYyOCAyLjYyOCAwIDAgMSAzLjcyNSAwIDEgMSAwIDAgMCAxLjQxOC0xLjQxMSA0LjYyOCA0LjYyOCAwIDAgMCAtNi41NjEgMHoiLz4NCiAgICA8ZWxsaXBzZSBmaWxsPSJjdXJyZW50Q29sb3IiIGN4PSIyMi45ODUiIGN5PSIyNC44NDMiIHJ4PSIxLjY2NyIgcnk9IjEuNjc0Ii8+DQogICAgPHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMjcuOTc5IDE5Ljc2OGE3LjA0NSA3LjA0NSAwIDAgMCAtOS45ODggMCAxIDEgMCAxIDAgMS40MTcgMS40MTIgNS4wNDUgNS4wNDUgMCAwIDEgNy4xNTQgMCAxIDEgMCAxIDAgMS40MTctMS40MTJ6Ii8+DQo8L3N2Zz4=",
|
|
155
155
|
"command": "test",
|
|
156
|
-
"jsonData": "{\"config\": {\"dbversion\": \"${data.dbversion}\", \"protocol\": \"${data.protocol}\", \"port\": \"${data.port}\", \"host\": \"${data.host}\", \"user\": \"${data.user}\", \"organization\": \"${data.organization}\", \"dbname\": \"${data.dbname}\", \"requestTimeout\": \"${data.requestTimeout}\", \"validateSSL\": ${data.validateSSL}, \"password\": \"${data.password}\", \"token\": \"${data.token}\", \"path\": \"${data.path}\"}}",
|
|
156
|
+
"jsonData": "{\"config\": {\"dbversion\": \"${data.dbversion}\", \"protocol\": \"${data.protocol}\", \"port\": \"${data.port}\", \"host\": \"${data.host}\", \"user\": \"${data.user}\", \"organization\": \"${data.organization}\", \"dbname\": \"${data.dbname}\", \"requestTimeout\": \"${data.requestTimeout}\", \"validateSSL\": ${data.validateSSL}, \"password\": \"${encodeURIComponent(data.password || '')}\", \"token\": \"${data.token}\", \"path\": \"${data.path}\"}}",
|
|
157
157
|
"label": "Test connection"
|
|
158
158
|
},
|
|
159
159
|
|
package/admin/words.js
CHANGED
|
@@ -24,7 +24,7 @@ systemDictionary = {
|
|
|
24
24
|
"Buffer Datapoints": { "en": "Buffer Datapoints", "de": "Schreibaktionen zusammenfassen", "ru": "Собирать значения для записи", "pt": "Datapoints do buffer", "nl": "Buffer-datapunten", "fr": "Buffer Datapoints", "it": "Buffer puntiforme", "es": "Puntos de datos del búfer", "pl": "Bufory Datapoints", "zh-cn": "缓冲区数据点"},
|
|
25
25
|
"Buffer Flush Interval": { "en": "Buffer Flush Interval", "de": "Schreibintervall", "ru": "Интервал записи значений в базу из RAM", "pt": "Intervalo de descarga do buffer", "nl": "Buffer Flush Interval", "fr": "Buffer Flush Interval", "it": "Intervallo di flussaggio del tampone", "es": "Intervalo de lavado del tampón", "pl": "Przerwa między buforami", "zh-cn": "缓冲冲洗间隔"},
|
|
26
26
|
"Confirmation required.": { "en": "Confirmation required.", "de": "Bestätigung erforderlich.", "ru": "Требуется подтверждение.", "pt": "Necessária confirmação.", "nl": "Bevestiging vereist.", "fr": "Confirmation requise.", "it": "Conferma richiesta.", "es": "Confirmación requerida.", "pl": "Wymagane Potwierdzenie.", "zh-cn": "需要确认。"},
|
|
27
|
-
"Counter": { "en": "Counter", "de": "
|
|
27
|
+
"Counter": { "en": "Counter", "de": "Zähler", "ru": "Прилавок", "pt": "Contador", "nl": "Balie", "fr": "Compteur", "it": "Contatore", "es": "Mostrador", "pl": "Lada", "zh-cn": "柜台"},
|
|
28
28
|
"Custom retention duration (days)": { "en": "Custom retention duration (days)", "de": "Benutzerdefinierte Aufbewahrungsdauer (Tage)", "ru": "Пользовательский срок хранения (дни)", "pt": "Duração da retenção personalizada (dias)", "nl": "Aangepaste bewaarduur (dagen)", "fr": "Durée de conservation personnalisée (jours)", "it": "Durata di conservazione personalizzata (giorni)", "es": "Duración de la retención personalizada (días)", "pl": "Niestandardowy czas przechowywania (dni)", "zh-cn": "自定义保留期限(天)"},
|
|
29
29
|
"Custom timeframe": { "en": "Custom timeframe", "de": "Benutzerdefinierter Zeitrahmen", "ru": "Пользовательский таймфрейм", "pt": "Período personalizado", "nl": "Aangepast tijdsbestek", "fr": "Délai personnalisé", "it": "Tempi personalizzati", "es": "Marco de tiempo personalizado", "pl": "Niestandardowe ramy czasowe", "zh-cn": "自定义时间范围"},
|
|
30
30
|
"DB Name": { "en": "DB Name", "de": "DB Name", "ru": "Имя базы", "pt": "Nome do banco de dados", "nl": "DB-naam", "fr": "DB Name", "it": "Nome DB", "es": "Nombre de DB", "pl": "Nazwa DB", "zh-cn": "数据库名称"},
|
|
@@ -62,7 +62,7 @@ systemDictionary = {
|
|
|
62
62
|
"Seconds": { "en": "Seconds", "de": "Sekunden", "ru": "секунд", "pt": "Segundos", "nl": "seconden", "fr": "Seconds", "it": "secondi", "es": "Segundos", "pl": "sekundy", "zh-cn": "秒"},
|
|
63
63
|
"Send health-check pings to database": { "en": "Send health-check pings to database", "de": "Pings zur Verfügbarkeitsprüfung an die Datenbank senden", "ru": "Отправлять эхо-запросы проверки работоспособности в базу данных", "pt": "Envie pings de verificação de integridade para o banco de dados", "nl": "Stuur gezondheidscheck pings naar database", "fr": "Envoyer des pings de vérification d'état à la base de données", "it": "Invia ping di controllo dello stato al database", "es": "Enviar pings de verificación de estado a la base de datos", "pl": "Wysyłaj pingi sprawdzające kondycję do bazy danych", "zh-cn": "将健康检查 ping 发送到数据库"},
|
|
64
64
|
"Start or enable adapter first": { "en": "Start or enable adapter first", "de": "Adapter muss zuerst aktiviert werden", "ru": "Сначала надо запустить или активировать драйвер", "pt": "Inicie ou ative o adaptador primeiro", "nl": "Start of schakel eerst de adapter in", "fr": "Start or enable adapter first", "it": "Inizia o abilita prima l'adattatore", "es": "Comience o habilite el adaptador primero", "pl": "Najpierw włącz lub włącz adapter", "zh-cn": "首先启动或启用适配器"},
|
|
65
|
-
"Storage retention": { "en": "Storage retention", "de": "
|
|
65
|
+
"Storage retention": { "en": "Storage retention", "de": "Aufbewahrungsdauer", "ru": "Сохранение хранения", "pt": "Retenção de armazenamento", "nl": "Opslagbehoud", "fr": "Rétention de stockage", "it": "Conservazione della memoria", "es": "retención de almacenamiento", "pl": "Przechowywanie pamięci", "zh-cn": "存储保留"},
|
|
66
66
|
"Store as": { "en": "Store as", "de": "Speichern als", "ru": "Сохранить как", "pt": "Armazenar como", "nl": "Opslaan als", "fr": "Stocker comme", "it": "Conserva come", "es": "Guardar como", "pl": "Przechowuj jako", "zh-cn": "存储为"},
|
|
67
67
|
"String": { "en": "String", "de": "Zeichenfolge", "ru": "Нить", "pt": "Fragmento", "nl": "Draad", "fr": "Corde", "it": "Corda", "es": "Cuerda", "pl": "Strunowy", "zh-cn": "细绳"},
|
|
68
68
|
"Test connection": { "en": "Test connection", "de": "Verbindung testen", "ru": "Проверить соединение", "pt": "Conexão de teste", "nl": "Test verbinding", "fr": "Test connection", "it": "Connessione di prova", "es": "Conexión de prueba", "pl": "Testuj połączenie", "zh-cn": "测试连接"},
|
|
@@ -77,7 +77,7 @@ systemDictionary = {
|
|
|
77
77
|
"health-check help": { "en": "Regular health checks probes are sent to the DB server to check if it is still alive.", "de": "Regelmäßige Verfügbarkeits-Anfragen werden an den DB-Server gesendet, um zu überprüfen, ob er noch aktiv ist.", "ru": "На сервер БД отправляются регулярные зонды проверки работоспособности, чтобы проверить, жив ли он.", "pt": "Sondagens de verificações regulares de integridade são enviadas ao servidor de banco de dados para verificar se ele ainda está ativo.", "nl": "Regelmatige gezondheidscontroles worden naar de DB-server gestuurd om te controleren of deze nog in leven is.", "fr": "Des vérifications de santé régulières sont envoyées au serveur de base de données pour vérifier s'il est toujours actif.", "it": "Controlli di integrità regolari vengono inviati al server DB per verificare se è ancora attivo.", "es": "Se envían sondas de verificación de estado regulares al servidor de base de datos para verificar si todavía está vivo.", "pl": "Regularne sondy sprawdzające kondycję są wysyłane do serwera bazy danych w celu sprawdzenia, czy nadal działa.", "zh-cn": "定期健康检查探针会发送到数据库服务器以检查它是否还活着。"},
|
|
78
78
|
"ignore values above x": { "en": "Ignore values above", "de": "Ignoriere Werte größer als", "ru": "Игнорировать значения выше", "pt": "Ignorar valores acima", "nl": "Bovenstaande waarden negeren", "fr": "Ignorer les valeurs ci-dessus", "it": "Ignora i valori sopra", "es": "Ignorar los valores anteriores", "pl": "Zignoruj wartości powyżej", "zh-cn": "忽略上面的值"},
|
|
79
79
|
"ignore values below x": { "en": "Ignore values below", "de": "Ignoriere Werte kleiner als", "ru": "Игнорировать значения ниже", "pt": "Ignorar valores abaixo", "nl": "Negeer onderstaande waarden", "fr": "Ignorer les valeurs ci-dessous", "it": "Ignora i valori sottostanti", "es": "Ignorar valores a continuación", "pl": "Zignoruj wartości poniżej", "zh-cn": "忽略下面的值"},
|
|
80
|
-
"ignore values below zero": { "en": "ignore values below zero (<0)", "de": "
|
|
80
|
+
"ignore values below zero": { "en": "ignore values below zero (<0)", "de": "Werte unter 0 ignorieren (<0)", "ru": "игнорировать значения ниже нуля (<0)", "pt": "ignorar valores abaixo de zero (<0)", "nl": "negeer waarden onder nul (<0)", "fr": "ignorer les valeurs inférieures à zéro (<0)", "it": "ignora i valori inferiori a zero (<0)", "es": "ignorar valores por debajo de cero (<0)", "pl": "zignoruj wartości poniżej zera (<0)", "zh-cn": "忽略零以下的值 (<0)"},
|
|
81
81
|
"ignore zero or null values": { "en": "ignore 0 or null values (==0)", "de": "Ignoriere 0 oder Nullwerte (==0)", "ru": "игнорировать 0 или нулевые значения (==0)", "pt": "ignore 0 ou valores nulos (==0)", "nl": "negeer 0 of null-waarden (==0)", "fr": "ignorer les valeurs 0 ou nulles (==0)", "it": "ignora 0 o valori nulli (==0)", "es": "ignorar 0 o valores nulos (==0)", "pl": "zignoruj wartości 0 lub null (==0)", "zh-cn": "忽略 0 或空值 (==0)"},
|
|
82
82
|
"keep forever": { "en": "keep forever", "de": "keine automatische Löschung", "ru": "хранить вечно", "pt": "mantenha para sempre", "nl": "blijf voor altijd", "fr": "keep forever", "it": "tienilo per sempre", "es": "mantener para siempre", "pl": "zachowaj na zawsze", "zh-cn": "永远保持"},
|
|
83
83
|
"log changes interval(s)": { "en": "Record the same values (seconds)", "de": "trotzdem gleiche Werte aufzeichnen (Sekunden)", "ru": "Запишите те же значения (секунды)", "pt": "Grave os mesmos valores (segundos)", "nl": "Noteer dezelfde waarden (seconden)", "fr": "Enregistrer les mêmes valeurs (secondes)", "it": "Registra gli stessi valori (secondi)", "es": "Registrar los mismos valores (segundos)", "pl": "Zapisz te same wartości (sekundy)", "zh-cn": "记录相同的值(秒)"},
|
package/io-package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"pl": "Logowanie stanów do InfluxDB",
|
|
14
14
|
"zh-cn": "将状态记录到InfluxDB中"
|
|
15
15
|
},
|
|
16
|
-
"version": "3.1.
|
|
16
|
+
"version": "3.1.3",
|
|
17
17
|
"title": "Logging data with InfluxDB",
|
|
18
18
|
"titleLang": {
|
|
19
19
|
"en": "Logging data with InfluxDB",
|
|
@@ -28,6 +28,30 @@
|
|
|
28
28
|
"zh-cn": "使用InfluxDB记录数据"
|
|
29
29
|
},
|
|
30
30
|
"news": {
|
|
31
|
+
"3.1.3": {
|
|
32
|
+
"en": "Corrected issue when testing connection to InfluxDBv1 with weird passwords",
|
|
33
|
+
"de": "Problem beim Testen der Verbindung zu InfluxDBv1 mit seltsamen Passwörtern behoben",
|
|
34
|
+
"ru": "Исправлена ошибка при тестировании подключения к InfluxDBv1 со странными паролями.",
|
|
35
|
+
"pt": "Corrigido o problema ao testar a conexão com o InfluxDBv1 com senhas estranhas",
|
|
36
|
+
"nl": "Probleem opgelost bij het testen van de verbinding met InfluxDBv1 met rare wachtwoorden",
|
|
37
|
+
"fr": "Correction d'un problème lors du test de connexion à InfluxDBv1 avec des mots de passe étranges",
|
|
38
|
+
"it": "Risolto problema durante il test della connessione a InfluxDBv1 con password strane",
|
|
39
|
+
"es": "Problema corregido al probar la conexión a InfluxDBv1 con contraseñas extrañas",
|
|
40
|
+
"pl": "Naprawiono problem podczas testowania połączenia z InfluxDBv1 za pomocą dziwnych haseł",
|
|
41
|
+
"zh-cn": "更正了使用奇怪密码测试与 InfluxDBv1 的连接时出现的问题"
|
|
42
|
+
},
|
|
43
|
+
"3.1.2": {
|
|
44
|
+
"en": "Workaround an admin issue when testing connection to InfluxDB",
|
|
45
|
+
"de": "Umgehung eines Administratorproblems beim Testen der Verbindung zu InfluxDB",
|
|
46
|
+
"ru": "Обход проблемы администратора при тестировании подключения к InfluxDB",
|
|
47
|
+
"pt": "Solução alternativa de um problema de administrador ao testar a conexão com o InfluxDB",
|
|
48
|
+
"nl": "Tijdelijke oplossing voor een beheerdersprobleem bij het testen van de verbinding met InfluxDB",
|
|
49
|
+
"fr": "Contournement d'un problème d'administration lors du test de connexion à InfluxDB",
|
|
50
|
+
"it": "Soluzione alternativa a un problema di amministrazione durante il test della connessione a InfluxDB",
|
|
51
|
+
"es": "Solución de un problema de administración al probar la conexión a InfluxDB",
|
|
52
|
+
"pl": "Obejście problemu administratora podczas testowania połączenia z InfluxDB",
|
|
53
|
+
"zh-cn": "在测试与 InfluxDB 的连接时解决管理问题"
|
|
54
|
+
},
|
|
31
55
|
"3.1.0": {
|
|
32
56
|
"en": "Data are not converted to numbers if they are other datatypes on getHistory to respect the saved data formats as defined in the datapoint settings for storage.\nFix retention change to lower checkbox in UI\nAllow storeState again to write to InfluxDB for \"unknown state ids\" - \"rules\" usage is not supported in for this and storeState would be silently discarded in this case!\nFix several crash cases reported by Sentry\nMake sure disabling \"Log changes only\" also really do not log the changes anymore\nAllow storeState and GetHistory also to be called for \"unknown ids\"",
|
|
33
57
|
"de": "Daten werden nicht in Zahlen konvertiert, wenn es sich um andere Datentypen auf getHistory handelt, um die gespeicherten Datenformate zu respektieren, wie sie in den Datenpunkteinstellungen für die Speicherung definiert sind.\nKorrektur der Aufbewahrungsänderung am unteren Kontrollkästchen in der Benutzeroberfläche\nStoreState erneut erlauben, in InfluxDB für \"unbekannte Zustands-IDs\" zu schreiben - die Verwendung von \"Regeln\" wird dafür nicht unterstützt und storeState würde in diesem Fall stillschweigend verworfen!\nMehrere von Sentry gemeldete Absturzfälle behoben\nStellen Sie sicher, dass durch Deaktivieren von \"Nur Änderungen protokollieren\" die Änderungen auch wirklich nicht mehr protokolliert werden\nAufruf von storeState und GetHistory auch für \"unbekannte IDs\" zulassen",
|
|
@@ -87,30 +111,6 @@
|
|
|
87
111
|
"es": "Manejar correctamente los nombres de bases de datos con guiones para InfluxDB 1\nArreglar getHistory para campos no booleanos\nAjuste la duración del grupo de fragmentos a las propuestas de influxdb",
|
|
88
112
|
"pl": "Prawidłowo obsługuj nazwy baz danych z myślnikami dla InfluxDB 1\nNapraw getHistory dla pól innych niż logiczne\nDostosuj czas trwania grupy shard do propozycji influxdb",
|
|
89
113
|
"zh-cn": "正确处理带有连字符的数据库名称,用于 InfluxDB 1\n修复非布尔字段的 getHistory\n调整分片组持续时间以适应 influxdb 提案"
|
|
90
|
-
},
|
|
91
|
-
"2.6.1": {
|
|
92
|
-
"en": "Address issue with updating retention policy for influxDB 1",
|
|
93
|
-
"de": "Beheben Sie ein Problem mit der Aktualisierung der Aufbewahrungsrichtlinie für influxDB 1",
|
|
94
|
-
"ru": "Устранить проблему с обновлением политики хранения для influxDB 1.",
|
|
95
|
-
"pt": "Resolva o problema com a atualização da política de retenção para o influxDB 1",
|
|
96
|
-
"nl": "Probleem oplossen met het bijwerken van het bewaarbeleid voor influxDB 1",
|
|
97
|
-
"fr": "Résoudre le problème de mise à jour de la stratégie de rétention pour influxDB 1",
|
|
98
|
-
"it": "Risoluzione del problema con l'aggiornamento del criterio di conservazione per influxDB 1",
|
|
99
|
-
"es": "Solucionar el problema con la actualización de la política de retención para influxDB 1",
|
|
100
|
-
"pl": "Rozwiąż problem z aktualizacją zasad przechowywania dla influxDB 1",
|
|
101
|
-
"zh-cn": "解决更新 influxDB 1 保留策略的问题"
|
|
102
|
-
},
|
|
103
|
-
"2.6.0": {
|
|
104
|
-
"en": "Make request timeout configurable - defaults to 30s\nAdd option to also accept self signed ssl certificates for InfluxDB 2.x",
|
|
105
|
-
"de": "Anforderungs-Timeout konfigurierbar machen – standardmäßig 30 Sekunden\nOption hinzugefügt, um auch selbstsignierte SSL-Zertifikate für InfluxDB 2.x zu akzeptieren",
|
|
106
|
-
"ru": "Сделать время ожидания запроса настраиваемым — по умолчанию 30 с.\nДобавить возможность также принимать самозаверяющие ssl-сертификаты для InfluxDB 2.x.",
|
|
107
|
-
"pt": "Tornar o tempo limite de solicitação configurável - o padrão é 30s\nAdicionar opção para também aceitar certificados SSL autoassinados para InfluxDB 2.x",
|
|
108
|
-
"nl": "Verzoek time-out configureerbaar maken - standaard ingesteld op 30s\nOptie toevoegen om ook zelfondertekende SSL-certificaten te accepteren voor InfluxDB 2.x",
|
|
109
|
-
"fr": "Faire en sorte que le délai d'attente de la demande soit configurable - par défaut à 30 s\nAjouter une option pour accepter également les certificats SSL auto-signés pour InfluxDB 2.x",
|
|
110
|
-
"it": "Rendi configurabile il timeout della richiesta: il valore predefinito è 30 secondi\nAggiungi l'opzione per accettare anche certificati SSL autofirmati per InfluxDB 2.x",
|
|
111
|
-
"es": "Hacer que el tiempo de espera de la solicitud sea configurable: el valor predeterminado es 30 s\nAgregue la opción para aceptar también certificados SSL autofirmados para InfluxDB 2.x",
|
|
112
|
-
"pl": "Ustaw limit czasu żądania konfigurowalny - domyślnie 30s\nDodaj opcję akceptowania również samopodpisanych certyfikatów ssl dla InfluxDB 2.x",
|
|
113
|
-
"zh-cn": "使请求超时可配置 - 默认为 30 秒\n添加选项以接受 InfluxDB 2.x 的自签名 ssl 证书"
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"mode": "daemon",
|
package/main.js
CHANGED
|
@@ -14,6 +14,14 @@ const Aggregate = require('./lib/aggregate.js');
|
|
|
14
14
|
const dataDir = path.normalize(`${utils.controllerDir}/${require(`${utils.controllerDir}/lib/tools`).getDefaultDataDir()}`);
|
|
15
15
|
const cacheFile = `${dataDir}influxdata.json`;
|
|
16
16
|
|
|
17
|
+
function isObject(it) {
|
|
18
|
+
// This is necessary because:
|
|
19
|
+
// typeof null === 'object'
|
|
20
|
+
// typeof [] === 'object'
|
|
21
|
+
// [] instanceof Object === true
|
|
22
|
+
return Object.prototype.toString.call(it) === '[object Object]';
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
let adapter;
|
|
18
26
|
|
|
19
27
|
function isEqual(a, b) {
|
|
@@ -444,6 +452,9 @@ function getRetention(adapter, msg) {
|
|
|
444
452
|
|
|
445
453
|
function testConnection(adapter, msg) {
|
|
446
454
|
adapter.log.debug(`testConnection msg-object: ${JSON.stringify(msg)}`);
|
|
455
|
+
if (!msg || !msg.message || !isObject(msg.message.config)) {
|
|
456
|
+
return adapter.sendTo(msg.from, msg.command, {error: 'Invalid test configuration.'}, msg.callback);
|
|
457
|
+
}
|
|
447
458
|
msg.message.config.port = parseInt(msg.message.config.port, 10) || 0;
|
|
448
459
|
msg.message.config.requestTimeout = parseInt(msg.message.config.requestTimeout) || 30000;
|
|
449
460
|
|
|
@@ -479,7 +490,7 @@ function testConnection(adapter, msg) {
|
|
|
479
490
|
msg.message.config.port,
|
|
480
491
|
msg.message.config.protocol, // optional, default 'http'
|
|
481
492
|
msg.message.config.user,
|
|
482
|
-
msg.message.config.password,
|
|
493
|
+
decodeURIComponent(msg.message.config.password || ''),
|
|
483
494
|
msg.message.config.dbname || appName,
|
|
484
495
|
msg.message.config.requestTimeout
|
|
485
496
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.influxdb",
|
|
3
3
|
"description": "Log states in InfluxDB",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.3",
|
|
5
5
|
"author": "bluefox <dogafox@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"bluefox <dogafox@gmail.com>",
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"@alcalzone/release-script": "^3.5.9",
|
|
30
30
|
"@alcalzone/release-script-plugin-iobroker": "^3.5.9",
|
|
31
31
|
"@alcalzone/release-script-plugin-license": "^3.5.9",
|
|
32
|
-
"
|
|
33
|
-
"gulp": "^4.0.2",
|
|
32
|
+
"@iobroker/adapter-dev": "^1.0.0",
|
|
34
33
|
"mocha": "^9.2.2",
|
|
35
34
|
"chai": "^4.3.6"
|
|
36
35
|
},
|
|
@@ -53,7 +52,8 @@
|
|
|
53
52
|
"release": "release-script",
|
|
54
53
|
"release-patch": "release-script patch --yes",
|
|
55
54
|
"release-minor": "release-script minor --yes",
|
|
56
|
-
"release-major": "release-script major --yes"
|
|
55
|
+
"release-major": "release-script major --yes",
|
|
56
|
+
"translate": "translate-adapter"
|
|
57
57
|
},
|
|
58
58
|
"license": "MIT"
|
|
59
59
|
}
|
package/lib/tools.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
const axios = require('axios').default;
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Tests whether the given variable is a real object and not an Array
|
|
5
|
-
* @param {any} it The variable to test
|
|
6
|
-
* @returns {it is Record<string, any>}
|
|
7
|
-
*/
|
|
8
|
-
function isObject(it) {
|
|
9
|
-
// This is necessary because:
|
|
10
|
-
// typeof null === 'object'
|
|
11
|
-
// typeof [] === 'object'
|
|
12
|
-
// [] instanceof Object === true
|
|
13
|
-
return Object.prototype.toString.call(it) === '[object Object]';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Tests whether the given variable is really an Array
|
|
18
|
-
* @param {any} it The variable to test
|
|
19
|
-
* @returns {it is any[]}
|
|
20
|
-
*/
|
|
21
|
-
function isArray(it) {
|
|
22
|
-
if (typeof Array.isArray === 'function') return Array.isArray(it);
|
|
23
|
-
return Object.prototype.toString.call(it) === '[object Array]';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Translates text to the target language. Automatically chooses the right translation API.
|
|
28
|
-
* @param {string} text The text to translate
|
|
29
|
-
* @param {string} targetLang The target languate
|
|
30
|
-
* @param {string} [yandexApiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
|
|
31
|
-
* @returns {Promise<string>}
|
|
32
|
-
*/
|
|
33
|
-
async function translateText(text, targetLang, yandexApiKey) {
|
|
34
|
-
if (targetLang === 'en') {
|
|
35
|
-
return text;
|
|
36
|
-
} else if (!text) {
|
|
37
|
-
return '';
|
|
38
|
-
}
|
|
39
|
-
if (yandexApiKey) {
|
|
40
|
-
return translateYandex(text, targetLang, yandexApiKey);
|
|
41
|
-
} else {
|
|
42
|
-
return translateGoogle(text, targetLang);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Translates text with Yandex API
|
|
48
|
-
* @param {string} text The text to translate
|
|
49
|
-
* @param {string} targetLang The target languate
|
|
50
|
-
* @param {string} apiKey The yandex API key. You can create one for free at https://translate.yandex.com/developers
|
|
51
|
-
* @returns {Promise<string>}
|
|
52
|
-
*/
|
|
53
|
-
async function translateYandex(text, targetLang, apiKey) {
|
|
54
|
-
if (targetLang === 'zh-cn') {
|
|
55
|
-
targetLang = 'zh';
|
|
56
|
-
}
|
|
57
|
-
try {
|
|
58
|
-
const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${apiKey}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`;
|
|
59
|
-
const response = await axios({url, timeout: 15000});
|
|
60
|
-
if (response.data && response.data.text && isArray(response.data.text)) {
|
|
61
|
-
return response.data.text[0];
|
|
62
|
-
}
|
|
63
|
-
throw new Error('Invalid response for translate request');
|
|
64
|
-
} catch (e) {
|
|
65
|
-
throw new Error(`Could not translate to "${targetLang}": ${e}`);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Translates text with Google API
|
|
71
|
-
* @param {string} text The text to translate
|
|
72
|
-
* @param {string} targetLang The target languate
|
|
73
|
-
* @returns {Promise<string>}
|
|
74
|
-
*/
|
|
75
|
-
async function translateGoogle(text, targetLang) {
|
|
76
|
-
try {
|
|
77
|
-
const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`;
|
|
78
|
-
const response = await axios({url, timeout: 15000});
|
|
79
|
-
if (isArray(response.data)) {
|
|
80
|
-
// we got a valid response
|
|
81
|
-
return response.data[0][0][0];
|
|
82
|
-
}
|
|
83
|
-
throw new Error('Invalid response for translate request');
|
|
84
|
-
} catch (e) {
|
|
85
|
-
if (e.response && e.response.status === 429) {
|
|
86
|
-
throw new Error(
|
|
87
|
-
`Could not translate to "${targetLang}": Rate-limited by Google Translate`
|
|
88
|
-
);
|
|
89
|
-
} else {
|
|
90
|
-
throw new Error(`Could not translate to "${targetLang}": ${e}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
module.exports = {
|
|
96
|
-
isArray,
|
|
97
|
-
isObject,
|
|
98
|
-
translateText
|
|
99
|
-
};
|