iobroker.sql 1.15.6 → 1.16.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 +36 -21
- package/admin/.gitignore +0 -0
- package/admin/i18n/de/translations.json +47 -0
- package/admin/i18n/en/translations.json +47 -0
- package/admin/i18n/es/translations.json +47 -0
- package/admin/i18n/fr/translations.json +47 -0
- package/admin/i18n/it/translations.json +47 -0
- package/admin/i18n/nl/translations.json +47 -0
- package/admin/i18n/pl/translations.json +47 -0
- package/admin/i18n/pt/translations.json +47 -0
- package/admin/i18n/ru/translations.json +47 -0
- package/admin/i18n/zh-cn/translations.json +47 -0
- package/admin/jsonCustom.json +138 -56
- package/admin/words.js +37 -44
- package/io-package.json +207 -221
- package/lib/aggregate.js +25 -17
- package/main.js +155 -152
- package/package.json +23 -10
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/auto-merge.yml +0 -17
- package/.github/dependabot.yml +0 -16
- package/.github/stale.yml +0 -78
- package/.github/workflows/dependabot-automerge.yml +0 -22
- package/.github/workflows/test-and-release.yml +0 -159
package/io-package.json
CHANGED
|
@@ -1,225 +1,211 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
"desc": {
|
|
18
|
-
"en": "Logging of states into SQL DB",
|
|
19
|
-
"de": "Loggt die Historie von einzelnen Zuständen in einer SQL DB",
|
|
20
|
-
"ru": "Сохраняет историю событий для отдельных состояний в SQL DB",
|
|
21
|
-
"pt": "Registro de estados em SQL DB",
|
|
22
|
-
"nl": "Logging van toestanden in SQL DB",
|
|
23
|
-
"fr": "Journalisation des états dans la base de données SQL",
|
|
24
|
-
"it": "Registrazione degli stati nel DB SQL",
|
|
25
|
-
"es": "Registro de estados en SQL DB",
|
|
26
|
-
"pl": "Rejestrowanie stanów w SQL DB",
|
|
27
|
-
"zh-cn": "将状态记录到SQL DB"
|
|
28
|
-
},
|
|
29
|
-
"version": "1.15.6",
|
|
30
|
-
"news": {
|
|
31
|
-
"1.15.6": {
|
|
32
|
-
"en": "added support of Admin5",
|
|
33
|
-
"de": "Unterstützung von Admin5 hinzugefügt",
|
|
34
|
-
"ru": "добавлена поддержка Admin5",
|
|
35
|
-
"pt": "adicionado suporte de Admin5",
|
|
36
|
-
"nl": "toegevoegde ondersteuning van Admin5",
|
|
37
|
-
"fr": "ajout de la prise en charge d'Admin5",
|
|
38
|
-
"it": "aggiunto il supporto di Admin5",
|
|
39
|
-
"es": "soporte agregado de Admin5",
|
|
40
|
-
"pl": "dodana obsługa Admin5",
|
|
41
|
-
"zh-cn": "增加了对Admin5的支持"
|
|
42
|
-
},
|
|
43
|
-
"1.15.5": {
|
|
44
|
-
"en": "make sure message query is a string (Sentry)",
|
|
45
|
-
"de": "Stellen Sie sicher, dass die Nachrichtenabfrage eine Zeichenfolge ist (Sentry).",
|
|
46
|
-
"ru": "убедитесь, что запрос сообщения является строкой (Sentry)",
|
|
47
|
-
"pt": "certifique-se de que a consulta da mensagem é uma string (Sentry)",
|
|
48
|
-
"nl": "zorg ervoor dat de berichtvraag een tekenreeks is (Sentry)",
|
|
49
|
-
"fr": "assurez-vous que la requête de message est une chaîne (Sentry)",
|
|
50
|
-
"it": "assicurati che la query del messaggio sia una stringa (Sentry)",
|
|
51
|
-
"es": "asegúrese de que la consulta del mensaje sea una cadena (Sentry)",
|
|
52
|
-
"pl": "upewnij się, że zapytanie o wiadomość jest ciągiem (Sentry)",
|
|
53
|
-
"zh-cn": "确保消息查询是字符串(Sentry)"
|
|
54
|
-
},
|
|
55
|
-
"1.15.4": {
|
|
56
|
-
"en": "Optimize stop handling",
|
|
57
|
-
"de": "Optimieren Sie das Stop-Handling",
|
|
58
|
-
"ru": "Оптимизировать обработку остановок",
|
|
59
|
-
"pt": "Otimize o manuseio de parada",
|
|
60
|
-
"nl": "Optimaliseer het afhandelen van stops",
|
|
61
|
-
"fr": "Optimiser la gestion des arrêts",
|
|
62
|
-
"it": "Ottimizza la gestione delle fermate",
|
|
63
|
-
"es": "Optimizar el manejo de paradas",
|
|
64
|
-
"pl": "Zoptymalizuj obsługę zatrzymania",
|
|
65
|
-
"zh-cn": "优化停止处理"
|
|
66
|
-
},
|
|
67
|
-
"1.15.3": {
|
|
68
|
-
"en": "Added the option \"Do not create database\". E.g. if DB was created and it does not required to do that, because the user does not have enough rights.",
|
|
69
|
-
"de": "Die Option \"Datenbank nicht erstellen\" wurde hinzugefügt. Z.B. wenn DB erstellt wurde und dies nicht erforderlich ist, da der Benutzer nicht über genügend Rechte verfügt.",
|
|
70
|
-
"ru": "Добавлена опция «Не создавать базу данных». Например. если БД была создана, а этого делать не нужно, так как у пользователя недостаточно прав.",
|
|
71
|
-
"pt": "Adicionada a opção \"Não criar banco de dados\". Por exemplo. se o DB foi criado e não é obrigatório, porque o usuário não tem direitos suficientes.",
|
|
72
|
-
"nl": "De optie \"Geen database aanmaken\" toegevoegd. Bijv. als DB is gemaakt en het is niet nodig om dat te doen, omdat de gebruiker niet genoeg rechten heeft.",
|
|
73
|
-
"fr": "Ajout de l'option \"Ne pas créer de base de données\". Par exemple. si DB a été créé et qu'il n'est pas nécessaire de le faire, car l'utilisateur n'a pas suffisamment de droits.",
|
|
74
|
-
"it": "Aggiunta l'opzione \"Non creare database\". Per esempio. se DB è stato creato e non è necessario farlo, perché l'utente non dispone di diritti sufficienti.",
|
|
75
|
-
"es": "Añadida la opción \"No crear base de datos\". P.ej. si se creó DB y no es necesario que lo haga, porque el usuario no tiene suficientes derechos.",
|
|
76
|
-
"pl": "Dodano opcję „Nie twórz bazy danych”. Na przykład. jeśli baza danych została utworzona i nie jest to wymagane, ponieważ użytkownik nie ma wystarczających uprawnień.",
|
|
77
|
-
"zh-cn": "添加了选项“不创建数据库”。例如。如果已创建数据库,则不需要这样做,因为用户没有足够的权限。"
|
|
78
|
-
},
|
|
79
|
-
"1.15.2": {
|
|
80
|
-
"en": "prevent wrong errors that realId is missing",
|
|
81
|
-
"de": "Verhindern Sie falsche Fehler, bei denen realId fehlt",
|
|
82
|
-
"ru": "предотвратить неправильные ошибки, которые отсутствуют в realId",
|
|
83
|
-
"pt": "evitar erros errados que faltam realId",
|
|
84
|
-
"nl": "voorkom verkeerde fouten die realId mist",
|
|
85
|
-
"fr": "éviter les erreurs erronées manquantes dans realId",
|
|
86
|
-
"it": "prevenire errori errati che realId manca",
|
|
87
|
-
"es": "evitar errores incorrectos que faltan realId",
|
|
88
|
-
"pl": "zapobiega błędnym błędom, których brakuje realId",
|
|
89
|
-
"zh-cn": "防止缺少realId的错误错误"
|
|
90
|
-
},
|
|
91
|
-
"1.15.1": {
|
|
92
|
-
"en": "implement a workaround for postgres problem",
|
|
93
|
-
"de": "Implementieren Sie eine Problemumgehung für das Postgres-Problem",
|
|
94
|
-
"ru": "реализовать обходной путь для проблемы postgres",
|
|
95
|
-
"pt": "implementar uma solução alternativa para o problema do postgres",
|
|
96
|
-
"nl": "een oplossing voor postgres-probleem implementeren",
|
|
97
|
-
"fr": "implémenter une solution de contournement pour le problème postgres",
|
|
98
|
-
"it": "implementare una soluzione alternativa per il problema di Postgres",
|
|
99
|
-
"es": "implementar una solución alternativa para el problema de postgres",
|
|
100
|
-
"pl": "wdrożyć obejście problemu z postgres",
|
|
101
|
-
"zh-cn": "实现postgres问题的解决方法"
|
|
102
|
-
},
|
|
103
|
-
"1.15.0": {
|
|
104
|
-
"en": "BREAKING* This version only accepts Node.js 10.x+ (because sqlite3 was upgraded)\nPrevent crash case (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
105
|
-
"de": "BREAKING * Diese Version akzeptiert nur Node.js 10.x + (da sqlite3 aktualisiert wurde)\nAbsturzfall verhindern (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
106
|
-
"ru": "BREAKING * Эта версия поддерживает только Node.js 10.x + (потому что sqlite3 был обновлен)\nПредотвращение сбоя (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
107
|
-
"pt": "BREAKING * Esta versão aceita apenas o Node.js 10.x + (porque o sqlite3 foi atualizado)\nEvitar caso de falha (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
108
|
-
"nl": "BREAKING * Deze versie accepteert alleen Node.js 10.x + (omdat sqlite3 is geüpgraded)\nVoorkom crashgeval (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
109
|
-
"fr": "BREAKING * Cette version accepte uniquement Node.js 10.x + (car sqlite3 a été mis à niveau)\nPrévenir les cas de crash (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
110
|
-
"it": "BREAKING * Questa versione accetta solo Node.js 10.x + (poiché sqlite3 è stato aggiornato)\nPrevenire il caso di crash (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
111
|
-
"es": "BREAKING * Esta versión solo acepta Node.js 10.x + (porque se actualizó sqlite3)\nPrevenir caso de bloqueo (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
112
|
-
"pl": "BREAKING * Ta wersja akceptuje tylko Node.js 10.x + (ponieważ sqlite3 został zaktualizowany)\nZapobiegaj przypadkom awarii (Sentry IOBROKER-SQL-16, IOBROKER-SQL-15, IOBROKER-SQL-1K)",
|
|
113
|
-
"zh-cn": "BREAKING *此版本仅接受Node.js 10.x +(因为sqlite3已升级)\n防止发生崩溃情况(哨兵IOBROKER-SQL-16,IOBROKER-SQL-15,IOBROKER-SQL-1K)"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"mode": "daemon",
|
|
117
|
-
"platform": "Javascript/Node.js",
|
|
118
|
-
"loglevel": "info",
|
|
119
|
-
"messagebox": true,
|
|
120
|
-
"subscribe": "messagebox",
|
|
121
|
-
"keywords": [
|
|
122
|
-
"charts",
|
|
123
|
-
"sql",
|
|
124
|
-
"logging",
|
|
125
|
-
"graphs",
|
|
126
|
-
"archive"
|
|
127
|
-
],
|
|
128
|
-
"preserveSettings": "custom",
|
|
129
|
-
"supportCustoms": true,
|
|
130
|
-
"getHistory": true,
|
|
131
|
-
"enabled": true,
|
|
132
|
-
"stopBeforeUpdate": true,
|
|
133
|
-
"materialize": true,
|
|
134
|
-
"compact": true,
|
|
135
|
-
"authors": [
|
|
136
|
-
"bluefox <dogafox@gmail.com>",
|
|
137
|
-
"Apollon77 <ingo@fischer-ka.de>"
|
|
138
|
-
],
|
|
139
|
-
"license": "MIT",
|
|
140
|
-
"readme": "https://github.com/ioBroker/ioBroker.sql/blob/master/README.md",
|
|
141
|
-
"icon": "sql.png",
|
|
142
|
-
"extIcon": "https://raw.githubusercontent.com/ioBroker/ioBroker.sql/master/admin/sql.png",
|
|
143
|
-
"type": "storage",
|
|
144
|
-
"dependencies": [
|
|
145
|
-
{
|
|
146
|
-
"js-controller": ">=2.0.0"
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"globalDependencies": [
|
|
150
|
-
{
|
|
151
|
-
"admin": ">=1.6.10"
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"supportStopInstance": 3000,
|
|
155
|
-
"stopTimeout": 3000,
|
|
156
|
-
"config": {
|
|
157
|
-
"minWidth": 570,
|
|
158
|
-
"width ": 435,
|
|
159
|
-
"minHeight": 200,
|
|
160
|
-
"height": 540
|
|
161
|
-
},
|
|
162
|
-
"plugins": {
|
|
163
|
-
"sentry": {
|
|
164
|
-
"dsn": "https://c30462d3e0834993b0aa29824346701e@sentry.iobroker.net/45"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
"jsonCustom": true,
|
|
168
|
-
"jsonConfig": true
|
|
2
|
+
"common": {
|
|
3
|
+
"name": "sql",
|
|
4
|
+
"title": "SQL History",
|
|
5
|
+
"titleLang": {
|
|
6
|
+
"en": "SQL logging",
|
|
7
|
+
"de": "SQL-Protokollierung",
|
|
8
|
+
"ru": "Ведение журнала SQL",
|
|
9
|
+
"pt": "Log de SQL",
|
|
10
|
+
"nl": "SQL logging",
|
|
11
|
+
"fr": "Journalisation SQL",
|
|
12
|
+
"it": "Registrazione SQL",
|
|
13
|
+
"es": "Registro de SQL",
|
|
14
|
+
"pl": "Rejestrowanie SQL",
|
|
15
|
+
"zh-cn": "SQL记录"
|
|
169
16
|
},
|
|
170
|
-
"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
"encrypt": false,
|
|
182
|
-
"round": 4,
|
|
183
|
-
"dbname": "iobroker",
|
|
184
|
-
"multiRequests": true,
|
|
185
|
-
"maxConnections": 100,
|
|
186
|
-
"changesRelogInterval": 0,
|
|
187
|
-
"changesMinDelta": 0,
|
|
188
|
-
"writeNulls": true,
|
|
189
|
-
"doNotCreateDatabase": false
|
|
17
|
+
"desc": {
|
|
18
|
+
"en": "Logging of states into SQL DB",
|
|
19
|
+
"de": "Loggt die Historie von einzelnen Zuständen in einer SQL DB",
|
|
20
|
+
"ru": "Сохраняет историю событий для отдельных состояний в SQL DB",
|
|
21
|
+
"pt": "Registro de estados em SQL DB",
|
|
22
|
+
"nl": "Logging van toestanden in SQL DB",
|
|
23
|
+
"fr": "Journalisation des états dans la base de données SQL",
|
|
24
|
+
"it": "Registrazione degli stati nel DB SQL",
|
|
25
|
+
"es": "Registro de estados en SQL DB",
|
|
26
|
+
"pl": "Rejestrowanie stanów w SQL DB",
|
|
27
|
+
"zh-cn": "将状态记录到SQL DB"
|
|
190
28
|
},
|
|
191
|
-
"
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
29
|
+
"version": "1.16.2",
|
|
30
|
+
"news": {
|
|
31
|
+
"1.16.2": {
|
|
32
|
+
"en": "Marked interpolated data with `i=true`",
|
|
33
|
+
"de": "Markierte interpolierte Daten mit `i=true`",
|
|
34
|
+
"ru": "Помеченные интерполированные данные с `i=true`",
|
|
35
|
+
"pt": "Dados interpolados marcados com `i=true`",
|
|
36
|
+
"nl": "Gemarkeerde geïnterpoleerde gegevens met `i=true`",
|
|
37
|
+
"fr": "Données interpolées marquées avec `i=true`",
|
|
38
|
+
"it": "Dati interpolati contrassegnati con `i=true`",
|
|
39
|
+
"es": "Datos interpolados marcados con `i=true`",
|
|
40
|
+
"pl": "Oznaczono dane interpolowane za pomocą `i=true`",
|
|
41
|
+
"zh-cn": "用 `i=true` 标记插值数据"
|
|
42
|
+
},
|
|
43
|
+
"1.16.1": {
|
|
44
|
+
"en": "Hide settings not relevant when \"log changes only\" is not used\nAllow all number values for debounce again",
|
|
45
|
+
"de": "Nicht relevante Einstellungen ausblenden, wenn \"Nur Änderungen protokollieren\" nicht verwendet wird\nAlle Zahlenwerte wieder für die Entprellung zulassen",
|
|
46
|
+
"ru": "Скрыть настройки, не актуальные, если не используется \"только изменения журнала\"\nРазрешить все числовые значения для устранения дребезга снова",
|
|
47
|
+
"pt": "Ocultar configurações irrelevantes quando \"apenas registro de alterações\" não é usado\nPermitir todos os valores numéricos para debounce novamente",
|
|
48
|
+
"nl": "Instellingen verbergen die niet relevant zijn wanneer \"alleen logboekwijzigingen\" niet wordt gebruikt\nSta alle getalwaarden opnieuw toe voor debounce",
|
|
49
|
+
"fr": "Masquer les paramètres non pertinents lorsque \"log changes only\" n'est pas utilisé\nAutoriser à nouveau toutes les valeurs numériques pour l'anti-rebond",
|
|
50
|
+
"it": "Nascondi le impostazioni non rilevanti quando \"solo modifiche al registro\" non viene utilizzato\nConsenti di nuovo l'antirimbalzo di tutti i valori numerici",
|
|
51
|
+
"es": "Ocultar la configuración que no es relevante cuando no se utiliza \"solo cambios de registro\"\nPermitir todos los valores numéricos para antirrebote nuevamente",
|
|
52
|
+
"pl": "Ukryj ustawienia nieistotne, gdy nie używasz opcji „tylko rejestruj zmiany”\nZezwól ponownie na odrzucenie wszystkich wartości liczbowych",
|
|
53
|
+
"zh-cn": "不使用“仅记录更改”时隐藏不相关的设置\n再次允许所有数值去抖动"
|
|
54
|
+
},
|
|
55
|
+
"1.16.0": {
|
|
56
|
+
"en": "Support only `js.controller` >= 3.3.x\nUsed system/custom view for collecting the objects\nImplemented option to ignore zero- or/and below zero- values",
|
|
57
|
+
"de": "Unterstützt nur `js.controller` >= 3.3.x\nVerwendete Systemansicht/benutzerdefinierte Ansicht zum Sammeln der Objekte\nImplementierte Option zum Ignorieren von Null- oder/und Unter-Null-Werten",
|
|
58
|
+
"ru": "Поддерживает только `js.controller`> = 3.3.x\nИспользуемый системный / пользовательский вид для сбора объектов\nРеализована возможность игнорировать нулевые и / или отрицательные значения.",
|
|
59
|
+
"pt": "Suporte apenas `js.controller`> = 3.3.x\nSistema usado / visão personalizada para coletar os objetos\nOpção implementada para ignorar valores zero ou / e abaixo de zero",
|
|
60
|
+
"nl": "Ondersteuning alleen `js.controller` >= 3.3.x\nGebruikt systeem/aangepaste weergave voor het verzamelen van de objecten\nGeïmplementeerde optie om nul- of/en onder nul-waarden te negeren",
|
|
61
|
+
"fr": "Supporte uniquement `js.controller` >= 3.3.x\nSystème utilisé/vue personnalisée pour la collecte des objets\nOption implémentée pour ignorer les valeurs zéro ou/et inférieures à zéro",
|
|
62
|
+
"it": "Supporta solo `js.controller` >= 3.3.x\nSistema utilizzato/vista personalizzata per la raccolta degli oggetti\nOpzione implementata per ignorare i valori zero o/o inferiori a zero",
|
|
63
|
+
"es": "Admite solo `js.controller`> = 3.3.x\nSistema usado / vista personalizada para recolectar los objetos.\nOpción implementada para ignorar valores cero o inferiores a cero",
|
|
64
|
+
"pl": "Obsługuje tylko `js.controller` >= 3.3.x\nWykorzystany widok systemowy/niestandardowy do zbierania obiektów\nZaimplementowana opcja ignorowania wartości zerowych lub/i poniżej zera",
|
|
65
|
+
"zh-cn": "仅支持 `js.controller` >= 3.3.x\n用于收集对象的系统/自定义视图\n已实现忽略零或/和低于零值的选项"
|
|
66
|
+
},
|
|
67
|
+
"1.15.7": {
|
|
68
|
+
"en": "fixed the support of Admin5",
|
|
69
|
+
"de": "Die Unterstützung von Admin5 wurde behoben",
|
|
70
|
+
"ru": "исправлена поддержка Admin5",
|
|
71
|
+
"pt": "consertou o suporte do Admin5",
|
|
72
|
+
"nl": "de ondersteuning van Admin5 opgelost",
|
|
73
|
+
"fr": "correction du support d'Admin5",
|
|
74
|
+
"it": "risolto il supporto di Admin5",
|
|
75
|
+
"es": "arreglado el soporte de Admin5",
|
|
76
|
+
"pl": "naprawiono obsługę Admin5",
|
|
77
|
+
"zh-cn": "修复了对Admin5的支持"
|
|
78
|
+
},
|
|
79
|
+
"1.15.6": {
|
|
80
|
+
"en": "added support of Admin5",
|
|
81
|
+
"de": "Unterstützung von Admin5 hinzugefügt",
|
|
82
|
+
"ru": "добавлена поддержка Admin5",
|
|
83
|
+
"pt": "adicionado suporte de Admin5",
|
|
84
|
+
"nl": "toegevoegde ondersteuning van Admin5",
|
|
85
|
+
"fr": "ajout de la prise en charge d'Admin5",
|
|
86
|
+
"it": "aggiunto il supporto di Admin5",
|
|
87
|
+
"es": "soporte agregado de Admin5",
|
|
88
|
+
"pl": "dodana obsługa Admin5",
|
|
89
|
+
"zh-cn": "增加了对Admin5的支持"
|
|
90
|
+
},
|
|
91
|
+
"1.15.5": {
|
|
92
|
+
"en": "make sure message query is a string (Sentry)",
|
|
93
|
+
"de": "Stellen Sie sicher, dass die Nachrichtenabfrage eine Zeichenfolge ist (Sentry).",
|
|
94
|
+
"ru": "убедитесь, что запрос сообщения является строкой (Sentry)",
|
|
95
|
+
"pt": "certifique-se de que a consulta da mensagem é uma string (Sentry)",
|
|
96
|
+
"nl": "zorg ervoor dat de berichtvraag een tekenreeks is (Sentry)",
|
|
97
|
+
"fr": "assurez-vous que la requête de message est une chaîne (Sentry)",
|
|
98
|
+
"it": "assicurati che la query del messaggio sia una stringa (Sentry)",
|
|
99
|
+
"es": "asegúrese de que la consulta del mensaje sea una cadena (Sentry)",
|
|
100
|
+
"pl": "upewnij się, że zapytanie o wiadomość jest ciągiem (Sentry)",
|
|
101
|
+
"zh-cn": "确保消息查询是字符串(Sentry)"
|
|
102
|
+
},
|
|
103
|
+
"1.15.4": {
|
|
104
|
+
"en": "Optimize stop handling",
|
|
105
|
+
"de": "Optimieren Sie das Stop-Handling",
|
|
106
|
+
"ru": "Оптимизировать обработку остановок",
|
|
107
|
+
"pt": "Otimize o manuseio de parada",
|
|
108
|
+
"nl": "Optimaliseer het afhandelen van stops",
|
|
109
|
+
"fr": "Optimiser la gestion des arrêts",
|
|
110
|
+
"it": "Ottimizza la gestione delle fermate",
|
|
111
|
+
"es": "Optimizar el manejo de paradas",
|
|
112
|
+
"pl": "Zoptymalizuj obsługę zatrzymania",
|
|
113
|
+
"zh-cn": "优化停止处理"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"mode": "daemon",
|
|
117
|
+
"platform": "Javascript/Node.js",
|
|
118
|
+
"loglevel": "info",
|
|
119
|
+
"messagebox": true,
|
|
120
|
+
"subscribe": "messagebox",
|
|
121
|
+
"keywords": [
|
|
122
|
+
"charts",
|
|
123
|
+
"sql",
|
|
124
|
+
"logging",
|
|
125
|
+
"graphs",
|
|
126
|
+
"archive"
|
|
127
|
+
],
|
|
128
|
+
"preserveSettings": "custom",
|
|
129
|
+
"supportCustoms": true,
|
|
130
|
+
"getHistory": true,
|
|
131
|
+
"enabled": true,
|
|
132
|
+
"stopBeforeUpdate": true,
|
|
133
|
+
"materialize": true,
|
|
134
|
+
"compact": true,
|
|
135
|
+
"authors": [
|
|
136
|
+
"bluefox <dogafox@gmail.com>",
|
|
137
|
+
"Apollon77 <ingo@fischer-ka.de>"
|
|
138
|
+
],
|
|
139
|
+
"license": "MIT",
|
|
140
|
+
"readme": "https://github.com/ioBroker/ioBroker.sql/blob/master/README.md",
|
|
141
|
+
"icon": "sql.png",
|
|
142
|
+
"extIcon": "https://raw.githubusercontent.com/ioBroker/ioBroker.sql/master/admin/sql.png",
|
|
143
|
+
"type": "storage",
|
|
144
|
+
"dependencies": [
|
|
145
|
+
{
|
|
146
|
+
"js-controller": ">=3.3.0"
|
|
147
|
+
}
|
|
213
148
|
],
|
|
214
|
-
"
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
149
|
+
"supportStopInstance": 3000,
|
|
150
|
+
"stopTimeout": 3000,
|
|
151
|
+
"plugins": {
|
|
152
|
+
"sentry": {
|
|
153
|
+
"dsn": "https://c30462d3e0834993b0aa29824346701e@sentry.iobroker.net/45"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"adminUI": {
|
|
157
|
+
"config": "json",
|
|
158
|
+
"custom": "json"
|
|
159
|
+
},
|
|
160
|
+
"jsonCustom": true,
|
|
161
|
+
"jsonConfig": true,
|
|
162
|
+
"tier": 1,
|
|
163
|
+
"connectionType": "none",
|
|
164
|
+
"dataSource": "push"
|
|
165
|
+
},
|
|
166
|
+
"native": {
|
|
167
|
+
"connLink": "",
|
|
168
|
+
"debounce": 1000,
|
|
169
|
+
"retention": 31536000,
|
|
170
|
+
"host": "localhost",
|
|
171
|
+
"port": 0,
|
|
172
|
+
"user": "",
|
|
173
|
+
"password": "",
|
|
174
|
+
"dbtype": "sqlite",
|
|
175
|
+
"fileName": "sqlite.db",
|
|
176
|
+
"requestInterval": 0,
|
|
177
|
+
"encrypt": false,
|
|
178
|
+
"round": 4,
|
|
179
|
+
"dbname": "iobroker",
|
|
180
|
+
"multiRequests": true,
|
|
181
|
+
"maxConnections": 100,
|
|
182
|
+
"changesRelogInterval": 0,
|
|
183
|
+
"changesMinDelta": 0,
|
|
184
|
+
"writeNulls": true,
|
|
185
|
+
"doNotCreateDatabase": false
|
|
186
|
+
},
|
|
187
|
+
"instanceObjects": [
|
|
188
|
+
{
|
|
189
|
+
"_id": "info",
|
|
190
|
+
"type": "channel",
|
|
191
|
+
"common": {
|
|
192
|
+
"name": "Information"
|
|
193
|
+
},
|
|
194
|
+
"native": {}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"_id": "info.connection",
|
|
198
|
+
"type": "state",
|
|
199
|
+
"common": {
|
|
200
|
+
"role": "indicator.connected",
|
|
201
|
+
"name": "If connected to DB",
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"read": true,
|
|
204
|
+
"write": false,
|
|
205
|
+
"def": false
|
|
206
|
+
},
|
|
207
|
+
"native": {}
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"objects": []
|
|
211
|
+
}
|
package/lib/aggregate.js
CHANGED
|
@@ -48,9 +48,6 @@ function aggregation(options, data) {
|
|
|
48
48
|
if (typeof data[i].ts !== 'number') {
|
|
49
49
|
data[i].ts = parseInt(data[i].ts, 10);
|
|
50
50
|
}
|
|
51
|
-
if (data[i].ts < 946681200000) {
|
|
52
|
-
data[i].ts *= 1000;
|
|
53
|
-
}
|
|
54
51
|
|
|
55
52
|
preIndex = Math.floor((data[i].ts - options.start) / options.step);
|
|
56
53
|
|
|
@@ -215,7 +212,6 @@ function finishAggregation(options) {
|
|
|
215
212
|
};
|
|
216
213
|
} // start, min, max == end
|
|
217
214
|
else {
|
|
218
|
-
|
|
219
215
|
options.result.splice(ii + 1, 0, {
|
|
220
216
|
ts: options.result[ii].min.ts,
|
|
221
217
|
val: options.result[ii].min.val
|
|
@@ -281,8 +277,8 @@ function finishAggregation(options) {
|
|
|
281
277
|
for (let k = options.result.length - 1; k >= 0; k--) {
|
|
282
278
|
if (options.result[k].val.ts) {
|
|
283
279
|
options.result[k] = {
|
|
284
|
-
ts:
|
|
285
|
-
val:
|
|
280
|
+
ts: options.result[k].val.ts,
|
|
281
|
+
val: options.result[k].val.val !== null ? Math.round(options.result[k].val.val / options.averageCount[k] * 100) / 100 : null
|
|
286
282
|
};
|
|
287
283
|
} else {
|
|
288
284
|
// no one value in this interval
|
|
@@ -302,16 +298,26 @@ function finishAggregation(options) {
|
|
|
302
298
|
}
|
|
303
299
|
}
|
|
304
300
|
}
|
|
301
|
+
|
|
305
302
|
beautify(options);
|
|
306
303
|
}
|
|
307
304
|
|
|
308
305
|
function beautify(options) {
|
|
309
306
|
let preFirstValue = null;
|
|
310
307
|
let postLastValue = null;
|
|
311
|
-
|
|
312
|
-
if (options.ignoreNull === '
|
|
313
|
-
|
|
314
|
-
|
|
308
|
+
|
|
309
|
+
if (options.ignoreNull === 'true') { // include nulls and replace them with last value
|
|
310
|
+
options.ignoreNull = true;
|
|
311
|
+
} else
|
|
312
|
+
if (options.ignoreNull === 'false') { // include nulls
|
|
313
|
+
options.ignoreNull = false;
|
|
314
|
+
} else
|
|
315
|
+
if (options.ignoreNull === '0') { // include nulls and replace them with 0
|
|
316
|
+
options.ignoreNull = 0;
|
|
317
|
+
} else
|
|
318
|
+
if (options.ignoreNull !== true && options.ignoreNull !== false && options.ignoreNull !== 0) {
|
|
319
|
+
options.ignoreNull = false;
|
|
320
|
+
}
|
|
315
321
|
|
|
316
322
|
// process null values, remove points outside the span and find first points after end and before start
|
|
317
323
|
for (let i = 0; i < options.result.length; i++) {
|
|
@@ -368,7 +374,7 @@ function beautify(options) {
|
|
|
368
374
|
if (firstY !== null) {
|
|
369
375
|
// interpolate
|
|
370
376
|
const y = preFirstValue.val + (firstY - preFirstValue.val) * (options.start - preFirstValue.ts) / (firstTS - preFirstValue.ts);
|
|
371
|
-
options.result.unshift({ts: options.start, val: y});
|
|
377
|
+
options.result.unshift({ts: options.start, val: y, i: true});
|
|
372
378
|
} else {
|
|
373
379
|
options.result.unshift({ts: options.start, val: null});
|
|
374
380
|
}
|
|
@@ -406,7 +412,7 @@ function beautify(options) {
|
|
|
406
412
|
if (lastY !== null) {
|
|
407
413
|
// make interpolation
|
|
408
414
|
const _y = lastY + (postLastValue.val - lastY) * (options.end - lastTS) / (postLastValue.ts - lastTS);
|
|
409
|
-
options.result.push({ts: options.end, val: _y});
|
|
415
|
+
options.result.push({ts: options.end, val: _y, i: true});
|
|
410
416
|
} else {
|
|
411
417
|
options.result.push({ts: options.end, val: null});
|
|
412
418
|
}
|
|
@@ -428,7 +434,7 @@ function beautify(options) {
|
|
|
428
434
|
}
|
|
429
435
|
}
|
|
430
436
|
} else if (options.aggregate === 'none') {
|
|
431
|
-
if (
|
|
437
|
+
if (options.count && options.result.length > options.count) {
|
|
432
438
|
options.result = options.result.slice(0, options.count);
|
|
433
439
|
}
|
|
434
440
|
}
|
|
@@ -462,8 +468,10 @@ function sendResponse(adapter, msg, options, data, startTime) {
|
|
|
462
468
|
}
|
|
463
469
|
}
|
|
464
470
|
options.result = aggregateData.result;
|
|
471
|
+
|
|
465
472
|
beautify(options);
|
|
466
|
-
|
|
473
|
+
|
|
474
|
+
if (options.aggregate === 'none' && options.count && options.result.length > options.count) {
|
|
467
475
|
options.result = options.result.slice(0, options.count);
|
|
468
476
|
}
|
|
469
477
|
aggregateData.result = options.result;
|
|
@@ -505,7 +513,7 @@ function sendResponseCounter(adapter, msg, options, data, startTime) {
|
|
|
505
513
|
sessionId: options.sessionId
|
|
506
514
|
}, msg.callback);
|
|
507
515
|
}
|
|
508
|
-
|
|
516
|
+
|
|
509
517
|
if (data[0] && data[1]) {
|
|
510
518
|
// first | start | afterFirst | ...... | last | end | afterLast
|
|
511
519
|
// 5 | | 8 | 9 | 1 | 3 | | 5
|
|
@@ -524,7 +532,7 @@ function sendResponseCounter(adapter, msg, options, data, startTime) {
|
|
|
524
532
|
if (data[0].ts < options.start) {
|
|
525
533
|
const val = data[0].val + (data[1].val - data[0].val) * ((options.start - data[0].ts) / (data[1].ts - data[0].ts));
|
|
526
534
|
data.splice(0, 1);
|
|
527
|
-
data.unshift({ts: options.start, val});
|
|
535
|
+
data.unshift({ts: options.start, val, i: true});
|
|
528
536
|
}
|
|
529
537
|
|
|
530
538
|
if (data[data.length - 2].ts === options.end) {
|
|
@@ -538,7 +546,7 @@ function sendResponseCounter(adapter, msg, options, data, startTime) {
|
|
|
538
546
|
if (options.end < veryLast.ts) {
|
|
539
547
|
const val = beforeLast.val + (veryLast.val - beforeLast.val) * ((options.end - beforeLast.ts) / (veryLast.ts - beforeLast.ts));
|
|
540
548
|
data.splice(-1, 1);
|
|
541
|
-
data.push({ts: options.end, val});
|
|
549
|
+
data.push({ts: options.end, val, i: true});
|
|
542
550
|
}
|
|
543
551
|
|
|
544
552
|
// at this point we expect [6.5, 9, 1, 4]
|