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

  1. ioBroker Community Home
  2. Deutsch
  3. Tester
  4. History2DB converter

NEWS

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

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

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.2k

History2DB converter

Geplant Angeheftet Gesperrt Verschoben Tester
60 Beiträge 14 Kommentatoren 10.4k Aufrufe 13 Watching
  • Ä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.
  • apollon77A Online
    apollon77A Online
    apollon77
    schrieb am zuletzt editiert von
    #3

    Update: History-Adapter und SQL-Adapter vom Github nehmen und dann gibt unter https://github.com/ioBroker/ioBroker.history in der Readme unter "Data converter" auch Infos und den aktuellen Stand. Ich habe es rudimentär mit SQLite getestet und klappte soweit … jetzt wären freiwillige gefragt :-)

    Was noch fehlt für SQL ist das selektieren auf Tagesebene für welche Tage schon Daten vorliegen und für welche nicht, aber da müsste man für alle 4 Datenbanktypen die Queries zusammenbasteln -da fehlt mir aktuell ehrlich gesagt die Zeit. Aber auch so sollte es gehen das alle Daten die älter sind als der älteste vorhandene Eintrag nur aingefügt werden was schonmal gut für ne Umstellung ist.

    Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

    • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
    • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
    1 Antwort Letzte Antwort
    0
    • G Offline
      G Offline
      GerdSo
      schrieb am zuletzt editiert von
      #4

      Ich bekomme es nicht zum Laufen. Er bricht bei mir beim Übertragen in eine mysql immer ab:

      c:\Program Files\ioBroker\node_modules\iobroker.history\converter>node history2db.js sql.0 debug 20170202 "c:\history"
      Send Data to sql.0
      Start at 20170202
      Use historyDir c:\history
      2017-02-12 16:32:57.693  - debug: history.20170202 objectDB connected
      2017-02-12 16:32:57.865  - debug: history.20170202 statesDB connected
      2017-02-12 16:32:58.021  - info: history.0 starting. Version 1.5.2 in c:/Program Files/ioBroker/node_modules/iobroker.history, node: v4.6.2
      No stored earliesDBValues found
      No stored existingDBTypes found
      started processFiles with 0 known db values
      We start earliest at 20170202
      Day 20170202 - history.hm-rega.0.10529.json
        datapoints reduced from 1 --> 1
      Invalid call
      DONE
      
      

      Meine mySQL-DB läuft seit ca. 1.2.2017 und history.0 hat Daten seit dem 25.3.2016. was mache ich falsch?

      Aus Sicherheitsgründen läuft weiterhin die history.0 parallel, d.h. derzeit werden die Daten in history.0 und sql.0 gespeichert.

      1 Antwort Letzte Antwort
      0
      • apollon77A Online
        apollon77A Online
        apollon77
        schrieb am zuletzt editiert von
        #5

        Hey,

        jippie, das Skript wird mal benutzt :-))

        Welche sql-Adapter-Version läuft? Bitte schauen das das aktuell ist.

        Dann erstmal schauen das das Skript an sich läuft- Starte es mal noch zusätzlich mit "–simulate" und schau was dann so geloggt wird.

        Der "Invalid call" sagt an sich das die Message falsch wäre die gesendet wird. Komisch.

        Wenn bei "simulate" alles sinnvoll aussieht, dann bitte sql-Adapter vom Github drüber installieren. Da sollte dann bei "Invalid call" mehr Debug sein. Das dann nochmal schicken. Danke

        Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

        • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
        • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
        1 Antwort Letzte Antwort
        0
        • G Offline
          G Offline
          GerdSo
          schrieb am zuletzt editiert von
          #6

          Hi,

          ` > Welche sql-Adapter-Version läuft? Bitte schauen das das aktuell ist.

          Dann erstmal schauen das das Skript an sich läuft- Starte es mal noch zusätzlich mit "–simulate" und schau was dann so geloggt wird.

          Der "Invalid call" sagt an sich das die Message falsch wäre die gesendet wird. Komisch.

          Wenn bei "simulate" alles sinnvoll aussieht, dann bitte sql-Adapter vom Github drüber installieren. Da sollte dann bei "Invalid call" mehr Debug sein. Das dann nochmal schicken. Danke `

          –simulate erzeugt sinnvolle Ausgaben. Kleiner Auszug:

          Day 20170131 - history.hm-rpc.0.MEQ1555921.4.MANU_MODE.json
            datapoints reduced from 1 --> 1
            SIMULATE: Not really writing ... 1 values for hm-rpc.0.MEQ1555921.4.MANU_MODE
          Day 20170131 - history.hm-rpc.0.MEQ1555921.4.PARTY_MODE_SUBMIT.json
            datapoints reduced from 1 --> 1
            SIMULATE: Not really writing ... 1 values for hm-rpc.0.MEQ1555921.4.PARTY_MODE_SUBMIT
          Day 20170131 - history.hm-rpc.0.MEQ1555921.4.PARTY_START_DAY.json
            datapoints reduced from 3 --> 3
            SIMULATE: Not really writing ... 3 values for hm-rpc.0.MEQ1555921.4.PARTY_START_DAY
          Day 20170131 - history.hm-rpc.0.MEQ1555921.4.PARTY_START_MONTH.json
            datapoints reduced from 3 --> 3
          

          Ist der aktuelle sql-Adapter 1.4.3. Habe es mit github gegengeprüft und es scheint die identische Version zu sein.

          Viele Grüße Gerd.

          1 Antwort Letzte Antwort
          0
          • apollon77A Online
            apollon77A Online
            apollon77
            schrieb am zuletzt editiert von
            #7

            Installier trotzdem mal von Github drüber. Ich hab exakt eine Zeile geändert und die Version erstmal noch gleich gelassen …

            Und dann starte nochmal ohne simulate und wir sehen weiter

            Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

            • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
            • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
            1 Antwort Letzte Antwort
            0
            • G Offline
              G Offline
              GerdSo
              schrieb am zuletzt editiert von
              #8

              Keine Besserung, identisches Verhalten:

              c:\Program Files\ioBroker\node_modules\iobroker.history\converter>node history2db.js sql.0 debug 20170202 "c:\history"
              Send Data to sql.0
              Start at 20170202
              Use historyDir c:\history
              2017-02-13 22:22:27.651  - debug: history.20170202 objectDB connected
              2017-02-13 22:22:27.713  - debug: history.20170202 statesDB connected
              2017-02-13 22:22:27.839  - info: history.0 starting. Version 1.5.2 in c:/Program Files/ioBroker/node_modules/iobroker.history, node: v4.6.2
              No stored earliesDBValues found
              No stored existingDBTypes found
              started processFiles with 0 known db values
              We start earliest at 20170202
              Day 20170202 - history.hm-rega.0.10529.json
                datapoints reduced from 1 --> 1
              Data stored but dbDB not available anymore, break.
              DONE
              

              2.Durchlauf

              c:\Program Files\ioBroker\node_modules\iobroker.history\converter>node history2db.js sql.0 debug 20170202 "c:\history"
              Send Data to sql.0
              Start at 20170202
              Use historyDir c:\history
              2017-02-13 22:26:47.355  - debug: history.20170202 objectDB connected
              2017-02-13 22:26:47.386  - debug: history.20170202 statesDB connected
              2017-02-13 22:26:47.433  - info: history.0 starting. Version 1.5.2 in c:/Program Files/ioBroker/node_modules/iobroker.history, node: v4.6.2
              No stored earliesDBValues found
              No stored existingDBTypes found
              started processFiles with 0 known db values
              We start earliest at 20170202
              Day 20170202 - history.hm-rega.0.10529.json
                datapoints reduced from 1 --> 1
              2017-02-13 22:28:18.915  - warn: history.0 Reconnection to DB.
              2017-02-13 22:28:18.931  - warn: history.0 Reconnection to DB.
              Invalid call
              DONE
              

              Evtl. war das der Grund weshalb bei meiner ersten Fehlermeldung auch der invalid call aufgetaucht ist

              1 Antwort Letzte Antwort
              0
              • apollon77A Online
                apollon77A Online
                apollon77
                schrieb am zuletzt editiert von
                #9

                Versuch mal den laufenden history.0 auszuschalten und starte dann das Skript. Nicht das sich zwei laufende "history.0" (weil das Skript registriert sich quasi auch als "history.0" in die quere kommen …

                Und zusätzlich hab ich non nen Fehler gefunden (Gründe für die "DB ist weg"-Meldung in deinem ersten Lauf von oben).

                Bitte SQL vom Github aktualisieren. Dann sollte der Fehler weg sein. Nach github update neustart der sqlInstanz nicht vergessen.

                Dann bitte nochmal logs :-)

                Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                1 Antwort Letzte Antwort
                0
                • G Offline
                  G Offline
                  GerdSo
                  schrieb am zuletzt editiert von
                  #10

                  Leider ohne Erfolg (history.0 ausgeschaltet)

                  C:\Program Files\ioBroker>node node_modules/iobroker.js-controller/iobroker.js stop
                  Stopping iobroker controller daemon...
                  iobroker controller daemon stopped.
                  
                  C:\Program Files\ioBroker>npm i https://github.com/ioBroker/ioBroker.sql/tarball/master
                  -
                  > sqlite3@3.1.7 install C:\Program Files\ioBroker\node_modules\iobroker.sql\node_modules\sqlite3
                  > node-pre-gyp install --fallback-to-build
                  
                  [sqlite3] Success: "C:\Program Files\ioBroker\node_modules\iobroker.sql\node_modules\sqlite3\lib\binding\node-v46-win32-ia32\node_sqlite3.node" is installed via remote
                  iobroker.sql@1.4.3 node_modules\iobroker.sql
                  ├── mysql@2.13.0 (sqlstring@2.2.0, bignumber.js@3.1.2, readable-stream@1.1.14)
                  ├── sql-client@0.7.0 (argf@0.0.1, inote-util@0.8.1)
                  ├── pg@6.1.2 (packet-reader@0.2.0, pg-connection-string@0.1.3, buffer-writer@1.0.1, semver@4.3.2, pg-types@1.11.0, pg-pool@1.6.0, pgpass@1.0.1)
                  ├── mssql@3.3.0 (generic-pool@2.5.4, promise@7.1.1, tedious@1.14.0)
                  └── sqlite3@3.1.7 (nan@2.4.0)
                  
                  C:\Program Files\ioBroker>iobroker start
                  
                  C:\Program Files\ioBroker>node node_modules/iobroker.js-controller/iobroker.js start
                  Starting iobroker controller daemon...
                  
                  c:\Program Files\ioBroker\node_modules\iobroker.history\converter>node history2db.js sql.0 debug 20170202 "c:\history"
                  Send Data to sql.0
                  Start at 20170202
                  Use historyDir c:\history
                  2017-02-14 20:49:09.831  - debug: history.20170202 objectDB connected
                  2017-02-14 20:49:09.847  - debug: history.20170202 statesDB connected
                  2017-02-14 20:49:09.878  - info: history.0 starting. Version 1.5.2 in c:/Program Files/ioBroker/node_modules/iobroker.history, node: v4.6.2
                  No stored earliesDBValues found
                  No stored existingDBTypes found
                  started processFiles with 0 known db values
                  We start earliest at 20170202
                  Day 20170202 - history.hm-rega.0.10529.json
                    datapoints reduced from 1 --> 1
                  Data stored but dbDB not available anymore, break.
                  DONE
                  
                  1 Antwort Letzte Antwort
                  0
                  • apollon77A Online
                    apollon77A Online
                    apollon77
                    schrieb am zuletzt editiert von
                    #11

                    Ok, bitte jetzt auch history vom Github aktualisieren, auch Debug drin. Jetzt bin ich gespannt was rauskommt :-)

                    Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                    • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                    • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                    1 Antwort Letzte Antwort
                    0
                    • G Offline
                      G Offline
                      GerdSo
                      schrieb am zuletzt editiert von
                      #12

                      @apollon77:

                      Ok, bitte jetzt auch history vom Github aktualisieren, auch Debug drin. Jetzt bin ich gespannt was rauskommt :-) `

                      Ergebnis:

                      c:\Program Files\ioBroker\node_modules\iobroker.history\converter>node history2db.js sql.0 debug 20170202 "c:\history"
                      Send Data to sql.0
                      Start at 20170202
                      Use historyDir c:\history
                      2017-02-14 21:47:29.548  - debug: history.20170202 objectDB connected
                      2017-02-14 21:47:29.580  - debug: history.20170202 statesDB connected
                      2017-02-14 21:47:29.611  - info: history.0 starting. Version 1.5.2 in c:/Program Files/ioBroker/node_modules/iobroker.history, node: v4.6.2
                      No stored earliesDBValues found
                      No stored existingDBTypes found
                      started processFiles with 0 known db values
                      We start earliest at 20170202
                      Day 20170202 - history.hm-rega.0.10529.json
                        datapoints reduced from 1 --> 1
                      Data stored but db not available anymore, break. {"success":true}
                      DONE
                      
                      

                      Bis auf das {"success":true} gibt es anscheinend keine Änderung :cry:

                      1 Antwort Letzte Antwort
                      0
                      • apollon77A Online
                        apollon77A Online
                        apollon77
                        schrieb am zuletzt editiert von
                        #13

                        Grrrrrrrrrr… der Push der Änderung von sql hatte nicht geklappt ... jetzt aber. Bitte neu sql installieren, dann sollte es laufen oder sinnvolle ausgaben geben :-)

                        Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                        • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                        • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                        1 Antwort Letzte Antwort
                        0
                        • G Offline
                          G Offline
                          GerdSo
                          schrieb am zuletzt editiert von
                          #14

                          @apollon77:

                          Grrrrrrrrrr… der Push der Änderung von sql hatte nicht geklappt ... jetzt aber. Bitte neu sql installieren, dann sollte es laufen oder sinnvolle ausgaben geben :-) `
                          Das erklärt meine Aussage, dass sich nichts geändert hat zwischen meinem Rechner und der github-Version ;)

                          Jetzt passiert mehr bei der Ausgabe und er läuft aktuell immer noch, allerdings wird laut Ausgabe nahezu alles ignoriert. Ab und zu wird ein Datenpunkt am Tag übernommen:````
                          Day 20170122 - history.yr.0.forecast.day2.temperature_min.json
                          Ignore ID history.yr.0.forecast.day2.temperature_min.json: yr.0.forecast.day2.temperature_min
                          Day 20170122 - history.yr.0.forecast.day2.text.json
                          Ignore ID history.yr.0.forecast.day2.text.json: yr.0.forecast.day2.text
                          Day 20170122 - history.yr.0.forecast.day2.wind_direction.json
                          Ignore ID history.yr.0.forecast.day2.wind_direction.json: yr.0.forecast.day2.wind_direction
                          Day 20170122 - history.yr.0.forecast.day2.wind_speed.json
                          Ignore ID history.yr.0.forecast.day2.wind_speed.json: yr.0.forecast.day2.wind_speed
                          Day 20170122 - history.yr.0.forecast.diagram.json
                          Ignore ID history.yr.0.forecast.diagram.json: yr.0.forecast.diagram
                          Day 20170122 - history.yr.0.forecast.html.json
                          Ignore ID history.yr.0.forecast.html.json: yr.0.forecast.html
                          Day 20170122 - history.yr.0.forecast.object.json
                          Ignore ID history.yr.0.forecast.object.json: yr.0.forecast.object
                          Day end
                          Day 20170121 - history.admin.0.info.updatesList.json
                          Ignore ID history.admin.0.info.updatesList.json: admin.0.info.updatesList
                          Day 20170121 - history.admin.0.info.updatesNumber.json
                          Ignore ID history.admin.0.info.updatesNumber.json: admin.0.info.updatesNumber
                          Day 20170121 - history.dwd.0.warning.begin.json
                          Ignore ID history.dwd.0.warning.begin.json: dwd.0.warning.begin
                          Day 20170121 - history.dwd.0.warning.description.json
                          Ignore ID history.dwd.0.warning.description.json: dwd.0.warning.description
                          Day 20170121 - history.dwd.0.warning.end.json
                          Ignore ID history.dwd.0.warning.end.json: dwd.0.warning.end
                          Day 20170121 - history.dwd.0.warning.headline.json
                          Ignore ID history.dwd.0.warning.headline.json: dwd.0.warning.headline

                          1 Antwort Letzte Antwort
                          0
                          • apollon77A Online
                            apollon77A Online
                            apollon77
                            schrieb am zuletzt editiert von
                            #15

                            Jetzt kommen wir zu den zusätzlichen Parametern :-)

                            Entweder du lässt vorher "analyzesql.js" laufen damit alle aktuell in sql existierenden Datenpunkt-IDs gesammelt werden und auch nur die konvertiert werden.

                            Alternativ –ignoreExistingDBValues setzen beim import-Skript dann sollte das egal sein und alles wird konvertiert - aber dann musst DU beim abbrechen aufpassen das du nicht doubletten erzeugst!

                            Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                            • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                            • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                            1 Antwort Letzte Antwort
                            0
                            • G Offline
                              G Offline
                              GerdSo
                              schrieb am zuletzt editiert von
                              #16

                              @apollon77:

                              Jetzt kommen wir zu den zusätzlichen Parametern :-)

                              Entweder du lässt vorher "analyzesql.js" laufen damit alle aktuell in sql existierenden Datenpunkt-IDs gesammelt werden und auch nur die konvertiert werden.

                              Alternativ –ignoreExistingDBValues setzen beim import-Skript dann sollte das egal sein und alles wird konvertiert - aber dann musst DU beim abbrechen aufpassen das du nicht doubletten erzeugst! `

                              Ich bin davon ausgegangen, dass ohne die zusätzlichen Parameter die Dubletten vermieden werden und er alle Datenpunkte übernimmt.

                              Das passt aber nicht mit dem ignore, dass aktuell protokolliert wird, überein, da er jetzt sehr viele Datenpunkte übernehmen müsste oder verstehe ich da etwas falsch. "analyzesql.js" hatte bei mir bisher eine nahezu leere Datei erzeugt und –simulate protokolliert ja, dass Daten übernommen werden können. Bin etwas ratlos.

                              1 Antwort Letzte Antwort
                              0
                              • apollon77A Online
                                apollon77A Online
                                apollon77
                                schrieb am zuletzt editiert von
                                #17

                                Aaaaalso … die Idee war das man nur das nach sql konvertieren will was man auch mit sql loggt. Daher gibt es diese "analyze"-Skripte. Die suchen aus der sql-DB alle Datenpunkte raus die geloggt werden und speichert diese quasi in einer "white-list" für das Konverterskript weil dann auch nur die genommen werden.

                                Daher auch der Effekt, wenn Du ohne dieses analyze und daher mit leerem "welche Datenpunkte gibt es denn"-File den konverter startest, das alles ignoriert wird.

                                "--ignoreExistingDBValues" sagt dem Skript das er genau diese Whitelist ignorieren soll. Damit nimmt er dann alles was im History gefunden wurde egal ob es schon in sql da ist oder nicht.

                                Daher wenn es immer noch komisch ist: Was ist denn der Output vom analyze-Skript?

                                Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                                • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                                • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                                1 Antwort Letzte Antwort
                                0
                                • G Offline
                                  G Offline
                                  GerdSo
                                  schrieb am zuletzt editiert von
                                  #18

                                  @apollon77:

                                  Daher wenn es immer noch komisch ist: Was ist denn der Output vom analyze-Skript? `
                                  Ergebnis mit gestopptem history.0, damals lief history.0 noch. Ergebnis ist aber identisch:

                                  c:\Program Files\ioBroker\node_modules\iobroker.history\converter>node analyzesql.js
                                  Query Data from sql.0
                                  2017-02-15 08:03:11.425  - info: history.0 starting. Version 1.5.2 in c:/Program Files/ioBroker/node_modules/iobroker.history, node: v4.6.2
                                  Send
                                  {"succes":true,"result":{"undefined":{"type":"undefined","ts":1970000}}}
                                  Datapoints found: undefined
                                  {"undefined":{"type":"undefined","ts":1970000}}
                                  

                                  Ergebnis earliestDBValues.json````
                                  {"undefined":1487142206553}

                                  Ergebnis existingDBTypes.json````
                                  {}
                                  
                                  1 Antwort Letzte Antwort
                                  0
                                  • apollon77A Online
                                    apollon77A Online
                                    apollon77
                                    schrieb am zuletzt editiert von
                                    #19

                                    Was sagt denn das iobroker.Log von sql.0 zu dein zeitunkt? Da sollt auch was geloggt werden. Und schau bitte das sql auf loglevel "info" steht das Du diese Logs siehst.

                                    Query result <json>Nochmal zur Klarstellung: sql.0 läuft und es sind Datenpunkte definiert die da hin loggen?!</json>

                                    Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                                    • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                                    • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                                    1 Antwort Letzte Antwort
                                    0
                                    • G Offline
                                      G Offline
                                      GerdSo
                                      schrieb am zuletzt editiert von
                                      #20

                                      @apollon77:

                                      Was sagt denn das iobroker.Log von sql.0 zu dein zeitunkt? Da sollt auch was geloggt werden. Und schau bitte das sql auf loglevel "info" steht das Du diese Logs siehst.

                                      Query result <json>Nochmal zur Klarstellung: sql.0 läuft und es sind Datenpunkte definiert die da hin loggen?!</json> `
                                      sql.0 läuft und es sind Datenpunkte definiert. Über die Adminoberfläche wurde das logging für sql.0 und history.0 identisch eingestellt, alle Datenpunkte loggen. Ich habe auch ein flot Diagramm auf sql.0 umgestellt und dort werden die Kurven korrekt angezeigt, daher sollten die Werte im sql.0 vorhanden sein.

                                      log zum Zeitpunkt der Analyse (history.0 gestoppt)

                                      <code>2017-02-17 23:37:54.844  - [31merror[39m: WARNING: cannot find logs with id = 96467210
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467638
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467639
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467640
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467641
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467642
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467643
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467644
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467645
                                      2017-02-17 23:37:55.782  - [31merror[39m: WARNING: cannot find logs with id = 96467646
                                      2017-02-17 23:37:55.797  - [31merror[39m: WARNING: cannot find logs with id = 96467647
                                      2017-02-17 23:37:55.797  - [31merror[39m: WARNING: cannot find logs with id = 96467648
                                      2017-02-17 23:37:55.797  - [31merror[39m: WARNING: cannot find logs with id = 96467649[/code]</code>
                                      
                                      1 Antwort Letzte Antwort
                                      0
                                      • apollon77A Online
                                        apollon77A Online
                                        apollon77
                                        schrieb am zuletzt editiert von
                                        #21

                                        Während der Analyse oder auch beim History-Übertragen kann es zu solchen Logs kommen. Da kommt ein Log-Teilprozess nicht hinterher. Gefühlt nicht so schlimm.

                                        Hat deine sql-Instanz Loglevel info?

                                        Beitrag hat geholfen? Votet rechts unten im Beitrag :-) https://paypal.me/Apollon77 / https://github.com/sponsors/Apollon77

                                        • Debug-Log für Instanz einschalten? Admin -> Instanzen -> Expertenmodus -> Instanz aufklappen - Loglevel ändern
                                        • Logfiles auf Platte /opt/iobroker/log/… nutzen, Admin schneidet Zeilen ab
                                        1 Antwort Letzte Antwort
                                        0
                                        • M Offline
                                          M Offline
                                          moebius
                                          schrieb am zuletzt editiert von
                                          #22

                                          Als ich mit iobroker angefangen hab, hat bei mir die Übernahme von history nach sql auch nicht geklappt.

                                          Hab dann mit diesem flow improvisiert. Man muss vorher schon den sql adapter einschalten, damit er

                                          die DP's anlegt.

                                          ! [
                                          ! {
                                          ! "id": "361523f4.0693fc",
                                          ! "type": "tab",
                                          ! "label": "Sql import historic data"
                                          ! },
                                          ! {
                                          ! "id": "54117af8.894304",
                                          ! "type": "file in",
                                          ! "z": "361523f4.0693fc",
                                          ! "name": "",
                                          ! "filename": "/opt/iobroker/iobroker-data/history/20170106/history.admin.0.ws333.Temp3.json",
                                          ! "format": "utf8",
                                          ! "x": 459,
                                          ! "y": 95,
                                          ! "wires": [
                                          ! [
                                          ! "ade70e93.59ded"
                                          ! ]
                                          ! ]
                                          ! },
                                          ! {
                                          ! "id": "42a18a7e.9e2744",
                                          ! "type": "debug",
                                          ! "z": "361523f4.0693fc",
                                          ! "name": "",
                                          ! "active": true,
                                          ! "console": "false",
                                          ! "complete": "true",
                                          ! "x": 1240,
                                          ! "y": 331,
                                          ! "wires": []
                                          ! },
                                          ! {
                                          ! "id": "ade70e93.59ded",
                                          ! "type": "json",
                                          ! "z": "361523f4.0693fc",
                                          ! "name": "",
                                          ! "x": 818,
                                          ! "y": 171,
                                          ! "wires": [
                                          ! [
                                          ! "2005b14d.5c492e"
                                          ! ]
                                          ! ]
                                          ! },
                                          ! {
                                          ! "id": "2005b14d.5c492e",
                                          ! "type": "function",
                                          ! "z": "361523f4.0693fc",
                                          ! "name": "Add timestamp",
                                          ! "func": "//var dp = msg.filename.match(/[-\w]+[.][\w]+$/i)[0]\nvar dp = msg.filename.match(/^.\/(.)\.(.*)$/i)[1]\n\nvar ma = []\n\nfor (i=0; i<msg.payload.length; ++i)/{\n/ma.push({topic:"insert/into/ts_number/set/id="(select" id/from/iobroker.datapoints/where/type="0" and/name="&quot;+ dp +&quot;" )/,/ts="&quot;" +/msg.payload<i="">[i].ts + ",val=" + msg.payload__.val + ",ack=0,_from=2,q=" + msg.payload__.q, payload: ""})\n ma.push({topic:"insert into ts_string set id=(select id from iobroker.datapoints where type = 1 and name = '"+ dp +"') , ts=" + msg.payload__.ts + ",val=" + msg.payload__.val + ",ack=0,_from=2,q=" + msg.payload__.q, payload: ""})\n ma.push({topic:"insert into ts_bool set id=(select id from iobroker.datapoints where type = 2 and name = '"+ dp +"') , ts=" + msg.payload__.ts + ",val=" + msg.payload__.val + ",ack=0,_from=2,q=" + msg.payload__.q, payload: ""})\n}\nreturn [ma];",
                                          ! "outputs": "1",
                                          ! "noerr": 0,
                                          ! "x": 962,
                                          ! "y": 223,
                                          ! "wires": [
                                          ! [
                                          ! "6d4c858b.8562cc"
                                          ! ]
                                          ! ]
                                          ! },
                                          ! {
                                          ! "id": "6d4c858b.8562cc",
                                          ! "type": "mysql",
                                          ! "z": "361523f4.0693fc",
                                          ! "mydb": "c5d28ccd.2882a",
                                          ! "name": "",
                                          ! "x": 1102,
                                          ! "y": 286,
                                          ! "wires": [
                                          ! [
                                          ! "42a18a7e.9e2744"
                                          ! ]
                                          ! ]
                                          ! },
                                          ! {
                                          ! "id": "8b3dd54e.fdff98",
                                          ! "type": "inject",
                                          ! "z": "361523f4.0693fc",
                                          ! "name": "",
                                          ! "topic": "",
                                          ! "payload": "",
                                          ! "payloadType": "date",
                                          ! "repeat": "",
                                          ! "crontab": "",
                                          ! "once": false,
                                          ! "x": 93,
                                          ! "y": 36,
                                          ! "wires": [
                                          ! [
                                          ! "54117af8.894304"
                                          ! ]
                                          ! ]
                                          ! },
                                          ! {
                                          ! "id": "c5d28ccd.2882a",
                                          ! "type": "MySQLdatabase",
                                          ! "z": "",
                                          ! "host": "big",
                                          ! "port": "3306",
                                          ! "db": "iobroker",
                                          ! "tz": ""
                                          ! }
                                          ! ]
                                          _______________</msg.payload.length;> 1803_clipboard05.jpg

                                          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

                                          320

                                          Online

                                          32.4k

                                          Benutzer

                                          81.4k

                                          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