iobroker.ebus 3.2.6 → 3.3.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 +4 -0
- package/admin/index_m.html +7 -0
- package/admin/words.js +7 -6
- package/io-package.json +15 -15
- package/main.js +83 -6
- package/package.json +13 -14
package/README.md
CHANGED
|
@@ -69,6 +69,10 @@ Attention: command in datapoint ebus.0.cmd is deleted after executing of command
|
|
|
69
69
|
Placeholder for the next version (at the beginning of the line):
|
|
70
70
|
### **WORK IN PROGRESS**
|
|
71
71
|
-->
|
|
72
|
+
### 3.3.0 (2024-05-24)
|
|
73
|
+
* (René) remove cron dependency
|
|
74
|
+
* (René) data history prepared for VIS-2: just a option here in the adapter and new widget (at this moment GeneralChart widget in vis-2-widgets-weather can be used)
|
|
75
|
+
|
|
72
76
|
### 3.2.6 (2024-02-11)
|
|
73
77
|
* (René) see issue #245: support ebusd 23.3
|
|
74
78
|
* (René) fixes reported by eslint
|
package/admin/index_m.html
CHANGED
|
@@ -296,6 +296,13 @@
|
|
|
296
296
|
</div>
|
|
297
297
|
</div>
|
|
298
298
|
|
|
299
|
+
<div class="row">
|
|
300
|
+
<div class="input-field col s6">
|
|
301
|
+
<input type="checkbox" id="History4Vis2" class="value" />
|
|
302
|
+
<label for="History4Vis2" class="translate">History4Vis2</label>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
299
306
|
</div>
|
|
300
307
|
|
|
301
308
|
<!-- settings for ebusd -->
|
package/admin/words.js
CHANGED
|
@@ -8,14 +8,15 @@
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
systemDictionary = {
|
|
11
|
-
"Circuit4Find": { "en": "Circuit in which parameters are searched ", "de": "
|
|
11
|
+
"Circuit4Find": { "en": "Circuit in which parameters are searched ", "de": "Gerät, in der nach Parametern gesucht wird", "ru": "Цепь, в которой ищутся параметры", "pt": "Circuito no qual se pesquisam parâmetros", "nl": "Circuit waarin parameters worden gezocht", "fr": "Circuit dans lequel les paramètres sont recherchés", "it": "Circuito in cui vengono cercati i parametri", "es": "Circuito en el que se buscan parámetros", "pl": "Obwód, w którym szukane są parametry", "uk": "Схема, в якій здійснюється пошук параметрів", "zh-cn": "搜索参数的电路"},
|
|
12
|
+
"History4Vis2": { "en": "Create history value for VIS-2 widget", "de": "Erstellen Sie einen Verlaufswert für das VIS-2-Widget", "ru": "Создать значение истории для виджета VIS-2", "pt": "Criar valor histórico para o widget VIS-2", "nl": "Creëer geschiedeniswaarde voor VIS-2 widget", "fr": "Créer une valeur historique pour le widget VIS-2", "it": "Crea un valore di cronologia per il widget VIS-2", "es": "Crear valor de historial para el widget VIS-2", "pl": "Utwórz wartość historii dla widżetu VIS-2", "uk": "Створення значення історії для віджета VIS-2", "zh-cn": "为 VIS-2 小部件创建历史值"},
|
|
12
13
|
"active": { "en": "active", "de": "aktiv", "ru": "активный", "pt": "ativo", "nl": "actief", "fr": "actif", "it": "attivo", "es": "activo", "pl": "aktywny", "uk": "активний", "zh-cn": "积极的"},
|
|
13
14
|
"addParameter": { "en": "additional parameter", "de": "zusätzliche Parameter", "ru": "дополнительный параметр", "pt": "parâmetro adicional", "nl": "extra parameter", "fr": "paramètre supplémentaire", "it": "parametro aggiuntivo", "es": "parámetro adicional", "pl": "dodatkowy parametr", "uk": "додатковий параметр", "zh-cn": "附加参数"},
|
|
14
|
-
"circuit": { "en": "circuit", "de": "
|
|
15
|
+
"circuit": { "en": "circuit", "de": "Gerät", "ru": "схема", "pt": "o circuito", "nl": "stroomkring", "fr": "circuit", "it": "circuito", "es": "circuito", "pl": "okrążenie", "uk": "схема", "zh-cn": "电路"},
|
|
15
16
|
"ebus_adapter_settings": { "en": "ebus adapter settings", "de": "ebus Adaptereinstellungen", "ru": "настройки адаптера ebus", "pt": "Configurações do adaptador ebus", "nl": "ebus-adapterinstellingen", "fr": "Paramètres de l'adaptateur ebus", "it": "impostazioni dell'adattatore ebus", "es": "configuración del adaptador ebus", "pl": "ustawienia adaptera ebus", "uk": "налаштування адаптера ebus", "zh-cn": "ebus适配器设置"},
|
|
16
|
-
"hint_ebusd": { "en": "you need an running ebusd inclusive all necessary configurations. This adapter uses HTML to read data from ebusd. It uses TCP (Telnet) to write to ebusd.", "de": "Für
|
|
17
|
+
"hint_ebusd": { "en": "you need an running ebusd inclusive all necessary configurations. This adapter uses HTML to read data from ebusd. It uses TCP (Telnet) to write to ebusd.", "de": "Für den Adapter wird ein laufender ebusd incl. alle notwendigen Konfigurationen benötigt. Dieser Adapter verwendet HTML, um Daten von ebusd zu lesen und TCP, um auf ebusd zu schreiben", "ru": "для интерфейса ebusd вам необходимо запустить ebusd, вкл. все необходимые конфигурации. Этот адаптер использует HTML для чтения данных из ebusd и TCP для записи в ebusd", "pt": "Para a interface ebusd, você precisa de um ebusd executado. todas as configurações necessárias. Este adaptador usa HTML para ler dados de ebusd e TCP para escrever em ebusd", "nl": "voor ebusd-interface heeft u een lopende ebusd nodig. alle noodzakelijke configuraties. Deze adapter gebruikt HTML om gegevens van ebusd en TCP te lezen om naar ebusd te schrijven", "fr": "Pour l'interface ebusd, vous avez besoin d'un ebusd en cours d'exécution. toutes les configurations nécessaires. Cet adaptateur utilise le HTML pour lire les données d'ebusd et TCP pour écrire sur ebusd", "it": "per l'interfaccia ebusd hai bisogno di un ebusd in esecuzione incl. tutte le configurazioni necessarie Questo adattatore utilizza l'HTML per leggere i dati da ebusd e TCP per scrivere su ebusd", "es": "para la interfaz ebusd necesita un ebusd eb todas las configuraciones necesarias. Este adaptador usa HTML para leer datos de ebusd y TCP para escribir en ebusd", "pl": "do interfejsu ebusd potrzebny jest działający ebusd w tym. wszystkie niezbędne konfiguracje. Ten adapter używa HTML do odczytu danych z ebusd i TCP w celu zapisania do ebusd", "uk": "вам потрібен запущений ebusd з усіма необхідними налаштуваннями. Цей адаптер використовує HTML для читання даних з ebusd. Він використовує TCP (Telnet) для запису в ebusd.", "zh-cn": "对于ebusd接口,您需要一个正在运行的ebusd incl。"},
|
|
17
18
|
"hint_ebusd_history": { "en": "list of all datapoint names which should be used with ebus history widget. ", "de": "Liste aller Datenpunktnamen, die mit dem ebus-History-Widget verwendet werden sollen.", "ru": "список всех имен точек данных, которые следует использовать с виджетом истории ebus.", "pt": "lista de todos os nomes de pontos de dados que devem ser usados com o widget de histórico do ebus.", "nl": "lijst met alle datapuntnamen die moeten worden gebruikt met de ebus-geschiedeniswidget.", "fr": "liste de tous les noms de points de données qui doivent être utilisés avec le widget historique ebus.", "it": "elenco di tutti i nomi dei punti dati che dovrebbero essere utilizzati con il widget cronologia ebus.", "es": "lista de todos los nombres de puntos de datos que deben usarse con el widget de historial de ebus.", "pl": "lista wszystkich nazw punktów danych, które powinny być używane z widżetem historii ebus.", "uk": "список усіх назв точок даних, які слід використовувати з віджетом історії ebus.", "zh-cn": "应与 ebus 历史小部件一起使用的所有数据点名称的列表。"},
|
|
18
|
-
"hint_ebusd_polled": { "en": "list of all datapoint names which should be polled from adapter. Do not add datapoints which are already polled from ebusd. Circuit and additional parameter are optionally.", "de": "Liste aller Datenpunktnamen, die vom Adapter abgefragt werden sollen.
|
|
19
|
+
"hint_ebusd_polled": { "en": "list of all datapoint names which should be polled from adapter. Do not add datapoints which are already polled from ebusd. Circuit and additional parameter are optionally.", "de": "Liste aller Datenpunktnamen, die vom Adapter abgefragt werden sollen.", "ru": "список всех имен точек данных, которые должны быть опрошены от адаптера. ", "pt": "lista de todos os nomes de pontos de dados que devem ser pesquisados no adaptador. ", "nl": "lijst met alle datapuntnamen die van de adapter moeten worden opgevraagd. ", "fr": "liste de tous les noms de points de données qui doivent être interrogés à partir de l'adaptateur. ", "it": "elenco di tutti i nomi dei punti dati che devono essere interrogati dall'adattatore. ", "es": "lista de todos los nombres de puntos de datos que deben consultarse desde el adaptador. ", "pl": "lista wszystkich nazw punktów danych, które powinny być odpytywane z adaptera. ", "uk": "список усіх імен точок даних, які повинні бути опитані з адаптера. Не додавайте точки даних, які вже опитуються з ebusd. Схема та додатковий параметр необов'язкові.", "zh-cn": "应从适配器轮询的所有数据点名称的列表。"},
|
|
19
20
|
"historyDP": { "en": "history datapoints", "de": "Verlaufsdatenpunkte", "ru": "исторические данные", "pt": "pontos de dados de história", "nl": "geschiedenis datapunten", "fr": "points de données d'historique", "it": "punti dati della cronologia", "es": "puntos de datos históricos", "pl": "punkty danych historii", "uk": "історії даних", "zh-cn": "历史数据点"},
|
|
20
21
|
"maxretries": { "en": "maximum number of retries to send a command ", "de": "maximale Anzahl von Wiederholungen, um einen Befehl zu senden", "ru": "максимальное количество попыток отправки команды", "pt": "número máximo de tentativas para enviar um comando", "nl": "maximum aantal pogingen om een opdracht te verzenden", "fr": "nombre maximum de tentatives pour envoyer une commande", "it": "numero massimo di tentativi per inviare un comando", "es": "número máximo de reintentos para enviar un comando", "pl": "maksymalna liczba ponownych prób wysłania polecenia", "uk": "максимальна кількість повторів для надсилання команди", "zh-cn": "发送命令的最大重试次数"},
|
|
21
22
|
"name": { "en": "name", "de": "Name", "ru": "имя", "pt": "nome", "nl": "naam", "fr": "Nom", "it": "nome", "es": "nombre", "pl": "Nazwa", "uk": "назва", "zh-cn": "姓名"},
|
|
@@ -24,6 +25,6 @@ systemDictionary = {
|
|
|
24
25
|
"readInterval": { "en": "interval to read data from ebusd [min]", "de": "Intervall zum Lesen von Daten aus ebusd [min]", "ru": "интервал чтения данных из ebusd [мин]", "pt": "intervalo para ler dados de ebusd [min]", "nl": "interval om gegevens van ebusd te lezen [min]", "fr": "intervalle de lecture des données depuis ebusd [min]", "it": "intervallo per leggere i dati da ebusd [min]", "es": "intervalo para leer datos de ebusd [min]", "pl": "interwał odczytu danych z ebusd [min]", "uk": "інтервал читання даних з ebusd [хв]", "zh-cn": "从 ebusd 读取数据的间隔 [分钟]"},
|
|
25
26
|
"target_HTTPPort": { "en": "target HTTP Port to read data", "de": "target HTTP Port zum Lesen von Daten", "ru": "целевой HTTP-порт для чтения данных", "pt": "porta HTTP de destino para ler dados", "nl": "doel HTTP-poort om gegevens te lezen", "fr": "Port HTTP cible pour lire les données", "it": "Porta HTTP di destinazione per leggere i dati", "es": "target HTTP Port para leer datos", "pl": "docelowy port HTTP do odczytu danych", "uk": "цільовий порт HTTP для читання даних", "zh-cn": "目标HTTP端口以读取数据"},
|
|
26
27
|
"target_IP": { "en": "target IP", "de": "Ziel-IP", "ru": "целевой IP-адрес", "pt": "IP alvo", "nl": "doel-IP", "fr": "cible IP", "it": "IP di destinazione", "es": "IP objetivo", "pl": "docelowy adres IP", "uk": "цільовий IP", "zh-cn": "目标IP"},
|
|
27
|
-
"target_TelnetPort": { "en": "target telnet Port to write data", "de": "
|
|
28
|
-
"useBoolean4Onoff": { "en": "use boolean instead string for datapoints with on/off values ", "de": "
|
|
28
|
+
"target_TelnetPort": { "en": "target telnet Port to write data", "de": "Telnet Port zum Schreiben von Daten", "ru": "целевой порт telnet для записи данных", "pt": "destino telnet porta para escrever dados", "nl": "doel telnet-poort om gegevens te schrijven", "fr": "Port telnet cible pour écrire des données", "it": "Porta telnet target per scrivere dati", "es": "target telnet Port para escribir datos", "pl": "docelowy port telnet do zapisu danych", "uk": "target telnet Порт для запису даних", "zh-cn": "目标telnet用于写入数据的端口"},
|
|
29
|
+
"useBoolean4Onoff": { "en": "use boolean instead string for datapoints with on/off values ", "de": "Boolean anstelle Strings für Datenpunkte mit Ein-/Aus-Werten verwenden", "ru": "используйте логическое значение вместо строки для точек данных со значениями включения / выключения", "pt": "use booleano em vez de string para pontos de dados com valores on / off", "nl": "gebruik in plaats daarvan booleaanse string voor datapunten met aan/uit-waarden", "fr": "utiliser une chaîne booléenne à la place pour les points de données avec des valeurs activées/désactivées", "it": "usa la stringa booleana invece per i punti dati con valori on/off", "es": "use booleano en lugar de cadena para puntos de datos con valores de encendido / apagado", "pl": "użyj wartości logicznej zamiast ciągu dla punktów danych z wartościami włączonymi / wyłączonymi", "uk": "використовуйте логічне значення замість рядка для точок даних зі значеннями on/off", "zh-cn": "对具有开/关值的数据点使用布尔值代替字符串"},
|
|
29
30
|
};
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "ebus",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.3.0": {
|
|
7
|
+
"en": "(René) remove cron dependency\n(René) data history prepared for VIS-2: just a option here in the adapter and new widget (at this moment GeneralChart widget in vis-2-widgets-weather can be used)",
|
|
8
|
+
"de": "(René) Cron Abhängigkeit entfernen\n(René) Datenhistorie für VIS-2 vorbereitet: nur eine Option hier im Adapter und neues Widget (in diesem Moment kann GeneralChart Widget in vis-2-widgets-weather verwendet werden)",
|
|
9
|
+
"ru": "(René) удалить хроновую зависимость\n(René) история данных, подготовленная для VIS-2: просто вариант здесь в адаптере и новом виджете (в этот момент виджет GeneralChart в vis-2-widgets-weather может быть использован)",
|
|
10
|
+
"pt": "(René) remover a dependência cron\n(René) histórico de dados preparado para VIS-2: apenas uma opção aqui no adaptador e novo widget (neste momento o widget GeneralChart em vis-2-widgets-weather pode ser usado)",
|
|
11
|
+
"nl": "(René) verwijderen cron afhankelijkheid\n(René) data geschiedenis voorbereid voor VIS-2: alleen een optie hier in de adapter en nieuwe widget (op dit moment GeneralChart widget in vis-2-widgets-weer kan worden gebruikt)",
|
|
12
|
+
"fr": "(René) supprimer la dépendance cron\n(René) historique de données préparé pour VIS-2: juste une option ici dans l'adaptateur et le nouveau widget (à ce moment le widget GeneralChart dans vis-2-widgets-weather peut être utilisé)",
|
|
13
|
+
"it": "(René) rimuovere la dipendenza cron\n(René) cronologia dei dati preparati per VIS-2: solo un'opzione qui nell'adattatore e nuovo widget (in questo momento GeneralChart widget in vis-2-widgets-weather può essere utilizzato)",
|
|
14
|
+
"es": "(René) eliminar la dependencia de cron\n(René) historial de datos preparado para VIS-2: sólo una opción aquí en el adaptador y nuevo widget (en este momento se puede utilizar el widget GeneralChart en vis-2-widgets-weather)",
|
|
15
|
+
"pl": "(René) usunąć zależność od cron\n(René) Historia danych przygotowana dla VIS-2: tylko opcja tutaj w adapterze i nowy widget (w tym momencie GeneralChart widget w vis- 2-widgets- pogoda może być użyta)",
|
|
16
|
+
"uk": "(René) видалення коронної залежності\n(René) історії даних, підготовлених для VIS-2: просто варіант тут в адаптері і новому віджеті (з цього моменту можна використовувати GeneralChart віджет в vis-2-widgets-weather)",
|
|
17
|
+
"zh-cn": "(René) 取消对克龙的依赖\n(René)为VIS-2准备的数据历史:仅在适配器和新部件中设置一个选项(此时可使用GeneralChart部件相对-2-widgets-weather)"
|
|
18
|
+
},
|
|
6
19
|
"3.2.6": {
|
|
7
20
|
"en": "(René) see issue #245: support ebusd 23.3\n(René) fixes reported by eslint",
|
|
8
21
|
"de": "(René) siehe Ausgabe #245: Unterstützung ebusd 23.3\n(René)",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "poczekaj na wszystkie polecenia przed aktualizacją danych",
|
|
81
94
|
"uk": "дочекатися всіх команд перед оновленням даних",
|
|
82
95
|
"zh-cn": "在更新数据之前等待所有命令"
|
|
83
|
-
},
|
|
84
|
-
"3.1.0": {
|
|
85
|
-
"en": "optimize answer of ebus.0.cmd",
|
|
86
|
-
"de": "Antwort von ebus.0.cmd optimieren",
|
|
87
|
-
"ru": "оптимизировать ответ ebus.0.cmd",
|
|
88
|
-
"pt": "otimizar resposta de ebus.0.cmd",
|
|
89
|
-
"nl": "optimaliseer het antwoord van ebus.0.cmd",
|
|
90
|
-
"fr": "optimiser la réponse de ebus.0.cmd",
|
|
91
|
-
"it": "ottimizzare la risposta di ebus.0.cmd",
|
|
92
|
-
"es": "optimizar la respuesta de ebus.0.cmd",
|
|
93
|
-
"pl": "zoptymalizować odpowiedź ebus.0.cmd",
|
|
94
|
-
"uk": "оптимізувати відповідь ebus.0.cmd",
|
|
95
|
-
"zh-cn": "优化 ebus.0.cmd 的答案"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"materialize": true,
|
|
139
139
|
"dependencies": [
|
|
140
140
|
{
|
|
141
|
-
"js-controller": ">=
|
|
141
|
+
"js-controller": ">=5.0.0"
|
|
142
142
|
}
|
|
143
143
|
],
|
|
144
144
|
"plugins": {
|
package/main.js
CHANGED
|
@@ -667,7 +667,7 @@ async function ebusd_ReceiveData() {
|
|
|
667
667
|
|
|
668
668
|
//
|
|
669
669
|
//if (key.match(adapter.FORBIDDEN_CHARS)) { continue; }
|
|
670
|
-
|
|
670
|
+
|
|
671
671
|
|
|
672
672
|
if (key.includes("global.version")) {
|
|
673
673
|
const value = newData[org_key];
|
|
@@ -764,7 +764,7 @@ async function ebusd_ReceiveData() {
|
|
|
764
764
|
//ebus.0.bai.messages.ReturnTemp.fields.tempmirror.value
|
|
765
765
|
if (!subnames[temp - 2].includes("sensor") //ignore sensor states
|
|
766
766
|
&& !subnames[temp - 2].includes("mirror") //ignore mirror-data
|
|
767
|
-
) {
|
|
767
|
+
) {
|
|
768
768
|
for (let ii = 0; ii < oHistoryVars.length; ii++) {
|
|
769
769
|
|
|
770
770
|
if (name === oHistoryVars[ii].name) {
|
|
@@ -804,7 +804,7 @@ async function ebusd_ReceiveData() {
|
|
|
804
804
|
|
|
805
805
|
if (subnames[0].includes("scan") ||
|
|
806
806
|
subnames[0].includes("ehp") ||
|
|
807
|
-
(subnames.length>2 && subnames[2].includes("currenterror"))
|
|
807
|
+
(subnames.length > 2 && subnames[2].includes("currenterror"))
|
|
808
808
|
|
|
809
809
|
) {
|
|
810
810
|
bSkip = true;
|
|
@@ -844,19 +844,96 @@ async function ebusd_ReceiveData() {
|
|
|
844
844
|
|
|
845
845
|
adapter.log.info("all http done");
|
|
846
846
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
847
|
+
if (adapter.config.History4Vis2) {
|
|
848
|
+
await UpdateHistory_Vis2(historyvalues, historydates);
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
await UpdateHistory(historyvalues, historydates);
|
|
852
|
+
}
|
|
850
853
|
|
|
851
854
|
}
|
|
852
855
|
catch (e) {
|
|
853
856
|
adapter.log.error("exception in ebusd_ReceiveData [" + e + "]");
|
|
854
857
|
|
|
855
858
|
await adapter.setStateAsync("history.error", { ack: true, val: "exception in receive" });
|
|
859
|
+
|
|
856
860
|
}
|
|
857
861
|
//});
|
|
858
862
|
}
|
|
859
863
|
|
|
864
|
+
async function UpdateHistory_Vis2(values, dates) {
|
|
865
|
+
adapter.log.debug("start history 4 VIS-2 " + JSON.stringify(values) + " " + JSON.stringify(dates));
|
|
866
|
+
|
|
867
|
+
//not used anymore
|
|
868
|
+
await adapter.setStateAsync("history.date", { ack: true, val: "" });
|
|
869
|
+
|
|
870
|
+
for (let s = 0; s < values.length; s++) {
|
|
871
|
+
|
|
872
|
+
const values1 = values[s];
|
|
873
|
+
//adapter.log.debug(s + " " + JSON.stringify(values1));
|
|
874
|
+
|
|
875
|
+
let val2Write = [];
|
|
876
|
+
const ctr = s + 1;
|
|
877
|
+
|
|
878
|
+
const obj = await adapter.getStateAsync("history.value" + ctr);
|
|
879
|
+
|
|
880
|
+
if (obj === null || obj === undefined) {
|
|
881
|
+
adapter.log.warn("history.value" + ctr + " not found, creating DP " + JSON.stringify(obj));
|
|
882
|
+
await adapter.setStateAsync("history.value" + ctr, { ack: true, val: "[]" });
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
val2Write = JSON.parse(obj.val);
|
|
886
|
+
adapter.log.debug("history.value" + ctr + " got " + JSON.stringify(val2Write));
|
|
887
|
+
|
|
888
|
+
for (let ss = 0; ss < values1.length; ss++) {
|
|
889
|
+
const values2 = values1[ss];
|
|
890
|
+
//adapter.log.debug(ss + " " + JSON.stringify(values2));
|
|
891
|
+
|
|
892
|
+
let d = 0;
|
|
893
|
+
|
|
894
|
+
for (const n in values2) {
|
|
895
|
+
|
|
896
|
+
const val = values2[n];
|
|
897
|
+
const time = dates[d]["time"];
|
|
898
|
+
const date = dates[d]["date"];
|
|
899
|
+
d++;
|
|
900
|
+
|
|
901
|
+
const times = time.split(":");
|
|
902
|
+
const datesl = date.split(".");
|
|
903
|
+
|
|
904
|
+
const day = parseInt(datesl[0]);
|
|
905
|
+
const month = parseInt(datesl[1]) - 1;
|
|
906
|
+
const year = parseInt(datesl[2]);
|
|
907
|
+
const hours = parseInt(times[0]);
|
|
908
|
+
const minutes = parseInt(times[1]);
|
|
909
|
+
|
|
910
|
+
const oDate = new Date(year, month, day, hours, minutes, 0, 0);
|
|
911
|
+
|
|
912
|
+
adapter.log.debug(n + " " + val + " " + oDate.toLocaleString());
|
|
913
|
+
|
|
914
|
+
val2Write.push(
|
|
915
|
+
[
|
|
916
|
+
oDate,
|
|
917
|
+
val
|
|
918
|
+
]
|
|
919
|
+
);
|
|
920
|
+
|
|
921
|
+
if (val2Write.length > 200) {
|
|
922
|
+
|
|
923
|
+
for (let i = val2Write.length; i > 200; i--) {
|
|
924
|
+
//adapter.log.debug("delete");
|
|
925
|
+
val2Write.shift();
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
await adapter.setStateAsync("history.value" + ctr, { ack: true, val: JSON.stringify(val2Write) });
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
860
937
|
|
|
861
938
|
|
|
862
939
|
async function UpdateHistory(values, dates) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.ebus",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "ioBroker ebus Adapter",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "René G.",
|
|
@@ -20,39 +20,38 @@
|
|
|
20
20
|
"url": "https://github.com/rg-engineering/ioBroker.ebus"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">= 18"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@iobroker/adapter-core": "3.
|
|
26
|
+
"@iobroker/adapter-core": "3.1.4",
|
|
27
27
|
"flat": "5.0.2",
|
|
28
28
|
"net": "1.0.2",
|
|
29
29
|
"promise-socket": "7.0.0",
|
|
30
|
-
"
|
|
31
|
-
"axios": "1.6.7"
|
|
30
|
+
"axios": "1.7.2"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@alcalzone/release-script": "3.7.0",
|
|
35
34
|
"@alcalzone/release-script-plugin-iobroker": "3.7.0",
|
|
36
35
|
"@alcalzone/release-script-plugin-license": "3.7.0",
|
|
37
|
-
"@iobroker/adapter-dev": "1.
|
|
38
|
-
"@iobroker/testing": "4.1.
|
|
36
|
+
"@iobroker/adapter-dev": "1.3.0",
|
|
37
|
+
"@iobroker/testing": "4.1.3",
|
|
39
38
|
"@types/chai": "4.3.11",
|
|
40
39
|
"@types/chai-as-promised": "7.1.8",
|
|
41
40
|
"@types/gulp": "4.0.17",
|
|
42
41
|
"@types/mocha": "10.0.6",
|
|
43
|
-
"@types/node": "20.
|
|
42
|
+
"@types/node": "20.12.12",
|
|
44
43
|
"@types/proxyquire": "1.3.31",
|
|
45
44
|
"@types/request-promise-native": "1.0.21",
|
|
46
45
|
"@types/sinon": "17.0.3",
|
|
47
46
|
"@types/sinon-chai": "3.2.12",
|
|
48
|
-
"axios": "1.
|
|
47
|
+
"axios": "1.7.2",
|
|
49
48
|
"chai": "4.4.1",
|
|
50
|
-
"chai-as-promised": "7.1.
|
|
51
|
-
"eslint": "
|
|
52
|
-
"gulp": "
|
|
53
|
-
"mocha": "10.
|
|
49
|
+
"chai-as-promised": "7.1.2",
|
|
50
|
+
"eslint": "9.3.0",
|
|
51
|
+
"gulp": "5.0.0",
|
|
52
|
+
"mocha": "10.4.0",
|
|
54
53
|
"proxyquire": "2.1.3",
|
|
55
|
-
"sinon": "
|
|
54
|
+
"sinon": "18.0.0",
|
|
56
55
|
"sinon-chai": "3.7.0"
|
|
57
56
|
},
|
|
58
57
|
"main": "main.js",
|