Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. npm raspi-i2c modul ladefehler

    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

    npm raspi-i2c modul ladefehler

    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      grooovie @grooovie last edited by

      Bis JavaScript 4.6.17 alles ok

      Gestern Update gemacht auf 4.6.22

      Wieder das gleiche Problem. Alle Schritte angefangen mit iobroker fix bis zur manuellen Installation. Keine Chance. Wirft den hleicht Fehler aus wie weiter oben beschrieben (kann Paket raspi-i2c nicht finden)

      Warum ist es eigentlich so schwer irgendwas mit i2c und iobroker auf dem raspi zu machen. Ich komme mir vor als wäre ich der einzige der Software sucht und vor hat

      Nachdem ich das vor dem Update von js erstellte Image des raspis der im multihost als slave läuft wieder aufgespielt hatte am Master gave ich nichts zurückgesetzt. So läuft es wieder. Sobald ich update die js ist Ende. HABE die ganze Nacht alles mögliche probiert.hilfeee

      AlCalzone 1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer @grooovie last edited by

        @grooovie sagte in npm raspi-i2c modul ladefehler:

        manuellen Installation. Keine Chance. Wirft den hleicht Fehler aus

        Bitte poste mal genau was dabei angezeigt wird.

        G 1 Reply Last reply Reply Quote 0
        • G
          grooovie @AlCalzone last edited by

          @AlCalzone Danke für Deine Antwort.

          Eigentlich das gleiche was Eingangs beschrieben ist.

          Der Witz nun wollte ich es nochmal dokumentieren und posten, also habe ich nochmal das update gemacht, jetzt ist der Fehler weg, ohne das ich irgendwas verändert habe. Ich habe mir am Freitag bis früh um 4 die Haare gerauft.

          Keine Ahnung warum es jetzt geht.

          Bin sprachlos.

          AlCalzone 1 Reply Last reply Reply Quote 1
          • AlCalzone
            AlCalzone Developer @grooovie last edited by AlCalzone

            @grooovie sagte in npm raspi-i2c modul ladefehler:

            bis früh um 4

            Das wirds gewesen sein 😂

            1 Reply Last reply Reply Quote 0
            • UncleSam
              UncleSam Developer last edited by

              @grooovie sagte in npm raspi-i2c modul ladefehler:

              Raspi-I2C in JS zu nutzen

              Hi Grooovie

              Wofür verwendest du das raspi-i2c Modul? Hast du gesehen, dass es einen einen Adapter für I2C gibt?

              https://forum.iobroker.net/topic/7023/adapter-iobroker-i2c

              Falls dort irgend etwas fehlt, lass es mich wissen und ich erweitere den Adapter gerne um die Funktionalität.

              /UncleSam

              G 1 Reply Last reply Reply Quote 0
              • G
                grooovie @UncleSam last edited by

                @UncleSam danke, ja habe ich gesehen, läuft auch bei mir aber da war nur ein Device hinterlegt, der 8fach I2c expander. ich benutze einen SX1509. mit dem Raspii2c modul konnte man direkt auf den bus zugreifen, das war gar nicht schlecht

                Im übrigen funktioniert es immer noch nicht.

                Ich dachte nur alles ist gut, aber die Aktualisierung von JS von 4.6.17 auf 4.6.22 verursacht die Fehler.
                Als ich weiter oben schrieb ich bin sprachlos es geht war der Grund das ich die Aktualisierung nur auf dem Master durchgeführt hatte. Auf dem Slave (Raspi mit i2c Anbindung des SX1509) läuft noch die 4.6.17 Version

                Ich dokumentiere euch das mal

                1.JPG
                aktuell der Slave Version 4.6.17, der Master hat bereits 4.6.22

                2.JPG
                das Script besteht nur noch aus den 2 Zeilen, alles andere ist auskommentiert.
                Script geht prima.

                nun update
                3.JPG
                jetzt läuft auf dem Master UND auf dem Slave 4.6.22

                so, nun wieder script starten:
                4.JPG
                und zack fehler!

                im Log steht:

                javascript.1	2020-08-05 17:17:08.033	error	(13851) at Script.runInContext (vm.js:131:20)
                javascript.1	2020-08-05 17:17:08.032	error	(13851) at script.js.Mein_Haus.ZaehlerRaum.I2C:28:33
                javascript.1	2020-08-05 17:17:08.032	error	(13851) TypeError: Cannot read property 'I2C' of undefined
                javascript.1	2020-08-05 17:17:08.032	error	(13851) ^
                javascript.1	2020-08-05 17:17:08.031	error	(13851) const I2C = require('raspi-i2c').I2C;
                javascript.1	2020-08-05 17:17:08.031	error	(13851) script.js.Mein_Haus.ZaehlerRaum.I2C: script.js.Mein_Haus.ZaehlerRaum.I2C:28
                javascript.1	2020-08-05 17:17:08.028	error	(13851) at Script.runInContext (vm.js:131:20)
                javascript.1	2020-08-05 17:17:08.028	error	(13851) at script.js.Mein_Haus.ZaehlerRaum.I2C:28:13
                javascript.1	2020-08-05 17:17:08.027	error	(13851) at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:390:36)
                javascript.1	2020-08-05 17:17:08.027	error	(13851) at require (internal/modules/cjs/helpers.js:72:18)
                javascript.1	2020-08-05 17:17:08.026	error	(13851) at Module.require (internal/modules/cjs/loader.js:1026:19)
                javascript.1	2020-08-05 17:17:08.025	error	(13851) script.js.Mein_Haus.ZaehlerRaum.I2C: Error: Cannot find module '/opt/iobroker/node_modules/iobroker.javascript/lib/../../raspi-i2c'
                

                das Modul wurde wie ganz oben beschrieben manuell installiert.

                Wenn ich das Image auf den Raspi von vor dem Update einspiele geht es wieder.

                Bitte um Hilfe.

                UncleSam 1 Reply Last reply Reply Quote 0
                • UncleSam
                  UncleSam Developer @grooovie last edited by

                  @grooovie sagte in npm raspi-i2c modul ladefehler:

                  ich benutze einen SX1509

                  Ich habe für den I2C Adapter ein Issue erfasst und werde (sobald die Hardware da ist) den SX1509 implementieren:
                  https://github.com/UncleSamSwiss/ioBroker.i2c/issues/45

                  UncleSamSwiss created this issue in UncleSamSwiss/ioBroker.i2c

                  closed Support for SX1509 #45

                  Homoran G 2 Replies Last reply Reply Quote 1
                  • Homoran
                    Homoran Global Moderator Administrators @UncleSam last edited by

                    @UncleSam sagte in npm raspi-i2c modul ladefehler:

                    und werde (sobald die Hardware da ist) den SX1509 implementieren:

                    Das nenne ich prompten Einsatz!

                    wobei expected delivery in 30-50 days, das deine Reaktionszeit etwas begrenzt 😂

                    1 Reply Last reply Reply Quote 1
                    • G
                      grooovie @UncleSam last edited by

                      @UncleSam
                      das ist ja cool

                      ich habe hier 10 stück, geht es besser wenn ich Dir einen sende? brauche nur Deine Anschrift

                      G 1 Reply Last reply Reply Quote 0
                      • G
                        grooovie @grooovie last edited by

                        was wird mit dem raspi-i2c Modul, ist das jetzt nutzlos seit dem JS update?

                        G 1 Reply Last reply Reply Quote 0
                        • G
                          grooovie @grooovie last edited by

                          es ist bisher immer noch nicht möglich das modul zu laden.

                          ich habe jetzt einen raspi 3b+ in das multihostsystem eingebunden, eine weitere JAVASCCRIPT instanz 4.6.17 installiert

                          doch es ist nicht möglich das modul zu nutzen, er findet es nicht, genau wie oben beschrieben.

                          gibt es denn kein vernünftige möglichkeit? bin ich der einzigste der i2c auf einem raspi in iobroker nutzt?

                          G Glasfaser 2 Replies Last reply Reply Quote 0
                          • G
                            grooovie @grooovie last edited by

                            @UncleSam

                            ich habe versucht den i2c adapter zu benutzen, aber der bricht immer mit fehler ab:

                            host.PoststrasseZentralheizung	2020-10-09 16:45:02.561	info	iobroker exit 25
                            host.PoststrasseZentralheizung	2020-10-09 16:45:01.529	error	iobroker host.PoststrasseZentralheizung Cannot install iobroker.i2c@0.0.6: 1
                            host.PoststrasseZentralheizung	2020-10-09 16:45:01.500	info	iobroker npm ERR! A complete log of this run can be found in:npm ERR! /home/iobroker/.npm/_logs/2020-10-09T14_45_01_465Z-debug.log
                            host.PoststrasseZentralheizung	2020-10-09 16:45:01.453	info	iobroker npm ERR! i2c-bus@1.2.5 install: `node-gyp rebuild`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the i2c-bus@1.2.5 install script.npm ERR! This is probably not a problem with npm. There i
                            host.PoststrasseZentralheizung	2020-10-09 16:45:01.434	info	iobroker npm ERR! code ELIFECYCLEnpm ERR! errno 1
                            host.PoststrasseZentralheizung	2020-10-09 16:45:00.110	info	iobroker gyp ERR! System Linux 5.4.51-v7+gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"gyp ERR! cwd /opt/iobroker/node_modules/i2c-busgyp
                            host.PoststrasseZentralheizung	2020-10-09 16:45:00.107	info	iobroker gyp ERR! stack Error: `make` failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)gyp ERR! stack at Chil
                            host.PoststrasseZentralheizung	2020-10-09 16:45:00.103	info	iobroker ERR! build error
                            host.PoststrasseZentralheizung	2020-10-09 16:45:00.100	info	iobroker gyp
                            host.PoststrasseZentralheizung	2020-10-09 16:45:00.094	info	iobroker make: *** [i2c.target.mk:111: Release/obj.target/i2c/src/i2c.o] Error 1
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.063	info	iobroker In file included from ../src/i2c.cc:107:../src/./writequick.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteQuickSync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writequick.cc:60:32: error: no ma
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.061	info	iobroker In file included from /home/iobroker/.cache/node-gyp/12.19.0/include/node/node.h:67, from ../src/i2c.cc:1:/home/iobroker/.cache/node-gyp/12.19.0/include/node/v8.h:2709:40: no
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.058	info	iobroker In file included from ../src/i2c.cc:107:../src/./writequick.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteQuickAsync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writequick.cc:47:32: error: no m
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.052	info	iobroker In file included from ../src/i2c.cc:106:../src/./writei2cblock.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteI2cBlockSync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writei2cblock.cc:108:32: er
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.048	info	iobroker In file included from /home/iobroker/.cache/node-gyp/12.19.0/include/node/node.h:67, from ../src/i2c.cc:1:/home/iobroker/.cache/node-gyp/12.19.0/include/node/v8.h:2709:40: no
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.045	info	iobroker In file included from ../src/i2c.cc:106:../src/./writei2cblock.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteI2cBlockAsync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writei2cblock.cc:68:32: er
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.039	info	iobroker In file included from ../src/i2c.cc:105:../src/./writeblock.cc:112:39: error: no matching function for call to ‘v8::Value::Uint32Value()’ __u32 length = info[2]->Uint32Value();
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.036	info	iobroker In file included from ../src/i2c.cc:105:../src/./writeblock.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteBlockSync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writeblock.cc:110:32: error: no m
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.033	info	iobroker In file included from /home/iobroker/.cache/node-gyp/12.19.0/include/node/node.h:67, from ../src/i2c.cc:1:/home/iobroker/.cache/node-gyp/12.19.0/include/node/v8.h:2709:40: no
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.030	info	iobroker In file included from ../src/i2c.cc:105:../src/./writeblock.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteBlockAsync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writeblock.cc:70:32: error: no m
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.023	info	iobroker In file included from ../src/i2c.cc:104:../src/./writeword.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteWordSync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writeword.cc:64:32: error: no match
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.020	info	iobroker In file included from /home/iobroker/.cache/node-gyp/12.19.0/include/node/node.h:67, from ../src/i2c.cc:1:/home/iobroker/.cache/node-gyp/12.19.0/include/node/v8.h:2709:40: no
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.017	info	iobroker In file included from ../src/i2c.cc:104:../src/./writeword.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteWordAsync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writeword.cc:49:32: error: no matc
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.013	info	iobroker In file included from ../src/i2c.cc:103:../src/./writebyte.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteByteSync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writebyte.cc:63:32: error: no match
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.010	info	iobroker In file included from /home/iobroker/.cache/node-gyp/12.19.0/include/node/node.h:67, from ../src/i2c.cc:1:/home/iobroker/.cache/node-gyp/12.19.0/include/node/v8.h:2709:40: no
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.006	info	iobroker In file included from ../src/i2c.cc:103:../src/./writebyte.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE WriteByteAsync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./writebyte.cc:49:32: error: no matc
                            host.PoststrasseZentralheizung	2020-10-09 16:44:58.002	info	iobroker In file included from ../src/i2c.cc:102:../src/./setaddr.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE SetAddrSync(Nan::NAN_METHOD_ARGS_TYPE)’:../src/./setaddr.cc:61:32: error: no matching fu
                            host.PoststrasseZentralheizung	2020-10-09 16:44:57.999	info	iobroker /home/iobroker/.cache/node-gyp/12.19.0/include/node/v8.h:2699:8: note: candidate expects 1 argument, 0 providedIn file included from /home/iobroker/.cache/node-gyp/12.19.0/include/node/v8-
                            
                            Thomas Braun UncleSam 2 Replies Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @grooovie last edited by Thomas Braun

                              @grooovie sagte in npm raspi-i2c modul ladefehler:

                              writequick.cc

                              Hast du das Paket libi2c-dev installiert?

                              sudo apt update
                              sudo apt install libi2c-dev build-essential
                              
                              G 2 Replies Last reply Reply Quote 0
                              • G
                                grooovie @Thomas Braun last edited by

                                @Thomas-Braun ```
                                @PoststrasseZentralheizung:~ $ sudo apt update
                                Hit:1 http://archive.raspberrypi.org/debian buster InRelease
                                Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
                                Hit:3 https://deb.nodesource.com/node_12.x buster InRelease
                                Fetched 15.0 kB in 2s (9,911 B/s)
                                Reading package lists... Done
                                Building dependency tree
                                Reading state information... Done
                                All packages are up to date.
                                pi@PoststrasseZentralheizung:~ $ sudo apt install libi2c-dev build-essential
                                Reading package lists... Done
                                Building dependency tree
                                Reading state information... Done
                                build-essential is already the newest version (12.6).
                                libi2c-dev is already the newest version (4.1-1).
                                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                                pi@PoststrasseZentralheizung:~ $ sudo reboot

                                1 Reply Last reply Reply Quote 0
                                • G
                                  grooovie @Thomas Braun last edited by

                                  @Thomas-Braun

                                  das script besteht nur aus einer zeile:

                                  const I2C = require('raspi-i2c').I2C;
                                  
                                  G 1 Reply Last reply Reply Quote 0
                                  • G
                                    grooovie @grooovie last edited by

                                    nach dem starten des scripts bekomme ich das:

                                    17:24:25.123	info	javascript.2 (531) Start javascript script.js.Mein_Haus.Poststrasse.Heizung
                                    17:24:25.143	error	javascript.2 (531) script.js.Mein_Haus.Poststrasse.Heizung: Error: Cannot find module '/opt/iobroker/node_modules/iobroker.javascript/lib/../../raspi-i2c'
                                    17:24:25.146	error	javascript.2 (531) at script.js.Mein_Haus.Poststrasse.Heizung:3:13
                                    17:24:25.151	error	javascript.2 (531) script.js.Mein_Haus.Poststrasse.Heizung: script.js.Mein_Haus.Poststrasse.Heizung:3
                                    17:24:25.155	error	javascript.2 (531) at script.js.Mein_Haus.Poststrasse.Heizung:3:33
                                    17:24:26.060	info	javascript.2 (531) Stop script script.js.Mein_Haus.Poststrasse.Heizung
                                    
                                    G 1 Reply Last reply Reply Quote 0
                                    • G
                                      grooovie @grooovie last edited by

                                      installiert habe ich alles wie von Alcalzone am 13.7. vorgeschlagen. leider ohne erfolg

                                      AlCalzone 1 Reply Last reply Reply Quote 0
                                      • AlCalzone
                                        AlCalzone Developer @grooovie last edited by AlCalzone

                                        @grooovie Es ist vollkommen egal, wie viele Zeilen das Skript hat. Es lädt eine Abhängigkeit, die nicht vollständig installiert ist und dann ist Schicht im Schacht.

                                        @grooovie sagte in npm raspi-i2c modul ladefehler:

                                        installiert habe ich alles wie von Alcalzone am 13.7. vorgeschlagen. leider ohne erfolg

                                        Was ist die vollständige Ausgabe dieser Installation?

                                        AlCalzone 1 Reply Last reply Reply Quote 0
                                        • Glasfaser
                                          Glasfaser @grooovie last edited by

                                          @AlCalzone

                                          @grooovie sagte in npm raspi-i2c modul ladefehler:
                                          ich habe jetzt einen raspi 3b+ in das multihostsystem eingebunden, eine weitere JAVASCCRIPT instanz 4.6.17 installiert
                                          doch es ist nicht möglich das modul zu nutzen,

                                          Kenne mich mit dem Modul nicht aus ... muß das bei einem neuen PI nicht erst in der Rasp Config freigeschaltet werden , oder hat das damit nichts zu tun wegen der Fehlermeldung .

                                          AlCalzone G 2 Replies Last reply Reply Quote 0
                                          • AlCalzone
                                            AlCalzone Developer @Glasfaser last edited by

                                            @Glasfaser glaube das will das Modul selbst machen - was die Installationsprobleme erst verursacht.

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

                                            Support us

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

                                            429
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            i2c module raspi-i2c
                                            6
                                            41
                                            2091
                                            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