Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Gelöst BLE-Adapter startet nach npm-Update nicht mehr

    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

    Gelöst BLE-Adapter startet nach npm-Update nicht mehr

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

      Hallo Spezialisten,

      Der BLE-Adapter lief geraume Zeit zu vollsten Zufriedenheit.

      Nun habe ich, um den Alexa2-Adapter in die Gänge zu bekommen, ein Update von node.js und npm durchgeführt.

      node.js war nur ein winziger Versionssprung, jedoch npm von 3.xxx auf 6.1.0.

      Leider startet der ble-Adapter jetzt nicht mehr, im Log erscheint die Fehlermeldung:

      unhandled promise rejection: Error: Cannot find module 'bluetooth-hci-socket'

      Was habe ich falsch gemacht oder nicht beachtet ?

      Ein:

      sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

      bringt nur den Hinweis "ist schon die neueste Version".

      Admin: 3.4.9

      node.js: 6.14.3

      npm: 6.1.0

      ble: 0.5.2

      schon mal besten Dank für eure Hilfe

      Grüße Ingo

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

        Hallo Cheffe, die Antwort hab ich dir schon mal gegeben 😉

        Kurze Forensuche nach "bluetooth-hci-socket" liefert:

        viewtopic.php?p=148056#p148056

        1 Reply Last reply Reply Quote 0
        • I
          Ingo last edited by

          Danke für die rasche Antwort.

          ich habe schon allerhand probiert, konnte mich auch an deine Hilfestellung erinnern, habe ich schon probiert.

          Führte diesmal leider nicht zum Erfolg.
          ` > Dann musst du das Modul mal suchen und manuell neu installieren.

          Laut deinem Log müsste es in /opt/iobroker/node_modules/bluetooth-hci-socket liegen. `

          Dort kann ich das Modul aber nicht finden.

          Also weiter mit:

          ` > Linux ist aktuell?

          Code: Alles auswählen

          apt update && apt upgrade

          Dann hat er das Modul, aus welchem Grund auch immer, bei dir nicht mit installiert.

          Code: Alles auswählen

          npm install bluetooth-hci-socket

          Würde ich jetzt mal machen. `

          Damit habe ich es damals zum Laufen gehabt.

          apt update && apt upgrade –-> alles auf dem neuesten Stand

          npm install bluetooth-hci-socket ---> diesmal erschlägt mich folgendes Log:

          root@Brix:~# npm install bluetooth-hci-socket
          
          > bluetooth-hci-socket@0.5.1 install /root/node_modules/bluetooth-hci-socket
          > node-gyp rebuild
          
          make: Verzeichnis „/root/node_modules/bluetooth-hci-socket/build“ wird betreten
            CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
          ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
          ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local <v8::value>Nan::MakeCallback(v8::Local<v8::object>, v8::Local<v8::string>, int, v8::Local<v8::value>*)’ is deprecated [-Wdeprecated-declarations]
               Nan::MakeCallback(Nan::New<object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                                         ^
          In file included from ../src/BluetoothHciSocket.cpp:8:0:
          ../../nan/nan.h:950:46: note: declared here
             NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback(
                                                        ^~~~~~~~~~~~
          ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
          ../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local <v8::value>[1])’
             Local <value>error = errorConstructor->NewInstance(1, constructorArgs);
                                                                                  ^
          In file included from /root/.node-gyp/10.6.0/include/node/node.h:63:0,
                           from /root/.node-gyp/10.6.0/include/node/node_buffer.h:25,
                           from ../src/BluetoothHciSocket.cpp:7:
          /root/.node-gyp/10.6.0/include/node/v8.h:3911:44: note: candidate: v8::MaybeLocal <v8::object>v8::Function::NewInstance(v8::Local<v8::context>, int, v8::Local<v8::value>*) const
             V8_WARN_UNUSED_RESULT MaybeLocal <object>NewInstance(
                                                      ^~~~~~~~~~~
          /root/.node-gyp/10.6.0/include/node/v8.h:3911:44: note:   candidate expects 3 arguments, 2 provided
          /root/.node-gyp/10.6.0/include/node/v8.h:3914:44: note: candidate: v8::MaybeLocal <v8::object>v8::Function::NewInstance(v8::Local<v8::context>) const
             V8_WARN_UNUSED_RESULT MaybeLocal <object>NewInstance(
                                                      ^~~~~~~~~~~
          /root/.node-gyp/10.6.0/include/node/v8.h:3914:44: note:   candidate expects 1 argument, 2 provided
          ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local <v8::value>Nan::MakeCallback(v8::Local<v8::object>, v8::Local<v8::string>, int, v8::Local<v8::value>*)’ is deprecated [-Wdeprecated-declarations]
             Nan::MakeCallback(Nan::New<object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                                       ^
          In file included from ../src/BluetoothHciSocket.cpp:8:0:
          ../../nan/nan.h:950:46: note: declared here
             NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback(
                                                        ^~~~~~~~~~~~
          binding.target.mk:95: die Regel für Ziel „Release/obj.target/binding/src/BluetoothHciSocket.o“ scheiterte
          make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Fehler 1
          make: Verzeichnis „/root/node_modules/bluetooth-hci-socket/build“ wird verlassen
          gyp ERR! build error
          gyp ERR! stack Error: `make` failed with exit code: 2
          gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
          gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
          gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
          gyp ERR! System Linux 4.9.0-6-amd64
          gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
          gyp ERR! cwd /root/node_modules/bluetooth-hci-socket
          gyp ERR! node -v v10.6.0
          gyp ERR! node-gyp -v v3.6.2
          gyp ERR! not ok
          npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
          npm WARN root No description
          npm WARN root No repository field.
          npm WARN root No README data
          npm WARN root No license field.
          
          npm ERR! code ELIFECYCLE
          npm ERR! errno 1
          npm ERR! bluetooth-hci-socket@0.5.1 install: `node-gyp rebuild`
          npm ERR! Exit status 1
          npm ERR!
          npm ERR! Failed at the bluetooth-hci-socket@0.5.1 install script.
          npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
          
          npm ERR! A complete log of this run can be found in:
          npm ERR!     /root/.npm/_logs/2018-08-06T15_23_22_317Z-debug.log
          root@Brix:~#
          
          Leider überfordert dies meine Fähigkeiten.
          
          Wäre schön, wenn mir jemand helfen kann.
          
          Grüße Ingo</v8::value></object></v8::value></v8::string></v8::object></v8::value></object></v8::context></v8::object></object></v8::value></v8::context></v8::object></value></v8::value></v8::value></object></v8::value></v8::string></v8::object></v8::value>
          
          1 Reply Last reply Reply Quote 0
          • Stabilostick
            Stabilostick last edited by

            Eventuell zu viel neuester Stand? Node V10.6.0 sagt gyp.

            1 Reply Last reply Reply Quote 0
            • I
              Ingo last edited by

              Hast recht,

              node -v sagt:

              v10.6.0

              Wie krieg ich denn das wieder behoben ???

              Grüße Ingo

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

                1.)

                Das Home-Verzeichnis des Root ist immer falsch für die Installation von Paketen für ioBroker. In deinem Fall sollte das Paket in einem der folgenden Ordner liegen

                /opt/iobroker/node_modules/
                /opt/iobroker/node_modules/iobroker.ble/node_modules
                /opt/iobroker/node_modules/noble/node_modules
                
                

                Falls du es nirgends findest, führe die Installation am besten in /opt/iobroker/node_modules/noble aus.

                2.) NodeJS 10 ist (noch) nicht unterstützt, d.h. du musst zurück auf 6 oder 8: https://github.com/noble/node-bluetooth … /issues/84

                Gestern hast du doch noch geschrieben du hättest 6.x?! Wie hast du denn das Update durchgeführt? Üblicherweise sind die Kommandos zum Installieren einer bestimmten Version sehr ähnlich.

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

                  Zu 2.

                  Würde sagen:

                  apt update && apt upgrade –-> alles auf dem neuesten Stand

                  1 Reply Last reply Reply Quote 0
                  • I
                    Ingo last edited by

                    Moin miteinander,

                    ich habe mich gestern noch durch das Forum und die Dokumentation gelesen und ein Upgrade von nodejs und npm nach folgender Anleitung

                    gemacht:

                    ioBroker.net Installation/Start Plattformen/Betriebssystem Linux Schnellstart (auch Raspberry Pi)

                    alles durchgeführt, inkl. reinstall.

                    Jetzt habe ich:

                    node -v 10.6.0 immer noch

                    nodejs -v 8.11.3

                    npm -v 4.6.1

                    Das Paket liegt in keinem der von dir aufgeführten Verzeichnissen.

                    Ursache dürfte die zu hohe node-Version sein, das ich 'bluetooth-hci-socket' nicht installiert kriege.

                    Liege ich damit richtig, wenn ja, wie krige ich das bloß behoben ???

                    Bin damit echt überfordert….

                    Danke für eure Hilfe

                    Grüße Ingo

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

                      Ich habe mal unseren Experten zu mehreren unterschiedlichen NodeJS-Versionen angeschrieben. Wenn das behoben ist, am besten nochmal iobroker.ble komplett entfernen und neu installieren.

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

                        Was ergibt ?

                        ls -l /usr/bin/node*
                        ls -l /usr/local/bin/node*
                        which node
                        
                        1 Reply Last reply Reply Quote 0
                        • I
                          Ingo last edited by

                          Hallo Paul53,

                          ` > root@Brix:~# ls -l /usr/bin/node*

                          -rwxr-xr-x 1 root root 28723688 Jun 13 02:24 /usr/bin/node

                          lrwxrwxrwx 1 root root 24 Aug 6 19:32 /usr/bin/nodejs -> /etc/alternatives/nodejs

                          root@Brix:~# ls -l /usr/local/bin/node*

                          -rwxr-xr-x 1 root staff 37580656 Jul 29 16:53 /usr/local/bin/node

                          root@Brix:~# which node

                          /usr/local/bin/node

                          root@Brix:~# `

                          Grüße Ingo

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

                            Lösche die Datei node im Verzeichnis /usr/local/bin und ersetze sie durch einen Symlink.

                            rm /usr/local/bin/node
                            ln -s /usr/bin/node /usr/local/bin/node
                            node -v
                            
                            1 Reply Last reply Reply Quote 0
                            • I
                              Ingo last edited by

                              Hallo Paul53,

                              gemacht:

                              ` > Last login: Tue Aug 7 13:32:09 2018 from 192.168.2.113

                              root@Brix:~# rm /usr/local/bin/node

                              root@Brix:~# ln -s /usr/bin/node /usr/local/bin/node

                              root@Brix:~# node -v

                              v8.11.3

                              root@Brix:~# `

                              jetzt konnte ich im Verzeichnis /opt/iobroker/node_modules/

                              > npm install bluetooth-hci-socket

                              installieren.

                              Und der BLE-Adapter läuft !!!!!

                              Und ich bekomme Werte ! Habe hier mehrere Xiaomi-Sensoren dran (die mit dem runden Display).

                              Großartig, Danke Paul !

                              Habe ich 2 Node-Versionen drauf gehabt ???

                              Vielen Dank für deine Hilfe

                              setze es gleich noch auf gelöst

                              Grüße Ingo

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

                                @Ingo:

                                Habe ich 2 Node-Versionen drauf gehabt ??? `

                                Ja 😄 :
                                ` > node -v 10.6.0 immer noch

                                nodejs -v 8.11.3 `

                                1 Reply Last reply Reply Quote 0
                                • I
                                  Ingo last edited by

                                  aha, (trotzdem nicht so richtig versteh) 😉

                                  Aber es löppt !

                                  Danke für eure Hilfe,

                                  Grüße Ingo

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

                                    @Ingo:

                                    aha, (trotzdem nicht so richtig versteh) 😉 `

                                    nodejs und node sollten eigentlich das gleiche Programm ausführen (kommt noch aus der Anfangszeit, wo es nodejs hieß, neuerdings heißt es nur noch node). Deine Logs zeigen aber, dass sie es nicht tun, sondern eins auf Version 10 und eins auf Version 8 zeigt.

                                    1 Reply Last reply Reply Quote 0
                                    • I
                                      Ingo last edited by

                                      war mir absolut nicht klar, das node und nodejs ein und das Selbe sind.

                                      Wieder eine Kleinigkeit gelernt….

                                      Grüße Ingo

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        C1500 last edited by

                                        Servus

                                        ich muss mich hier mal kurz dran hängen

                                        Mein BLE geht nach de einspielen des BackUp nicht mehr bzw. wird nicht grün.

                                        Leider hab ich keinerlei Ahnung was da nicht stimmt.

                                        Aber im die Debug Ausgabe zeigt folgendes:
                                        3443_ble.png

                                        root@rock64:~# node -v
                                        v8.12.0
                                        

                                        und

                                        npm install bluetooth-hci-socket
                                        ````brachte nix
                                        
                                        Hoffentlich kann mir da jemand weiter helfen.
                                        
                                        Gruß Peer
                                        1 Reply Last reply Reply Quote 0
                                        • AlCalzone
                                          AlCalzone Developer last edited by

                                          Hast du zufällig nodejs geupdated, ohne reinstall.sh auszuführen?

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            C1500 last edited by

                                            oder so ähnlich ;o)

                                            Ich hab versucht vom Pi3 zum Rock64 umzuziehen und das über ein BackItUp

                                            Dabei hat er wohl das ein oder andere verschluckt bzw. gab es bei der Vorinstallation von ioBroker schon Unterschiede zur anderen.

                                            Danke für den Tip

                                            Hat jetzt ne gute Stunde gedauert aber es läuft alles wieder

                                            Gruß Peer

                                            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

                                            616
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            21
                                            2175
                                            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