Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Русский
  3. ioBroker
  4. ioBroker драйвера
  5. Драйвер SQL History

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    21
    1
    928

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.0k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.4k

Драйвер SQL History

Geplant Angeheftet Gesperrt Verschoben ioBroker драйвера
37 Beiträge 13 Kommentatoren 14.4k Aufrufe
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • H Offline
    H Offline
    Haus
    schrieb am zuletzt editiert von
    #10

    @Haba:

    вот как вариант http://forum.iobroker.net/viewtopic.php … 618#p23618 `
    Да пытаюсь, пока вышло подключится трудно без знаний javascript :(

    js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

    admin: 3.6.0

    javascript: 4.1.10

    web: 2.4.1 vis: 1.1.10

    cloud: 2.6.2

    Server: DELL FX170 / linux: Debian 9.5 Stretch

    Adapter: MegaD-2561, Mega-ES…

    1 Antwort Letzte Antwort
    0
    • H Offline
      H Offline
      Haba
      schrieb am zuletzt editiert von
      #11

      Наверное больше не js, а правильно сформировать SQL запрос в базу, чтобы получить искомое :)

      SELECT AVG('имя столбца в таблице с показаниями') FROM 'имя таблицы'

      WHERE 'имя столбца даты и времени' >= date_sub(now(), INTERVAL 1 HOUR);

      попробуй так

      1 Antwort Letzte Antwort
      0
      • J Offline
        J Offline
        jaffa
        schrieb am zuletzt editiert von
        #12

        Из за чего ошибка?

        sql-0 2016-04-17 04:10:21 error Cannot select SELECT id, type FROM iobroker.datapoints WHERE name='megad.0.p7_Свет_1';: Error: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_

        sql-0 2016-04-17 04:10:21 warn Cannot get index of "megad.0.p7_Свет_1": Error: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

        1 Antwort Letzte Antwort
        0
        • I Offline
          I Offline
          instalator
          schrieb am zuletzt editiert von
          #13

          @jaffa:

          Из за чего ошибка?

          sql-0 2016-04-17 04:10:21 error Cannot select SELECT id, type FROM iobroker.datapoints WHERE name='megad.0.p7_Свет_1';: Error: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_

          sql-0 2016-04-17 04:10:21 warn Cannot get index of "megad.0.p7_Свет_1": Error: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' `
          http://stackoverflow.com/questions/1008 … ysql-error

          Высокий уровень Децибел вреден для здоровья!

          http://blog.instalator.ru/

          1 Antwort Letzte Antwort
          0
          • H Offline
            H Offline
            Haus
            schrieb am zuletzt editiert von
            #14

            Почему меняя host: 'localhost' на удалённый host: '192.168.1.10' все равно стучит в localhost ?

            var mysql = require('mysql');
            var connection = mysql.createConnection({
                //host: 'localhost',
                host: '192.168.1.10',
                user: 'root',
                password: '********',
                database: 'demo',
                socketPath: '/var/run/mysqld/mysqld.sock'
            });
            
            //создаем подключение к базе
            connection.connect(function(err) {
                if (err) {
                    log('error connecting: ' + err.stack);
                    return;
                }
                log('connected as id ' + connection.threadId);
            });
            
            function start () {
                connection.query('SELECT (dev_value) AS cur_temp FROM tmp_2 WHERE ContID=6 ORDER BY dev_date DESC LIMIT 3', function(err, res, fields) {
                    if (err) throw err;
                    log('cur_temp: ' + (res[0].cur_temp).toFixed(2));
                    //setState('Heat.cur_temp', (res[0].cur_temp).toFixed(2));
                });
            }
            setInterval ( function () {
                start ();
            },30000 );
            

            PS. закомментировал socketPath: '/var/run/mysqld/mysqld.sock' стал отрабатывать host: '192.168.1.10'.

            js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

            admin: 3.6.0

            javascript: 4.1.10

            web: 2.4.1 vis: 1.1.10

            cloud: 2.6.2

            Server: DELL FX170 / linux: Debian 9.5 Stretch

            Adapter: MegaD-2561, Mega-ES…

            1 Antwort Letzte Antwort
            0
            • L Offline
              L Offline
              Lstt
              schrieb am zuletzt editiert von
              #15

              Сегодня решил попробовать node.js 4.4.3, получаю в логе:

              sql.0	2016-04-27 09:29:07	error	sql.0 TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:28:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:28:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:27:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:27:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:26:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:26:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              admin-1	2016-04-27 09:25:56	info	successful connection to socket.io from ::ffff:XXX.YYY.169.102
              sql-0	2016-04-27 09:25:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
              sql-0	2016-04-27 09:25:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function 
              
              
              1 Antwort Letzte Antwort
              0
              • BluefoxB Offline
                BluefoxB Offline
                Bluefox
                schrieb am zuletzt editiert von
                #16

                @Lstt:

                Сегодня решил попробовать node.js 4.4.3, получаю в логе:

                sql.0	2016-04-27 09:29:07	error	sql.0 TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:28:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:28:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:27:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:27:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:26:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:26:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                admin-1	2016-04-27 09:25:56	info	successful connection to socket.io from ::ffff:XXX.YYY.169.102
                sql-0	2016-04-27 09:25:37	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function
                sql-0	2016-04-27 09:25:07	error	TypeError: SQL[(clients[adapter.config.dbtype].name + "Pool")] is not a function 
                
                ```` `  
                

                А какой dbtype у тебя?

                1 Antwort Letzte Antwort
                0
                • L Offline
                  L Offline
                  Lstt
                  schrieb am zuletzt editiert von
                  #17

                  Самый простой, без заморочек, SQLite3. Всё остальное, пока для меня сложно..

                  1 Antwort Letzte Antwort
                  0
                  • BluefoxB Offline
                    BluefoxB Offline
                    Bluefox
                    schrieb am zuletzt editiert von
                    #18

                    @Lstt:

                    Самый простой, без заморочек, SQLite3. Всё остальное, пока для меня сложно.. `
                    К счастью я смог воспроизвести ошибку.

                    При смене версий ноды нужно пересобирать все бинарные пакеты. И sqlite это один из них.

                    Лечится просто:

                    cd ...iobrokerDirectory
                    iobroker stop sql
                    cd node_modules/iobroker.sql
                    npm update --production
                    cd ..\..
                    iobroker start sql
                    
                    
                    1 Antwort Letzte Antwort
                    0
                    • E Offline
                      E Offline
                      electric
                      schrieb am zuletzt editiert von
                      #19

                      Система armbian плата cubietruck.

                      Ошибка при установки драйвера:
                      1238_pic_198.jpg

                      1 Antwort Letzte Antwort
                      0
                      • S Offline
                        S Offline
                        spectrekr
                        schrieb am zuletzt editiert von
                        #20

                        Это не ошибка, если подождать подольше, то он начинает компилировать базу sqlite, процесс очень затягивается, может несколько минут длится.

                        1 Antwort Letzte Antwort
                        0
                        • E Offline
                          E Offline
                          electric
                          schrieb am zuletzt editiert von
                          #21

                          @spectrekr:

                          Это не ошибка, если подождать подольше, то он начинает компилировать базу sqlite, процесс очень затягивается, может несколько минут длится. `
                          Спасибо! Да, подождал, установилось…

                          1 Antwort Letzte Antwort
                          0
                          • I Offline
                            I Offline
                            instalator
                            schrieb am zuletzt editiert von
                            #22

                            Настроил сегодня MySQL .

                            В логе есть такие ошибки:

                            ! ````
                            sql.0 2016-11-20 20:37:19.752 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(93, 1479649029728, ''''''off'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:19.410 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(74, 1479649029399, ''''''hdmi1'''''', 0, 2, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hdmi1'''''', 0, 2, 0)' at line 1
                            sql.0 2016-11-20 20:37:19.188 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(108, 1479649029176, ''''''off'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:16.136 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(133, 1479649026114, ''''''*pow=off '''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:13.316 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(71, 1479649023305, ''''''cool'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cool'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:07.716 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(149, 1479649017635, ''''''OK'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OK'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:07.248 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(113, 1479649017231, ''''''off'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:02.142 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(105, 1479649012081, ''''''*pow=off '''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:37:00.944 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(80, 1479649010933, ''''''0B'''''', 0, 3, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0B'''''', 0, 3, 0)' at line 1
                            sql.0 2016-11-20 20:36:59.489 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(50, 1479649009472, ''''''off'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:36:59.245 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(36, 1479649009233, ''''''01R240G3B0'''''', 0, 2, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '01R240G3B0'''''', 0, 2, 0)' at line 1
                            sql.0 2016-11-20 20:36:58.558 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(118, 1479649008542, ''''''phone'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'phone'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:36:57.851 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(143, 1479649007841, ''''''min'''''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'min'''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:36:35.858 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(46, 1479648985848, ''myhome-RS232,myhome-NRF,myhome-Bathroom,myhome-kitchen,myhome-bedroom,myhome-Mother,myhome-Conditioner,myhome-BENQ,myhome-Guestroom,myhome-Audio_Amplifier,myhome-Lighting'', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'myhome-RS232,myhome-NRF,myhome-Bathroom,myhome-kitchen,myhome-bedroom,myhome-Mot' at line 1
                            mqtt.0 2016-11-20 20:35:25.866 info mqtt.0 Client [phone] closed
                            mqtt.0 2016-11-20 20:35:25.858 info mqtt.0 Client [phone] disconnected
                            sql.0 2016-11-20 20:35:19.719 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(93, 1479648909707, ''''off'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:19.411 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(74, 1479648909397, ''''hdmi1'''', 0, 2, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hdmi1'''', 0, 2, 0)' at line 1
                            sql.0 2016-11-20 20:35:19.186 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(108, 1479648909174, ''''off'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:16.122 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(133, 1479648906111, ''''*pow=off '''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:13.312 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(71, 1479648903301, ''''cool'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cool'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:07.642 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(149, 1479648897631, ''''OK'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OK'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:07.220 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(113, 1479648897209, ''''off'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:02.090 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(105, 1479648892079, ''''*pow=off '''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:35:00.945 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(80, 1479648890930, ''''0B'''', 0, 3, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0B'''', 0, 3, 0)' at line 1
                            sql.0 2016-11-20 20:34:59.475 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(50, 1479648889463, ''''off'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:34:59.136 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(36, 1479648889124, ''''01R240G3B0'''', 0, 2, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '01R240G3B0'''', 0, 2, 0)' at line 1
                            sql.0 2016-11-20 20:34:58.556 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(118, 1479648888540, ''''phone'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'phone'''', 1, 1, 0)' at line 1
                            sql.0 2016-11-20 20:34:57.850 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(143, 1479648887839, ''''min'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'min'''', 1, 1, 0)' at line 1
                            mqtt.0 2016-11-20 20:34:49.108 info mqtt.0 Client [phone] connected

                            Каждый раз при новой ошибке в переменной добавляются кавычки.
                            [266_______.png](/assets/uploads/files/266_______.png)
                            [266______.png](/assets/uploads/files/266______.png)

                            Высокий уровень Децибел вреден для здоровья!

                            http://blog.instalator.ru/

                            1 Antwort Letzte Antwort
                            0
                            • BluefoxB Offline
                              BluefoxB Offline
                              Bluefox
                              schrieb am zuletzt editiert von
                              #23

                              Включи дебаг и посмотри как выглядят команды

                              1 Antwort Letzte Antwort
                              0
                              • I Offline
                                I Offline
                                instalator
                                schrieb am zuletzt editiert von
                                #24

                                @Bluefox:

                                Включи дебаг и посмотри как выглядят команды `

                                ! ````
                                sql.0 2016-11-20 21:07:17.589 error Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(36, 1479650837572, ''01R240G3B0'', 0, 4, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the m
                                inMem 2016-11-20 21:07:17.576 debug message * kodi.1.playing_time val=06-37-17, ack=true, ts=1479650837485, q=0, from=system.adapter.kodi.1, lc=1479650837485
                                sql.0 2016-11-20 21:07:17.573 debug INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(36, 1479650837572, ''01R240G3B0'', 0, 4, 0);

                                
                                >! ````
                                sql.0	2016-11-20 21:08:37.649	error	Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(36, 1479650917641, ''''''01R240G3B0'''''', 0, 4, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; che
                                sql.0	2016-11-20 21:08:37.642	debug	INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(36, 1479650917641, ''''''01R240G3B0'''''', 0, 4, 0);
                                sql.0	2016-11-20 21:08:37.641	debug	timed-relog mqtt.0.myhome.test.test, value='''''01R240G3B0''''', lastLogTime=1479650907639, ts=1479650917641
                                

                                Высокий уровень Децибел вреден для здоровья!

                                http://blog.instalator.ru/

                                1 Antwort Letzte Antwort
                                0
                                • BluefoxB Offline
                                  BluefoxB Offline
                                  Bluefox
                                  schrieb am zuletzt editiert von
                                  #25

                                  Поменяй строку 28 в lib/mysql.js на

                                      if (db === "ts_string") state.val = "'" + state.val.replace(/'/g, '\\\'') + "'";
                                  

                                  Лучше?

                                  1 Antwort Letzte Antwort
                                  0
                                  • I Offline
                                    I Offline
                                    instalator
                                    schrieb am zuletzt editiert von
                                    #26

                                    @Bluefox:

                                    Поменяй строку 28 в lib/mysql.js на

                                        if (db === "ts_string") state.val = "'" + state.val.replace(/'/g, '\\\'') + "'";
                                    

                                    Лучше? `
                                    Меньше но проскакивает:

                                    ! ````
                                    sql.0 2016-11-21 19:17:18.410 debug sql.0 INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(143, 1479730628288, ''''min'''', 1, 1, 0);
                                    sql.0 2016-11-21 19:17:18.574 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(143, 1479730628288, ''''min'''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'min'''', 1, 1, 0)' at line 1

                                    
                                    PS. Не меньбше, так же.
                                    
                                    Но не на все объекты ругается

                                    Высокий уровень Децибел вреден для здоровья!

                                    http://blog.instalator.ru/

                                    1 Antwort Letzte Antwort
                                    0
                                    • I Offline
                                      I Offline
                                      instalator
                                      schrieb am zuletzt editiert von
                                      #27

                                      Ядрёнбатон….головастена

                                      Я извиняюсь, поправил не тот файл (изменил mSsql.js).

                                      Теперь вот как выдает:

                                      ! ````
                                      sql.0 2016-11-21 20:50:19.359 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(108, 1479736209339, ''\'off\''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off\''', 1, 1, 0)' at line 1
                                      sql.0 2016-11-21 20:50:16.940 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(93, 1479736206928, ''\'off\''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off\''', 1, 1, 0)' at line 1
                                      sql.0 2016-11-21 20:50:14.965 error sql.0 Cannot insert INSERT INTO iobroker.ts_string (id, ts, val, ack, _from, q) VALUES(50, 1479736204944, ''\'off\''', 1, 1, 0);: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'off\''', 1, 1, 0)' at line 1

                                      Первая запись после рестарта драйвера нормальная, потом с каждой записью добавляет кавычки. SQL настроен на Запись неизменённых значений каждые n секунд.
                                      [266_234234344444.png](/assets/uploads/files/266_234234344444.png)
                                      [266______2222.png](/assets/uploads/files/266______2222.png)

                                      Высокий уровень Децибел вреден для здоровья!

                                      http://blog.instalator.ru/

                                      1 Antwort Letzte Antwort
                                      0
                                      • H Offline
                                        H Offline
                                        Haus
                                        schrieb am zuletzt editiert von
                                        #28

                                        DB Type MySQL

                                        При обновление 1.3.2

                                        sql.0	2016-11-22 11:14:50.503	info	sql.0 enabled logging of system.adapter.admin.0.memRss
                                        sql.0	2016-11-22 11:14:50.474	info	sql.0 Connected to mysql
                                        sql.0	2016-11-22 11:14:50.187	info	sql.0 starting. Version 1.3.2 in /opt/iobroker/node_modules/iobroker.sql, node: v4.6.1
                                        Server-PC	2016-11-22 11:14:45.249	info	iobroker npm install --production --prefix "/opt/iobroker/node_modules/iobroker.sql" (System call)
                                        Server-PC	2016-11-22 11:14:45.121	info	host.Server-PC instance system.adapter.sql.0 started with pid 26337
                                        Server-PC	2016-11-22 11:14:45.120	info	host.Server-PC "system.adapter.sql.0" enabled
                                        Server-PC	2016-11-22 11:14:45.119	info	host.Server-PC object change system.adapter.sql.0
                                        Server-PC	2016-11-22 11:14:45.064	info	iobroker host.Server-PC Adapter "system.adapter.sql.0" is started
                                        Server-PC	2016-11-22 11:14:44.613	info	iobroker npm WARN unmet dependency which is version 2.3.0
                                        Server-PC	2016-11-22 11:14:44.605	info	iobroker npm WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar-pack requires debug@'~2.2.0' but
                                        Server-PC	2016-11-22 11:14:10.353	info	iobroker ../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginReset(node_sqlite3::Statement::Baton*)’:../src/macros.h:125:9: warning: unused variable ‘status’
                                        Server-PC	2016-11-22 11:14:10.316	info	iobroker ../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginEach(node_sqlite3::Statement::Baton*)’:../src/macros.h:125:9: warning: unused variable ‘status’
                                        Server-PC	2016-11-22 11:14:10.277	info	iobroker ../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginAll(node_sqlite3::Statement::Baton*)’:../src/macros.h:125:9: warning: unused variable ‘status’ [
                                        Server-PC	2016-11-22 11:14:10.257	info	iobroker ../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginRun(node_sqlite3::Statement::Baton*)’:../src/macros.h:125:9: warning: unused variable ‘status’ [
                                        Server-PC	2016-11-22 11:14:10.241	info	iobroker ../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginGet(node_sqlite3::Statement::Baton*)’:../src/macros.h:125:9: warning: unused variable ‘status’ [
                                        Server-PC	2016-11-22 11:14:10.230	info	iobroker In file included from ../src/statement.cc:6:0:../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginBind(node_sqlite3::Statement::Baton*)’: ../src/mac
                                        Server-PC	2016-11-22 11:14:10.200	info	iobroker ../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginPrepare(node_sqlite3::Database::Baton*)’:../src/statement.cc:118:9: warning: unused variable ‘st
                                        Server-PC	2016-11-22 11:13:49.579	info	iobroker ../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginLoadExtension(node_sqlite3::Database::Baton*)’:../src/database.cc:625:9: warning: unused variable
                                        Server-PC	2016-11-22 11:13:49.554	info	iobroker ../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginExec(node_sqlite3::Database::Baton*)’:../src/database.cc:525:9: warning: unused variable ‘status’
                                        Server-PC	2016-11-22 11:13:49.405	info	iobroker ../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginClose(node_sqlite3::Database::Baton*)’:../src/database.cc:230:9: warning: unused variable ‘status’
                                        Server-PC	2016-11-22 11:13:49.383	info	iobroker ../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginOpen(node_sqlite3::Database::Baton*)’:../src/database.cc:144:9: warning: unused variable ‘status’
                                        iobroker	2016-11-22 11:09:48.369	info	ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v46-linux-ia32.tar.gz node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@4.6.1 (no
                                        iobroker	2016-11-22 11:09:48.361	info	node-pre-gyp
                                        iobroker	2016-11-22 11:09:23.368	info	WARN deprecated node-uuid@1.4.7: use uuid module instead
                                        iobroker	2016-11-22 11:09:23.362	info	npm
                                        host.Server-PC	2016-11-22 11:09:07.520	info	instance system.adapter.sql.0 terminated with code 0 (OK)
                                        iobroker	2016-11-22 11:09:07.459	info	npm install iobroker.sql --production --prefix "/opt/iobroker" (System call)
                                        host.Server-PC	2016-11-22 11:09:07.389	info	stopInstance system.adapter.sql.0 killing pid 1915
                                        host.Server-PC	2016-11-22 11:09:07.388	info	stopInstance system.adapter.sql.0
                                        host.Server-PC	2016-11-22 11:09:07.386	info	"system.adapter.sql.0" disabled
                                        host.Server-PC	2016-11-22 11:09:07.385	info	object change system.adapter.sql.0
                                        iobroker	2016-11-22 11:09:07.352	info	host.Server-PC Adapter "system.adapter.sql.0" is stopped.
                                        iobroker	2016-11-22 11:09:05.298	info	upgrade sql
                                        

                                        js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                                        admin: 3.6.0

                                        javascript: 4.1.10

                                        web: 2.4.1 vis: 1.1.10

                                        cloud: 2.6.2

                                        Server: DELL FX170 / linux: Debian 9.5 Stretch

                                        Adapter: MegaD-2561, Mega-ES…

                                        1 Antwort Letzte Antwort
                                        0
                                        • BluefoxB Offline
                                          BluefoxB Offline
                                          Bluefox
                                          schrieb am zuletzt editiert von
                                          #29

                                          Работает же.

                                          1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          819

                                          Online

                                          32.5k

                                          Benutzer

                                          81.6k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe