Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Adapter SQL - Einstellungen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Adapter SQL - Einstellungen

    This topic has been deleted. Only users with topic management privileges can see it.
    • Issi
      Issi Developer @apollon77 last edited by Issi

      @apollon77 sagte in Adapter SQL - Einstellungen:

      Das log sieht so aus als ob da keine Debounce-Zeit gesetzt ist. Starte bitte mal den Adapter neu. Im Code sieht generell alles ok aus. Sonst muss ich da mal ganz tief reinschauen. Ggf bitte mal ein GitHub Issue anlegen.

      nach dem neustart läuft es wie es soll hab dan nur die Storage Vorhaltezeit von 2 Jaren auf 1 Jahr geändert und er fängt dan die werte aufzeichnen
      hab ein test system eingerichtet und mal das ganze log vom start und die änderung der Storage Vorhaltezeit und bis er anfängt die werte aufzeichnen geholt.

      2019-05-29 23:25:30.241  - info: sql.0 Connected to mysql
      2019-05-29 23:25:30.242  - debug: sql.0 SELECT id, type, name FROM `IoBroker`.datapoints;
      2019-05-29 23:25:30.256  - debug: sql.0 SELECT id, name FROM `IoBroker`.sources;
      2019-05-29 23:25:30.267  - debug: sql.0 Found Alias: Mein_TV.0.Vis_Zahl --> Test
      2019-05-29 23:25:30.268  - info: sql.0 enabled logging of Test, Alias=true, 1 points now activated
      2019-05-29 23:25:30.275  - debug: sql.0 Initialization done
      2019-05-29 23:25:34.488  - debug: sql.0 objectDB connected
      2019-05-29 23:25:34.521  - debug: sql.0 statesDB connected
      2019-05-29 23:25:34.636  - info: sql.0 starting. Version 1.9.5 in /opt/iobroker/node_modules/iobroker.sql, node: v8.15.1
      2019-05-29 23:25:34.745  - debug: sql.0 CREATE DATABASE `IoBroker` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
      2019-05-29 23:25:34.751  - debug: sql.0 Response: {"code":"ER_DB_CREATE_EXISTS","errno":1007,"sqlMessage":"Can't create database 'IoBroker'; database exists","sqlState":"HY000","index":0,"sql":"CREATE DATABASE `IoBroker` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"}
      2019-05-29 23:25:34.760  - debug: sql.0 CREATE TABLE `IoBroker`.sources    (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, name TEXT);
      2019-05-29 23:25:34.763  - debug: sql.0 Response: {"code":"ER_TABLE_EXISTS_ERROR","errno":1050,"sqlMessage":"Table 'sources' already exists","sqlState":"42S01","index":0,"sql":"CREATE TABLE `IoBroker`.sources    (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, name TEXT);"}
      2019-05-29 23:25:34.766  - debug: sql.0 CREATE TABLE `IoBroker`.datapoints (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, name TEXT, type INTEGER);
      2019-05-29 23:25:34.768  - debug: sql.0 Response: {"code":"ER_TABLE_EXISTS_ERROR","errno":1050,"sqlMessage":"Table 'datapoints' already exists","sqlState":"42S01","index":0,"sql":"CREATE TABLE `IoBroker`.datapoints (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, name TEXT, type INTEGER);"}
      2019-05-29 23:25:34.772  - debug: sql.0 CREATE TABLE `IoBroker`.ts_number  (id INTEGER, ts BIGINT, val REAL,    ack BOOLEAN, _from INTEGER, q INTEGER, PRIMARY KEY(id, ts));
      2019-05-29 23:25:34.773  - debug: sql.0 Response: {"code":"ER_TABLE_EXISTS_ERROR","errno":1050,"sqlMessage":"Table 'ts_number' already exists","sqlState":"42S01","index":0,"sql":"CREATE TABLE `IoBroker`.ts_number  (id INTEGER, ts BIGINT, val REAL,    ack BOOLEAN, _from INTEGER, q INTEGER, PRIMARY KEY(id, ts));"}
      2019-05-29 23:25:34.777  - debug: sql.0 CREATE TABLE `IoBroker`.ts_string  (id INTEGER, ts BIGINT, val TEXT,    ack BOOLEAN, _from INTEGER, q INTEGER, PRIMARY KEY(id, ts));
      2019-05-29 23:25:34.778  - debug: sql.0 Response: {"code":"ER_TABLE_EXISTS_ERROR","errno":1050,"sqlMessage":"Table 'ts_string' already exists","sqlState":"42S01","index":0,"sql":"CREATE TABLE `IoBroker`.ts_string  (id INTEGER, ts BIGINT, val TEXT,    ack BOOLEAN, _from INTEGER, q INTEGER, PRIMARY KEY(id, ts));"}
      2019-05-29 23:25:34.782  - debug: sql.0 CREATE TABLE `IoBroker`.ts_bool    (id INTEGER, ts BIGINT, val BOOLEAN, ack BOOLEAN, _from INTEGER, q INTEGER, PRIMARY KEY(id, ts));
      2019-05-29 23:25:34.784  - debug: sql.0 Response: {"code":"ER_TABLE_EXISTS_ERROR","errno":1050,"sqlMessage":"Table 'ts_bool' already exists","sqlState":"42S01","index":0,"sql":"CREATE TABLE `IoBroker`.ts_bool    (id INTEGER, ts BIGINT, val BOOLEAN, ack BOOLEAN, _from INTEGER, q INTEGER, PRIMARY KEY(id, ts));"}
      2019-05-29 23:25:34.784  - info: sql.0 Connected to mysql
      2019-05-29 23:25:34.785  - debug: sql.0 SELECT id, type, name FROM `IoBroker`.datapoints;
      2019-05-29 23:25:34.797  - debug: sql.0 SELECT id, name FROM `IoBroker`.sources;
      2019-05-29 23:25:34.808  - debug: sql.0 Found Alias: Mein_TV.0.Vis_Zahl --> Test
      2019-05-29 23:25:34.808  - info: sql.0 enabled logging of Test, Alias=true, 1 points now activated
      2019-05-29 23:25:34.816  - debug: sql.0 Initialization done
      2019-05-29 23:25:35.029  - debug: sql.0 For getHistory for id Test: Type empty, use dbtype 0
      2019-05-29 23:25:35.030  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172342751 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:35.031  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172342751 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:35.044  - debug: sql.0 Send: 50 of: 50 in: 16ms
      2019-05-29 23:25:35.045  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:25:40.007  - debug: sql.0 new value received for Test, new-value=87, ts=1559172340005, relog=false
      2019-05-29 23:25:46.593  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172354328 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:46.593  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172354328 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:46.601  - debug: sql.0 Send: 50 of: 50 in: 8ms
      2019-05-29 23:25:46.601  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:25:50.003  - debug: sql.0 new value received for Test, new-value=88, ts=1559172350002, relog=false
      2019-05-29 23:25:55.615  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172363343 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:55.615  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172363343 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:55.629  - debug: sql.0 Send: 50 of: 50 in: 14ms
      2019-05-29 23:25:55.629  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:25:56.409  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172364145 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:56.409  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172364145 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:25:56.418  - debug: sql.0 Send: 50 of: 50 in: 9ms
      2019-05-29 23:25:56.418  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:00.004  - debug: sql.0 new value received for Test, new-value=89, ts=1559172360002, relog=false
      2019-05-29 23:26:04.687  - debug: sql.0 Registered Alias: Mein_TV.0.Vis_Zahl --> Test
      2019-05-29 23:26:04.687  - debug: sql.0 remembered Index/Type 94 / 0
      2019-05-29 23:26:04.688  - info: sql.0 enabled logging of Test, Alias=true
      2019-05-29 23:26:05.015  - debug: sql.0 For getHistory for id Test: Type empty, use dbtype 0
      2019-05-29 23:26:05.015  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172372751 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:05.015  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172372751 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:05.024  - debug: sql.0 Send: 50 of: 50 in: 9ms
      2019-05-29 23:26:05.024  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:08.492  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172376229 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:08.493  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172376229 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:08.501  - debug: sql.0 Send: 50 of: 50 in: 9ms
      2019-05-29 23:26:08.501  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:10.005  - debug: sql.0 new value received for Test, new-value=90, ts=1559172370003, relog=false
      2019-05-29 23:26:15.017  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172382753 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:15.017  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172382753 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:15.026  - debug: sql.0 Send: 50 of: 50 in: 9ms
      2019-05-29 23:26:15.027  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:20.005  - debug: sql.0 new value received for Test, new-value=91, ts=1559172380003, relog=false
      2019-05-29 23:26:20.006  - debug: sql.0 Datatype Test: Currently: number, StorageType: false
      2019-05-29 23:26:20.008  - debug: sql.0 INSERT INTO `IoBroker`.ts_number (id, ts, val, ack, _from, q) VALUES(94, 1559172380003, 91, 1, 2, 0);
      2019-05-29 23:26:20.016  - debug: sql.0 DELETE FROM `IoBroker`.ts_number WHERE id=94 AND ts < 1527636360016;
      2019-05-29 23:26:25.025  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172392761 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:25.025  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172392761 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:25.034  - debug: sql.0 Send: 50 of: 50 in: 10ms
      2019-05-29 23:26:25.034  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:30.004  - debug: sql.0 new value received for Test, new-value=92, ts=1559172390002, relog=false
      2019-05-29 23:26:36.608  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172404344 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:36.609  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172404344 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:36.618  - debug: sql.0 Send: 50 of: 50 in: 10ms
      2019-05-29 23:26:36.618  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:40.005  - debug: sql.0 new value received for Test, new-value=93, ts=1559172400002, relog=false
      2019-05-29 23:26:40.005  - debug: sql.0 Datatype Test: Currently: number, StorageType: false
      2019-05-29 23:26:40.006  - debug: sql.0 INSERT INTO `IoBroker`.ts_number (id, ts, val, ack, _from, q) VALUES(94, 1559172400002, 93, 1, 2, 0);
      2019-05-29 23:26:46.017  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172413753 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:46.017  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172413753 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:46.027  - debug: sql.0 Send: 50 of: 50 in: 10ms
      2019-05-29 23:26:46.027  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:48.173  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172415910 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:48.173  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172415910 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:48.179  - debug: sql.0 Send: 50 of: 50 in: 6ms
      2019-05-29 23:26:48.179  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:26:50.004  - debug: sql.0 new value received for Test, new-value=94, ts=1559172410002, relog=false
      2019-05-29 23:26:55.013  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172422750 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:55.014  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172422750 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:26:55.020  - debug: sql.0 Send: 50 of: 50 in: 7ms
      2019-05-29 23:26:55.020  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:27:00.006  - debug: sql.0 new value received for Test, new-value=95, ts=1559172420002, relog=false
      2019-05-29 23:27:00.006  - debug: sql.0 Datatype Test: Currently: number, StorageType: false
      2019-05-29 23:27:00.006  - debug: sql.0 INSERT INTO `IoBroker`.ts_number (id, ts, val, ack, _from, q) VALUES(94, 1559172420002, 95, 1, 2, 0);
      2019-05-29 23:27:05.013  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172432750 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:27:05.014  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172432750 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:27:05.020  - debug: sql.0 Send: 50 of: 50 in: 7ms
      2019-05-29 23:27:05.020  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:27:10.004  - debug: sql.0 new value received for Test, new-value=96, ts=1559172430002, relog=false
      2019-05-29 23:27:15.018  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172442755 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:27:15.019  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172442755 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:27:15.026  - debug: sql.0 Send: 50 of: 50 in: 8ms
      2019-05-29 23:27:15.026  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:27:20.006  - debug: sql.0 Datatype Test: Currently: number, StorageType: false
      2019-05-29 23:27:20.007  - debug: sql.0 INSERT INTO `IoBroker`.ts_number (id, ts, val, ack, _from, q) VALUES(94, 1559172430002, 96, 1, 2, 0);
      2019-05-29 23:27:20.011  - debug: sql.0 new value received for Test, new-value=97, ts=1559172440010, relog=false
      2019-05-29 23:27:25.036  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172452772 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:27:25.036  - debug: sql.0 SELECT ts, val, ack, `IoBroker`.sources.name as 'from', q FROM `IoBroker`.ts_number INNER JOIN `IoBroker`.sources ON `IoBroker`.sources.id=`IoBroker`.ts_number._from WHERE  `IoBroker`.ts_number.id=94 AND `IoBroker`.ts_number.ts < 1559172452772 ORDER BY ts DESC LIMIT 50;
      2019-05-29 23:27:25.043  - debug: sql.0 Send: 50 of: 50 in: 7ms
      2019-05-29 23:27:25.043  - debug: sql.0 sendTo "getHistory" to system.adapter.admin.0 from system.adapter.sql.0
      2019-05-29 23:27:30.004  - debug: sql.0 new value received for Test, new-value=98, ts=1559172450002, relog=false
      2019-05-29 23:27:30.005  - debug: sql.0 Datatype Test: Currently: number, StorageType: false
      2019-05-29 23:27:30.005  - debug: sql.0 INSERT INTO `IoBroker`.ts_number (id, ts, val, ack, _from, q) VALUES(94, 1559172450002, 98, 1, 2, 0);
      
      
      

      edit: hatte das falsche log drin jetzt ist das richtige drin

      1 Reply Last reply Reply Quote 0
      • apollon77
        apollon77 last edited by

        Interessant, dann scheint es wohl ein Bug zu sein wenn sich die Einstellungen eines OBjects während der laufzeit ändern. Dann weiss ich aber wo ich exakt schauen kann. Machst Du mir bitte dazu und vllt mit Link hierher ein GitHub Issue bitte auf? Danke

        Issi 1 Reply Last reply Reply Quote 0
        • Issi
          Issi Developer @apollon77 last edited by

          @apollon77 sagte in Adapter SQL - Einstellungen:

          Interessant, dann scheint es wohl ein Bug zu sein wenn sich die Einstellungen eines OBjects während der laufzeit ändern. Dann weiss ich aber wo ich exakt schauen kann. Machst Du mir bitte dazu und vllt mit Link hierher ein GitHub Issue bitte auf? Danke

          Issue ist erstellt
          Issue

          1 Reply Last reply Reply Quote 0
          • apollon77
            apollon77 last edited by

            Danke. Kannst du das bitte mal bei History checken ob es da auch do ist? Danke

            Issi 1 Reply Last reply Reply Quote 0
            • Issi
              Issi Developer @apollon77 last edited by

              @apollon77 sagte in Adapter SQL - Einstellungen:

              Danke. Kannst du das bitte mal bei History checken ob es da auch do ist? Danke

              beim History-Adapter ist es anscheint nicht der fall hab mehrmal einstellungen geändert und er logt nichts so wie es sein soll.

              1 Reply Last reply Reply Quote 0
              • apollon77
                apollon77 last edited by

                Was meinst Du genau damit?

                Issi paul53 2 Replies Last reply Reply Quote 0
                • Issi
                  Issi Developer @apollon77 last edited by

                  @apollon77 sagte in Adapter SQL - Einstellungen:

                  Was meinst Du genau damit?

                  wenn du damit mich meinst hab die selben einstelungen bei History-Adapter probirt und dan Storage Vorhaltezeit gewechselt während der laufzeit und er hat nicht angefangen zu logen so wie der SQL adapter

                  1 Reply Last reply Reply Quote 0
                  • paul53
                    paul53 @apollon77 last edited by

                    @apollon77 sagte am 13.4.2017:

                    Wenn innerhalb der Entprellzeit ein neuer Wert kommt, gilt der letzte Wert als "Nicht stabil" und die Entprellzeit wird für den neuen Wert neugestartet.

                    Der Neustart bei jeder Änderung erfolgt im History-Adapter, nicht aber im SQL-Adapter. Im SQL-Adapter läuft der Timer / Zähler weiter und gibt nach Zeitablauf wieder frei.

                    1 Reply Last reply Reply Quote 0
                    • apollon77
                      apollon77 last edited by

                      ok. AUch eine wichtige Info. Also es geht alles korrekt bei history, aber sql nicht

                      paul53 1 Reply Last reply Reply Quote 0
                      • paul53
                        paul53 @apollon77 last edited by

                        @apollon77 Schau Dir mal die Änderung vom 10.Oktober 2018 an:

                                if (timeoutTriggered) sqlDPs[_id].timeout = null;
                        
                        1 Reply Last reply Reply Quote 0
                        • apollon77
                          apollon77 last edited by

                          Das ist egal. wenn ein Timeout gesetzt ist dann läuft der auch wenn man da "null" setzt. Da geht es nur um korrekte Werte.

                          Meine Vermutung geht eher dahin das bei einem Object change die Werte ncht sauber korrekt eu initsialisiert werden und damit debounce vllt gar nicht gesetzt ist oder so

                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @apollon77 last edited by paul53

                            @apollon77 sagte:

                            wenn ein Timeout gesetzt ist dann läuft der auch wenn man da "null" setzt.

                            Ja, aber clearTimeout() wird vor setTimeout() nicht mehr ausgeführt.

                                        if (sqlDPs[id].timeout) clearTimeout(sqlDPs[id].timeout);
                            

                            Wann ist diese Bedingung erfüllt ?

                            if (_settings) {
                            
                            apollon77 1 Reply Last reply Reply Quote 0
                            • apollon77
                              apollon77 @paul53 last edited by

                              @paul53 zu 1.) ja, würde maximal dazu führen das zwei Timer laufen. Daher die obige Änderung weil sonst fälschlicherweise Timer vergessen wurden weil immer auf "null" gesetzt wurde auch wenn es direkt aufgerufen wurde.

                              zu 2.) Sobald das "eine Wert" hat (also !== null && !== undefined && !==false) .. in dem Fall ist es dann ein Objekt

                              paul53 1 Reply Last reply Reply Quote 0
                              • paul53
                                paul53 @apollon77 last edited by

                                @apollon77 sagte:

                                zu 2.)

                                Das ist mir klar, aber was ist der Inhalt von ?

                                    var _settings = sqlDPs[_id][adapter.namespace];
                                
                                1 Reply Last reply Reply Quote 0
                                • apollon77
                                  apollon77 last edited by

                                  Das sind die Datenpunkt Spezifischen Einstellungen der sql Instanz. also das im Objekt unter common.custom["sql.0"]

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    dtp last edited by

                                    Vielleicht darf ich mich hier mal ranhängen, obwohl ich ein etwas anderes Problem mit dem SQL-Adapter habe.

                                    Ich beschreibe mit dem Adapter eine mariaDB-10-Datenbank auf meiner DiskStation. Kürzlich habe ich nun wegen Umstellung auf einen anderen Docker-Container (über Portainer mit MACVLAN) die IP-Adresse meines ioBroker ändern müssen. Die IP der mariaDB-10-Datenbank blieb gleich. Mir wird auch ein OK im SQL-Adapter angezeigt, wenn ich die Verbindung zur Datenbank überprüfe. Mein Problem ist aber, dass seit der Umstellung keine Datenpunkte mehr geloggt werden. Einmalig nach dem Neustart wird zwar ein neuer Wert geschrieben, aber das war's dann auch. Danach passiert nichts mehr. Nun muss ich wohl die komplette ioBroker-Datenbank unter phpMyAdmin löschen und neu anlegen.

                                    Ist das Verhalten bekannt? Handelt es sich ggf. um einen Bug?

                                    1 Reply Last reply Reply Quote 0
                                    • apollon77
                                      apollon77 last edited by

                                      Also wenn beim test ok kommt hat er Zugriff; ebenso wenn er einen Wert schreibt. Von daher sollte alles passen und es ist kein Bug bekannt der soetwas allein verursachen würde.
                                      Im Log irgendwas hilfreiches? Debug Log? Das sagt an sich auch einiges ob und wann und warum ggf nicht etwas geloggt wird.

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        dtp last edited by

                                        @apollon77: Das Problem scheint nicht der SQL-Adapter zu sein, sondern es scheint an den hm-rpc-Instanzen zu liegen, die ihre Zustände nicht aktualisieren. Hat sich also vorerst erledigt. Danke trotzdem für die schnelle Reaktion.

                                        Gruß,

                                        Thorsten

                                        1 Reply Last reply Reply Quote 1
                                        • apollon77
                                          apollon77 last edited by

                                          Dann schau mal da da die "Callback Adresse" im Adapter korrekt eingestellt und der Port durchgeschleift wird!

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate
                                          FAQ Cloud / IOT
                                          HowTo: Node.js-Update
                                          HowTo: Backup/Restore
                                          Downloads
                                          BLOG

                                          483
                                          Online

                                          31.9k
                                          Users

                                          80.2k
                                          Topics

                                          1.3m
                                          Posts

                                          adapter sql
                                          5
                                          33
                                          2875
                                          Loading More Posts
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                          The ioBroker Community 2014-2023
                                          logo