Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. [Aufruf] BLE Adapter testen (v0.6.0)

    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

    [Aufruf] BLE Adapter testen (v0.6.0)

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

      Dann machst du am besten einen neuen Thread dazu auf 😉

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

        Hallo zusammen,

        bei mir findet er zwar das @abandonware/bluetooth-hci socket, aber er sagt mir schon wieder falsche node Version. (Siehe Anhang)

        Ich dachte es gäbe jetzt Node10 Support? Sorry bin immer noch Anfänger mit Linux. Was mache ich hier falsch?

        Ich hab nochmal neu installiert.

        Bei der Installation kommt tatsächlich auch eine Fehlermeldung bei Bluetooth. Werde da aber nicht draus schlau. Bzw. weiß nicht was ich tun soll.

        $ ./iobroker add ble  --host phoscon
        NPM version: 6.5.0
        npm install iobroker.ble --production --save --prefix "/opt/iobroker" (System call)
        ../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:979: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.14.2/include/node/node.h:63:0,
                         from /root/.node-gyp/10.14.2/include/node/node_buffer.h:25,
                         from ../src/BluetoothHciSocket.cpp:7:
        /root/.node-gyp/10.14.2/include/node/v8.h:3993: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.14.2/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
        /root/.node-gyp/10.14.2/include/node/v8.h:3996: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.14.2/include/node/v8.h:3996: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:979:46: note: declared here
           NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback(
                                                      ^~~~~~~~~~~~
        ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
        ../src/BluetoothHciSocket.cpp:395:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
               devId = arg0->IntegerValue();
                                          ^
        In file included from /root/.node-gyp/10.14.2/include/node/v8.h:26:0,
                         from /root/.node-gyp/10.14.2/include/node/node.h:63,
                         from /root/.node-gyp/10.14.2/include/node/node_buffer.h:25,
                         from ../src/BluetoothHciSocket.cpp:7:
        /root/.node-gyp/10.14.2/include/node/v8.h:2476:46: note: declared here
           V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
                                                      ^
        /root/.node-gyp/10.14.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
           declarator __attribute__((deprecated(message)))
           ^~~~~~~~~~
        ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
        ../src/BluetoothHciSocket.cpp:417:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
               devId = arg0->IntegerValue();
                                          ^
        In file included from /root/.node-gyp/10.14.2/include/node/v8.h:26:0,
                         from /root/.node-gyp/10.14.2/include/node/node.h:63,
                         from /root/.node-gyp/10.14.2/include/node/node_buffer.h:25,
                         from ../src/BluetoothHciSocket.cpp:7:
        /root/.node-gyp/10.14.2/include/node/v8.h:2476:46: note: declared here
           V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
                                                      ^
        /root/.node-gyp/10.14.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
           declarator __attribute__((deprecated(message)))
           ^~~~~~~~~~
        
        make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
        gyp
         ERR! build error 
        gyp ERR! stack Error: `make` failed with exit code: 2gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
        gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
        gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
        
        gyp ERR! System Linux 4.14.79-v7+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 /opt/iobroker/node_modules/noble/node_modules/bluetooth-hci-socket
        gyp ERR! node -v v10.14.2
        gyp ERR! node-gyp -v v3.8.0
        gyp ERR! not ok 
        
        npm
         WARN enoent ENOENT: no such file or directory, open '/opt/iobroker/node_modules/bluetooth-hci-socket/package.json'
        npm 
        WARN babel-eslint@5.0.4 requires a peer of eslint@<2.3.0 but none is installed. You must install peer dependencies yourself.
        npm
         WARN
         optional
         SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 (node_modules/noble/node_modules/bluetooth-hci-socket):
        npm WARN
         optional SKIPPING OPTIONAL DEPENDENCY: bluetooth-hci-socket@0.5.1 install: `node-gyp rebuild`npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
        
        host.phoscon install adapter ble
        got /opt/iobroker/node_modules/iobroker.ble/admin
        upload [2] ble.admin /opt/iobroker/node_modules/iobroker.ble/admin/words.js words.js application/javascript
        upload [1] ble.admin /opt/iobroker/node_modules/iobroker.ble/admin/index.html index.html text/html
        upload [0] ble.admin /opt/iobroker/node_modules/iobroker.ble/admin/ble.png ble.png image/png
        host.phoscon object system.adapter.ble created
        host.phoscon create instance ble
        host.phoscon object ble.0.options.allowNewDevices created
        host.phoscon object ble.0.options created
        host.phoscon object ble.0.info.driverState created
        host.phoscon object ble.0.info.connection created
        host.phoscon object ble.0.info created
        host.phoscon object system.adapter.ble.0.outputCount created
        host.phoscon object system.adapter.ble.0.inputCount created
        host.phoscon object system.adapter.ble.0.uptime created
        host.phoscon object system.adapter.ble.0.memRss created
        host.phoscon object system.adapter.ble.0.memHeapTotal created
        host.phoscon object system.adapter.ble.0.memHeapUsed created
        host.phoscon object system.adapter.ble.0.connected created
        host.phoscon object system.adapter.ble.0.alive created
        host.phoscon object system.adapter.ble.0 created
        process exited with code 0
        
        Fehlermeldung mit falscher Node Version bleibt aber die gleich. 
        
        Lampe im Broker dann auf gelb
        
        Gruss
          [10504_bleadapter.jpg](/assets/uploads/files/10504_bleadapter.jpg)</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
        • AlCalzone
          AlCalzone Developer last edited by

          Nach einem NodeJS-Update kommst du um eine Neukompilierung der nativen Module nicht herum.

          Das kannst du erledigen mit

          cd /opt/iobroker
          npm rebuild
          
          

          Das wird eine Weile dauern.

          Außerdem ist scheinbar noch eine alte Version des Adapters installiert. Bitte mal komplett löschen und neu installieren:

          iobroker del ble
          iobroker add ble
          
          
          1 Reply Last reply Reply Quote 0
          • S
            Shaky79 last edited by

            Danke schonmal . Rebuild wirft mir direkt ein paar EAccess Fehlermeldungen raus. Mach ich das auch mit diesem unsafe perm oder kann ich da sudo verwenden

            Gesendet von iPhone mit Tapatalk

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

              @Shaky79:

              Mach ich das auch mit diesem unsafe perm oder kann ich da sudo verwenden `
              Nein und nein!

              ==> Bitte viewtopic.php?f=8&t=19209 lesen

              Wenn in den Meldungen auch

              scandir '/root/.npm/_logs' 
              

              auftaucht, dann hilft Punkt 4 aus dem Link.

              Sonst nochmal die Meldungen posten.

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

                ** Update: Hat sich glaub ich erledigt. Fehlercode gibt es zwar immer noch, aber der Rebuild läuft atm durch*

                pi@phoscon:~ $ cd /opt/iobroker
                pi@phoscon:/opt/iobroker $ npm rebuild
                
                > iobroker@1.3.1 install /opt/iobroker/node_modules/iobroker
                > node lib/checkVersions.js
                
                NPM version: 6.5.0
                
                > iobroker@1.3.1 postinstall /opt/iobroker/node_modules/iobroker
                > node lib/install.js
                
                fs.js:115
                    throw err;
                    ^
                
                Error: EACCES: permission denied, unlink '/opt/iobroker/LICENSE'
                    at Object.unlinkSync (fs.js:952:3)
                    at mayCopyFile (/opt/iobroker/node_modules/fs-extra/lib/copy-sync/copy-sync.js:57:8)
                    at onFile (/opt/iobroker/node_modules/fs-extra/lib/copy-sync/copy-sync.js:52:10)
                    at getStats (/opt/iobroker/node_modules/fs-extra/lib/copy-sync/copy-sync.js:46:44)
                    at startCopy (/opt/iobroker/node_modules/fs-extra/lib/copy-sync/copy-sync.js:36:10)
                    at Object.copySync (/opt/iobroker/node_modules/fs-extra/lib/copy-sync/copy-sync.js:31:10)
                    at Object.copyFilesRecursiveSync (/opt/iobroker/node_modules/iobroker/lib/tools.js:591:12)
                    at copyFilesToRootDir (/opt/iobroker/node_modules/iobroker/lib/installCopyFiles.js:29:11)
                    at Object. <anonymous>(/opt/iobroker/node_modules/iobroker/lib/installCopyFiles.js:14:1)
                    at Module._compile (internal/modules/cjs/loader.js:689:30)
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! iobroker@1.3.1 postinstall: `node lib/install.js`
                npm ERR! Exit status 1
                npm ERR! 
                npm ERR! Failed at the iobroker@1.3.1 postinstall 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!     /home/pi/.npm/_logs/2018-12-29T09_02_20_981Z-debug.log
                pi@phoscon:/opt/iobroker $</anonymous> 
                

                Das sind die Fehlermeldungen . Kein scandir dabei

                Danke schonmal für deine Hilfe

                Gesendet von iPhone mit Tapatalk

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

                  Öhhhh das versucht das iobrokerpaket neu zu installieren und bricht dann ab… Geht folgendes?

                  cd /opt/iobroker
                  ./reinstall.sh
                  
                  

                  Gesendet von unterwegs

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

                    Also irgendwie wird es immer kurioser:

                    npm rebuild ist jetzt durchgelaufen
                    

                    bis es zu folgendem Fehler kommt:

                    bufferutil.target.mk:101: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed
                    make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
                    make: Leaving directory '/opt/iobroker/node_modules/bufferutil/build'
                    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:262:23)
                    gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
                    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
                    gyp ERR! System Linux 4.14.79-v7+
                    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 /opt/iobroker/node_modules/bufferutil
                    gyp ERR! node -v v10.14.2
                    gyp ERR! node-gyp -v v3.8.0
                    gyp ERR! not ok
                    npm ERR! code ELIFECYCLE
                    npm ERR! errno 1
                    npm ERR! bufferutil@1.1.0 install: `node-gyp rebuild`
                    npm ERR! Exit status 1
                    npm ERR!
                    npm ERR! Failed at the bufferutil@1.1.0 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!     /home/pi/.npm/_logs/2018-12-29T11_02_07_683Z-debug.log
                    
                    

                    Hab danach trotzdem mal iobroker gestartet und siehe da: im Log gibt es keine Fehlermeldungen vom BLE Adapter mehr. Trotzdem bleibt er aber auf "gelb"

                    Muss noch was testen, dann melde ich mich nochmal
                    10504_ble2.jpg

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

                      Was sagt der state Info.driverState?

                      Gesendet von unterwegs

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

                        so langsam werde ich weich:

                        unhandled promise rejection: Error: The module '/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node' was compiled against a different Node.js version using NODE_MODUL
                        

                        Die Fehlermeldung kommt jetzt doch wieder beim Broker.

                        Das heißt wahrscheinlich, dass mein rebuild nicht bis zu dem node_module gekommen ist.

                        Irgendeine Idee wie ich das Problem mit der Fehlermeldung beim "bufferutil" wegbekomme?

                        Oder kann ich irgendwie nur das eine module rebuilden?

                        Gruss

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

                          cd /opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket 
                          npm rebuild 
                          
                          

                          Gesendet von unterwegs

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

                            Sorry für die Anfängerfragen [emoji3]

                            Jetzt kann ich dir auch deine Frage zum state beantworten.

                            Also Adapter ist gelb und bluetooth driver stater ist unauthorized

                            Gesendet von iPhone mit Tapatalk

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

                              Ok, wahrscheinlich einfach von mir dumm, aber ich hab in den Adaptereinstellungen die Updatezeit auf 1000ms gestellt und jetzt ist er grün?

                              So jetzt meine nächste dumme Frage:

                              Kann ich da jetzt theoretisch mein Iphone, bzw. meine "Tile Pro" Bluetooth Tracker einbinden?

                              Bzw. er legt keine Geräte an, die er findet.

                              Müsste ja ne Menge in meinem Haus da sein.

                              Update: Das war ein kurzes Vergnügen. Nach einem Neustart hat erstmal wieder alles nicht funktioniert.

                              Mir ist jetzt aufgefallen, dass ich offensichtlich den IObroker immer unter sudo im Autostart habe und da ist der ganze Kram mit "Falsche Node Version" noch drin.

                              Habe den Iobroker dann gestoppt und einfach einen ohne "Sudo" gestartet.

                              Da bekomme ich wieder keine Fehlermeldung bezüglich "Node" Version, aber jetzt ist der Adapter wieder "gelb" .

                              Ich werd wahnsinnig 😉

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

                                Ok neue Erkenntnis,

                                der BLE-Adapter springt auf grün sobald ich per Konsole````
                                sudo hcitool lesecan

                                anmache.
                                
                                In der Konsole stehen dann auch einige Mac-Adressen, aber im iobroker unter Objekte wird trotzdem nichts hinzugefügt.
                                
                                Sobald ich den hcitool lesecan beende und ich den Adapter neu starte geht die Lampe auch wieder nur auf gelb.
                                
                                Könnt ihr euch das erklären?
                                
                                Gruss
                                1 Reply Last reply Reply Quote 0
                                • Deanna4711
                                  Deanna4711 last edited by

                                  @Shaky79:

                                  der BLE-Adapter springt auf grün sobald ich per Konsole````
                                  sudo hcitool lesecan

                                  anmache.
                                  
                                  In der Konsole stehen dann auch einige Mac-Adressen, aber im iobroker unter Objekte wird trotzdem nichts hinzugefügt.
                                  
                                  Sobald ich den hcitool lesecan beende und ich den Adapter neu starte geht die Lampe auch wieder nur auf gelb. `  
                                  

                                  Ich habe genau das selbe Verhalten. Ich suche schon seit 2 Wochen nach einer Lösung. Welches OS hast Du laufen?

                                  Bei mir läuft Armbian auf einem RockPi4. Ich nehme an, dass die BT Treiber das Problem sind.

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

                                    Ich hab Raspbian drauf.

                                    Hab das zusammen mit dem Raspbee Stick +Deconz Software von Dresden-Elektronik runtergeladen.

                                    Fügt er bei dir auch keine Geräte hinzu?

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

                                      Mir ist noch eine Sache aufgefallen. Bei mir scheint über das iobroker admin-gui nicht die aktuellste Version des iobroker.ble installiert zu werden.

                                      Ist mir aufgefallen, weil ich das /src Verzeichnis im iobroker.ble garnicht hatte. Und das brauche ich ja auch offensichtlich um diese "forked" noble Variante für Node10 zu nutzen. Habe das jetzt mal versucht direkt über

                                      npm install https://github.com/AlCalzone/ioBroker.ble/tarball/master
                                      

                                      zu installieren.

                                      Legt dann aber keine Instanzen an und hat zumindest irgendeine Fehlermeldung bei der Installation ausgespuckt.

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

                                        @Shaky79:

                                        Fügt er bei dir auch keine Geräte hinzu? `
                                        Nein. Führe ich````
                                        sudo hcitool lesecan

                                        
                                        ![](%5Battachment=0%5DTerminal%20lescan.JPG%5B/attachment%5D)~~![](</s><ATTACHMENT  ![10527_terminal_lescan.jpg](/assets/uploads/files/10527_terminal_lescan.jpg)  )~~[attachment=0]~~Terminal lescan.JPG[/attachment]" />Alles wird gestartet, in der Konsole werden die Geräte gefunden, im ioBroker Log sieht auch alles gut aus (meine ich :?: )
                                        
                                        ![](%5Battachment=1%5DBLE_Log.JPG%5B/attachment%5D)~~![](</s><ATTACHMENT  ![10527_ble_log.jpg](/assets/uploads/files/10527_ble_log.jpg)  )~~[attachment=1]~~BLE_Log.JPG[/attachment]" /> aber er findet eben nichts.~~~~
                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Shaky79 last edited by

                                          Ja wie bei mir

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

                                            Npm install legt auch keine Instanzen an. Das musst du selbst machen.

                                            0.6.0 ist noch nicht im stable repo sondern latest, deswegen siehst du es nicht. Und irgendwie bekomme ich das Gefühl dass du zwei node Versionen hast oder anderweitig die Installation verkorkst ist.

                                            Hast du nach der aktuellsten Anleitung installiert?

                                            Gesendet von unterwegs

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            578
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            59
                                            370
                                            65809
                                            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