Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. History2DB converter

    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

    History2DB converter

    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eastcoast last edited by

      @apollon77:

      Einfacher wohl eher die Daten über kluge queries als csv oder so aus sql rauszuholen (also ohne ioBroker, sondern direkt mit SQL-Tools/Kommandozeile oder so). Dann ein bissl Texteditor Magie oder ein kleines Skriptchen was das diekt in die Influxdb pumpt.

      Wie fit bist Du mit sowas? 🙂 `
      So etwas in der Art hatte ich mir vorgestellt, leider habe ich im moment kein Zeit mich darin einzuarbeiten.

      Hätte gehofft ist gibt schon etwas fertiges… trozdem Danke für die Antwort.

      1 Reply Last reply Reply Quote 0
      • S
        stefan last edited by stefan

        Hallo zusammen,

        ich versuche gerade meine history in influxdb zu konvertieren ..klappt aber leider nicht gleicher Fehler bei analyze script und history2db script

        nodejs history2db.js influxdb.0 debug 0 /home/history --processAllDPs --simulate
        module.js:550
            throw err;
            ^
        
        Error: Cannot find module '/opt/history2db/ioBroker.history/converter/../lib/utils'
            at Function.Module._resolveFilename (module.js:548:15)
            at Function.Module._load (module.js:475:25)
            at Module.require (module.js:597:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/opt/history2db/ioBroker.history/converter/history2db.js:9:14)
            at Module._compile (module.js:653:30)
            at Object.Module._extensions..js (module.js:664:10)
            at Module.load (module.js:566:32)
            at tryModuleLoad (module.js:506:12)
            at Function.Module._load (module.js:498:3)
        
        

        Ich befürchte mir fehlt da was☹ aber was?
        Hängt es an dem .../lib/utils am Ende der Error Zeile?
        Hab einfach das ioBroker.history git geclont da müsste ja alles mitgekommen sein was ich brauche oder?

        Irgendjemand eine Idee?

        Für jede Hilfe dankbar
        Stefan

        1 Reply Last reply Reply Quote 0
        • arteck
          arteck Developer Most Active last edited by

          @stefan sagte in History2DB converter:

          /opt/history2db/ioBroker.history/converter/../lib/utils

          da ist doch verkehrt.. von wo rufst du das Script auf

          1 Reply Last reply Reply Quote 0
          • S
            stefan last edited by

            Hmm aus dem Verzeichnis wo ich das git hingeklont hab ...
            Muss es aus dem iobroker installationsverzeichnis aufgerufen werden?

            Z 1 Reply Last reply Reply Quote 0
            • Z
              zimage @stefan last edited by

              @stefan : ich habe die selbe Fehlermeldung wie du... konntest du das lösen ?

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

                Hallo, möchte meine Daten auch gerne übernehmen und kämpfe mit der zuletzt genannten Fehlermeldung. Könnte jemand freundlicherweise nochmal die genaue Syntax für den Befehl schreiben.

                Vielen Dank

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

                  Hallo,

                  die richtige Syntax scheint nun gefunden. Mit dem Parameter -simulate kommen auch scheinbar vernünftige Ausgaben. Wenn ich allerdings mit history2db.js die Daten in influx schreiben will, dann kommen zwar über putty in der Konsole vermeintlich vernünftige Ausgaben, im Log von iobroker aber nur:
                  Auszug

                  history.0	2020-01-25 16:16:18.390	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.389	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.388	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.386	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.384	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.383	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.381	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.380	error	(1626) storeState called with invalid data
                  history.0	2020-01-25 16:16:18.363	error	(1626) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.639	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.632	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.631	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.630	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.629	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.628	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.626	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.620	error	(8469) storeState called with invalid data
                  influxdb.0	2020-01-25 16:16:19.612	error	(8469) storeState called with invalid data
                  

                  Kann mir jemand sagen, woran das wohl liegt?

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

                    @apollon77

                    Hallo apollon77, hättest Du einen Tip für mich?

                    Vielen Dank für Deine Mühe!

                    Jo

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

                      Mach bitte mal ein Issue auf im History Projekt. Muss ich mir ansehen

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

                        Issue erstellt

                        S 1 Reply Last reply Reply Quote 1
                        • S
                          stan23 @XxJooO last edited by

                          Ich habe die gleiche Fehlermeldung wie @XxJooO und im Issue mein Log hinzugefügt.

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

                            Kam noch nicht dazu. Sorry

                            1 Reply Last reply Reply Quote 0
                            • M
                              Marcus007 last edited by

                              Hallo Zusammen,

                              gibt es zu dieser Problematik "History-Daten in eine InfluxDB" importieren ein Tool das durch Personen ohne Datenbankprogrammierkenntnisse bedient werden kann?

                              Beste Grüße
                              Marcus

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

                                Hallo Marcus,

                                wenn Du Dich an die Anleitung hältst, dann brauchst Du keine Kenntnisse. Gehe davon aus, dass Dein ioBroker unter Linux läuft, dann genügt die Anleitung in der readme, vorher wichtig: Backup machen.
                                Schau dazu auf den github vom history Adapter. Hier stehen die Befehle, die unter Linux per SSH abgesetzt werden müssen.
                                Die beiden Jungs aus dem thread hier haben zusammen auch den Fehler ausgemerzt und das Übertragen der Werte funktioniert jetzt einwandfrei. Falls was unklar bleibt, nochmal melden und vor allem zeigen, wo es hakt.

                                Grüße und viel Erfolg

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  Marcus007 @XxJooO last edited by Marcus007

                                  @XxJooO Danke.
                                  Du hast mir Mut gemacht. 😀
                                  Ich werde es bei Gelegenheit testen.

                                  Marcus

                                  Es hat geklappt:
                                  545 Tagesverzeichnisse mit ca. 18GB Daten wurden in 7h mit Erfolg umgezogen.

                                  Nochmals vielen Dank, für die Arbeit.

                                  Marcus

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

                                    Hallo Leute,

                                    ich versuche grade meine History-Daten in influx zu migrieren.
                                    Leider bekomme ich beim Aufruf von "analyzeinflux.js" schon Fehler.

                                    In der Console bekomme ich:
                                    1.jpg

                                    Und zeitgleich im ioBroker-Log:
                                    2.jpg

                                    Beim Versuch ohne analyze-script die Daten zu migrieren wird schlicht alles "ignored". Datenpunkt für Datenpunkt.

                                    Mein IOBroker läuft als Docker unter Unraid... die InfluxDB in einem eigenen Docker Container.

                                    Kann mir jemand helfen?'

                                    Danke!

                                    David

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

                                      @davipet Ist das ne InfluxDB 1 oder 2? Ist die InfluxDB Instanz korrekt konfiguriert?

                                      InfluxDB 2 wird erst seit History 2.2.1 im analyze Skript unterstützt ... Welche History Version ists denn?

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

                                        Hallo @apollon77
                                        Danke für die Info!
                                        Es ist eine History 2.2.0 Instanz und eine influxDB 2
                                        Da ist also das Problem.
                                        Dann ziehe ich mal auf History 2.2.1 hoch und versuche es erneut 🙂

                                        Gruß

                                        David

                                        1 Reply Last reply Reply Quote 1
                                        • M
                                          meto last edited by

                                          Hallo,
                                          ich habe vor einigen Tagen begonnen auf Influx umzustellen. Influx funktioniert augenscheinlich einwandfrei. Die neuen Werte kommen alle an. Leider erhalte ich bei der Konvertierung Fehlermeldungen. Mit History 2.2.0 und Inlux 3.1.7 Ende des ganz kurz nach dem Aufruf mit "warn: influxdb.0 (12548) storeState executed with 3 errors" im iobroker log.

                                          Ich habe dann von Github History 2.2.1 und Inlux 3.1.8 installiert.

                                          Nun Endet das Ganz nach dem Aufruf unverrichteter Dinge:

                                          pi@raspbi4:/opt/iobroker/node_modules/iobroker.history/converter $ node history2db.js influxdb.0 info 20201231 /home/pi/history  --logChangesOnly --processNonExistingValuesOnly
                                          Send Data to influxdb.0
                                          Start at 20201231
                                          Use historyDir /home/pi/history
                                          earliesDBValues initialized from cache 135
                                          ExistingDBTypes initialized from cache 135
                                          Started processFiles with 135 known db values
                                          We start earliest at 20201231
                                          Day 20201231 - history.hm-rega.0.51333.json
                                            datapoints reduced from 345 --> 345
                                          This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
                                          TypeError: Assignment to constant variable.
                                              at processFile (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:282:66)
                                              at processFiles (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:185:5)
                                              at main (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:148:5)
                                              at Adapter.<anonymous> (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:96:5)
                                              at Adapter.emit (node:events:513:28)
                                              at Adapter.emit (node:domain:489:12)
                                              at /opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.js:9132:26
                                          
                                          

                                          Hat jemand eine Idee was da falsch läuft und wie ich die Daten von History trotzdem in die Influx-Datenbank bekomme?

                                          Danke im Voraus.

                                          Gruß
                                          meto

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

                                            @meto Bitte Github issue anlegen bei histotry ... muss ich ansehen, scheint code fehler

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            683
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            14
                                            60
                                            8211
                                            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