iobroker.influxdb 3.0.2 → 3.1.0
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 +15 -2
- package/admin/i18n/de/translations.json +3 -3
- package/admin/i18n/en/translations.json +1 -1
- package/admin/i18n/zh-cn/translations.json +2 -2
- package/admin/jsonConfig.json +2 -2
- package/admin/words.js +9 -9
- package/io-package.json +14 -14
- package/lib/aggregate.js +5 -0
- package/main.js +123 -74
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,7 +183,7 @@ Possible options:
|
|
|
183
183
|
- **ignoreNull** - if null values should be included (false), replaced by last not null value (true) or replaced with 0 (0)
|
|
184
184
|
- **removeBorderValues** - By default additional border values are returned to optimize charting. Set this option to true if this is not wanted (e.g. for script data processing)
|
|
185
185
|
- **returnNewestEntries** - The returned data are always sorted by timestamp ascending. When using aggregate "none" and also providing "count" or "limit" this means that normally the oldest entries are returned (unless no start data is provided). Set this option to true to get the newest entries instead.
|
|
186
|
-
- **aggregate** - aggregate method:
|
|
186
|
+
- **aggregate** - aggregate method (Default: 'average'):
|
|
187
187
|
- *minmax* - used special algorithm. Splice the whole time range in small intervals and find for every interval max, min, start and end values.
|
|
188
188
|
- *max* - Splice the whole time range in small intervals and find for every interval max value and use it for this interval (nulls will be ignored).
|
|
189
189
|
- *min* - Same as max, but take minimal value.
|
|
@@ -287,7 +287,9 @@ sendTo('influxdb.0', 'query', 'from(bucket: "iobroker") |> range(start: -3h); fr
|
|
|
287
287
|
If you want to write other data into the InfluxDB you can use the build in system function **storeState**.
|
|
288
288
|
This function can also be used to convert data from other History adapters like History or SQL.
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
A successful response do not mean that the data are really written out to the disk. It just means that they were processed.
|
|
291
|
+
|
|
292
|
+
The given ids are not checked against the ioBroker database and do not need to be set up or enabled there. If own IDs are used without settings then the "rules" parameter is not supported and will result in an error. The default "Maximal number of stored in RAM values" is used for such IDs.
|
|
291
293
|
|
|
292
294
|
The Message can have one of the following three formats:
|
|
293
295
|
* one ID and one state object
|
|
@@ -321,6 +323,9 @@ sendTo('history.0', 'storeState', [
|
|
|
321
323
|
```
|
|
322
324
|
|
|
323
325
|
Additionally, you can add attribute `rules: true` in message to activate all rules, like `counter`, `changesOnly`, `de-bounce` and so on
|
|
326
|
+
|
|
327
|
+
In case of errors an array with all single error messages is returned and also a successCount to see how many entries were stored successfully.
|
|
328
|
+
|
|
324
329
|
## delete state
|
|
325
330
|
If you want to delete entry from the Database you can use the build in system function **delete**:
|
|
326
331
|
|
|
@@ -445,6 +450,14 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
|
|
|
445
450
|
-->
|
|
446
451
|
|
|
447
452
|
## Changelog
|
|
453
|
+
### 3.1.0 (2022-05-27)
|
|
454
|
+
* (Apollon77) 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.
|
|
455
|
+
* (Apollon77) Fix retention change to lower checkbox in UI
|
|
456
|
+
* (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
|
+
* (Apollon77) Fix several crash cases reported by Sentry
|
|
458
|
+
* (Apollon77) Make sure disabling "Log changes only" also really do not log the changes anymore
|
|
459
|
+
* (Apollon77) Allow storeState and GetHistory also to be called for "unknown ids"
|
|
460
|
+
|
|
448
461
|
### 3.0.2 (2022-05-12)
|
|
449
462
|
* (Apollon77) handle an empty Path for InfluxDB 2.0 correctly in all cases
|
|
450
463
|
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"blockTime": "Alle neuen Werte für X ms nach dem letzten protokollierten Wert ignorieren",
|
|
73
73
|
"debounce": "Änderungen ignorieren, bis der Wert für X Millisekunden unverändert bleibt",
|
|
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
|
-
"ignore values above x": "
|
|
76
|
-
"ignore values below x": "
|
|
75
|
+
"ignore values above x": "Ignoriere Werte größer als",
|
|
76
|
+
"ignore values below x": "Ignoriere Werte kleiner als",
|
|
77
77
|
"ignore values below zero": "Ignoriere Werte unter Null (<0)",
|
|
78
78
|
"ignore zero or null values": "Ignoriere 0 oder Nullwerte (==0)",
|
|
79
79
|
"keep forever": "keine automatische Löschung",
|
|
80
|
-
"log changes interval(s)": "
|
|
80
|
+
"log changes interval(s)": "trotzdem gleiche Werte aufzeichnen (Sekunden)",
|
|
81
81
|
"log changes minimal delta": "Minimale Differenz zum letzten Wert",
|
|
82
82
|
"log changes only": "Nur Änderungen aufzeichnen",
|
|
83
83
|
"note": "History Einstellungen müssen für jeden State einzeln gemacht werden, im Tab \"States\" und nur wenn die Adapter Instanz aktiv ist",
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"retention": "Storage retention",
|
|
87
87
|
"use 0 to not buffer at all": "Use 0 to not buffer at all",
|
|
88
88
|
"usetags help": "For more information, please refer to the documentation: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields"
|
|
89
|
-
}
|
|
89
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"0 = disable": "0
|
|
2
|
+
"0 = disable": "0 = 禁用",
|
|
3
3
|
"0 = disable delta check": "0 =禁用增量检查",
|
|
4
4
|
"0 = disabled": "0 = 禁用",
|
|
5
5
|
"1 day": "1天",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"Password": "密码",
|
|
50
50
|
"Password confirm": "确认密码",
|
|
51
51
|
"Please confirm!": "请确认",
|
|
52
|
-
"Port": "
|
|
52
|
+
"Port": "端口",
|
|
53
53
|
"Reject on SSL errors": "拒绝 SSL 错误",
|
|
54
54
|
"Request timeout": "请求超时",
|
|
55
55
|
"Reset DB": "重置数据库",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -288,8 +288,8 @@
|
|
|
288
288
|
"newLine": true,
|
|
289
289
|
"type": "checkbox",
|
|
290
290
|
"label": "Apply lower retention",
|
|
291
|
-
"hidden": "(data.retention >= originalData.retention && originalData.retention != 0) || data.retention == 0",
|
|
292
|
-
"disabled": "(data.retention >= originalData.retention && originalData.retention != 0) || data.retention == 0",
|
|
291
|
+
"hidden": "((originalData.retention >= 0 && data.retention >= 0 && ((data.retention >= originalData.retention && originalData.retention != 0) || data.retention == 0)) || (originalData.retention === -1 && data.retention >= 0 && ((data.retention >= parseInt(originalData.customRetentionDuration, 10) * 24 * 60) || data.retention == 0)) || (originalData.retention > 0 && data.retention === -1 && (parseInt(data.customRetentionDuration, 10) * 24 * 60 >= originalData.retention)) || (originalData.retention === -1 && data.retention === -1 && data.customRetentionDuration >= originalData.customRetentionDuration))",
|
|
292
|
+
"disabled": "((originalData.retention >= 0 && data.retention >= 0 && ((data.retention >= originalData.retention && originalData.retention != 0) || data.retention == 0)) || (originalData.retention === -1 && data.retention >= 0 && ((data.retention >= parseInt(originalData.customRetentionDuration, 10) * 24 * 60) || data.retention == 0)) || (originalData.retention > 0 && data.retention === -1 && (parseInt(data.customRetentionDuration, 10) * 24 * 60 >= originalData.retention)) || (originalData.retention === -1 && data.retention === -1 && data.customRetentionDuration >= originalData.customRetentionDuration))",
|
|
293
293
|
"confirm": {
|
|
294
294
|
"text": "Lowering the retention period should be considered with caution: Past data exceeding the retention period will be lost.",
|
|
295
295
|
"condition": "data.retentionConfirm && data.retentionConfirm != originalData.retentionConfirm",
|
package/admin/words.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
systemDictionary = {
|
|
5
|
-
"0 = disable": { "en": "0 = disable", "de": "0 = Deaktivieren", "ru": "0 = не активно", "pt": "0 = desativar", "nl": "0 = uitschakelen", "fr": "0 = disable", "it": "0 = disabilita", "es": "0 = desactivar", "pl": "0 = wyłącz", "zh-cn": "0
|
|
5
|
+
"0 = disable": { "en": "0 = disable", "de": "0 = Deaktivieren", "ru": "0 = не активно", "pt": "0 = desativar", "nl": "0 = uitschakelen", "fr": "0 = disable", "it": "0 = disabilita", "es": "0 = desactivar", "pl": "0 = wyłącz", "zh-cn": "0 = 禁用"},
|
|
6
6
|
"0 = disable delta check": { "en": "0 = disable delta check", "de": "0 = Abweichungsprüfung deaktivieren", "ru": "0 = не проверять минимальное изменение", "pt": "0 = desativar o cheque delta", "nl": "0 = delta-controle uitschakelen", "fr": "0 = disable delta check", "it": "0 = disabilita il controllo delta", "es": "0 = deshabilitar la verificación delta", "pl": "0 = wyłącz kontrolę delta", "zh-cn": "0 =禁用增量检查"},
|
|
7
7
|
"0 = disabled": { "en": "0 = disabled", "de": "0 = deaktiviert", "ru": "0 = отключено", "pt": "0 = desativado", "nl": "0 = uitgeschakeld", "fr": "0 = désactivé", "it": "0 = disabilitato", "es": "0 = deshabilitado", "pl": "0 = wyłączone", "zh-cn": "0 = 禁用"},
|
|
8
8
|
"1 day": { "en": "1 day", "de": "1 Tag", "ru": "1 день", "pt": "1 dia", "nl": "1 dag", "fr": "1 day", "it": "1 giorno", "es": "1 día", "pl": "1 dzień", "zh-cn": "1天"},
|
|
@@ -20,7 +20,7 @@ systemDictionary = {
|
|
|
20
20
|
"Are you sure? All data will be dropped.": { "en": "All data will be dropped. Are you sure? ", "de": "Sollen wirklich alle Daten gelöscht werden? ", "ru": "Вы уверены? Все данные в базе будут удалены. ", "pt": "Você tem certeza? Todos os dados serão descartados.", "nl": "Weet je het zeker? Alle gegevens worden verwijderd.", "fr": "Are you sure? All data will be dropped.", "it": "Sei sicuro? Tutti i dati verranno eliminati.", "es": "¿Estás seguro? Todos los datos serán eliminados.", "pl": "Jesteś pewny? Wszystkie dane zostaną usunięte.", "zh-cn": "你确定吗?"},
|
|
21
21
|
"Automatic": { "en": "Automatic", "de": "Automatisch", "ru": "автоматический", "pt": "Automático", "nl": "automatisch", "fr": "Automatique", "it": "Automatico", "es": "Automático", "pl": "Automatyczny", "zh-cn": "自动的"},
|
|
22
22
|
"Block time": { "en": "Blocktime", "de": "Blockzeit", "ru": "Блокировка", "pt": "Blocktime", "nl": "Bloktijd", "fr": "Temps de blocage", "it": "Blocktime", "es": "hora de bloque", "pl": "Czas blokady", "zh-cn": "出块时间"},
|
|
23
|
-
"Boolean": { "en": "Boolean", "de": "
|
|
23
|
+
"Boolean": { "en": "Boolean", "de": "Boolean", "ru": "логический", "pt": "boleano", "nl": "Booleaans", "fr": "booléen", "it": "booleano", "es": "booleano", "pl": "Boole'a", "zh-cn": "布尔值"},
|
|
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": "需要确认。"},
|
|
@@ -42,16 +42,17 @@ systemDictionary = {
|
|
|
42
42
|
"Expert Settings": { "en": "Expert Settings", "de": "Experteneinstellungen", "ru": "Экспертные настройки", "pt": "Configurações para especialistas", "nl": "Expertinstellingen", "fr": "Paramètres experts", "it": "Impostazioni avanzate", "es": "Configuración experta", "pl": "Ustawienia eksperckie", "zh-cn": "专家设置"},
|
|
43
43
|
"History adapter settings": { "en": "History adapter settings", "de": "History-Adapter Einstellungen", "ru": "Настройки драйвера history", "pt": "Configurações do adaptador de histórico", "nl": "Geschiedenis adapter instellingen", "fr": "History adapter settings", "it": "Impostazioni della scheda Cronologia", "es": "Configuración del adaptador de historial", "pl": "Ustawienia adaptera historii", "zh-cn": "历史记录适配器设置"},
|
|
44
44
|
"Host": { "en": "Host", "de": "Server", "ru": "Хост", "pt": "Hospedeiro", "nl": "gastheer", "fr": "Host", "it": "Ospite", "es": "Anfitrión", "pl": "Gospodarz", "zh-cn": "主持人"},
|
|
45
|
+
"Log the last value again on startup": { "en": "Log the last value again on startup", "de": "Protokollieren Sie den letzten Wert erneut beim Start", "ru": "Снова запишите последнее значение при запуске", "pt": "Registre o último valor novamente na inicialização", "nl": "Log de laatste waarde opnieuw bij het opstarten", "fr": "Enregistrez à nouveau la dernière valeur au démarrage", "it": "Registra di nuovo l'ultimo valore all'avvio", "es": "Registre el último valor nuevamente al inicio", "pl": "Zarejestruj ostatnią wartość ponownie podczas uruchamiania", "zh-cn": "在启动时再次记录最后一个值"},
|
|
45
46
|
"Lowering the retention period should be considered with caution: Past data exceeding the retention period will be lost.": {"en": "Lowering the retention period should be considered with caution: Past data exceeding the retention period will be lost.", "de": "Eine Verkürzung der Vorhaltezeit ist mit Vorsicht zu genießen: Vergangene Daten, die die Vorhaltezeit überschreiten, gehen verloren.", "ru": "К уменьшению срока хранения следует подходить с осторожностью: прошлые данные, превышающие срок хранения, будут потеряны.", "pt": "A redução do período de retenção deve ser considerada com cautela: os dados anteriores que excederem o período de retenção serão perdidos.", "nl": "Het verlagen van de bewaarperiode moet met de nodige voorzichtigheid worden overwogen: gegevens uit het verleden die de bewaarperiode overschrijden, gaan verloren.", "fr": "La réduction de la période de conservation doit être envisagée avec prudence : les données antérieures dépassant la période de conservation seront perdues.", "it": "La riduzione del periodo di conservazione deve essere considerata con cautela: i dati passati che superano il periodo di conservazione andranno persi.", "es": "Reducir el período de retención debe considerarse con precaución: los datos anteriores que excedan el período de retención se perderán.", "pl": "Obniżenie okresu przechowywania należy rozważać z ostrożnością: Przeszłe dane przekraczające okres przechowywania zostaną utracone.", "zh-cn": "应谨慎考虑降低保留期限:超过保留期限的过去数据将丢失。"},
|
|
46
47
|
"Milliseconds": { "en": "Milliseconds", "de": "Millisekunden", "ru": "Миллисекунды", "pt": "Milissegundos", "nl": "milliseconden", "fr": "Millisecondes", "it": "Millisecondi", "es": "milisegundos", "pl": "Milisekundy", "zh-cn": "毫秒"},
|
|
47
|
-
"Number": { "en": "Number", "de": "
|
|
48
|
+
"Number": { "en": "Number", "de": "Zahl", "ru": "Количество", "pt": "Número", "nl": "Nummer", "fr": "Numéro", "it": "Numero", "es": "Número", "pl": "Numer", "zh-cn": "数字"},
|
|
48
49
|
"Number of days to keep the data.": { "en": "Number of days to keep the data.", "de": "Anzahl der Tage, um die Daten aufzubewahren.", "ru": "Количество дней хранения данных.", "pt": "Número de dias para manter os dados.", "nl": "Aantal dagen om de gegevens te bewaren.", "fr": "Nombre de jours de conservation des données.", "it": "Numero di giorni di conservazione dei dati.", "es": "Número de días para conservar los datos.", "pl": "Liczba dni przechowywania danych.", "zh-cn": "保留数据的天数。"},
|
|
49
50
|
"Ok": { "en": "Ok", "de": "Ok", "ru": "Ok", "pt": "Ok", "nl": "OK", "fr": "Ok", "it": "Ok", "es": "De acuerdo", "pl": "Ok", "zh-cn": "好的"},
|
|
50
51
|
"Organization": { "en": "Organization", "de": "Organisation", "ru": "Организация", "pt": "Organização", "nl": "Organisatie", "fr": "Organisation", "it": "Organizzazione", "es": "Organización", "pl": "Organizacja", "zh-cn": "组织"},
|
|
51
52
|
"Password": { "en": "Password", "de": "Passwort", "ru": "Пароль", "pt": "Senha", "nl": "Wachtwoord", "fr": "Password", "it": "Parola d'ordine", "es": "Contraseña", "pl": "Hasło", "zh-cn": "密码"},
|
|
52
53
|
"Password confirm": { "en": "Password confirm", "de": "Passwort-Wiederholung", "ru": "Подтверждение пароля", "pt": "Confirmação de senha", "nl": "Wachtwoord bevestigen", "fr": "Password confirm", "it": "Conferma la password", "es": "Contraseña confirmada", "pl": "Potwierdź hasło", "zh-cn": "确认密码"},
|
|
53
54
|
"Please confirm!": { "en": "Please confirm!", "de": "Bitte bestätigen!", "ru": "Пожалуйста подтвердите", "pt": "Por favor confirme", "nl": "Bevestig alstublieft", "fr": "Veuillez confirmer", "it": "Si prega di confermare", "es": "Por favor confirmar", "pl": "Proszę potwierdzić", "zh-cn": "请确认"},
|
|
54
|
-
"Port": { "en": "Port", "de": "Port", "ru": "Порт", "pt": "Porta", "nl": "Haven", "fr": "Port", "it": "Porta", "es": "Puerto", "pl": "Port", "zh-cn": "
|
|
55
|
+
"Port": { "en": "Port", "de": "Port", "ru": "Порт", "pt": "Porta", "nl": "Haven", "fr": "Port", "it": "Porta", "es": "Puerto", "pl": "Port", "zh-cn": "端口"},
|
|
55
56
|
"Reject on SSL errors": { "en": "Reject on SSL errors", "de": "Ablehnen bei SSL-Fehlern", "ru": "Отклонить при ошибках SSL", "pt": "Rejeitar em erros de SSL", "nl": "Weigeren bij SSL-fouten", "fr": "Rejeter sur les erreurs SSL", "it": "Rifiuta errori SSL", "es": "Rechazar en errores de SSL", "pl": "Odrzuć błędy SSL", "zh-cn": "拒绝 SSL 错误"},
|
|
56
57
|
"Request timeout": { "en": "Request timeout", "de": "Request Timeout", "ru": "Время ожидания запроса", "pt": "Solicitar tempo limite", "nl": "Verzoek time-out", "fr": "Délai d'expiration de la demande", "it": "Richiedi timeout", "es": "Pide tiempo fuera", "pl": "Limit czasu żądania", "zh-cn": "请求超时"},
|
|
57
58
|
"Reset DB": { "en": "Reset DB", "de": "Alle Daten in Datenbank löschen", "ru": "Очистить базу", "pt": "Redefinir DB", "nl": "Stel DB opnieuw in", "fr": "Reset DB", "it": "Ripristina DB", "es": "Restablecer DB", "pl": "Zresetuj DB", "zh-cn": "重置数据库"},
|
|
@@ -63,7 +64,7 @@ systemDictionary = {
|
|
|
63
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": "首先启动或启用适配器"},
|
|
64
65
|
"Storage retention": { "en": "Storage retention", "de": "Speicheraufbewahrung", "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": "存储保留"},
|
|
65
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": "存储为"},
|
|
66
|
-
"String": { "en": "String", "de": "
|
|
67
|
+
"String": { "en": "String", "de": "Zeichenfolge", "ru": "Нить", "pt": "Fragmento", "nl": "Draad", "fr": "Corde", "it": "Corda", "es": "Cuerda", "pl": "Strunowy", "zh-cn": "细绳"},
|
|
67
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": "测试连接"},
|
|
68
69
|
"This feature can only be used on databases that are empty, or already were setup with this feature enabled. Otherwise it will cause errors (see logs).": {"en": "This feature can only be used on databases that are empty, or already were setup with this feature enabled. Otherwise it will cause errors (see logs).", "de": "Diese Funktion kann nur für Datenbanken verwendet werden, die leer sind oder bereits mit aktivierter Funktion eingerichtet wurden. Andernfalls kommt es zu Fehlern (siehe Protokolle).", "ru": "Эту функцию можно использовать только с пустыми базами данных, которые уже были настроены с включенной этой функцией. В противном случае это вызовет ошибки (см. Логи).", "pt": "Este recurso só pode ser usado em bancos de dados que estão vazios ou já foram configurados com este recurso habilitado. Caso contrário, causará erros (consulte os logs).", "nl": "Deze functie kan alleen worden gebruikt op databases die leeg zijn of al zijn ingesteld met deze functie ingeschakeld. Anders veroorzaakt het fouten (zie logs).", "fr": "Cette fonctionnalité ne peut être utilisée que sur des bases de données vides ou déjà configurées avec cette fonctionnalité activée. Sinon, cela provoquera des erreurs (voir les journaux).", "it": "Questa funzione può essere utilizzata solo su database vuoti o già configurati con questa funzione abilitata. Altrimenti causerà errori (vedi log).", "es": "Esta función solo se puede utilizar en bases de datos que estén vacías o que ya se hayan configurado con esta función habilitada. De lo contrario, provocará errores (consulte los registros).", "pl": "Ta funkcja może być używana tylko w przypadku baz danych, które są puste lub zostały już skonfigurowane z włączoną tą funkcją. W przeciwnym razie spowoduje to błędy (patrz logi).", "zh-cn": "此功能只能用于空数据库或已启用此功能设置的数据库。否则会导致错误(见日志)。"},
|
|
69
70
|
"Token": { "en": "Token", "de": "Token", "ru": "Токен", "pt": "Símbolo", "nl": "Teken", "fr": "Jeton", "it": "Gettone", "es": "Simbólico", "pl": "Znak", "zh-cn": "代币"},
|
|
@@ -74,12 +75,12 @@ systemDictionary = {
|
|
|
74
75
|
"blockTime": { "en": "Ignore all new values for X ms after last logged value", "de": "Alle neuen Werte für X ms nach dem letzten protokollierten Wert ignorieren", "ru": "Игнорировать все новые значения для X мс после последнего зарегистрированного значения", "pt": "Ignore todos os novos valores por X ms após o último valor registrado", "nl": "Negeer alle nieuwe waarden voor X ms na de laatste gelogde waarde", "fr": "Ignorer toutes les nouvelles valeurs pendant X ms après la dernière valeur enregistrée", "it": "Ignora tutti i nuovi valori per X ms dopo l'ultimo valore registrato", "es": "Ignorar todos los valores nuevos para X ms después del último valor registrado", "pl": "Ignoruj wszystkie nowe wartości przez X ms po ostatniej zarejestrowanej wartości", "zh-cn": "在上次记录值之后忽略 X 毫秒的所有新值"},
|
|
75
76
|
"debounce": { "en": "Ignore changes till value stays unchanged for X Milliseconds", "de": "Änderungen ignorieren, bis der Wert für X Millisekunden unverändert bleibt", "ru": "Игнорировать изменения до тех пор, пока не будет постоянного значения в течение X миллисекунд", "pt": "Ignorar alterações até que o valor permaneça inalterado por X Milissegundos", "nl": "Wijzigingen negeren totdat waarde ongewijzigd blijft voor X Milliseconds", "fr": "Ignorer les modifications jusqu'à ce que la valeur reste inchangée pour X millisecondes", "it": "Ignora le modifiche fino a quando il valore rimane invariato per X Milliseconds", "es": "Ignorar cambios hasta que el valor permanezca sin cambios durante X milisegundos", "pl": "Zignoruj zmiany, aż wartość pozostanie niezmieniona przez X Milliseconds", "zh-cn": "忽略更改,直到值保持不变为X毫秒"},
|
|
76
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": "定期健康检查探针会发送到数据库服务器以检查它是否还活着。"},
|
|
77
|
-
"ignore values above x": { "en": "Ignore values above", "de": "
|
|
78
|
-
"ignore values below x": { "en": "Ignore values below", "de": "
|
|
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
|
+
"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": "忽略下面的值"},
|
|
79
80
|
"ignore values below zero": { "en": "ignore values below zero (<0)", "de": "Ignoriere Werte unter Null (<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)"},
|
|
80
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)"},
|
|
81
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": "永远保持"},
|
|
82
|
-
"log changes interval(s)": { "en": "Record the same values (seconds)", "de": "
|
|
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": "记录相同的值(秒)"},
|
|
83
84
|
"log changes minimal delta": { "en": "Minimum difference from last value", "de": "Minimale Differenz zum letzten Wert", "ru": "Минимальная разница от последнего значения", "pt": "Diferença mínima do último valor", "nl": "Minimaal verschil met laatste waarde", "fr": "Différence minimale par rapport à la dernière valeur", "it": "Differenza minima dall'ultimo valore", "es": "Diferencia mínima del último valor", "pl": "Minimalna różnica od ostatniej wartości", "zh-cn": "与上一个值的最小差异"},
|
|
84
85
|
"log changes only": { "en": "Record changes only", "de": "Nur Änderungen aufzeichnen", "ru": "Записывать только изменения", "pt": "Registrar apenas alterações", "nl": "Alleen wijzigingen opnemen", "fr": "Enregistrer uniquement les modifications", "it": "Registra solo le modifiche", "es": "Registrar solo cambios", "pl": "Nagrywaj tylko zmiany", "zh-cn": "仅记录更改"},
|
|
85
86
|
"note": { "en": "History settings must be done for every state individually on the tab \"States\" and only if adapter is active", "de": "History Einstellungen müssen für jeden State einzeln gemacht werden, im Tab \"States\" und nur wenn die Adapter Instanz aktiv ist", "ru": "Настройки history делаются для каждого состояния отдельно в закладке \"Состояния\" и только, когда инстанция активирована", "pt": "As configurações de histórico devem ser feitas para cada estado individual na guia \"Estados\" e somente se o adaptador estiver ativo", "nl": "Geschiedenisinstellingen moeten voor elke afzonderlijke status worden uitgevoerd op het tabblad \"Staten\" en alleen als de adapter actief is", "fr": "History settings must be done for every state individually on the tab \"States\" and only if adapter is active", "it": "Le impostazioni della cronologia devono essere eseguite singolarmente per ogni stato nella scheda \"Stati\" e solo se l'adattatore è attivo", "es": "La configuración del historial se debe realizar para cada estado individualmente en la pestaña \"Estados\" y solo si el adaptador está activo", "pl": "Ustawienia historii muszą być wykonane dla każdego stanu indywidualnie na karcie \"Stany\" i tylko wtedy, gdy adapter jest aktywny", "zh-cn": "仅在适配器处于活动状态时,才必须在“状态”选项卡上分别为每个状态进行历史记录设置"},
|
|
@@ -88,5 +89,4 @@ systemDictionary = {
|
|
|
88
89
|
"retention": { "en": "Storage retention", "de": "Storage Vorhaltezeit", "ru": "Время хранения в базе", "pt": "Retenção de armazenamento", "nl": "Opslag retentie", "fr": "Storage retention", "it": "Conservazione di memoria", "es": "Retención de almacenamiento", "pl": "Przechowywanie danych", "zh-cn": "储存保留"},
|
|
89
90
|
"use 0 to not buffer at all": { "en": "Use 0 to not buffer at all", "de": "Wert 0 schreibt Werte direkt", "ru": "Для деактвации буферизации введите 0", "pt": "Use 0 para não buffer no total", "nl": "Gebruik 0 om helemaal niet te bufferen", "fr": "Use 0 to not buffer at all", "it": "Utilizzare 0 per non bufferizzare affatto", "es": "Use 0 para no almacenar el búfer en absoluto", "pl": "Użyj 0, aby w ogóle nie buforować", "zh-cn": "使用0根本不缓冲"},
|
|
90
91
|
"usetags help": { "en": "For more information, please refer to the documentation: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "de": "Weitere Informationen sind in der Dokumentation: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields zu finden.", "ru": "Для получения дополнительной информации обратитесь к документации: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "pt": "Para obter mais informações, consulte a documentação: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "nl": "Raadpleeg de documentatie voor meer informatie: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "fr": "Pour plus d'informations, veuillez vous référer à la documentation : https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "it": "Per ulteriori informazioni, fare riferimento alla documentazione: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "es": "Para obtener más información, consulte la documentación: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "pl": "Więcej informacji można znaleźć w dokumentacji: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields", "zh-cn": "有关更多信息,请参阅文档:"},
|
|
91
|
-
"Log the last value again on startup": { "en": "Log the last value again on startup", "de": "Protokollieren Sie den letzten Wert erneut beim Start", "ru": "Снова запишите последнее значение при запуске", "pt": "Registre o último valor novamente na inicialização", "nl": "Log de laatste waarde opnieuw bij het opstarten", "fr": "Enregistrez à nouveau la dernière valeur au démarrage", "it": "Registra di nuovo l'ultimo valore all'avvio", "es": "Registre el último valor nuevamente al inicio", "pl": "Zarejestruj ostatnią wartość ponownie podczas uruchamiania", "zh-cn": "在启动时再次记录最后一个值"},
|
|
92
92
|
};
|
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.0
|
|
16
|
+
"version": "3.1.0",
|
|
17
17
|
"title": "Logging data with InfluxDB",
|
|
18
18
|
"titleLang": {
|
|
19
19
|
"en": "Logging data with InfluxDB",
|
|
@@ -28,6 +28,18 @@
|
|
|
28
28
|
"zh-cn": "使用InfluxDB记录数据"
|
|
29
29
|
},
|
|
30
30
|
"news": {
|
|
31
|
+
"3.1.0": {
|
|
32
|
+
"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
|
+
"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",
|
|
34
|
+
"ru": "Данные не преобразуются в числа, если они относятся к другим типам данных в getHistory, чтобы соблюдать форматы сохраненных данных, определенные в настройках точки данных для хранения.\nИсправьте изменение сохранения, чтобы опустить флажок в пользовательском интерфейсе.\nРазрешить storeState снова записывать в InfluxDB для «неизвестных идентификаторов состояния» — использование «правил» не поддерживается для этого, и в этом случае storeState будет молча отброшен!\nИсправьте несколько случаев сбоев, о которых сообщил Sentry.\nУбедитесь, что отключение «Только журнал изменений» также действительно больше не регистрирует изменения.\nРазрешить также вызывать storeState и GetHistory для «неизвестных идентификаторов».",
|
|
35
|
+
"pt": "Os dados não são convertidos em números se forem outros tipos de dados em getHistory para respeitar os formatos de dados salvos conforme definido nas configurações do ponto de dados para armazenamento.\nCorrigir a alteração de retenção na caixa de seleção inferior na interface do usuário\nPermitir que storeState grave novamente no InfluxDB para \"ids de estado desconhecidos\" - o uso de \"regras\" não é suportado para isso e storeState seria descartado silenciosamente neste caso!\nCorrija vários casos de travamento relatados pelo Sentinela\nCertifique-se de desativar \"Somente alterações de log\" também não registra mais as alterações\nPermitir que storeState e GetHistory também sejam chamados para \"ids desconhecidos\"",
|
|
36
|
+
"nl": "Gegevens worden niet geconverteerd naar getallen als het andere gegevenstypen op getHistory zijn om de opgeslagen gegevensindelingen te respecteren zoals gedefinieerd in de gegevenspuntinstellingen voor opslag.\nRetentiewijziging repareren om het selectievakje in de gebruikersinterface te verlagen\nSta storeState opnieuw toe om naar InfluxDB te schrijven voor \"onbekende status-ID's\" - het gebruik van \"regels\" wordt hiervoor niet ondersteund en storeState zou in dit geval stil worden weggegooid!\nHerstel verschillende crashgevallen gemeld door Sentry\nZorg ervoor dat het uitschakelen van \"Alleen wijzigingen loggen\" ook echt de wijzigingen niet meer logt\nToestaan dat storeState en GetHistory ook worden aangeroepen voor \"onbekende id's\"",
|
|
37
|
+
"fr": "Les données ne sont pas converties en nombres s'il s'agit d'autres types de données sur getHistory afin de respecter les formats de données enregistrés tels que définis dans les paramètres de point de données pour le stockage.\nCorrection du changement de rétention pour abaisser la case à cocher dans l'interface utilisateur\nAutoriser à nouveau storeState à écrire dans InfluxDB pour les \"identifiants d'état inconnus\" - l'utilisation des \"règles\" n'est pas prise en charge dans ce cas et storeState serait supprimé en silence dans ce cas !\nCorrection de plusieurs cas de crash signalés par Sentry\nAssurez-vous que la désactivation de \"Log changes only\" n'enregistre plus vraiment les modifications\nAutoriser storeState et GetHistory à être également appelés pour les \"identifiants inconnus\"",
|
|
38
|
+
"it": "I dati non vengono convertiti in numeri se sono altri tipi di dati su getHistory per rispettare i formati dei dati salvati come definito nelle impostazioni del punto dati per l'archiviazione.\nCorreggi la modifica della conservazione nella casella di controllo inferiore nell'interfaccia utente\nConsenti a storeState di scrivere nuovamente su InfluxDB per \"ID stato sconosciuto\" - l'utilizzo di \"regole\" non è supportato in questo caso e storeState verrebbe automaticamente eliminato in questo caso!\nRisolvi diversi casi di crash segnalati da Sentry\nAssicurati che la disabilitazione di \"Registra solo modifiche\" non registri più le modifiche\nConsenti anche a storeState e GetHistory di essere chiamati per \"ID sconosciuti\"",
|
|
39
|
+
"es": "Los datos no se convierten en números si son otros tipos de datos en getHistory para respetar los formatos de datos guardados como se define en la configuración del punto de datos para el almacenamiento.\nArreglar el cambio de retención para bajar la casilla de verificación en la interfaz de usuario\nPermita que storeState vuelva a escribir en InfluxDB para \"identificadores de estado desconocidos\": el uso de \"reglas\" no es compatible con esto y storeState se descartaría silenciosamente en este caso.\nSolucione varios casos de bloqueo informados por Sentry\nAsegúrese de deshabilitar \"Registrar solo cambios\" y realmente no registre más los cambios\nPermitir que storeState y GetHistory también se llamen para \"identificadores desconocidos\"",
|
|
40
|
+
"pl": "Dane nie są konwertowane na liczby, jeśli są to inne typy danych w getHistory, aby przestrzegać zapisanych formatów danych zdefiniowanych w ustawieniach punktu danych dla przechowywania.\nNapraw zmianę przechowywania w dolnym polu wyboru w interfejsie użytkownika\nZezwól storeState ponownie na zapis do InfluxDB dla \"nieznanych identyfikatorów stanu\" - użycie \"reguł\" nie jest w tym przypadku obsługiwane, a storeState zostanie w tym przypadku po cichu odrzucone!\nNapraw kilka przypadków awarii zgłoszonych przez Sentry\nUpewnij się, że wyłączenie opcji „Zapisuj tylko zmiany” również naprawdę nie powoduje już rejestrowania zmian\nZezwalaj na wywoływanie storeState i GetHistory również dla „nieznanych identyfikatorów”",
|
|
41
|
+
"zh-cn": "如果数据是 getHistory 上的其他数据类型,则数据不会转换为数字,以尊重数据点设置中定义的已保存数据格式以进行存储。\n将保留更改修复为 UI 中的较低复选框\n再次允许 storeState 为“未知状态 id”写入 InfluxDB - 不支持使用“规则”,在这种情况下 storeState 将被静默丢弃!\n修复 Sentry 报告的几个崩溃案例\n确保禁用“仅记录更改”也确实不再记录更改\n还允许为“未知 ID”调用 storeState 和 GetHistory"
|
|
42
|
+
},
|
|
31
43
|
"3.0.2": {
|
|
32
44
|
"en": "handle an empty Path for InfluxDB 2.0 correctly in all cases",
|
|
33
45
|
"de": "Behandeln Sie einen leeren Pfad für InfluxDB 2.0 in allen Fällen korrekt",
|
|
@@ -99,18 +111,6 @@
|
|
|
99
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",
|
|
100
112
|
"pl": "Ustaw limit czasu żądania konfigurowalny - domyślnie 30s\nDodaj opcję akceptowania również samopodpisanych certyfikatów ssl dla InfluxDB 2.x",
|
|
101
113
|
"zh-cn": "使请求超时可配置 - 默认为 30 秒\n添加选项以接受 InfluxDB 2.x 的自签名 ssl 证书"
|
|
102
|
-
},
|
|
103
|
-
"2.5.2": {
|
|
104
|
-
"en": "Marked interpolated data with `i=true`",
|
|
105
|
-
"de": "Markierte interpolierte Daten mit `i=true`",
|
|
106
|
-
"ru": "Помеченные интерполированные данные с `i=true`",
|
|
107
|
-
"pt": "Dados interpolados marcados com `i=true`",
|
|
108
|
-
"nl": "Gemarkeerde geïnterpoleerde gegevens met `i=true`",
|
|
109
|
-
"fr": "Données interpolées marquées avec `i=true`",
|
|
110
|
-
"it": "Dati interpolati contrassegnati con `i=true`",
|
|
111
|
-
"es": "Datos interpolados marcados con `i=true`",
|
|
112
|
-
"pl": "Oznaczono dane interpolowane za pomocą `i=true`",
|
|
113
|
-
"zh-cn": "用 `i=true` 标记插值数据"
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"mode": "daemon",
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"pl": "Ta nowa wersja wprowadza kilka zmian w sposobie rejestrowania wartości, ponieważ naprawiliśmy kilka problemów i dodaliśmy nowe funkcje. W szczególności sprawdź zdefiniowane ustawienia „odbicia” i „czasu blokowania” w punktach danych, jeśli wartości nie są rejestrowane zgodnie z oczekiwaniami i upewnij się, że ustawienia mają sens. Aby uzyskać więcej informacji, zapoznaj się z dziennikiem zmian i Readme.",
|
|
239
239
|
"zh-cn": "这个新版本引入了一些更改值的记录方式,因为我们修复了几个问题并添加了新功能。如果未按预期记录值,请特别检查数据点中定义的“去抖动”和“阻塞时间”设置,并确保设置有意义。有关更多详细信息,请参阅更改日志和自述文件。"
|
|
240
240
|
},
|
|
241
|
-
"link": "https://github.com/ioBroker/ioBroker.
|
|
241
|
+
"link": "https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#default-settings",
|
|
242
242
|
"level": "warn",
|
|
243
243
|
"linkText": {
|
|
244
244
|
"en": "Readme",
|
package/lib/aggregate.js
CHANGED
|
@@ -142,6 +142,11 @@ function aggregationLogic(data, index, options) {
|
|
|
142
142
|
log = options.log || console.log;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
if (!options.result[index]) {
|
|
146
|
+
log(`${options.logId} Data index ${index} not initialized, ignore!`);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
145
150
|
if (options.aggregate !== 'minmax' && !options.result[index].val.ts) {
|
|
146
151
|
options.result[index].val.ts = Math.round(options.start + (((index - 1) + 0.5) * options.step));
|
|
147
152
|
}
|
package/main.js
CHANGED
|
@@ -984,7 +984,7 @@ function pushHistory(adapter, id, state, timerRelog) {
|
|
|
984
984
|
adapter._influxDPs[id].lastLogTime = state.ts;
|
|
985
985
|
settings.enableDebugLogs && adapter.log.debug(`Value logged ${id}, value=${adapter._influxDPs[id].state.val}, ts=${adapter._influxDPs[id].state.ts}`);
|
|
986
986
|
pushHelper(adapter, id);
|
|
987
|
-
if (settings.changesRelogInterval > 0) {
|
|
987
|
+
if (settings.changesOnly && settings.changesRelogInterval > 0) {
|
|
988
988
|
adapter._influxDPs[id].relogTimeout = setTimeout(reLogHelper, settings.changesRelogInterval * 1000, adapter, id);
|
|
989
989
|
}
|
|
990
990
|
}, settings.debounceTime, id, state);
|
|
@@ -996,7 +996,7 @@ function pushHistory(adapter, id, state, timerRelog) {
|
|
|
996
996
|
|
|
997
997
|
settings.enableDebugLogs && adapter.log.debug(`Value logged ${id}, value=${adapter._influxDPs[id].state.val}, ts=${adapter._influxDPs[id].state.ts}`);
|
|
998
998
|
pushHelper(adapter, id, state);
|
|
999
|
-
if (settings.changesRelogInterval > 0) {
|
|
999
|
+
if (settings.changesOnly && settings.changesRelogInterval > 0) {
|
|
1000
1000
|
adapter._influxDPs[id].relogTimeout = setTimeout(reLogHelper, settings.changesRelogInterval * 1000, adapter, id);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
@@ -1009,12 +1009,12 @@ function reLogHelper(adapter, _id) {
|
|
|
1009
1009
|
return;
|
|
1010
1010
|
}
|
|
1011
1011
|
adapter._influxDPs[_id].relogTimeout = null;
|
|
1012
|
-
adapter._influxDPs[_id].relogTimeout = null;
|
|
1013
1012
|
if (adapter._influxDPs[_id].skipped) {
|
|
1014
1013
|
pushHistory(adapter, _id, adapter._influxDPs[_id].skipped, true);
|
|
1015
1014
|
} else if (adapter._influxDPs[_id].state) {
|
|
1016
1015
|
pushHistory(adapter, _id, adapter._influxDPs[_id].state, true);
|
|
1017
|
-
} else {
|
|
1016
|
+
} else {
|
|
1017
|
+
adapter.getForeignState(adapter._influxDPs[_id].realId, (err, state) => {
|
|
1018
1018
|
if (err) {
|
|
1019
1019
|
adapter.log.info(`init timed Relog: can not get State for ${_id}: ${err}`);
|
|
1020
1020
|
} else if (!state) {
|
|
@@ -1029,14 +1029,15 @@ function reLogHelper(adapter, _id) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
1031
|
function pushHelper(adapter, _id, state, cb) {
|
|
1032
|
-
if (!
|
|
1033
|
-
return cb && setImmediate(cb, `ID ${_id}
|
|
1032
|
+
if (!state && (!adapter._influxDPs[_id] && !adapter._influxDPs[_id].state)) {
|
|
1033
|
+
return cb && setImmediate(cb, `No state to log for ID ${_id}`);
|
|
1034
1034
|
}
|
|
1035
1035
|
if (!state) {
|
|
1036
1036
|
state = adapter._influxDPs[_id].state;
|
|
1037
1037
|
}
|
|
1038
1038
|
|
|
1039
|
-
|
|
1039
|
+
// Important: We allow also to store "unknown" states, so use fallback here
|
|
1040
|
+
const _settings = adapter._influxDPs[_id] && adapter._influxDPs[_id][adapter.namespace] || {};
|
|
1040
1041
|
|
|
1041
1042
|
if (state.val === null) { // InfluxDB can not handle null values
|
|
1042
1043
|
return cb && setImmediate(cb, `null value for ${_id} can not be handled`);
|
|
@@ -1091,23 +1092,14 @@ function pushValueIntoDB(adapter, id, state, directWrite, cb) {
|
|
|
1091
1092
|
return cb && cb(`InfluxDB can not handle non finite values like ${state.val}`);
|
|
1092
1093
|
}
|
|
1093
1094
|
|
|
1094
|
-
|
|
1095
|
+
if (isFinite(state.ts)) {
|
|
1096
|
+
state.ts = parseInt(state.ts, 10) || 0;
|
|
1097
|
+
}
|
|
1095
1098
|
|
|
1096
1099
|
if (typeof state.val === 'object') {
|
|
1097
1100
|
state.val = JSON.stringify(state.val);
|
|
1098
1101
|
}
|
|
1099
1102
|
|
|
1100
|
-
/*
|
|
1101
|
-
if (state.val === 'true') {
|
|
1102
|
-
state.val = true;
|
|
1103
|
-
} else if (state.val === 'false') {
|
|
1104
|
-
state.val = false;
|
|
1105
|
-
} else {
|
|
1106
|
-
// try to convert to float
|
|
1107
|
-
const f = parseFloat(state.val);
|
|
1108
|
-
if (f == state.val) state.val = f;
|
|
1109
|
-
}*/
|
|
1110
|
-
|
|
1111
1103
|
//adapter.log.debug('write value ' + state.val + ' for ' + id);
|
|
1112
1104
|
const influxFields = {
|
|
1113
1105
|
value: state.val,
|
|
@@ -1703,7 +1695,30 @@ function updateState(adapter, msg) {
|
|
|
1703
1695
|
}
|
|
1704
1696
|
}
|
|
1705
1697
|
|
|
1706
|
-
function
|
|
1698
|
+
function storeStatePushData(adapter, id, state, applyRules) {
|
|
1699
|
+
if (!state || typeof state !== 'object') {
|
|
1700
|
+
throw new Error(`State ${JSON.stringify(state)} for ${id} is not valid`);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
let pushFunc = applyRules ? pushHistory : pushHelper;
|
|
1704
|
+
if (!adapter._influxDPs[id] || !adapter._influxDPs[id][adapter.namespace]) {
|
|
1705
|
+
if (applyRules) {
|
|
1706
|
+
throw new Error(`history not enabled for ${id}, so can not apply the rules as requested`);
|
|
1707
|
+
}
|
|
1708
|
+
adapter._influxDPs[id] = adapter._influxDPs[id] || {};
|
|
1709
|
+
}
|
|
1710
|
+
return new Promise((resolve, reject) => {
|
|
1711
|
+
pushFunc(adapter, id, state , err => {
|
|
1712
|
+
if (err) {
|
|
1713
|
+
reject(new Error(`Error writing state for ${id}: ${err.message}, Data: ${JSON.stringify(state)}`));
|
|
1714
|
+
} else {
|
|
1715
|
+
resolve(true);
|
|
1716
|
+
}
|
|
1717
|
+
});
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
async function storeState(adapter, msg) {
|
|
1707
1722
|
if (!msg.message) {
|
|
1708
1723
|
adapter.log.error('storeState called with invalid data');
|
|
1709
1724
|
return adapter.sendTo(msg.from, msg.command, {
|
|
@@ -1711,45 +1726,58 @@ function storeState(adapter, msg) {
|
|
|
1711
1726
|
}, msg.callback);
|
|
1712
1727
|
}
|
|
1713
1728
|
|
|
1714
|
-
let
|
|
1715
|
-
|
|
1716
|
-
pushFunc = pushHistory;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
let id;
|
|
1729
|
+
let errors = [];
|
|
1730
|
+
let successCount = 0;
|
|
1720
1731
|
if (Array.isArray(msg.message)) {
|
|
1721
1732
|
adapter.log.debug(`storeState ${msg.message.length} items`);
|
|
1722
1733
|
for (let i = 0; i < msg.message.length; i++) {
|
|
1723
|
-
id = adapter._aliasMap[msg.message[i].id] ? adapter._aliasMap[msg.message[i].id] : msg.message[i].id;
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1734
|
+
const id = adapter._aliasMap[msg.message[i].id] ? adapter._aliasMap[msg.message[i].id] : msg.message[i].id;
|
|
1735
|
+
try {
|
|
1736
|
+
await storeStatePushData(adapter, id, msg.message[i].state, msg.message.rules);
|
|
1737
|
+
successCount++;
|
|
1738
|
+
} catch (err) {
|
|
1739
|
+
errors.push(err.message);
|
|
1728
1740
|
}
|
|
1729
1741
|
}
|
|
1730
|
-
} else if (msg.message.
|
|
1742
|
+
} else if (msg.message.id && Array.isArray(msg.message.state)) {
|
|
1731
1743
|
adapter.log.debug(`storeState ${msg.message.state.length} items`);
|
|
1732
|
-
id = adapter._aliasMap[msg.message.id] ? adapter._aliasMap[msg.message.id] : msg.message.id;
|
|
1744
|
+
const id = adapter._aliasMap[msg.message.id] ? adapter._aliasMap[msg.message.id] : msg.message.id;
|
|
1733
1745
|
for (let j = 0; j < msg.message.state.length; j++) {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1746
|
+
try {
|
|
1747
|
+
await storeStatePushData(adapter, id, msg.message.state[j], msg.message.rules);
|
|
1748
|
+
successCount++;
|
|
1749
|
+
} catch (err) {
|
|
1750
|
+
errors.push(err.message);
|
|
1738
1751
|
}
|
|
1739
1752
|
}
|
|
1740
|
-
} else if (msg.message.id && msg.message.state
|
|
1753
|
+
} else if (msg.message.id && msg.message.state) {
|
|
1741
1754
|
adapter.log.debug('storeState 1 item');
|
|
1742
|
-
id = adapter._aliasMap[msg.message.id] ? adapter._aliasMap[msg.message.id] : msg.message.id;
|
|
1743
|
-
|
|
1755
|
+
const id = adapter._aliasMap[msg.message.id] ? adapter._aliasMap[msg.message.id] : msg.message.id;
|
|
1756
|
+
try {
|
|
1757
|
+
await storeStatePushData(adapter, id, msg.message.state, msg.message.rules);
|
|
1758
|
+
successCount++;
|
|
1759
|
+
} catch (err) {
|
|
1760
|
+
errors.push(err.message);
|
|
1761
|
+
}
|
|
1744
1762
|
} else {
|
|
1745
1763
|
adapter.log.error('storeState called with invalid data');
|
|
1746
1764
|
return adapter.sendTo(msg.from, msg.command, {
|
|
1747
1765
|
error: `Invalid call: ${JSON.stringify(msg)}`
|
|
1748
1766
|
}, msg.callback);
|
|
1749
1767
|
}
|
|
1768
|
+
if (errors.length) {
|
|
1769
|
+
adapter.log.warn(`storeState executed with ${errors.length} errors: ${errors.join(', ')}`);
|
|
1770
|
+
return adapter.sendTo(msg.from, msg.command, {
|
|
1771
|
+
error: `${errors.length} errors happened while storing data`,
|
|
1772
|
+
errors: errors,
|
|
1773
|
+
successCount
|
|
1774
|
+
}, msg.callback);
|
|
1775
|
+
}
|
|
1750
1776
|
|
|
1777
|
+
adapter.log.debug(`storeState executed with ${successCount} states successfully`);
|
|
1751
1778
|
adapter.sendTo(msg.from, msg.command, {
|
|
1752
1779
|
success: true,
|
|
1780
|
+
successCount,
|
|
1753
1781
|
connected: !!adapter._connected,
|
|
1754
1782
|
seriesBufferCounter: adapter._seriesBufferCounter,
|
|
1755
1783
|
seriesBufferFlushPlanned: adapter._seriesBufferFlushPlanned
|
|
@@ -1872,6 +1900,26 @@ function getHistory(adapter, msg) {
|
|
|
1872
1900
|
logId: (msg.message.id ? msg.message.id : 'all') + Date.now() + Math.random()
|
|
1873
1901
|
};
|
|
1874
1902
|
|
|
1903
|
+
try {
|
|
1904
|
+
if (options.start && typeof options.start !== 'number') {
|
|
1905
|
+
options.start = new Date(options.start).getTime();
|
|
1906
|
+
}
|
|
1907
|
+
} catch (err) {
|
|
1908
|
+
return adapter.sendTo(msg.from, msg.command, {
|
|
1909
|
+
error: 'Invalid call. Start date ' + JSON.stringify(options.start) + ' is not a valid date'
|
|
1910
|
+
}, msg.callback);
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
try {
|
|
1914
|
+
if (options.end && typeof options.end !== 'number') {
|
|
1915
|
+
options.end = new Date(options.end).getTime();
|
|
1916
|
+
}
|
|
1917
|
+
} catch (err) {
|
|
1918
|
+
return adapter.sendTo(msg.from, msg.command, {
|
|
1919
|
+
error: 'Invalid call. End date ' + JSON.stringify(options.end) + ' is not a valid date'
|
|
1920
|
+
}, msg.callback);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1875
1923
|
if (!options.start && options.count) {
|
|
1876
1924
|
options.returnNewestEntries = true;
|
|
1877
1925
|
}
|
|
@@ -1887,6 +1935,7 @@ function getHistory(adapter, msg) {
|
|
|
1887
1935
|
options.round = adapter.config.round;
|
|
1888
1936
|
}
|
|
1889
1937
|
|
|
1938
|
+
adapter._influxDPs[options.id] = adapter._influxDPs[options.id] || {};
|
|
1890
1939
|
const debugLog = options.debugLog = !!(adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].enableDebugLogs);
|
|
1891
1940
|
|
|
1892
1941
|
debugLog && adapter.log.debug(`${options.logId} getHistory (InfluxDB1) call: ${JSON.stringify(options)}`);
|
|
@@ -1910,15 +1959,6 @@ function getHistory(adapter, msg) {
|
|
|
1910
1959
|
options.integralUnit = 60;
|
|
1911
1960
|
}
|
|
1912
1961
|
|
|
1913
|
-
if (!adapter._influxDPs[options.id]) {
|
|
1914
|
-
adapter.sendTo(msg.from, msg.command, {
|
|
1915
|
-
result: [],
|
|
1916
|
-
step: 0,
|
|
1917
|
-
error: `Logging not activated for ${options.id}`
|
|
1918
|
-
}, msg.callback);
|
|
1919
|
-
return;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
1962
|
if (options.start > options.end) {
|
|
1923
1963
|
const _end = options.end;
|
|
1924
1964
|
options.end = options.start;
|
|
@@ -2049,6 +2089,9 @@ function getHistory(adapter, msg) {
|
|
|
2049
2089
|
adapter.log.info(`Error storing buffered series for ${options.id} before GetHistory: ${err}`);
|
|
2050
2090
|
}
|
|
2051
2091
|
setTimeout(() => {
|
|
2092
|
+
if (!adapter._client) {
|
|
2093
|
+
return Aggregate.sendResponse(adapter, msg, options, 'Database no longer connected', startTime);
|
|
2094
|
+
}
|
|
2052
2095
|
adapter._client.query(query, (error, rows) => {
|
|
2053
2096
|
if (error) {
|
|
2054
2097
|
if (adapter._client.request.getHostsAvailable().length === 0) {
|
|
@@ -2073,13 +2116,8 @@ function getHistory(adapter, msg) {
|
|
|
2073
2116
|
rows[qr][rr].ts = new Date(rows[qr][rr].time).getTime();
|
|
2074
2117
|
delete rows[qr][rr].time;
|
|
2075
2118
|
|
|
2076
|
-
if (rows[qr][rr].val
|
|
2077
|
-
|
|
2078
|
-
rows[qr][rr].val = parseFloat(rows[qr][rr].val);
|
|
2079
|
-
if (options.round) {
|
|
2080
|
-
rows[qr][rr].val = Math.round(rows[qr][rr].val * options.round) / options.round;
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2119
|
+
if (typeof rows[qr][rr].val === 'number' && options.round) {
|
|
2120
|
+
rows[qr][rr].val = Math.round(rows[qr][rr].val * options.round) / options.round;
|
|
2083
2121
|
}
|
|
2084
2122
|
|
|
2085
2123
|
if (options.addId) {
|
|
@@ -2126,6 +2164,26 @@ function getHistoryIflx2(adapter, msg) {
|
|
|
2126
2164
|
logId: (msg.message.id ? msg.message.id : 'all') + Date.now() + Math.random()
|
|
2127
2165
|
};
|
|
2128
2166
|
|
|
2167
|
+
try {
|
|
2168
|
+
if (options.start && typeof options.start !== 'number') {
|
|
2169
|
+
options.start = new Date(options.start).getTime();
|
|
2170
|
+
}
|
|
2171
|
+
} catch (err) {
|
|
2172
|
+
return adapter.sendTo(msg.from, msg.command, {
|
|
2173
|
+
error: 'Invalid call. Start date ' + JSON.stringify(options.start) + ' is not a valid date'
|
|
2174
|
+
}, msg.callback);
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
try {
|
|
2178
|
+
if (options.end && typeof options.end !== 'number') {
|
|
2179
|
+
options.end = new Date(options.end).getTime();
|
|
2180
|
+
}
|
|
2181
|
+
} catch (err) {
|
|
2182
|
+
return adapter.sendTo(msg.from, msg.command, {
|
|
2183
|
+
error: 'Invalid call. End date ' + JSON.stringify(options.end) + ' is not a valid date'
|
|
2184
|
+
}, msg.callback);
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2129
2187
|
if (!options.start && options.count) {
|
|
2130
2188
|
options.returnNewestEntries = true;
|
|
2131
2189
|
}
|
|
@@ -2141,6 +2199,7 @@ function getHistoryIflx2(adapter, msg) {
|
|
|
2141
2199
|
options.round = adapter.config.round;
|
|
2142
2200
|
}
|
|
2143
2201
|
|
|
2202
|
+
adapter._influxDPs[options.id] = adapter._influxDPs[options.id] || {};
|
|
2144
2203
|
const debugLog = options.debugLog = !!(adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].enableDebugLogs);
|
|
2145
2204
|
|
|
2146
2205
|
debugLog && adapter.log.debug(`${options.logId} getHistory (InfluxDB2) call: ${JSON.stringify(options)}`);
|
|
@@ -2164,14 +2223,6 @@ function getHistoryIflx2(adapter, msg) {
|
|
|
2164
2223
|
options.integralUnit = 60;
|
|
2165
2224
|
}
|
|
2166
2225
|
|
|
2167
|
-
if (!adapter._influxDPs[options.id] || !adapter._influxDPs[options.id][adapter.namespace]) {
|
|
2168
|
-
return adapter.sendTo(msg.from, msg.command, {
|
|
2169
|
-
result: [],
|
|
2170
|
-
step: 0,
|
|
2171
|
-
error: `Logging not activated for ${options.id}`
|
|
2172
|
-
}, msg.callback);
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
2226
|
if (options.start > options.end) {
|
|
2176
2227
|
const _end = options.end;
|
|
2177
2228
|
options.end = options.start;
|
|
@@ -2216,8 +2267,11 @@ function getHistoryIflx2(adapter, msg) {
|
|
|
2216
2267
|
}
|
|
2217
2268
|
setTimeout(() => {
|
|
2218
2269
|
adapter._client.query(booleanTypeCheckQuery, (error, rslt) => {
|
|
2270
|
+
if (!adapter._influxDPs[options.id]) {
|
|
2271
|
+
return;
|
|
2272
|
+
}
|
|
2219
2273
|
let supportsAggregates;
|
|
2220
|
-
if (adapter._influxDPs[options.id][adapter.namespace].storageType && adapter._influxDPs[options.id][adapter.namespace].storageType !== 'Number') {
|
|
2274
|
+
if (adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].storageType && adapter._influxDPs[options.id][adapter.namespace].storageType !== 'Number') {
|
|
2221
2275
|
supportsAggregates = false;
|
|
2222
2276
|
} else if (error) {
|
|
2223
2277
|
if (error.message.includes('type conflict: bool')) {
|
|
@@ -2240,9 +2294,9 @@ function getHistoryIflx2(adapter, msg) {
|
|
|
2240
2294
|
}
|
|
2241
2295
|
}
|
|
2242
2296
|
if (supportsAggregates) {
|
|
2243
|
-
if (adapter._influxDPs[options.id][adapter.namespace].state && typeof adapter._influxDPs[options.id][adapter.namespace].state.val !== 'number') {
|
|
2297
|
+
if (adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].state && typeof adapter._influxDPs[options.id][adapter.namespace].state.val !== 'number') {
|
|
2244
2298
|
supportsAggregates = false;
|
|
2245
|
-
} else if (adapter._influxDPs[options.id][adapter.namespace].skipped && typeof adapter._influxDPs[options.id][adapter.namespace].skipped.val !== 'number') {
|
|
2299
|
+
} else if (adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].skipped && typeof adapter._influxDPs[options.id][adapter.namespace].skipped.val !== 'number') {
|
|
2246
2300
|
supportsAggregates = false;
|
|
2247
2301
|
}
|
|
2248
2302
|
}
|
|
@@ -2374,13 +2428,8 @@ function getHistoryIflx2(adapter, msg) {
|
|
|
2374
2428
|
delete rows[qr][rr].value;
|
|
2375
2429
|
}
|
|
2376
2430
|
|
|
2377
|
-
if (rows[qr][rr].val
|
|
2378
|
-
|
|
2379
|
-
rows[qr][rr].val = parseFloat(rows[qr][rr].val);
|
|
2380
|
-
if (options.round) {
|
|
2381
|
-
rows[qr][rr].val = Math.round(rows[qr][rr].val * options.round) / options.round;
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2431
|
+
if (typeof rows[qr][rr].val === 'number' && options.round) {
|
|
2432
|
+
rows[qr][rr].val = Math.round(rows[qr][rr].val * options.round) / options.round;
|
|
2384
2433
|
}
|
|
2385
2434
|
|
|
2386
2435
|
if (rows[qr][rr].time) {
|