Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. ioBroker Allgemein
  4. Frage : Migrate MySQL nach Influxdb

NEWS

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

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

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

Frage : Migrate MySQL nach Influxdb

Scheduled Pinned Locked Moved ioBroker Allgemein
151 Posts 31 Posters 26.1k Views 25 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M marco-mh

    @jackgruber in Iobroker hab ich auf nie löschen eingestellt

    JackGruberJ Offline
    JackGruberJ Offline
    JackGruber
    wrote on last edited by
    #110

    @marco-mh Ich vermute mal er nutzt die global da diese auf default bei dir steht.

    M 2 Replies Last reply
    0
    • JackGruberJ JackGruber

      @marco-mh Ich vermute mal er nutzt die global da diese auf default bei dir steht.

      M Offline
      M Offline
      marco-mh
      wrote on last edited by
      #111

      @jackgruber kann ich das umstellen?

      node.js 16.15.1, NPM 8.11, js.Controller 4.0.23

      JackGruberJ 1 Reply Last reply
      0
      • M marco-mh

        @jackgruber kann ich das umstellen?

        JackGruberJ Offline
        JackGruberJ Offline
        JackGruber
        wrote on last edited by
        #112

        @marco-mh In ioBroker InfluxDB Adapter, keine Ahnung, ich nutze den nicht.

        1 Reply Last reply
        1
        • JackGruberJ JackGruber

          @marco-mh Ich vermute mal er nutzt die global da diese auf default bei dir steht.

          M Offline
          M Offline
          marco-mh
          wrote on last edited by
          #113

          @jackgruber eine Grafische Oberfläche über den Browser gibt es nicht für Influx oder?

          node.js 16.15.1, NPM 8.11, js.Controller 4.0.23

          JackGruberJ 1 Reply Last reply
          0
          • M marco-mh

            @jackgruber eine Grafische Oberfläche über den Browser gibt es nicht für Influx oder?

            JackGruberJ Offline
            JackGruberJ Offline
            JackGruber
            wrote on last edited by
            #114

            @marco-mh Keine ahnung, ich arbeit auf fast allen systemen nur auf der console.

            M 1 Reply Last reply
            0
            • JackGruberJ JackGruber

              @marco-mh Keine ahnung, ich arbeit auf fast allen systemen nur auf der console.

              M Offline
              M Offline
              marco-mh
              wrote on last edited by
              #115

              @jackgruber ich dank dir erstmal für heute. Super Arbeit und Support von dir.

              7D8E2B7A-57F5-40B0-B654-C64DD2E1C4E4.jpeg

              node.js 16.15.1, NPM 8.11, js.Controller 4.0.23

              1 Reply Last reply
              0
              • JackGruberJ JackGruber

                @marco-mh Verschiedene kennwörter für den user iobroker je nach dem von wo er kommt, oder das kennwort in der Json falsch?
                Meld dich mal im phpMyAdmin mit dem iobrokeran.

                K Online
                K Online
                Kueppert
                wrote on last edited by Kueppert
                #116

                @jackgruber sagte in Frage : Migrate MySQL nach Influxdb:

                @marco-mh Verschiedene kennwörter für den user iobroker je nach dem von wo er kommt, oder das kennwort in der Json falsch?
                Meld dich mal im phpMyAdmin mit dem iobrokeran.

                Ich hab mir jetzt auch ne InfluxDB auf einer LXC aufgesetzt, Datenbank angelegt, User etc, was halt sein muss. Ich habe den User für MySQL eben via phpMyAdmin geprüft (user & Passwort), diese auch in der JSON eingetragen, IP & Ports geprüft, ich erhalte trotzdem folgende Fehlermeldung:

                C:\GitHub>migrate.py ALL
                (1045, "Access denied for user 'admin'@'Houston-OLD.fritz.box' (using password: YES)")
                

                Die Requirements hab ich installiert wie in der Readme steht, Python 3.8.10 hab ich drauf. Hab mich jetzt mehrere Stunden damit befasst und komm nicht weiter :(

                Das Skript will ich auf meinem Windows10-PC ausführen, MySQL = VM Proxmox, InfluxDB = LXC Proxmox unpriviligiert

                Die Eingabeaufforderung unter Win10 hab ich als Admin ausgeführt.

                Und hier das, was ich auf dem Win-PC in der Eingabeaufforderung alles gemacht hab:

                C:\GitHub>dir
                 Volume in Laufwerk C: hat keine Bezeichnung.
                 Volumeseriennummer: 507A-0C37
                
                 Verzeichnis von C:\GitHub
                
                08.06.2021  20:25    <DIR>          .
                08.06.2021  20:25    <DIR>          ..
                08.06.2021  20:25                38 .gitignore
                08.06.2021  20:25               353 database.json.example
                08.06.2021  20:24             4.038 iobroker_mysql_2_influxdb-master.zip
                08.06.2021  20:25             6.811 migrate.py
                08.06.2021  20:25             1.143 README.md
                08.06.2021  20:25                33 requirements.txt
                               6 Datei(en),         12.416 Bytes
                               2 Verzeichnis(se), 34.135.502.848 Bytes frei
                
                C:\GitHub>python --version
                Python 3.8.10
                
                C:\GitHub>python -m pip install -U pip
                Requirement already satisfied: pip in c:\users\thorsten\appdata\local\programs\python\python38\lib\site-packages (21.1.1)
                Collecting pip
                  Downloading pip-21.1.2-py3-none-any.whl (1.5 MB)
                     |████████████████████████████████| 1.5 MB 3.3 MB/s
                Installing collected packages: pip
                  Attempting uninstall: pip
                    Found existing installation: pip 21.1.1
                    Uninstalling pip-21.1.1:
                      Successfully uninstalled pip-21.1.1
                Successfully installed pip-21.1.2
                
                C:\GitHub>pip install -r requirements.txt
                Collecting influxdb>=5.3.1
                  Downloading influxdb-5.3.1-py2.py3-none-any.whl (77 kB)
                     |████████████████████████████████| 77 kB 1.2 MB/s
                Collecting PyMySQL>=1.0.2
                  Downloading PyMySQL-1.0.2-py3-none-any.whl (43 kB)
                     |████████████████████████████████| 43 kB 709 kB/s
                Collecting requests>=2.17.0
                  Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
                     |████████████████████████████████| 61 kB 3.8 MB/s
                Collecting six>=1.10.0
                  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
                Collecting pytz
                  Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
                     |████████████████████████████████| 510 kB 6.8 MB/s
                Collecting msgpack
                  Downloading msgpack-1.0.2-cp38-cp38-win_amd64.whl (69 kB)
                     |████████████████████████████████| 69 kB 2.0 MB/s
                Collecting python-dateutil>=2.6.0
                  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
                     |████████████████████████████████| 227 kB 6.8 MB/s
                Collecting idna<3,>=2.5
                  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
                     |████████████████████████████████| 58 kB 3.0 MB/s
                Collecting urllib3<1.27,>=1.21.1
                  Downloading urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
                     |████████████████████████████████| 138 kB 6.8 MB/s
                Collecting chardet<5,>=3.0.2
                  Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
                     |████████████████████████████████| 178 kB 6.8 MB/s
                Collecting certifi>=2017.4.17
                  Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
                     |████████████████████████████████| 145 kB ...
                Installing collected packages: urllib3, six, idna, chardet, certifi, requests, pytz, python-dateutil, msgpack, PyMySQL, influxdb
                Successfully installed PyMySQL-1.0.2 certifi-2021.5.30 chardet-4.0.0 idna-2.10 influxdb-5.3.1 msgpack-1.0.2 python-dateutil-2.8.1 pytz-2021.1 requests-2.25.1 six-1.16.0 urllib3-1.26.5
                
                C:\GitHub>migrate.py ALL
                (1045, "Access denied for user 'iobroker'@'Houston-OLD.fritz.box' (using password: YES)")
                
                C:\GitHub>migrate.py ALL
                (1045, "Access denied for user 'admin'@'Houston-OLD.fritz.box' (using password: YES)")
                
                C:\GitHub>migrate.py ALL
                (1045, "Access denied for user 'admin'@'Houston-OLD.fritz.box' (using password: YES)")
                
                C:\GitHub>
                

                UDM Pro, Intel NUC - ioBroker in Proxmox-VM, PiHole+Grafana&Influx+TasmoAdmin in LXCs, Raspberry Pi3 (als CCU), Zigbee-Stick Sonoff, Synology DS918+

                1 Reply Last reply
                0
                • K Online
                  K Online
                  Kueppert
                  wrote on last edited by
                  #117

                  LÄÄÄÄÄÄÄÄÄÄÄÄUFT, ich werd bekloppt...hab nen anderen User genommen. Habe bei diesem User unter phpMyAdmin => Benutzerkonten => Anmeldeinformationen unter "Hostname" = Jeder Host % eingetragen:
                  566a059b-defd-462d-90e4-abf99b475734-image.png

                  Falls jmd mal das gleiche Problem haben sollte :)

                  UDM Pro, Intel NUC - ioBroker in Proxmox-VM, PiHole+Grafana&Influx+TasmoAdmin in LXCs, Raspberry Pi3 (als CCU), Zigbee-Stick Sonoff, Synology DS918+

                  1 Reply Last reply
                  0
                  • K Online
                    K Online
                    Kueppert
                    wrote on last edited by Kueppert
                    #118

                    Hmmmm....hab nur jetzt, wo ich in die InfluxDB schreiben will, echt bei jedem Objekt, das ich logge, Fehlermeldungen im LOG :(

                    influxdb.0 2021-06-08 22:11:28.416	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:11:28.413	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T20:11:28.392Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:11:28.310	warn	Add alias.0.Spritpreise.ESSODiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:11:28.308	warn	Error on writePoint("{"value":"1,32","time":"2021-06-08T20:11:28.238Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.ESSODiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.ESSODiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:10:16.094	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:10:16.093	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T20:01:28.348Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:10:16.070	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:10:16.069	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T19:56:28.376Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:10:16.039	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:10:16.038	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T19:51:28.283Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:10:16.007	warn	Try to write 3 Points separate to find the conflicting one
                    influxdb.0 2021-06-08 22:10:16.006	warn	Error on writePoints for alias.0.Spritpreise.JETDiesel: Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=3"}
                    influxdb.0 2021-06-08 22:10:15.982	warn	Add alias.0.Spritpreise.ESSODiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:10:15.980	warn	Error on writePoint("{"value":"1,32","time":"2021-06-08T20:01:28.220Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.ESSODiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.ESSODiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:10:15.952	warn	Add alias.0.Spritpreise.ESSODiesel to conflicting Points (4 now)
                    influxdb.0 2021-06-08 22:10:15.945	warn	Error on writePoint("{"value":"1,32","time":"2021-06-08T19:56:28.229Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.ESSODiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.ESSODiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                    influxdb.0 2021-06-08 22:10:15.476	warn	Error on writePoint("{"value":true,"time":"2021-06-08T20:06:06.182Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Steckdosen.Serverschrank\" is type boolean, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Steckdosen.Serverschrank\\\" is type boolean, already exists as type float dropped=1\"}\n"
                    

                    Hab nur einige wenige gepostet...wie bekomm ich das behoben?

                    UDM Pro, Intel NUC - ioBroker in Proxmox-VM, PiHole+Grafana&Influx+TasmoAdmin in LXCs, Raspberry Pi3 (als CCU), Zigbee-Stick Sonoff, Synology DS918+

                    JackGruberJ 1 Reply Last reply
                    0
                    • K Kueppert

                      Hmmmm....hab nur jetzt, wo ich in die InfluxDB schreiben will, echt bei jedem Objekt, das ich logge, Fehlermeldungen im LOG :(

                      influxdb.0 2021-06-08 22:11:28.416	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:11:28.413	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T20:11:28.392Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:11:28.310	warn	Add alias.0.Spritpreise.ESSODiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:11:28.308	warn	Error on writePoint("{"value":"1,32","time":"2021-06-08T20:11:28.238Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.ESSODiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.ESSODiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:10:16.094	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:10:16.093	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T20:01:28.348Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:10:16.070	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:10:16.069	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T19:56:28.376Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:10:16.039	warn	Add alias.0.Spritpreise.JETDiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:10:16.038	warn	Error on writePoint("{"value":"1,29","time":"2021-06-08T19:51:28.283Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.JETDiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:10:16.007	warn	Try to write 3 Points separate to find the conflicting one
                      influxdb.0 2021-06-08 22:10:16.006	warn	Error on writePoints for alias.0.Spritpreise.JETDiesel: Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.JETDiesel\" is type string, already exists as type float dropped=3"}
                      influxdb.0 2021-06-08 22:10:15.982	warn	Add alias.0.Spritpreise.ESSODiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:10:15.980	warn	Error on writePoint("{"value":"1,32","time":"2021-06-08T20:01:28.220Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.ESSODiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.ESSODiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:10:15.952	warn	Add alias.0.Spritpreise.ESSODiesel to conflicting Points (4 now)
                      influxdb.0 2021-06-08 22:10:15.945	warn	Error on writePoint("{"value":"1,32","time":"2021-06-08T19:56:28.229Z","from":"system.adapter.tankerkoenig.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Spritpreise.ESSODiesel\" is type string, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Spritpreise.ESSODiesel\\\" is type string, already exists as type float dropped=1\"}\n"
                      influxdb.0 2021-06-08 22:10:15.476	warn	Error on writePoint("{"value":true,"time":"2021-06-08T20:06:06.182Z","from":"system.adapter.sonoff.0","q":0,"ack":true}): Error: {"error":"partial write: field type conflict: input field \"value\" on measurement \"alias.0.Steckdosen.Serverschrank\" is type boolean, already exists as type float dropped=1"} / "{\"error\":\"partial write: field type conflict: input field \\\"value\\\" on measurement \\\"alias.0.Steckdosen.Serverschrank\\\" is type boolean, already exists as type float dropped=1\"}\n"
                      

                      Hab nur einige wenige gepostet...wie bekomm ich das behoben?

                      JackGruberJ Offline
                      JackGruberJ Offline
                      JackGruber
                      wrote on last edited by
                      #119

                      @kueppert
                      Es schaut so aus, als ob system.adapter.tankerkoenig mal strings und mal float values enthält und dies natürlich nicht in ein schema passen.

                      Du könntest mir einen export aus der MySQL zukommen lassen. Die ID (Angezeigt beim start des jeweiligen imports) kannst du für eine WHERE bedingung beim Datenexport nutzen.

                      K 1 Reply Last reply
                      0
                      • JackGruberJ JackGruber

                        @kueppert
                        Es schaut so aus, als ob system.adapter.tankerkoenig mal strings und mal float values enthält und dies natürlich nicht in ein schema passen.

                        Du könntest mir einen export aus der MySQL zukommen lassen. Die ID (Angezeigt beim start des jeweiligen imports) kannst du für eine WHERE bedingung beim Datenexport nutzen.

                        K Online
                        K Online
                        Kueppert
                        wrote on last edited by Kueppert
                        #120

                        @jackgruber hab vermutlich den Fehler gefunden. Ich hab im Alias den "." zu einem "," konvertiert und den Typ auf string stehen gehabt...hab die Konvertierung jetzt rausgenommen und auf number umgestellt. Sollte das reichen? Entspricht das einem float?
                        Wenn nein, lösche ich wieder die InfluxDB (das measurement) und importiere nochmal alles neu...
                        Danke dir und vG. Thorsten :)

                        NACHTRAG: Tankerkönig schreibt wirklich nen String in seine Objekte beim Spritpreis, ich konvertiere zu number im Alias :/ Kann ich dir "einfach" aus phpMyAdmin einen Export zukommen lassen? Ich weiß nur nicht, wie ich zB nur die Spritpreise da raus bekomme ^^ Hab aktuell 3Mio Datensätze, viele wollte ich in der Influx nach "Migration" löschen. Aber den string vom Tankerkönig bekomm ich ja nicht mit meinen ALias-Werten (number) gemerged so ohne weiteres...

                        UDM Pro, Intel NUC - ioBroker in Proxmox-VM, PiHole+Grafana&Influx+TasmoAdmin in LXCs, Raspberry Pi3 (als CCU), Zigbee-Stick Sonoff, Synology DS918+

                        JackGruberJ 1 Reply Last reply
                        0
                        • K Kueppert

                          @jackgruber hab vermutlich den Fehler gefunden. Ich hab im Alias den "." zu einem "," konvertiert und den Typ auf string stehen gehabt...hab die Konvertierung jetzt rausgenommen und auf number umgestellt. Sollte das reichen? Entspricht das einem float?
                          Wenn nein, lösche ich wieder die InfluxDB (das measurement) und importiere nochmal alles neu...
                          Danke dir und vG. Thorsten :)

                          NACHTRAG: Tankerkönig schreibt wirklich nen String in seine Objekte beim Spritpreis, ich konvertiere zu number im Alias :/ Kann ich dir "einfach" aus phpMyAdmin einen Export zukommen lassen? Ich weiß nur nicht, wie ich zB nur die Spritpreise da raus bekomme ^^ Hab aktuell 3Mio Datensätze, viele wollte ich in der Influx nach "Migration" löschen. Aber den string vom Tankerkönig bekomm ich ja nicht mit meinen ALias-Werten (number) gemerged so ohne weiteres...

                          JackGruberJ Offline
                          JackGruberJ Offline
                          JackGruber
                          wrote on last edited by
                          #121

                          @Kueppert

                          Ersetz das XYZ durch die ID aus der python ausgabe und führ beide Querys unter SQL im PhPMyAdmin aus.

                          SELECT * FROM ts_string WHERE id = XYZ LIMIT 0, 100
                          
                          SELECT * FROM datapoints WHERE id = XYZ
                          

                          Dann für beide abfragen ganz unten auf der Seite Operationen für das Abfrageergebnis > Exportieren wählen.

                          Dann kann ich es mir anschauen und evtl. ne Option reinbauen um Datensätze zu konvertieren.

                          1 Reply Last reply
                          1
                          • K Online
                            K Online
                            Kueppert
                            wrote on last edited by Kueppert
                            #122

                            @jackgruber danke dir für deine Rückmeldung. Ich habe herausgefunden, dass die Fehlermeldungen "nur" kamen bei neuen Eintragungen in die InfluxDB, die ich im Alias-DP falsch konvertiert hatte. Hab im ALias auf Zahl umgestellt und voila, InfluxDB schmeißt keine Fehler mehr :)
                            Bin gerade dabei in der Konsole alle Maisurements zusammenzuführen, die zusammen gehören (hab zu oft die Bezeichnungen gewechselt). Werde zukünftig nur noch die Alias-Objekte loggen und dahinterliegende Geräte, sofern nötig, austauschen. Dann bleibt es immer bei der gleichen Bezeichnung.
                            DANKE für dein tolles Skript für den Import in InfluxDB :+1: :+1: :+1: :+1:

                            UDM Pro, Intel NUC - ioBroker in Proxmox-VM, PiHole+Grafana&Influx+TasmoAdmin in LXCs, Raspberry Pi3 (als CCU), Zigbee-Stick Sonoff, Synology DS918+

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              schweigel
                              wrote on last edited by
                              #123

                              Hallo,

                              erstmal vielen Dank für das Skript.

                              ts_numeric lässt sich ohne Probleme überführen, aber mit bool gibt es Probleme. Scheinbar sind die Daten in der Quelle nicht als bool sondern als float abgelegt. Daher wird eine Konvertierung nach boolean benötigt. Was muss an dem Skript angepasst werden, damit ts_bool vor der Überführung entsprechen konvertiert wird?

                              Total metrics in ts_bool: 1
                              wolf.0.cwl.158(ID: 98) (1/1)
                              Processing row 1 to 1,000 from LIMIT 0 / 100,000 ts_bool - wolf.0.cwl.158 (1/1)
                              InfluxDB error
                              400: {"error":"partial write: field type conflict: input field \"value\" on measurement \"wolf.0.cwl.158\" is type float, already exists as type boolean dropped=200"}
                              

                              Grüße

                              JackGruberJ 1 Reply Last reply
                              0
                              • S schweigel

                                Hallo,

                                erstmal vielen Dank für das Skript.

                                ts_numeric lässt sich ohne Probleme überführen, aber mit bool gibt es Probleme. Scheinbar sind die Daten in der Quelle nicht als bool sondern als float abgelegt. Daher wird eine Konvertierung nach boolean benötigt. Was muss an dem Skript angepasst werden, damit ts_bool vor der Überführung entsprechen konvertiert wird?

                                Total metrics in ts_bool: 1
                                wolf.0.cwl.158(ID: 98) (1/1)
                                Processing row 1 to 1,000 from LIMIT 0 / 100,000 ts_bool - wolf.0.cwl.158 (1/1)
                                InfluxDB error
                                400: {"error":"partial write: field type conflict: input field \"value\" on measurement \"wolf.0.cwl.158\" is type float, already exists as type boolean dropped=200"}
                                

                                Grüße

                                JackGruberJ Offline
                                JackGruberJ Offline
                                JackGruber
                                wrote on last edited by JackGruber
                                #124

                                @schweigel was für float werte stehen in der ts_bool für den Datenpunkt?

                                SELECT * FROM ts_bool WHERE id = 98 AND val != 0 AND val != 1 LIMIT 0, 10;
                                
                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  schweigel
                                  wrote on last edited by
                                  #125

                                  @JackGruber Es sind nur 0 und 1 enthalten, deine Abfrage liefert also keine Zeilen zurück.

                                  JackGruberJ 1 Reply Last reply
                                  0
                                  • S schweigel

                                    @JackGruber Es sind nur 0 und 1 enthalten, deine Abfrage liefert also keine Zeilen zurück.

                                    JackGruberJ Offline
                                    JackGruberJ Offline
                                    JackGruber
                                    wrote on last edited by
                                    #126

                                    @schweigel
                                    Du hast in der InfluxDB bereits daten vom selben messpunkt, die float (Zahlen mit nachkommastellen) sind. Diese in bool (Wahrheitswerte) zu konvertieren macht eigentlich kein Sin.

                                    Aber du kannst versuchen das Script für dich anzupassen.
                                    Füge soetwas wie fields["value"] = float(record["value"]),nach Zeile 108 ein, dann wird versucht alle Werte in float zu wandeln.

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      schweigel
                                      wrote on last edited by
                                      #127

                                      @JackGruber
                                      Mmh, das hat nicht ganz geklappt.
                                      Habe es versucht, dann kam folgende Fehlermeldung:

                                      wolf.0.cwl.158(ID: 98) (1/1)
                                      Processing row 1 to 1,000 from LIMIT 0 / 100,000 ts_bool - wolf.0.cwl.158 (1/1)
                                      InfluxDB error
                                      400: {"error":"partial write: field type conflict: input field \"value\" on measurement \"wolf.0.cwl.158\" is type float, already exists as type boolean dropped=219"}
                                      

                                      Dachte auch das die Daten in MySQL in float sind und ich diese nach InfluxDB als boolean überführen muss, also habe ich die Zeile angepasst:

                                      fields["value"] = bool(record["value"])
                                      

                                      Zu meiner Überraschung bekam ich dann folgende Meldung:

                                      wolf.0.cwl.158(ID: 98) (1/1)
                                      Processing row 1 to 1,000 from LIMIT 0 / 100,000 ts_bool - wolf.0.cwl.158 (1/1)
                                      InfluxDB error
                                      400: {"error":"partial write: field type conflict: input field \"value\" on measurement \"wolf.0.cwl.158\" is type boolean, already exists as type float dropped=148"}
                                      

                                      Nun war ich verwundert, ist value nun ein float oder ein boolean in InfluxDB? Also habe ich mir den Aufbau in Influx angesehen mit folgendem Ergebnis:

                                      name: wolf.0.cwl.158
                                      fieldKey fieldType
                                      -------- ---------
                                      ack      boolean
                                      from     string
                                      q        float
                                      value    boolean
                                      value    float
                                      

                                      value gibt es zweimal. Für mein Verständnis sollte es nur einmal da sein. Muss ich da die InfluxDB erst fixen?

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        schweigel
                                        wrote on last edited by
                                        #128

                                        Habe den Messwert nun aus der DB gelöscht und ihn über den Adapter in iobroker neu angelegt. Nun hat er nur noch einen value als boolean. Damit war der Datentransfer nun möglich.

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          schweigel
                                          wrote on last edited by
                                          #129

                                          Hatte nun noch weitere Probleme:

                                          Daten waren in MySQL und in InfluxDB als unterschiedliche Formate gespeichert und teilweise hatten sich in MySQL die Datentypen über die Zeit geändert, sodass ein Messwert in mehreren Datentabellen (z.B. ts_number & ts_string) vorhanden war.
                                          Da das Skript den Datentyp über die Quelltabelle ermittelt (ts_number => Zahl, ts_bool => Wahrheitswert, ts_string => Zeichenfolge) führt dieses zu Problemen.
                                          In der Übersichtstabelle (datapoints) gibt es nur eine Angabe des Datentypes. Diese ist in meinen Auge der aktuell gewünschte Datentyp. Daher habe ich das Skript um eine Abfrage des Datentypes aus datapoints erweitert und eine Konvertierung in diesen Datentyp eingebaut.
                                          Nun können Daten z.B. in den Tabellen ts_string und ts_number vorliegen. Bei der Migration werden die Daten dann in den Datentyp konvertiert, der in datapoints angegeben ist.
                                          Damit reicht es das InfluxDB und MySQL für jeden Wert den gleichen Datentypen verwenden.

                                          Da ich früher meist als Datentyp "Automatisch" angegeben hatte, konnte dieses hier zu Problemen führen. Nach dem ich alle Datentypen händisch gerade gezogen habe, teilweise direkt in der MySQL-Datenbank, funktionierte die Migration mit der Skriptanpassung problemlos.

                                          Meine Änderungen des Skriptes sind in einem Fork abgelegt und einen Pull request habe ich gestellt.

                                          Aus meiner Sicht könnte man nun noch als Anpassung vornehmen, das er den gewünschten Datentypen nicht aus der MySQL-Datenbank bezieht, sondern aus der InfluxDB, wenn man vorher den Wert dort bereits über iobroker eingefügt hat.

                                          In Summe nochmal danke für das Skript, es hat mir sehr weiter geholfen.

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

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

                                          903

                                          Online

                                          32.4k

                                          Users

                                          81.5k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe